* [PR PATCH] mpv-0.35.0
@ 2022-11-12 22:07 abenson
2022-11-13 0:04 ` mpv-0.35.0 38github
` (19 more replies)
0 siblings, 20 replies; 21+ messages in thread
From: abenson @ 2022-11-12 22:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
There is a new pull request by abenson against master on the void-packages repository
https://github.com/abenson/void-packages mpv_0.35.0
https://github.com/void-linux/void-packages/pull/40497
mpv-0.35.0
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### Local build testing
- I built this PR locally for my native architecture, x86-64
A patch file from https://github.com/void-linux/void-packages/pull/40497.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mpv_0.35.0-40497.patch --]
[-- Type: text/x-diff, Size: 11194 bytes --]
From 24dcd464fcd9a83c58ef7b4b699f0ca5bd009fc7 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:06:05 -0600
Subject: [PATCH 01/10] mpv: update to 0.35.0.
---
common/shlibs | 2 +-
srcpkgs/mpv/template | 23 +++++++++++++----------
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 76512744735e..862bba59babc 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2214,7 +2214,7 @@ librrd.so.8 rrdtool-1.6.0_1
librrd_th.so.4 rrdtool-1.4.9_1
libmosquitto.so.1 libmosquitto-1.6.3_5
libmosquittopp.so.1 libmosquittopp-1.6.3_5
-libmpv.so.1 mpv-0.8.0_2
+libmpv.so.2 mpv-0.35.0_1
libmbedtls.so.12 mbedtls-2.13.1_1
libmbedcrypto.so.3 mbedtls-2.9.0_1
libmbedx509.so.0 mbedtls-2.9.0_1
diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template
index ded8c1bbe98f..9f0991f5f786 100644
--- a/srcpkgs/mpv/template
+++ b/srcpkgs/mpv/template
@@ -1,7 +1,7 @@
# Template file for 'mpv'
pkgname=mpv
-version=0.34.1
-revision=2
+version=0.35.0
+revision=1
build_style=waf3
configure_args="--confdir=/etc/mpv --docdir=/usr/share/examples/mpv
--enable-cdda --enable-dvbin --enable-dvdnav --enable-libarchive
@@ -9,7 +9,8 @@ configure_args="--confdir=/etc/mpv --docdir=/usr/share/examples/mpv
$(vopt_enable jack) $(vopt_enable lcms lcms2) $(vopt_enable lua)
$(vopt_enable openal) $(vopt_enable pulseaudio pulse) $(vopt_enable sdl2)
$(vopt_enable vapoursynth) $(vopt_enable vdpau) $(vopt_enable vulkan)
- $(vopt_enable vulkan shaderc) $(vopt_enable wayland) $(vopt_enable x11)"
+ $(vopt_enable vulkan shaderc) $(vopt_enable wayland) $(vopt_enable x11)
+ $(vopt_enable pipewire)"
hostmakedepends="pkg-config python3-docutils $(vopt_if wayland wayland-devel)"
makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libass-devel libbluray-devel libcdio-paranoia-devel libdvdnav-devel
@@ -17,11 +18,12 @@ makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libarchive-devel $(vopt_if alsa alsa-lib-devel) $(vopt_if caca libcaca-devel)
$(vopt_if jack jack-devel) $(vopt_if lcms lcms2-devel)
$(vopt_if lua lua52-devel) $(vopt_if openal libopenal-devel)
- $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if sdl2 SDL2-devel)
- $(vopt_if vapoursynth vapoursynth-devel) $(vopt_if vdpau libvdpau-devel)
+ $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if pipewire pipewire-devel)
+ $(vopt_if sdl2 SDL2-devel) $(vopt_if vapoursynth vapoursynth-devel)
+ $(vopt_if vdpau libvdpau-devel)
$(vopt_if vulkan "Vulkan-Headers vulkan-loader shaderc libplacebo-devel")
$(vopt_if wayland "wayland-devel wayland-protocols libxkbcommon-devel")
- $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel")"
+ $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel libXpresent-devel")"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Video player based on MPlayer/mplayer2"
maintainer="travankor <travankor@tuta.io>"
@@ -29,15 +31,16 @@ license="GPL-2.0-or-later"
homepage="https://mpv.io"
changelog="https://github.com/mpv-player/mpv/releases"
distfiles="https://github.com/mpv-player/${pkgname}/archive/v${version}.tar.gz"
-checksum=32ded8c13b6398310fa27767378193dc1db6d78b006b70dbcbd3123a1445e746
+checksum=dc411c899a64548250c142bf1fa1aa7528f1b4398a24c86b816093999049ec00
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
-build_options="alsa caca jack lcms lua openal pulseaudio sdl2 vapoursynth vdpau
- vulkan wayland x11"
-build_options_default="alsa jack lcms lua pulseaudio vdpau vulkan wayland x11"
+build_options="alsa caca jack lcms lua openal pulseaudio pipewire sdl2
+ vapoursynth vdpau vulkan wayland x11"
+build_options_default="alsa jack lcms lua pulseaudio pipewire vdpau vulkan
+ wayland x11"
desc_option_caca="Enable support for libcaca video output"
desc_option_lcms="Enable support for LittleCMS 2 engine"
desc_option_openal="Enable support for OpenAL audio output"
From a6a7779825b66fb6f97c8b5705f6f129cc956dac Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 15:18:22 -0600
Subject: [PATCH 02/10] python3-httpcore: update to 0.16.0.
---
srcpkgs/python3-httpcore/template | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/python3-httpcore/template b/srcpkgs/python3-httpcore/template
index 8acb01c63d6f..c7ddf3b28d1f 100644
--- a/srcpkgs/python3-httpcore/template
+++ b/srcpkgs/python3-httpcore/template
@@ -1,18 +1,18 @@
# Template file for 'python3-httpcore'
pkgname=python3-httpcore
-version=0.15.0
-revision=2
+version=0.16.0
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
-depends="python3-h11 python3-sniffio python3-anyio python3-h2 python3-certifi"
+depends="python3-h11 python3-sniffio python3-anyio python3-h2 python3-certifi python3-trio"
+checkdepends="$depends python3-pytest python3-trustme"
short_desc="Minimal HTTP client"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="BSD-3-Clause"
homepage="https://www.encode.io/httpcore/"
changelog="https://raw.githubusercontent.com/encode/httpcore/master/CHANGELOG.md"
distfiles="https://github.com/encode/httpcore/archive/refs/tags/$version.tar.gz"
-checksum=e5458b6342fb6a0cdd58b86c1336516b90ad8879dedc24a9667f9fdf7b4081ea
-make_check=no # at least trustme python module is not packaged
+checksum=4823603836ccb1b84868d1b784eb31d6f4c5ce9255f3315cd5a28bc3db5a0538
post_install() {
vlicense LICENSE.md
From d2eec4ccb681f1311a755045d55a308151f1b813 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 03/10] celluloid: rebuild for mpv-0.35.0
---
srcpkgs/celluloid/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/celluloid/template b/srcpkgs/celluloid/template
index 739911562045..904fe4f631c0 100644
--- a/srcpkgs/celluloid/template
+++ b/srcpkgs/celluloid/template
@@ -1,7 +1,7 @@
# Template file for 'celluloid'
pkgname=celluloid
version=0.23
-revision=1
+revision=2
build_style=meson
hostmakedepends="gettext glib-devel pkg-config"
makedepends="gtk4-devel libepoxy-devel libglib-devel mpv-devel"
From 9bb058d574a7a4905e9fe233b318eb09f706b43c Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 04/10] minitube: rebuild for mpv-0.35.0
---
srcpkgs/minitube/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/minitube/template b/srcpkgs/minitube/template
index 915458a43a6a..b4b50c0f9694 100644
--- a/srcpkgs/minitube/template
+++ b/srcpkgs/minitube/template
@@ -1,7 +1,7 @@
# Template file for 'minitube'
pkgname=minitube
version=3.9.3
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-tools qt5-host-tools qt5-qmake git"
makedepends="qt5-devel phonon-qt5-devel qt5-script-devel qt5-declarative-devel
From dded85fe77e0e5fe867037209755831c88932e1b Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 05/10] mpc-qt: rebuild for mpv-0.35.0
---
srcpkgs/mpc-qt/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/mpc-qt/template b/srcpkgs/mpc-qt/template
index 3e60cb06c896..34247cbaba2b 100644
--- a/srcpkgs/mpc-qt/template
+++ b/srcpkgs/mpc-qt/template
@@ -1,7 +1,7 @@
# Template file for 'mpc-qt'
pkgname=mpc-qt
version=18.08
-revision=1
+revision=2
build_style=qmake
configure_args="MPCQT_VERSION=${version}"
hostmakedepends="pkg-config qt5-qmake qt5-host-tools"
From 352b5ddb14bc8dc051f6b8ae7394502f191785c1 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 06/10] orion: rebuild for mpv-0.35.0
---
srcpkgs/orion/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/orion/template b/srcpkgs/orion/template
index d69f2ff04dd4..b1f2215b1d43 100644
--- a/srcpkgs/orion/template
+++ b/srcpkgs/orion/template
@@ -1,7 +1,7 @@
# Template file for 'orion'
pkgname=orion
version=1.6.7
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-declarative-devel qt5-quickcontrols2-devel mpv-devel"
From 13751371e80f5a58ef5051308b7fbb4fdbf5967d Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 07/10] plex-media-player: rebuild for mpv-0.35.0
---
srcpkgs/plex-media-player/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/plex-media-player/template b/srcpkgs/plex-media-player/template
index 8e96eaf89949..f5fd481884d4 100644
--- a/srcpkgs/plex-media-player/template
+++ b/srcpkgs/plex-media-player/template
@@ -1,7 +1,7 @@
# Template file for 'plex-media-player'
pkgname=plex-media-player
version=2.58.0
-revision=3
+revision=4
_verbuild=1076
_commit_rev=38e019da
# See CMakeModules/WebClient.cmake
From 03f8e226a1f77049ab8b17190ca020b140ca8c1a Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 08/10] qimgv: rebuild for mpv-0.35.0
---
srcpkgs/qimgv/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/qimgv/template b/srcpkgs/qimgv/template
index bb91ee98eab7..7eb30db33992 100644
--- a/srcpkgs/qimgv/template
+++ b/srcpkgs/qimgv/template
@@ -1,7 +1,7 @@
# Template file for 'qimgv'
pkgname=qimgv
version=1.0.2
-revision=1
+revision=2
build_style=cmake
configure_args="$(vopt_if video -DVIDEO_SUPPORT=ON -DVIDEO_SUPPORT=OFF)
$(vopt_if scale -DOPENCV_SUPPORT=ON -DOPENCV_SUPPORT=OFF)
From 1e8e8d89b4ecda8e437efe5345dec071e26b01b9 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 09/10] stremio-shell: rebuild for mpv-0.35.0
---
srcpkgs/stremio-shell/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/stremio-shell/template b/srcpkgs/stremio-shell/template
index ac133f6c3729..45687a9a4289 100644
--- a/srcpkgs/stremio-shell/template
+++ b/srcpkgs/stremio-shell/template
@@ -1,7 +1,7 @@
# Template file for 'stremio-shell'
pkgname=stremio-shell
version=4.4.159
-revision=1
+revision=2
_singleapplication_hash=f1e15081dc57a9c03f7f4f165677f18802e1437a
_libmpv_hash=822a41a1087daf2911fc336fbd9509f962158fef
create_wrksrc=yes
From bf0828faa0fcffb610aa6dccedb19e96345a64b2 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 10/10] vidcutter: rebuild for mpv-0.35.0
---
srcpkgs/vidcutter/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/vidcutter/template b/srcpkgs/vidcutter/template
index 07bda50c917c..319ff1810cb2 100644
--- a/srcpkgs/vidcutter/template
+++ b/srcpkgs/vidcutter/template
@@ -1,7 +1,7 @@
# Template file for 'vidcutter'
pkgname=vidcutter
version=6.0.0
-revision=6
+revision=7
build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython"
makedepends="mpv-devel python3-devel"
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
@ 2022-11-13 0:04 ` 38github
2022-11-13 1:39 ` mpv-0.35.0 travankor
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: 38github @ 2022-11-13 0:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
New comment by 38github on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1312600253
Comment:
Great to see someone taking this on right away. Thank you!
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
2022-11-13 0:04 ` mpv-0.35.0 38github
@ 2022-11-13 1:39 ` travankor
2022-11-13 11:08 ` mpv-0.35.0 hazen2215
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: travankor @ 2022-11-13 1:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 254 bytes --]
New comment by travankor on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1312613463
Comment:
The `waf3` build option can be switched to `meson`. I can look at that if you want that done in a separate PR.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
2022-11-13 0:04 ` mpv-0.35.0 38github
2022-11-13 1:39 ` mpv-0.35.0 travankor
@ 2022-11-13 11:08 ` hazen2215
2022-11-13 14:35 ` mpv-0.35.0 q66
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: hazen2215 @ 2022-11-13 11:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 179 bytes --]
New comment by hazen2215 on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1312704096
Comment:
sndio build option can be re-added.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (2 preceding siblings ...)
2022-11-13 11:08 ` mpv-0.35.0 hazen2215
@ 2022-11-13 14:35 ` q66
2022-11-14 2:29 ` mpv-0.35.0 abenson
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: q66 @ 2022-11-13 14:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
New comment by q66 on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1312745676
Comment:
this should come with a build system switch to meson
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (3 preceding siblings ...)
2022-11-13 14:35 ` mpv-0.35.0 q66
@ 2022-11-14 2:29 ` abenson
2022-11-14 2:39 ` [PR PATCH] [Updated] mpv-0.35.0 abenson
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: abenson @ 2022-11-14 2:29 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
New comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1312956157
Comment:
Added `sndio` option and changed template to `meson`.
A few of the dependencies need some work.
- [X] celluloid
- [ ] minitube
- [X] mpc-qt
- [ ] orion
- [ ] plex-media-player
- [X] qimgv
- [ ] stremio-shell
- [ ] vidcutter
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (4 preceding siblings ...)
2022-11-14 2:29 ` mpv-0.35.0 abenson
@ 2022-11-14 2:39 ` abenson
2022-11-14 12:44 ` sgn
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: abenson @ 2022-11-14 2:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
There is an updated pull request by abenson against master on the void-packages repository
https://github.com/abenson/void-packages mpv_0.35.0
https://github.com/void-linux/void-packages/pull/40497
mpv-0.35.0
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### Local build testing
- I built this PR locally for my native architecture, x86-64
[ci skip]
A patch file from https://github.com/void-linux/void-packages/pull/40497.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mpv_0.35.0-40497.patch --]
[-- Type: text/x-diff, Size: 23754 bytes --]
From 26ad6f89c8faaba2e24348cdb7fd4280a71f4e2e Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:06:05 -0600
Subject: [PATCH 1/9] mpv: update to 0.35.0.
---
common/shlibs | 2 +-
srcpkgs/mpv/template | 57 ++++++++++++++++++++++++--------------------
2 files changed, 32 insertions(+), 27 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 76512744735e..862bba59babc 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2214,7 +2214,7 @@ librrd.so.8 rrdtool-1.6.0_1
librrd_th.so.4 rrdtool-1.4.9_1
libmosquitto.so.1 libmosquitto-1.6.3_5
libmosquittopp.so.1 libmosquittopp-1.6.3_5
-libmpv.so.1 mpv-0.8.0_2
+libmpv.so.2 mpv-0.35.0_1
libmbedtls.so.12 mbedtls-2.13.1_1
libmbedcrypto.so.3 mbedtls-2.9.0_1
libmbedx509.so.0 mbedtls-2.9.0_1
diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template
index ded8c1bbe98f..0e3c3ed8f81c 100644
--- a/srcpkgs/mpv/template
+++ b/srcpkgs/mpv/template
@@ -1,15 +1,26 @@
# Template file for 'mpv'
pkgname=mpv
-version=0.34.1
-revision=2
-build_style=waf3
-configure_args="--confdir=/etc/mpv --docdir=/usr/share/examples/mpv
- --enable-cdda --enable-dvbin --enable-dvdnav --enable-libarchive
- --enable-libmpv-shared --enable-cplugins $(vopt_enable alsa) $(vopt_enable caca)
- $(vopt_enable jack) $(vopt_enable lcms lcms2) $(vopt_enable lua)
- $(vopt_enable openal) $(vopt_enable pulseaudio pulse) $(vopt_enable sdl2)
- $(vopt_enable vapoursynth) $(vopt_enable vdpau) $(vopt_enable vulkan)
- $(vopt_enable vulkan shaderc) $(vopt_enable wayland) $(vopt_enable x11)"
+version=0.35.0
+revision=1
+build_style=meson
+configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled
+ -Dlibmpv=true -Dcplugins=enabled
+ -Dalsa=$(vopt_if alsa enabled disabled)
+ -Dcaca=$(vopt_if caca enabled disabled)
+ -Djack=$(vopt_if jack enabled disabled)
+ -Dlcms2=$(vopt_if lcms enabled disabled)
+ -Dlua=$(vopt_if lua enabled disabled)
+ -Dopenal=$(vopt_if openal enabled disabled)
+ -Dpulse=$(vopt_if pulseaudio enabled disabled)
+ -Dsdl2=$(vopt_if sdl2 enabled disabled)
+ -Dvapoursynth=$(vopt_if vapoursynth enabled disabled)
+ -Dvdpau=$(vopt_if vdpau enabled disabled)
+ -Dvulkan=$(vopt_if vulkan enabled disabled)
+ -Dshaderc=$(vopt_if vulkan enabled disabled)
+ -Dwayland=$(vopt_if wayland enabled disabled)
+ -Dx11=$(vopt_if x11 enabled disabled)
+ -Dpipewire=$(vopt_if pipewire enabled disabled)
+ -Dsndio=$(vopt_if sndio enabled disabled)"
hostmakedepends="pkg-config python3-docutils $(vopt_if wayland wayland-devel)"
makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libass-devel libbluray-devel libcdio-paranoia-devel libdvdnav-devel
@@ -17,11 +28,12 @@ makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libarchive-devel $(vopt_if alsa alsa-lib-devel) $(vopt_if caca libcaca-devel)
$(vopt_if jack jack-devel) $(vopt_if lcms lcms2-devel)
$(vopt_if lua lua52-devel) $(vopt_if openal libopenal-devel)
- $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if sdl2 SDL2-devel)
- $(vopt_if vapoursynth vapoursynth-devel) $(vopt_if vdpau libvdpau-devel)
+ $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if pipewire pipewire-devel)
+ $(vopt_if sdl2 SDL2-devel) $(vopt_if vapoursynth vapoursynth-devel)
+ $(vopt_if vdpau libvdpau-devel) $(vopt_if sndio sndio-devel)
$(vopt_if vulkan "Vulkan-Headers vulkan-loader shaderc libplacebo-devel")
$(vopt_if wayland "wayland-devel wayland-protocols libxkbcommon-devel")
- $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel")"
+ $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel libXpresent-devel")"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Video player based on MPlayer/mplayer2"
maintainer="travankor <travankor@tuta.io>"
@@ -29,30 +41,23 @@ license="GPL-2.0-or-later"
homepage="https://mpv.io"
changelog="https://github.com/mpv-player/mpv/releases"
distfiles="https://github.com/mpv-player/${pkgname}/archive/v${version}.tar.gz"
-checksum=32ded8c13b6398310fa27767378193dc1db6d78b006b70dbcbd3123a1445e746
+checksum=dc411c899a64548250c142bf1fa1aa7528f1b4398a24c86b816093999049ec00
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
-build_options="alsa caca jack lcms lua openal pulseaudio sdl2 vapoursynth vdpau
- vulkan wayland x11"
-build_options_default="alsa jack lcms lua pulseaudio vdpau vulkan wayland x11"
+build_options="alsa caca jack lcms lua openal pulseaudio pipewire sdl2
+ sndio vapoursynth vdpau vulkan wayland x11"
+build_options_default="alsa jack lcms lua pulseaudio pipewire vdpau vulkan
+ sndio wayland x11"
desc_option_caca="Enable support for libcaca video output"
desc_option_lcms="Enable support for LittleCMS 2 engine"
desc_option_openal="Enable support for OpenAL audio output"
vopt_conflict sdl2 wayland
-if [ -z "$CROSS_BUILD" ]; then
- configure_args+=" --zshdir=/usr/share/zsh/site-functions"
-fi
-
-pre_configure() {
- python3 bootstrap.py
-}
-
mpv-devel_package() {
- depends="${sourcepkg}>=${version}_${revision}"
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
From c7dfabea6ba5f5e4e59c3a2077e04d25f16462f5 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 2/9] celluloid: rebuild for mpv-0.35.0
---
srcpkgs/celluloid/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/celluloid/template b/srcpkgs/celluloid/template
index 739911562045..904fe4f631c0 100644
--- a/srcpkgs/celluloid/template
+++ b/srcpkgs/celluloid/template
@@ -1,7 +1,7 @@
# Template file for 'celluloid'
pkgname=celluloid
version=0.23
-revision=1
+revision=2
build_style=meson
hostmakedepends="gettext glib-devel pkg-config"
makedepends="gtk4-devel libepoxy-devel libglib-devel mpv-devel"
From 7770c30180af7c8942e92235ddf06f5a421b350a Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 3/9] [TODO] minitube: rebuild for mpv-0.35.0
---
srcpkgs/minitube/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/minitube/template b/srcpkgs/minitube/template
index 915458a43a6a..b4b50c0f9694 100644
--- a/srcpkgs/minitube/template
+++ b/srcpkgs/minitube/template
@@ -1,7 +1,7 @@
# Template file for 'minitube'
pkgname=minitube
version=3.9.3
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-tools qt5-host-tools qt5-qmake git"
makedepends="qt5-devel phonon-qt5-devel qt5-script-devel qt5-declarative-devel
From ebc04291a247dd1aa578f9f99ec502898443692f Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 4/9] mpc-qt: update to 22.02.
---
srcpkgs/mpc-qt/template | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/srcpkgs/mpc-qt/template b/srcpkgs/mpc-qt/template
index 3e60cb06c896..7a7ae6f6cf96 100644
--- a/srcpkgs/mpc-qt/template
+++ b/srcpkgs/mpc-qt/template
@@ -1,6 +1,6 @@
# Template file for 'mpc-qt'
pkgname=mpc-qt
-version=18.08
+version=22.02
revision=1
build_style=qmake
configure_args="MPCQT_VERSION=${version}"
@@ -9,16 +9,6 @@ makedepends="qt5-devel qt5-x11extras-devel mpv-devel"
short_desc="Clone of Media Player Classic reimplemented in Qt"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="GPL-2.0-or-later"
-homepage="https://github.com/cmdrkotori/mpc-qt"
-#distfiles="${homepage}/archive/v${version}.tar.gz"
-# https://github.com/mpv-player/mpv/commit/575197ff8b0a0d8cd14f7ee78461c1d61d045d72
-distfiles="https://sources.voidlinux.org/mpc-qt-18.08/v18.08.tar.gz
- https://raw.githubusercontent.com/mpv-player/mpv/2337fa4e0213993398d36cb3222633766d677dfd/libmpv/qthelper.hpp"
-checksum="c58fd90926773c9da8bdfc1a8e4dba0b95cbc58cee6db9981e8de94fd9534406
- 86e1fcba6001829b7e23a856db84d01ebc76e63528f74064d7bc5705015a2684"
-skip_extraction="qthelper.hpp"
-
-post_extract() {
- mkdir -p mpv
- cp $XBPS_SRCDISTDIR/mpc-qt-$version/qthelper.hpp mpv/
-}
+homepage="https://mpc-qt.github.io/"
+distfiles="https://github.com/mpc-qt/mpc-qt/archive/refs/tags/v${version}.tar.gz"
+checksum=fa6cffd6bde1304b6c0ec3aba8e98d03f4d73999fee4e4546026ec159530350d
From c5bb728fbcdbeba7677bc32038d69983e8999f03 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 5/9] [TODO] orion: rebuild for mpv-0.35.0
---
srcpkgs/orion/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/orion/template b/srcpkgs/orion/template
index d69f2ff04dd4..b1f2215b1d43 100644
--- a/srcpkgs/orion/template
+++ b/srcpkgs/orion/template
@@ -1,7 +1,7 @@
# Template file for 'orion'
pkgname=orion
version=1.6.7
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-declarative-devel qt5-quickcontrols2-devel mpv-devel"
From 6e34dd69ac8bc4803fdc6db24f0a3b0e23249781 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 6/9] plex-media-player: remove package
https://github.com/plexinc/plex-media-player/commit/d9685b274934855a707a37613cae09108ee9db6c
No longer builds due to relying on deprecated features.
---
.../patches/fix-opengl-cb-api-usage.patch | 164 ------------------
.../patches/qt5-append-header.patch | 16 --
srcpkgs/plex-media-player/template | 52 ------
srcpkgs/plex-media-player/update | 1 -
4 files changed, 233 deletions(-)
delete mode 100644 srcpkgs/plex-media-player/patches/fix-opengl-cb-api-usage.patch
delete mode 100644 srcpkgs/plex-media-player/patches/qt5-append-header.patch
delete mode 100644 srcpkgs/plex-media-player/template
delete mode 100644 srcpkgs/plex-media-player/update
diff --git a/srcpkgs/plex-media-player/patches/fix-opengl-cb-api-usage.patch b/srcpkgs/plex-media-player/patches/fix-opengl-cb-api-usage.patch
deleted file mode 100644
index fb22e7f9f518..000000000000
--- a/srcpkgs/plex-media-player/patches/fix-opengl-cb-api-usage.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-The opengl-cb interface has been retired; patch in libmpv usage.
-https://github.com/plexinc/plex-media-player/issues/997
-https://github.com/plexinc/plex-media-player/pull/999
-
---- a/src/player/PlayerComponent.cpp
-+++ b/src/player/PlayerComponent.cpp
-@@ -259,7 +259,7 @@ void PlayerComponent::setQtQuickWindow(QQuickWindow* window)
- ///////////////////////////////////////////////////////////////////////////////////////////////////
- void PlayerComponent::setWindow(QQuickWindow* window)
- {
-- QString vo = "opengl-cb";
-+ QString vo = "libmpv";
-
- #ifdef TARGET_RPI
- window->setFlags(Qt::FramelessWindowHint);
-@@ -276,7 +276,7 @@ void PlayerComponent::setWindow(QQuickWindow* window)
-
- mpv::qt::set_property(m_mpv, "vo", vo);
-
-- if (vo == "opengl-cb")
-+ if (vo == "libmpv")
- setQtQuickWindow(window);
- }
-
---- a/src/player/PlayerQuickItem.cpp
-+++ b/src/player/PlayerQuickItem.cpp
-@@ -11,6 +11,8 @@
- #include <QtQuick/QQuickWindow>
- #include <QOpenGLFunctions>
-
-+#include <mpv/render_gl.h>
-+
- #include "QsLog.h"
- #include "utils/Utils.h"
-
-@@ -93,7 +95,6 @@ class RequestRepaintJob : public QRunnable
- PlayerRenderer::PlayerRenderer(mpv::qt::Handle mpv, QQuickWindow* window)
- : m_mpv(mpv), m_mpvGL(nullptr), m_window(window), m_size(), m_hAvrtHandle(nullptr), m_videoRectangle(-1, -1, -1, -1), m_fbo(0)
- {
-- m_mpvGL = (mpv_opengl_cb_context *)mpv_get_sub_api(m_mpv, MPV_SUB_API_OPENGL_CB);
- }
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////
-@@ -104,11 +105,27 @@ bool PlayerRenderer::init()
- DwmEnableMMCSS(TRUE);
- #endif
-
-- mpv_opengl_cb_set_update_callback(m_mpvGL, on_update, (void *)this);
-
- // Signals presence of MPGetNativeDisplay().
- const char *extensions = "GL_MP_MPGetNativeDisplay";
-- return mpv_opengl_cb_init_gl(m_mpvGL, extensions, get_proc_address, nullptr) >= 0;
-+
-+ mpv_opengl_init_params opengl_params = {
-+ .get_proc_address = get_proc_address,
-+ .get_proc_address_ctx = NULL,
-+ .extra_exts = extensions,
-+ };
-+ mpv_render_param params[] = {
-+ {MPV_RENDER_PARAM_API_TYPE, (void*)MPV_RENDER_API_TYPE_OPENGL},
-+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &opengl_params},
-+ {MPV_RENDER_PARAM_INVALID},
-+ };
-+ int err = mpv_render_context_create(&m_mpvGL, m_mpv, params);
-+
-+ if (err >= 0) {
-+ mpv_render_context_set_update_callback(m_mpvGL, on_update, (void *)this);
-+ return true;
-+ }
-+ return false;
- }
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////
-@@ -116,7 +133,8 @@ PlayerRenderer::~PlayerRenderer()
- {
- // Keep in mind that the m_mpv handle must be held until this is done.
- if (m_mpvGL)
-- mpv_opengl_cb_uninit_gl(m_mpvGL);
-+ mpv_render_context_free(m_mpvGL);
-+ m_mpvGL = nullptr;
- delete m_fbo;
- }
-
-@@ -158,9 +176,18 @@ void PlayerRenderer::render()
- }
- }
-
-- // The negative height signals to mpv that the video should be flipped
-- // (according to the flipped OpenGL coordinate system).
-- mpv_opengl_cb_draw(m_mpvGL, fbo, fboSize.width(), (flip ? -1 : 1) * fboSize.height());
-+ mpv_opengl_fbo mpv_fbo = {
-+ .fbo = fbo,
-+ .w = fboSize.width(),
-+ .h = fboSize.height(),
-+ };
-+ int mpv_flip = flip ? -1 : 0;
-+ mpv_render_param params[] = {
-+ {MPV_RENDER_PARAM_OPENGL_FBO, &mpv_fbo},
-+ {MPV_RENDER_PARAM_FLIP_Y, &mpv_flip},
-+ {MPV_RENDER_PARAM_INVALID}
-+ };
-+ mpv_render_context_render(m_mpvGL, params);
-
- m_window->resetOpenGLState();
-
-@@ -177,7 +204,8 @@ void PlayerRenderer::render()
- ///////////////////////////////////////////////////////////////////////////////////////////////////
- void PlayerRenderer::swap()
- {
-- mpv_opengl_cb_report_flip(m_mpvGL, 0);
-+ if (m_mpvGL)
-+ mpv_render_context_report_swap(m_mpvGL);
- }
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////
-@@ -224,7 +252,7 @@ PlayerQuickItem::PlayerQuickItem(QQuickItem* parent)
- PlayerQuickItem::~PlayerQuickItem()
- {
- if (m_mpvGL)
-- mpv_opengl_cb_set_update_callback(m_mpvGL, nullptr, nullptr);
-+ mpv_render_context_set_update_callback(m_mpvGL, nullptr, nullptr);
- }
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////
-@@ -298,10 +326,6 @@ void PlayerQuickItem::initMpv(PlayerComponent* player)
- {
- m_mpv = player->getMpvHandle();
-
-- m_mpvGL = (mpv_opengl_cb_context *)mpv_get_sub_api(m_mpv, MPV_SUB_API_OPENGL_CB);
-- if (!m_mpvGL)
-- throw FatalException(tr("OpenGL not enabled in libmpv."));
--
- connect(player, &PlayerComponent::windowVisible, this, &QQuickItem::setVisible);
- window()->update();
- }
---- a/src/player/PlayerQuickItem.h
-+++ b/src/player/PlayerQuickItem.h
-@@ -6,7 +6,7 @@
- #include <QOpenGLFramebufferObject>
-
- #include <mpv/client.h>
--#include <mpv/opengl_cb.h>
-+#include <mpv/render.h>
-
- #ifdef Q_OS_WIN32
- #include <windows.h>
-@@ -34,7 +34,7 @@ public slots:
- private:
- static void on_update(void *ctx);
- mpv::qt::Handle m_mpv;
-- mpv_opengl_cb_context* m_mpvGL;
-+ mpv_render_context* m_mpvGL;
- QQuickWindow* m_window;
- QSize m_size;
- HANDLE m_hAvrtHandle;
-@@ -64,7 +64,7 @@ private slots:
-
- private:
- mpv::qt::Handle m_mpv;
-- mpv_opengl_cb_context* m_mpvGL;
-+ mpv_render_context* m_mpvGL;
- PlayerRenderer* m_renderer;
- QString m_debugInfo;
- };
diff --git a/srcpkgs/plex-media-player/patches/qt5-append-header.patch b/srcpkgs/plex-media-player/patches/qt5-append-header.patch
deleted file mode 100644
index 898f7a321131..000000000000
--- a/srcpkgs/plex-media-player/patches/qt5-append-header.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/src/player/CodecsComponent.cpp 2020-05-19 19:32:23.000000000 +0200
-+++ b/src/player/CodecsComponent.cpp 2020-07-28 08:00:34.966060781 +0200
-@@ -684,9 +684,11 @@
- {
- Downloader::HeaderList headers;
- QString auth = SystemComponent::Get().authenticationToken();
-+ QString prod = WITH_CODECS ? "Plex Media Player" : "openpmp";
-+ QString plat = "Konvergo";
- if (auth.size())
- headers.append({"X-Plex-Token", auth});
-- headers.append({"X-Plex-Product", WITH_CODECS ? "Plex Media Player" : "openpmp"});
-- headers.append({"X-Plex-Platform", "Konvergo"});
-+ headers.append({"X-Plex-Product", prod});
-+ headers.append({"X-Plex-Platform", plat});
- return headers;
- }
diff --git a/srcpkgs/plex-media-player/template b/srcpkgs/plex-media-player/template
deleted file mode 100644
index 8e96eaf89949..000000000000
--- a/srcpkgs/plex-media-player/template
+++ /dev/null
@@ -1,52 +0,0 @@
-# Template file for 'plex-media-player'
-pkgname=plex-media-player
-version=2.58.0
-revision=3
-_verbuild=1076
-_commit_rev=38e019da
-# See CMakeModules/WebClient.cmake
-_buildid_version=183-045db5be50e175
-# See https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/buildid.cmake
-_clientdesktop_version=4.29.2-e50e175
-_clienttv_version=4.29.6-045db5b
-build_style=cmake
-configure_args="-DQTROOT="${XBPS_CROSS_BASE}/usr" -DFULL_GIT_REVISION=${_commit_rev}"
-hostmakedepends="pkg-config python3"
-makedepends="libcec-devel libX11-devel libXext-devel libXrandr-devel
- MesaLib-devel mpv-devel qt5-devel qt5-declarative-devel qt5-location-devel
- qt5-webchannel-devel qt5-webengine-devel qt5-x11extras-devel SDL2-devel zlib-devel"
-depends="qt5-quickcontrols"
-short_desc="Next generation Plex Desktop/Embedded Client"
-maintainer="Enno Boland <gottox@voidlinux.org>"
-license="LGPL-2.1-or-later"
-homepage="https://github.com/plexinc/plex-media-player"
-distfiles="https://github.com/plexinc/plex-media-player/archive/v${version}.${_verbuild}-${_commit_rev}.tar.gz
- https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/buildid.cmake>buildid-${_buildid_version}.cmake
- https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-desktop-${_clientdesktop_version}.tar.xz
- https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-desktop-${_clientdesktop_version}.tar.xz.sha1
- https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-tv-${_clienttv_version}.tar.xz
- https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-tv-${_clienttv_version}.tar.xz.sha1"
-checksum="f73ddae52d40eb5019283a16c83f4d5909dc1059ced85d6298e5525347705341
- 0331e53bb67c4b14284fafbe3a98700c3438ece99b9e969bcb49a1d583674af7
- c56c1784dd8de0fbda971b66e4fc19a6b91c154e9122213a7c0ef577613a94fe
- eef51c4ee379ca914522b072832bad119bb831897958f985bab79097a1ef571f
- e04b7d77804efb850f6abbec48982526f6fe727a74a143f73b83033672de3fb8
- 53cbb948ec4fa73f073892ab6179481f1d17d3c165b2997aee1973739ee0eeff"
-skip_extraction="buildid-${_buildid_version}.cmake
- web-client-desktop-${_clientdesktop_version}.tar.xz
- web-client-desktop-${_clientdesktop_version}.tar.xz.sha1
- web-client-tv-${_clienttv_version}.tar.xz
- web-client-tv-${_clienttv_version}.tar.xz.sha1"
-
-if [ "$CROSS_BUILD" ]; then
- hostmakedepends+=" qt5-devel qt5-host-tools"
-fi
-
-post_extract() {
- mkdir -p "${wrksrc}/build/dependencies"
- cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/buildid-${_buildid_version}.cmake" "${wrksrc}/build/dependencies"
- cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-desktop-${_clientdesktop_version}.tar.xz" "${wrksrc}/build/dependencies"
- cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-desktop-${_clientdesktop_version}.tar.xz.sha1" "${wrksrc}/build/dependencies"
- cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-tv-${_clienttv_version}.tar.xz" "${wrksrc}/build/dependencies"
- cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-tv-${_clienttv_version}.tar.xz.sha1" "${wrksrc}/build/dependencies"
-}
diff --git a/srcpkgs/plex-media-player/update b/srcpkgs/plex-media-player/update
deleted file mode 100644
index 5adfae106695..000000000000
--- a/srcpkgs/plex-media-player/update
+++ /dev/null
@@ -1 +0,0 @@
-pattern='/archive/refs/tags/v?\K[\d+\.]+'
From affa9d41b2583a06a2386813ddfa212f6561aef8 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 7/9] qimgv: rebuild for mpv-0.35.0
---
srcpkgs/qimgv/patches/fix-mpv-opengl.patch | 11 +++++++++++
srcpkgs/qimgv/template | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/qimgv/patches/fix-mpv-opengl.patch
diff --git a/srcpkgs/qimgv/patches/fix-mpv-opengl.patch b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
new file mode 100644
index 000000000000..9fd3dffe9f96
--- /dev/null
+++ b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
@@ -0,0 +1,11 @@
+--- a/plugins/player_mpv/src/mpvwidget.cpp
++++ b/plugins/player_mpv/src/mpvwidget.cpp
+@@ -69,7 +69,7 @@
+ }
+
+ void MpvWidget::initializeGL() {
+- mpv_opengl_init_params gl_init_params{get_proc_address, nullptr, nullptr};
++ mpv_opengl_init_params gl_init_params{get_proc_address, nullptr};
+ mpv_render_param params[]{
+ {MPV_RENDER_PARAM_API_TYPE, const_cast<char *>(MPV_RENDER_API_TYPE_OPENGL)},
+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
diff --git a/srcpkgs/qimgv/template b/srcpkgs/qimgv/template
index bb91ee98eab7..7eb30db33992 100644
--- a/srcpkgs/qimgv/template
+++ b/srcpkgs/qimgv/template
@@ -1,7 +1,7 @@
# Template file for 'qimgv'
pkgname=qimgv
version=1.0.2
-revision=1
+revision=2
build_style=cmake
configure_args="$(vopt_if video -DVIDEO_SUPPORT=ON -DVIDEO_SUPPORT=OFF)
$(vopt_if scale -DOPENCV_SUPPORT=ON -DOPENCV_SUPPORT=OFF)
From 7e1d23e16e66497fdc84a1f98ac3baa9eefaea81 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 8/9] [TODO] stremio-shell: rebuild for mpv-0.35.0
---
srcpkgs/stremio-shell/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/stremio-shell/template b/srcpkgs/stremio-shell/template
index ac133f6c3729..45687a9a4289 100644
--- a/srcpkgs/stremio-shell/template
+++ b/srcpkgs/stremio-shell/template
@@ -1,7 +1,7 @@
# Template file for 'stremio-shell'
pkgname=stremio-shell
version=4.4.159
-revision=1
+revision=2
_singleapplication_hash=f1e15081dc57a9c03f7f4f165677f18802e1437a
_libmpv_hash=822a41a1087daf2911fc336fbd9509f962158fef
create_wrksrc=yes
From abbc379eb39b9b1ad6c48787c23f1211e7e6ab14 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 9/9] [TODO] vidcutter: update to 6.0.5.1.
---
srcpkgs/vidcutter/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/vidcutter/template b/srcpkgs/vidcutter/template
index 07bda50c917c..93e6dbefaacc 100644
--- a/srcpkgs/vidcutter/template
+++ b/srcpkgs/vidcutter/template
@@ -1,7 +1,7 @@
# Template file for 'vidcutter'
pkgname=vidcutter
-version=6.0.0
-revision=6
+version=6.0.5.1
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython"
makedepends="mpv-devel python3-devel"
@@ -12,7 +12,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/ozmartian/vidcutter"
distfiles="https://github.com/ozmartian/vidcutter/archive/refs/tags/${version}.tar.gz"
-checksum=c09be7eceaf42ff7211fe3b8125279c4fec7f7d251d272b61d579e426bd4e2c2
+checksum=c6374eaedb845f9e580e555dd12c1db1cf2ffa28d3756b08e2ae28c1a4cd4a96
pre_build() {
rm -f vidcutter/libs/pympv/mpv.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (5 preceding siblings ...)
2022-11-14 2:39 ` [PR PATCH] [Updated] mpv-0.35.0 abenson
@ 2022-11-14 12:44 ` sgn
2022-11-14 12:44 ` mpv-0.35.0 sgn
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: sgn @ 2022-11-14 12:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/abenson/void-packages mpv_0.35.0
https://github.com/void-linux/void-packages/pull/40497
mpv-0.35.0
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### Local build testing
- I built this PR locally for my native architecture, x86-64
[ci skip]
A patch file from https://github.com/void-linux/void-packages/pull/40497.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mpv_0.35.0-40497.patch --]
[-- Type: text/x-diff, Size: 25297 bytes --]
From 26ad6f89c8faaba2e24348cdb7fd4280a71f4e2e Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:06:05 -0600
Subject: [PATCH 01/10] mpv: update to 0.35.0.
---
common/shlibs | 2 +-
srcpkgs/mpv/template | 57 ++++++++++++++++++++++++--------------------
2 files changed, 32 insertions(+), 27 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 76512744735e..862bba59babc 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2214,7 +2214,7 @@ librrd.so.8 rrdtool-1.6.0_1
librrd_th.so.4 rrdtool-1.4.9_1
libmosquitto.so.1 libmosquitto-1.6.3_5
libmosquittopp.so.1 libmosquittopp-1.6.3_5
-libmpv.so.1 mpv-0.8.0_2
+libmpv.so.2 mpv-0.35.0_1
libmbedtls.so.12 mbedtls-2.13.1_1
libmbedcrypto.so.3 mbedtls-2.9.0_1
libmbedx509.so.0 mbedtls-2.9.0_1
diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template
index ded8c1bbe98f..0e3c3ed8f81c 100644
--- a/srcpkgs/mpv/template
+++ b/srcpkgs/mpv/template
@@ -1,15 +1,26 @@
# Template file for 'mpv'
pkgname=mpv
-version=0.34.1
-revision=2
-build_style=waf3
-configure_args="--confdir=/etc/mpv --docdir=/usr/share/examples/mpv
- --enable-cdda --enable-dvbin --enable-dvdnav --enable-libarchive
- --enable-libmpv-shared --enable-cplugins $(vopt_enable alsa) $(vopt_enable caca)
- $(vopt_enable jack) $(vopt_enable lcms lcms2) $(vopt_enable lua)
- $(vopt_enable openal) $(vopt_enable pulseaudio pulse) $(vopt_enable sdl2)
- $(vopt_enable vapoursynth) $(vopt_enable vdpau) $(vopt_enable vulkan)
- $(vopt_enable vulkan shaderc) $(vopt_enable wayland) $(vopt_enable x11)"
+version=0.35.0
+revision=1
+build_style=meson
+configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled
+ -Dlibmpv=true -Dcplugins=enabled
+ -Dalsa=$(vopt_if alsa enabled disabled)
+ -Dcaca=$(vopt_if caca enabled disabled)
+ -Djack=$(vopt_if jack enabled disabled)
+ -Dlcms2=$(vopt_if lcms enabled disabled)
+ -Dlua=$(vopt_if lua enabled disabled)
+ -Dopenal=$(vopt_if openal enabled disabled)
+ -Dpulse=$(vopt_if pulseaudio enabled disabled)
+ -Dsdl2=$(vopt_if sdl2 enabled disabled)
+ -Dvapoursynth=$(vopt_if vapoursynth enabled disabled)
+ -Dvdpau=$(vopt_if vdpau enabled disabled)
+ -Dvulkan=$(vopt_if vulkan enabled disabled)
+ -Dshaderc=$(vopt_if vulkan enabled disabled)
+ -Dwayland=$(vopt_if wayland enabled disabled)
+ -Dx11=$(vopt_if x11 enabled disabled)
+ -Dpipewire=$(vopt_if pipewire enabled disabled)
+ -Dsndio=$(vopt_if sndio enabled disabled)"
hostmakedepends="pkg-config python3-docutils $(vopt_if wayland wayland-devel)"
makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libass-devel libbluray-devel libcdio-paranoia-devel libdvdnav-devel
@@ -17,11 +28,12 @@ makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libarchive-devel $(vopt_if alsa alsa-lib-devel) $(vopt_if caca libcaca-devel)
$(vopt_if jack jack-devel) $(vopt_if lcms lcms2-devel)
$(vopt_if lua lua52-devel) $(vopt_if openal libopenal-devel)
- $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if sdl2 SDL2-devel)
- $(vopt_if vapoursynth vapoursynth-devel) $(vopt_if vdpau libvdpau-devel)
+ $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if pipewire pipewire-devel)
+ $(vopt_if sdl2 SDL2-devel) $(vopt_if vapoursynth vapoursynth-devel)
+ $(vopt_if vdpau libvdpau-devel) $(vopt_if sndio sndio-devel)
$(vopt_if vulkan "Vulkan-Headers vulkan-loader shaderc libplacebo-devel")
$(vopt_if wayland "wayland-devel wayland-protocols libxkbcommon-devel")
- $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel")"
+ $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel libXpresent-devel")"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Video player based on MPlayer/mplayer2"
maintainer="travankor <travankor@tuta.io>"
@@ -29,30 +41,23 @@ license="GPL-2.0-or-later"
homepage="https://mpv.io"
changelog="https://github.com/mpv-player/mpv/releases"
distfiles="https://github.com/mpv-player/${pkgname}/archive/v${version}.tar.gz"
-checksum=32ded8c13b6398310fa27767378193dc1db6d78b006b70dbcbd3123a1445e746
+checksum=dc411c899a64548250c142bf1fa1aa7528f1b4398a24c86b816093999049ec00
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
-build_options="alsa caca jack lcms lua openal pulseaudio sdl2 vapoursynth vdpau
- vulkan wayland x11"
-build_options_default="alsa jack lcms lua pulseaudio vdpau vulkan wayland x11"
+build_options="alsa caca jack lcms lua openal pulseaudio pipewire sdl2
+ sndio vapoursynth vdpau vulkan wayland x11"
+build_options_default="alsa jack lcms lua pulseaudio pipewire vdpau vulkan
+ sndio wayland x11"
desc_option_caca="Enable support for libcaca video output"
desc_option_lcms="Enable support for LittleCMS 2 engine"
desc_option_openal="Enable support for OpenAL audio output"
vopt_conflict sdl2 wayland
-if [ -z "$CROSS_BUILD" ]; then
- configure_args+=" --zshdir=/usr/share/zsh/site-functions"
-fi
-
-pre_configure() {
- python3 bootstrap.py
-}
-
mpv-devel_package() {
- depends="${sourcepkg}>=${version}_${revision}"
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
From c7dfabea6ba5f5e4e59c3a2077e04d25f16462f5 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 02/10] celluloid: rebuild for mpv-0.35.0
---
srcpkgs/celluloid/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/celluloid/template b/srcpkgs/celluloid/template
index 739911562045..904fe4f631c0 100644
--- a/srcpkgs/celluloid/template
+++ b/srcpkgs/celluloid/template
@@ -1,7 +1,7 @@
# Template file for 'celluloid'
pkgname=celluloid
version=0.23
-revision=1
+revision=2
build_style=meson
hostmakedepends="gettext glib-devel pkg-config"
makedepends="gtk4-devel libepoxy-devel libglib-devel mpv-devel"
From 7770c30180af7c8942e92235ddf06f5a421b350a Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 03/10] [TODO] minitube: rebuild for mpv-0.35.0
---
srcpkgs/minitube/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/minitube/template b/srcpkgs/minitube/template
index 915458a43a6a..b4b50c0f9694 100644
--- a/srcpkgs/minitube/template
+++ b/srcpkgs/minitube/template
@@ -1,7 +1,7 @@
# Template file for 'minitube'
pkgname=minitube
version=3.9.3
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-tools qt5-host-tools qt5-qmake git"
makedepends="qt5-devel phonon-qt5-devel qt5-script-devel qt5-declarative-devel
From ebc04291a247dd1aa578f9f99ec502898443692f Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 04/10] mpc-qt: update to 22.02.
---
srcpkgs/mpc-qt/template | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/srcpkgs/mpc-qt/template b/srcpkgs/mpc-qt/template
index 3e60cb06c896..7a7ae6f6cf96 100644
--- a/srcpkgs/mpc-qt/template
+++ b/srcpkgs/mpc-qt/template
@@ -1,6 +1,6 @@
# Template file for 'mpc-qt'
pkgname=mpc-qt
-version=18.08
+version=22.02
revision=1
build_style=qmake
configure_args="MPCQT_VERSION=${version}"
@@ -9,16 +9,6 @@ makedepends="qt5-devel qt5-x11extras-devel mpv-devel"
short_desc="Clone of Media Player Classic reimplemented in Qt"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="GPL-2.0-or-later"
-homepage="https://github.com/cmdrkotori/mpc-qt"
-#distfiles="${homepage}/archive/v${version}.tar.gz"
-# https://github.com/mpv-player/mpv/commit/575197ff8b0a0d8cd14f7ee78461c1d61d045d72
-distfiles="https://sources.voidlinux.org/mpc-qt-18.08/v18.08.tar.gz
- https://raw.githubusercontent.com/mpv-player/mpv/2337fa4e0213993398d36cb3222633766d677dfd/libmpv/qthelper.hpp"
-checksum="c58fd90926773c9da8bdfc1a8e4dba0b95cbc58cee6db9981e8de94fd9534406
- 86e1fcba6001829b7e23a856db84d01ebc76e63528f74064d7bc5705015a2684"
-skip_extraction="qthelper.hpp"
-
-post_extract() {
- mkdir -p mpv
- cp $XBPS_SRCDISTDIR/mpc-qt-$version/qthelper.hpp mpv/
-}
+homepage="https://mpc-qt.github.io/"
+distfiles="https://github.com/mpc-qt/mpc-qt/archive/refs/tags/v${version}.tar.gz"
+checksum=fa6cffd6bde1304b6c0ec3aba8e98d03f4d73999fee4e4546026ec159530350d
From c5bb728fbcdbeba7677bc32038d69983e8999f03 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 05/10] [TODO] orion: rebuild for mpv-0.35.0
---
srcpkgs/orion/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/orion/template b/srcpkgs/orion/template
index d69f2ff04dd4..b1f2215b1d43 100644
--- a/srcpkgs/orion/template
+++ b/srcpkgs/orion/template
@@ -1,7 +1,7 @@
# Template file for 'orion'
pkgname=orion
version=1.6.7
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-declarative-devel qt5-quickcontrols2-devel mpv-devel"
From 6e34dd69ac8bc4803fdc6db24f0a3b0e23249781 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 06/10] plex-media-player: remove package
https://github.com/plexinc/plex-media-player/commit/d9685b274934855a707a37613cae09108ee9db6c
No longer builds due to relying on deprecated features.
---
.../patches/fix-opengl-cb-api-usage.patch | 164 ------------------
.../patches/qt5-append-header.patch | 16 --
srcpkgs/plex-media-player/template | 52 ------
srcpkgs/plex-media-player/update | 1 -
4 files changed, 233 deletions(-)
delete mode 100644 srcpkgs/plex-media-player/patches/fix-opengl-cb-api-usage.patch
delete mode 100644 srcpkgs/plex-media-player/patches/qt5-append-header.patch
delete mode 100644 srcpkgs/plex-media-player/template
delete mode 100644 srcpkgs/plex-media-player/update
diff --git a/srcpkgs/plex-media-player/patches/fix-opengl-cb-api-usage.patch b/srcpkgs/plex-media-player/patches/fix-opengl-cb-api-usage.patch
deleted file mode 100644
index fb22e7f9f518..000000000000
--- a/srcpkgs/plex-media-player/patches/fix-opengl-cb-api-usage.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-The opengl-cb interface has been retired; patch in libmpv usage.
-https://github.com/plexinc/plex-media-player/issues/997
-https://github.com/plexinc/plex-media-player/pull/999
-
---- a/src/player/PlayerComponent.cpp
-+++ b/src/player/PlayerComponent.cpp
-@@ -259,7 +259,7 @@ void PlayerComponent::setQtQuickWindow(QQuickWindow* window)
- ///////////////////////////////////////////////////////////////////////////////////////////////////
- void PlayerComponent::setWindow(QQuickWindow* window)
- {
-- QString vo = "opengl-cb";
-+ QString vo = "libmpv";
-
- #ifdef TARGET_RPI
- window->setFlags(Qt::FramelessWindowHint);
-@@ -276,7 +276,7 @@ void PlayerComponent::setWindow(QQuickWindow* window)
-
- mpv::qt::set_property(m_mpv, "vo", vo);
-
-- if (vo == "opengl-cb")
-+ if (vo == "libmpv")
- setQtQuickWindow(window);
- }
-
---- a/src/player/PlayerQuickItem.cpp
-+++ b/src/player/PlayerQuickItem.cpp
-@@ -11,6 +11,8 @@
- #include <QtQuick/QQuickWindow>
- #include <QOpenGLFunctions>
-
-+#include <mpv/render_gl.h>
-+
- #include "QsLog.h"
- #include "utils/Utils.h"
-
-@@ -93,7 +95,6 @@ class RequestRepaintJob : public QRunnable
- PlayerRenderer::PlayerRenderer(mpv::qt::Handle mpv, QQuickWindow* window)
- : m_mpv(mpv), m_mpvGL(nullptr), m_window(window), m_size(), m_hAvrtHandle(nullptr), m_videoRectangle(-1, -1, -1, -1), m_fbo(0)
- {
-- m_mpvGL = (mpv_opengl_cb_context *)mpv_get_sub_api(m_mpv, MPV_SUB_API_OPENGL_CB);
- }
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////
-@@ -104,11 +105,27 @@ bool PlayerRenderer::init()
- DwmEnableMMCSS(TRUE);
- #endif
-
-- mpv_opengl_cb_set_update_callback(m_mpvGL, on_update, (void *)this);
-
- // Signals presence of MPGetNativeDisplay().
- const char *extensions = "GL_MP_MPGetNativeDisplay";
-- return mpv_opengl_cb_init_gl(m_mpvGL, extensions, get_proc_address, nullptr) >= 0;
-+
-+ mpv_opengl_init_params opengl_params = {
-+ .get_proc_address = get_proc_address,
-+ .get_proc_address_ctx = NULL,
-+ .extra_exts = extensions,
-+ };
-+ mpv_render_param params[] = {
-+ {MPV_RENDER_PARAM_API_TYPE, (void*)MPV_RENDER_API_TYPE_OPENGL},
-+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &opengl_params},
-+ {MPV_RENDER_PARAM_INVALID},
-+ };
-+ int err = mpv_render_context_create(&m_mpvGL, m_mpv, params);
-+
-+ if (err >= 0) {
-+ mpv_render_context_set_update_callback(m_mpvGL, on_update, (void *)this);
-+ return true;
-+ }
-+ return false;
- }
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////
-@@ -116,7 +133,8 @@ PlayerRenderer::~PlayerRenderer()
- {
- // Keep in mind that the m_mpv handle must be held until this is done.
- if (m_mpvGL)
-- mpv_opengl_cb_uninit_gl(m_mpvGL);
-+ mpv_render_context_free(m_mpvGL);
-+ m_mpvGL = nullptr;
- delete m_fbo;
- }
-
-@@ -158,9 +176,18 @@ void PlayerRenderer::render()
- }
- }
-
-- // The negative height signals to mpv that the video should be flipped
-- // (according to the flipped OpenGL coordinate system).
-- mpv_opengl_cb_draw(m_mpvGL, fbo, fboSize.width(), (flip ? -1 : 1) * fboSize.height());
-+ mpv_opengl_fbo mpv_fbo = {
-+ .fbo = fbo,
-+ .w = fboSize.width(),
-+ .h = fboSize.height(),
-+ };
-+ int mpv_flip = flip ? -1 : 0;
-+ mpv_render_param params[] = {
-+ {MPV_RENDER_PARAM_OPENGL_FBO, &mpv_fbo},
-+ {MPV_RENDER_PARAM_FLIP_Y, &mpv_flip},
-+ {MPV_RENDER_PARAM_INVALID}
-+ };
-+ mpv_render_context_render(m_mpvGL, params);
-
- m_window->resetOpenGLState();
-
-@@ -177,7 +204,8 @@ void PlayerRenderer::render()
- ///////////////////////////////////////////////////////////////////////////////////////////////////
- void PlayerRenderer::swap()
- {
-- mpv_opengl_cb_report_flip(m_mpvGL, 0);
-+ if (m_mpvGL)
-+ mpv_render_context_report_swap(m_mpvGL);
- }
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////
-@@ -224,7 +252,7 @@ PlayerQuickItem::PlayerQuickItem(QQuickItem* parent)
- PlayerQuickItem::~PlayerQuickItem()
- {
- if (m_mpvGL)
-- mpv_opengl_cb_set_update_callback(m_mpvGL, nullptr, nullptr);
-+ mpv_render_context_set_update_callback(m_mpvGL, nullptr, nullptr);
- }
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////
-@@ -298,10 +326,6 @@ void PlayerQuickItem::initMpv(PlayerComponent* player)
- {
- m_mpv = player->getMpvHandle();
-
-- m_mpvGL = (mpv_opengl_cb_context *)mpv_get_sub_api(m_mpv, MPV_SUB_API_OPENGL_CB);
-- if (!m_mpvGL)
-- throw FatalException(tr("OpenGL not enabled in libmpv."));
--
- connect(player, &PlayerComponent::windowVisible, this, &QQuickItem::setVisible);
- window()->update();
- }
---- a/src/player/PlayerQuickItem.h
-+++ b/src/player/PlayerQuickItem.h
-@@ -6,7 +6,7 @@
- #include <QOpenGLFramebufferObject>
-
- #include <mpv/client.h>
--#include <mpv/opengl_cb.h>
-+#include <mpv/render.h>
-
- #ifdef Q_OS_WIN32
- #include <windows.h>
-@@ -34,7 +34,7 @@ public slots:
- private:
- static void on_update(void *ctx);
- mpv::qt::Handle m_mpv;
-- mpv_opengl_cb_context* m_mpvGL;
-+ mpv_render_context* m_mpvGL;
- QQuickWindow* m_window;
- QSize m_size;
- HANDLE m_hAvrtHandle;
-@@ -64,7 +64,7 @@ private slots:
-
- private:
- mpv::qt::Handle m_mpv;
-- mpv_opengl_cb_context* m_mpvGL;
-+ mpv_render_context* m_mpvGL;
- PlayerRenderer* m_renderer;
- QString m_debugInfo;
- };
diff --git a/srcpkgs/plex-media-player/patches/qt5-append-header.patch b/srcpkgs/plex-media-player/patches/qt5-append-header.patch
deleted file mode 100644
index 898f7a321131..000000000000
--- a/srcpkgs/plex-media-player/patches/qt5-append-header.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/src/player/CodecsComponent.cpp 2020-05-19 19:32:23.000000000 +0200
-+++ b/src/player/CodecsComponent.cpp 2020-07-28 08:00:34.966060781 +0200
-@@ -684,9 +684,11 @@
- {
- Downloader::HeaderList headers;
- QString auth = SystemComponent::Get().authenticationToken();
-+ QString prod = WITH_CODECS ? "Plex Media Player" : "openpmp";
-+ QString plat = "Konvergo";
- if (auth.size())
- headers.append({"X-Plex-Token", auth});
-- headers.append({"X-Plex-Product", WITH_CODECS ? "Plex Media Player" : "openpmp"});
-- headers.append({"X-Plex-Platform", "Konvergo"});
-+ headers.append({"X-Plex-Product", prod});
-+ headers.append({"X-Plex-Platform", plat});
- return headers;
- }
diff --git a/srcpkgs/plex-media-player/template b/srcpkgs/plex-media-player/template
deleted file mode 100644
index 8e96eaf89949..000000000000
--- a/srcpkgs/plex-media-player/template
+++ /dev/null
@@ -1,52 +0,0 @@
-# Template file for 'plex-media-player'
-pkgname=plex-media-player
-version=2.58.0
-revision=3
-_verbuild=1076
-_commit_rev=38e019da
-# See CMakeModules/WebClient.cmake
-_buildid_version=183-045db5be50e175
-# See https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/buildid.cmake
-_clientdesktop_version=4.29.2-e50e175
-_clienttv_version=4.29.6-045db5b
-build_style=cmake
-configure_args="-DQTROOT="${XBPS_CROSS_BASE}/usr" -DFULL_GIT_REVISION=${_commit_rev}"
-hostmakedepends="pkg-config python3"
-makedepends="libcec-devel libX11-devel libXext-devel libXrandr-devel
- MesaLib-devel mpv-devel qt5-devel qt5-declarative-devel qt5-location-devel
- qt5-webchannel-devel qt5-webengine-devel qt5-x11extras-devel SDL2-devel zlib-devel"
-depends="qt5-quickcontrols"
-short_desc="Next generation Plex Desktop/Embedded Client"
-maintainer="Enno Boland <gottox@voidlinux.org>"
-license="LGPL-2.1-or-later"
-homepage="https://github.com/plexinc/plex-media-player"
-distfiles="https://github.com/plexinc/plex-media-player/archive/v${version}.${_verbuild}-${_commit_rev}.tar.gz
- https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/buildid.cmake>buildid-${_buildid_version}.cmake
- https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-desktop-${_clientdesktop_version}.tar.xz
- https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-desktop-${_clientdesktop_version}.tar.xz.sha1
- https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-tv-${_clienttv_version}.tar.xz
- https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-tv-${_clienttv_version}.tar.xz.sha1"
-checksum="f73ddae52d40eb5019283a16c83f4d5909dc1059ced85d6298e5525347705341
- 0331e53bb67c4b14284fafbe3a98700c3438ece99b9e969bcb49a1d583674af7
- c56c1784dd8de0fbda971b66e4fc19a6b91c154e9122213a7c0ef577613a94fe
- eef51c4ee379ca914522b072832bad119bb831897958f985bab79097a1ef571f
- e04b7d77804efb850f6abbec48982526f6fe727a74a143f73b83033672de3fb8
- 53cbb948ec4fa73f073892ab6179481f1d17d3c165b2997aee1973739ee0eeff"
-skip_extraction="buildid-${_buildid_version}.cmake
- web-client-desktop-${_clientdesktop_version}.tar.xz
- web-client-desktop-${_clientdesktop_version}.tar.xz.sha1
- web-client-tv-${_clienttv_version}.tar.xz
- web-client-tv-${_clienttv_version}.tar.xz.sha1"
-
-if [ "$CROSS_BUILD" ]; then
- hostmakedepends+=" qt5-devel qt5-host-tools"
-fi
-
-post_extract() {
- mkdir -p "${wrksrc}/build/dependencies"
- cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/buildid-${_buildid_version}.cmake" "${wrksrc}/build/dependencies"
- cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-desktop-${_clientdesktop_version}.tar.xz" "${wrksrc}/build/dependencies"
- cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-desktop-${_clientdesktop_version}.tar.xz.sha1" "${wrksrc}/build/dependencies"
- cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-tv-${_clienttv_version}.tar.xz" "${wrksrc}/build/dependencies"
- cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-tv-${_clienttv_version}.tar.xz.sha1" "${wrksrc}/build/dependencies"
-}
diff --git a/srcpkgs/plex-media-player/update b/srcpkgs/plex-media-player/update
deleted file mode 100644
index 5adfae106695..000000000000
--- a/srcpkgs/plex-media-player/update
+++ /dev/null
@@ -1 +0,0 @@
-pattern='/archive/refs/tags/v?\K[\d+\.]+'
From affa9d41b2583a06a2386813ddfa212f6561aef8 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 07/10] qimgv: rebuild for mpv-0.35.0
---
srcpkgs/qimgv/patches/fix-mpv-opengl.patch | 11 +++++++++++
srcpkgs/qimgv/template | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/qimgv/patches/fix-mpv-opengl.patch
diff --git a/srcpkgs/qimgv/patches/fix-mpv-opengl.patch b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
new file mode 100644
index 000000000000..9fd3dffe9f96
--- /dev/null
+++ b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
@@ -0,0 +1,11 @@
+--- a/plugins/player_mpv/src/mpvwidget.cpp
++++ b/plugins/player_mpv/src/mpvwidget.cpp
+@@ -69,7 +69,7 @@
+ }
+
+ void MpvWidget::initializeGL() {
+- mpv_opengl_init_params gl_init_params{get_proc_address, nullptr, nullptr};
++ mpv_opengl_init_params gl_init_params{get_proc_address, nullptr};
+ mpv_render_param params[]{
+ {MPV_RENDER_PARAM_API_TYPE, const_cast<char *>(MPV_RENDER_API_TYPE_OPENGL)},
+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
diff --git a/srcpkgs/qimgv/template b/srcpkgs/qimgv/template
index bb91ee98eab7..7eb30db33992 100644
--- a/srcpkgs/qimgv/template
+++ b/srcpkgs/qimgv/template
@@ -1,7 +1,7 @@
# Template file for 'qimgv'
pkgname=qimgv
version=1.0.2
-revision=1
+revision=2
build_style=cmake
configure_args="$(vopt_if video -DVIDEO_SUPPORT=ON -DVIDEO_SUPPORT=OFF)
$(vopt_if scale -DOPENCV_SUPPORT=ON -DOPENCV_SUPPORT=OFF)
From 7e1d23e16e66497fdc84a1f98ac3baa9eefaea81 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 08/10] [TODO] stremio-shell: rebuild for mpv-0.35.0
---
srcpkgs/stremio-shell/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/stremio-shell/template b/srcpkgs/stremio-shell/template
index ac133f6c3729..45687a9a4289 100644
--- a/srcpkgs/stremio-shell/template
+++ b/srcpkgs/stremio-shell/template
@@ -1,7 +1,7 @@
# Template file for 'stremio-shell'
pkgname=stremio-shell
version=4.4.159
-revision=1
+revision=2
_singleapplication_hash=f1e15081dc57a9c03f7f4f165677f18802e1437a
_libmpv_hash=822a41a1087daf2911fc336fbd9509f962158fef
create_wrksrc=yes
From abbc379eb39b9b1ad6c48787c23f1211e7e6ab14 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 09/10] [TODO] vidcutter: update to 6.0.5.1.
---
srcpkgs/vidcutter/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/vidcutter/template b/srcpkgs/vidcutter/template
index 07bda50c917c..93e6dbefaacc 100644
--- a/srcpkgs/vidcutter/template
+++ b/srcpkgs/vidcutter/template
@@ -1,7 +1,7 @@
# Template file for 'vidcutter'
pkgname=vidcutter
-version=6.0.0
-revision=6
+version=6.0.5.1
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython"
makedepends="mpv-devel python3-devel"
@@ -12,7 +12,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/ozmartian/vidcutter"
distfiles="https://github.com/ozmartian/vidcutter/archive/refs/tags/${version}.tar.gz"
-checksum=c09be7eceaf42ff7211fe3b8125279c4fec7f7d251d272b61d579e426bd4e2c2
+checksum=c6374eaedb845f9e580e555dd12c1db1cf2ffa28d3756b08e2ae28c1a4cd4a96
pre_build() {
rm -f vidcutter/libs/pympv/mpv.c
From 61bb327f1e107cd5670be8e648dd9a1644f30c1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Mon, 14 Nov 2022 19:43:05 +0700
Subject: [PATCH 10/10] minitube: patch for mpv-0.35
---
srcpkgs/minitube/patches/mpv-0.35.patch | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/minitube/patches/mpv-0.35.patch
diff --git a/srcpkgs/minitube/patches/mpv-0.35.patch b/srcpkgs/minitube/patches/mpv-0.35.patch
new file mode 100644
index 000000000000..db13f9058f7f
--- /dev/null
+++ b/srcpkgs/minitube/patches/mpv-0.35.patch
@@ -0,0 +1,14 @@
+https://github.com/mpv-player/mpv/commit/632059816adde518c67f6606e3cfdef5bec18b52
+Index: minitube-3.9.3/lib/media/src/mpv/mpvwidget.cpp
+===================================================================
+--- minitube-3.9.3.orig/lib/media/src/mpv/mpvwidget.cpp
++++ minitube-3.9.3/lib/media/src/mpv/mpvwidget.cpp
+@@ -30,7 +30,7 @@ void MpvWidget::initializeGL() {
+ qDebug() << "initializeGL" << nativeParent;
+ if (nativeParent == nullptr) qFatal("No native parent");
+
+- mpv_opengl_init_params gl_init_params{get_proc_address, this, nullptr};
++ mpv_opengl_init_params gl_init_params{get_proc_address, this};
+ mpv_render_param params[]{{MPV_RENDER_PARAM_API_TYPE, (void *)MPV_RENDER_API_TYPE_OPENGL},
+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
+ {MPV_RENDER_PARAM_INVALID, nullptr},
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (6 preceding siblings ...)
2022-11-14 12:44 ` sgn
@ 2022-11-14 12:44 ` sgn
2022-11-14 13:08 ` mpv-0.35.0 sgn
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: sgn @ 2022-11-14 12:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
New comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1312956157
Comment:
Added `sndio` option and changed template to `meson`.
A few of the dependencies need some work.
- [X] celluloid
- [ ] minitube
- [X] mpc-qt
- [ ] orion
- [ ] plex-media-player
- [X] qimgv
- [ ] stremio-shell
- [ ] vidcutter
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (7 preceding siblings ...)
2022-11-14 12:44 ` mpv-0.35.0 sgn
@ 2022-11-14 13:08 ` sgn
2022-11-14 13:08 ` mpv-0.35.0 sgn
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: sgn @ 2022-11-14 13:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
New comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1312956157
Comment:
Added `sndio` option and changed template to `meson`.
A few of the dependencies need some work.
- [X] celluloid
- [x] minitube
- [X] mpc-qt
- [ ] orion
- [ ] plex-media-player
- [X] qimgv
- [x] stremio-shell
- [ ] vidcutter
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (8 preceding siblings ...)
2022-11-14 13:08 ` mpv-0.35.0 sgn
@ 2022-11-14 13:08 ` sgn
2022-11-14 13:09 ` mpv-0.35.0 sgn
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: sgn @ 2022-11-14 13:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
New comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1312956157
Comment:
Added `sndio` option and changed template to `meson`.
A few of the dependencies need some work.
- [X] celluloid
- [x] minitube
- [X] mpc-qt
- [ ] orion
- [x] plex-media-player
- [X] qimgv
- [x] stremio-shell
- [ ] vidcutter
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (9 preceding siblings ...)
2022-11-14 13:08 ` mpv-0.35.0 sgn
@ 2022-11-14 13:09 ` sgn
2022-11-14 14:10 ` [PR PATCH] [Updated] mpv-0.35.0 abenson
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: sgn @ 2022-11-14 13:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1313671126
Comment:
`stremio-shell` fixed in master, please bump again for mpv, `plex-media-player` has been removed.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (10 preceding siblings ...)
2022-11-14 13:09 ` mpv-0.35.0 sgn
@ 2022-11-14 14:10 ` abenson
2022-11-14 14:11 ` mpv-0.35.0 abenson
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: abenson @ 2022-11-14 14:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
There is an updated pull request by abenson against master on the void-packages repository
https://github.com/abenson/void-packages mpv_0.35.0
https://github.com/void-linux/void-packages/pull/40497
mpv-0.35.0
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### Local build testing
- I built this PR locally for my native architecture, x86-64
[ci skip]
A patch file from https://github.com/void-linux/void-packages/pull/40497.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mpv_0.35.0-40497.patch --]
[-- Type: text/x-diff, Size: 13712 bytes --]
From 85983ca8e1a04658160769239599d4081315040b Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:06:05 -0600
Subject: [PATCH 1/8] mpv: update to 0.35.0.
---
common/shlibs | 2 +-
srcpkgs/mpv/template | 57 ++++++++++++++++++++++++--------------------
2 files changed, 32 insertions(+), 27 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 481250d5c924..aa1bbafb1bba 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2214,7 +2214,7 @@ librrd.so.8 rrdtool-1.6.0_1
librrd_th.so.4 rrdtool-1.4.9_1
libmosquitto.so.1 libmosquitto-1.6.3_5
libmosquittopp.so.1 libmosquittopp-1.6.3_5
-libmpv.so.1 mpv-0.8.0_2
+libmpv.so.2 mpv-0.35.0_1
libmbedtls.so.12 mbedtls-2.13.1_1
libmbedcrypto.so.3 mbedtls-2.9.0_1
libmbedx509.so.0 mbedtls-2.9.0_1
diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template
index ded8c1bbe98f..0e3c3ed8f81c 100644
--- a/srcpkgs/mpv/template
+++ b/srcpkgs/mpv/template
@@ -1,15 +1,26 @@
# Template file for 'mpv'
pkgname=mpv
-version=0.34.1
-revision=2
-build_style=waf3
-configure_args="--confdir=/etc/mpv --docdir=/usr/share/examples/mpv
- --enable-cdda --enable-dvbin --enable-dvdnav --enable-libarchive
- --enable-libmpv-shared --enable-cplugins $(vopt_enable alsa) $(vopt_enable caca)
- $(vopt_enable jack) $(vopt_enable lcms lcms2) $(vopt_enable lua)
- $(vopt_enable openal) $(vopt_enable pulseaudio pulse) $(vopt_enable sdl2)
- $(vopt_enable vapoursynth) $(vopt_enable vdpau) $(vopt_enable vulkan)
- $(vopt_enable vulkan shaderc) $(vopt_enable wayland) $(vopt_enable x11)"
+version=0.35.0
+revision=1
+build_style=meson
+configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled
+ -Dlibmpv=true -Dcplugins=enabled
+ -Dalsa=$(vopt_if alsa enabled disabled)
+ -Dcaca=$(vopt_if caca enabled disabled)
+ -Djack=$(vopt_if jack enabled disabled)
+ -Dlcms2=$(vopt_if lcms enabled disabled)
+ -Dlua=$(vopt_if lua enabled disabled)
+ -Dopenal=$(vopt_if openal enabled disabled)
+ -Dpulse=$(vopt_if pulseaudio enabled disabled)
+ -Dsdl2=$(vopt_if sdl2 enabled disabled)
+ -Dvapoursynth=$(vopt_if vapoursynth enabled disabled)
+ -Dvdpau=$(vopt_if vdpau enabled disabled)
+ -Dvulkan=$(vopt_if vulkan enabled disabled)
+ -Dshaderc=$(vopt_if vulkan enabled disabled)
+ -Dwayland=$(vopt_if wayland enabled disabled)
+ -Dx11=$(vopt_if x11 enabled disabled)
+ -Dpipewire=$(vopt_if pipewire enabled disabled)
+ -Dsndio=$(vopt_if sndio enabled disabled)"
hostmakedepends="pkg-config python3-docutils $(vopt_if wayland wayland-devel)"
makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libass-devel libbluray-devel libcdio-paranoia-devel libdvdnav-devel
@@ -17,11 +28,12 @@ makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libarchive-devel $(vopt_if alsa alsa-lib-devel) $(vopt_if caca libcaca-devel)
$(vopt_if jack jack-devel) $(vopt_if lcms lcms2-devel)
$(vopt_if lua lua52-devel) $(vopt_if openal libopenal-devel)
- $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if sdl2 SDL2-devel)
- $(vopt_if vapoursynth vapoursynth-devel) $(vopt_if vdpau libvdpau-devel)
+ $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if pipewire pipewire-devel)
+ $(vopt_if sdl2 SDL2-devel) $(vopt_if vapoursynth vapoursynth-devel)
+ $(vopt_if vdpau libvdpau-devel) $(vopt_if sndio sndio-devel)
$(vopt_if vulkan "Vulkan-Headers vulkan-loader shaderc libplacebo-devel")
$(vopt_if wayland "wayland-devel wayland-protocols libxkbcommon-devel")
- $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel")"
+ $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel libXpresent-devel")"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Video player based on MPlayer/mplayer2"
maintainer="travankor <travankor@tuta.io>"
@@ -29,30 +41,23 @@ license="GPL-2.0-or-later"
homepage="https://mpv.io"
changelog="https://github.com/mpv-player/mpv/releases"
distfiles="https://github.com/mpv-player/${pkgname}/archive/v${version}.tar.gz"
-checksum=32ded8c13b6398310fa27767378193dc1db6d78b006b70dbcbd3123a1445e746
+checksum=dc411c899a64548250c142bf1fa1aa7528f1b4398a24c86b816093999049ec00
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
-build_options="alsa caca jack lcms lua openal pulseaudio sdl2 vapoursynth vdpau
- vulkan wayland x11"
-build_options_default="alsa jack lcms lua pulseaudio vdpau vulkan wayland x11"
+build_options="alsa caca jack lcms lua openal pulseaudio pipewire sdl2
+ sndio vapoursynth vdpau vulkan wayland x11"
+build_options_default="alsa jack lcms lua pulseaudio pipewire vdpau vulkan
+ sndio wayland x11"
desc_option_caca="Enable support for libcaca video output"
desc_option_lcms="Enable support for LittleCMS 2 engine"
desc_option_openal="Enable support for OpenAL audio output"
vopt_conflict sdl2 wayland
-if [ -z "$CROSS_BUILD" ]; then
- configure_args+=" --zshdir=/usr/share/zsh/site-functions"
-fi
-
-pre_configure() {
- python3 bootstrap.py
-}
-
mpv-devel_package() {
- depends="${sourcepkg}>=${version}_${revision}"
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
From 204fe84127ae3f05fc4d8b14a1521f41d5207153 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 2/8] celluloid: rebuild for mpv-0.35.0
---
srcpkgs/celluloid/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/celluloid/template b/srcpkgs/celluloid/template
index 739911562045..904fe4f631c0 100644
--- a/srcpkgs/celluloid/template
+++ b/srcpkgs/celluloid/template
@@ -1,7 +1,7 @@
# Template file for 'celluloid'
pkgname=celluloid
version=0.23
-revision=1
+revision=2
build_style=meson
hostmakedepends="gettext glib-devel pkg-config"
makedepends="gtk4-devel libepoxy-devel libglib-devel mpv-devel"
From ef732e6b0565624422c33aef59547fb743d41b35 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 3/8] minitube: rebuild for mpv-0.35.0
---
srcpkgs/minitube/patches/mpv-0.35.patch | 14 ++++++++++++++
srcpkgs/minitube/template | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/minitube/patches/mpv-0.35.patch
diff --git a/srcpkgs/minitube/patches/mpv-0.35.patch b/srcpkgs/minitube/patches/mpv-0.35.patch
new file mode 100644
index 000000000000..db13f9058f7f
--- /dev/null
+++ b/srcpkgs/minitube/patches/mpv-0.35.patch
@@ -0,0 +1,14 @@
+https://github.com/mpv-player/mpv/commit/632059816adde518c67f6606e3cfdef5bec18b52
+Index: minitube-3.9.3/lib/media/src/mpv/mpvwidget.cpp
+===================================================================
+--- minitube-3.9.3.orig/lib/media/src/mpv/mpvwidget.cpp
++++ minitube-3.9.3/lib/media/src/mpv/mpvwidget.cpp
+@@ -30,7 +30,7 @@ void MpvWidget::initializeGL() {
+ qDebug() << "initializeGL" << nativeParent;
+ if (nativeParent == nullptr) qFatal("No native parent");
+
+- mpv_opengl_init_params gl_init_params{get_proc_address, this, nullptr};
++ mpv_opengl_init_params gl_init_params{get_proc_address, this};
+ mpv_render_param params[]{{MPV_RENDER_PARAM_API_TYPE, (void *)MPV_RENDER_API_TYPE_OPENGL},
+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
+ {MPV_RENDER_PARAM_INVALID, nullptr},
diff --git a/srcpkgs/minitube/template b/srcpkgs/minitube/template
index 915458a43a6a..b4b50c0f9694 100644
--- a/srcpkgs/minitube/template
+++ b/srcpkgs/minitube/template
@@ -1,7 +1,7 @@
# Template file for 'minitube'
pkgname=minitube
version=3.9.3
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-tools qt5-host-tools qt5-qmake git"
makedepends="qt5-devel phonon-qt5-devel qt5-script-devel qt5-declarative-devel
From 951818f3887589475241f394cef99a82a16ddeeb Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 4/8] mpc-qt: update to 22.02.
---
srcpkgs/mpc-qt/template | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/srcpkgs/mpc-qt/template b/srcpkgs/mpc-qt/template
index 3e60cb06c896..7a7ae6f6cf96 100644
--- a/srcpkgs/mpc-qt/template
+++ b/srcpkgs/mpc-qt/template
@@ -1,6 +1,6 @@
# Template file for 'mpc-qt'
pkgname=mpc-qt
-version=18.08
+version=22.02
revision=1
build_style=qmake
configure_args="MPCQT_VERSION=${version}"
@@ -9,16 +9,6 @@ makedepends="qt5-devel qt5-x11extras-devel mpv-devel"
short_desc="Clone of Media Player Classic reimplemented in Qt"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="GPL-2.0-or-later"
-homepage="https://github.com/cmdrkotori/mpc-qt"
-#distfiles="${homepage}/archive/v${version}.tar.gz"
-# https://github.com/mpv-player/mpv/commit/575197ff8b0a0d8cd14f7ee78461c1d61d045d72
-distfiles="https://sources.voidlinux.org/mpc-qt-18.08/v18.08.tar.gz
- https://raw.githubusercontent.com/mpv-player/mpv/2337fa4e0213993398d36cb3222633766d677dfd/libmpv/qthelper.hpp"
-checksum="c58fd90926773c9da8bdfc1a8e4dba0b95cbc58cee6db9981e8de94fd9534406
- 86e1fcba6001829b7e23a856db84d01ebc76e63528f74064d7bc5705015a2684"
-skip_extraction="qthelper.hpp"
-
-post_extract() {
- mkdir -p mpv
- cp $XBPS_SRCDISTDIR/mpc-qt-$version/qthelper.hpp mpv/
-}
+homepage="https://mpc-qt.github.io/"
+distfiles="https://github.com/mpc-qt/mpc-qt/archive/refs/tags/v${version}.tar.gz"
+checksum=fa6cffd6bde1304b6c0ec3aba8e98d03f4d73999fee4e4546026ec159530350d
From 6f9085568c75b003f86e164fee0129ac8cb54931 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 5/8] [TODO] orion: rebuild for mpv-0.35.0
---
srcpkgs/orion/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/orion/template b/srcpkgs/orion/template
index d69f2ff04dd4..b1f2215b1d43 100644
--- a/srcpkgs/orion/template
+++ b/srcpkgs/orion/template
@@ -1,7 +1,7 @@
# Template file for 'orion'
pkgname=orion
version=1.6.7
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-declarative-devel qt5-quickcontrols2-devel mpv-devel"
From 946ac44c785ce0a7796bd802ebc76d991282c30c Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 6/8] qimgv: rebuild for mpv-0.35.0
---
srcpkgs/qimgv/patches/fix-mpv-opengl.patch | 11 +++++++++++
srcpkgs/qimgv/template | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/qimgv/patches/fix-mpv-opengl.patch
diff --git a/srcpkgs/qimgv/patches/fix-mpv-opengl.patch b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
new file mode 100644
index 000000000000..9fd3dffe9f96
--- /dev/null
+++ b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
@@ -0,0 +1,11 @@
+--- a/plugins/player_mpv/src/mpvwidget.cpp
++++ b/plugins/player_mpv/src/mpvwidget.cpp
+@@ -69,7 +69,7 @@
+ }
+
+ void MpvWidget::initializeGL() {
+- mpv_opengl_init_params gl_init_params{get_proc_address, nullptr, nullptr};
++ mpv_opengl_init_params gl_init_params{get_proc_address, nullptr};
+ mpv_render_param params[]{
+ {MPV_RENDER_PARAM_API_TYPE, const_cast<char *>(MPV_RENDER_API_TYPE_OPENGL)},
+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
diff --git a/srcpkgs/qimgv/template b/srcpkgs/qimgv/template
index bb91ee98eab7..7eb30db33992 100644
--- a/srcpkgs/qimgv/template
+++ b/srcpkgs/qimgv/template
@@ -1,7 +1,7 @@
# Template file for 'qimgv'
pkgname=qimgv
version=1.0.2
-revision=1
+revision=2
build_style=cmake
configure_args="$(vopt_if video -DVIDEO_SUPPORT=ON -DVIDEO_SUPPORT=OFF)
$(vopt_if scale -DOPENCV_SUPPORT=ON -DOPENCV_SUPPORT=OFF)
From a00d4639506168027b011d8e680cc5172044e6c6 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 7/8] [TODO] vidcutter: update to 6.0.5.1.
---
srcpkgs/vidcutter/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/vidcutter/template b/srcpkgs/vidcutter/template
index 07bda50c917c..93e6dbefaacc 100644
--- a/srcpkgs/vidcutter/template
+++ b/srcpkgs/vidcutter/template
@@ -1,7 +1,7 @@
# Template file for 'vidcutter'
pkgname=vidcutter
-version=6.0.0
-revision=6
+version=6.0.5.1
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython"
makedepends="mpv-devel python3-devel"
@@ -12,7 +12,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/ozmartian/vidcutter"
distfiles="https://github.com/ozmartian/vidcutter/archive/refs/tags/${version}.tar.gz"
-checksum=c09be7eceaf42ff7211fe3b8125279c4fec7f7d251d272b61d579e426bd4e2c2
+checksum=c6374eaedb845f9e580e555dd12c1db1cf2ffa28d3756b08e2ae28c1a4cd4a96
pre_build() {
rm -f vidcutter/libs/pympv/mpv.c
From 8bca94f3da8584e2ee1b7957dc24b89644caa9bb Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Mon, 14 Nov 2022 08:08:31 -0600
Subject: [PATCH 8/8] stremio-shell: rebuild for mpv-0.35.0
---
srcpkgs/stremio-shell/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/stremio-shell/template b/srcpkgs/stremio-shell/template
index 641000d6fe64..2b0c0b23af69 100644
--- a/srcpkgs/stremio-shell/template
+++ b/srcpkgs/stremio-shell/template
@@ -1,7 +1,7 @@
# Template file for 'stremio-shell'
pkgname=stremio-shell
version=4.4.159
-revision=2
+revision=3
_singleapplication_hash=f1e15081dc57a9c03f7f4f165677f18802e1437a
_libmpv_hash=822a41a1087daf2911fc336fbd9509f962158fef
create_wrksrc=yes
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (11 preceding siblings ...)
2022-11-14 14:10 ` [PR PATCH] [Updated] mpv-0.35.0 abenson
@ 2022-11-14 14:11 ` abenson
2022-11-14 14:12 ` mpv-0.35.0 abenson
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: abenson @ 2022-11-14 14:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
New comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1313771972
Comment:
Alright, that leaves vidcutter, which I will open an issue with upstream, and orion, which is abandoned upstream.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (12 preceding siblings ...)
2022-11-14 14:11 ` mpv-0.35.0 abenson
@ 2022-11-14 14:12 ` abenson
2022-11-14 14:18 ` [PR PATCH] [Updated] mpv-0.35.0 abenson
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: abenson @ 2022-11-14 14:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 254 bytes --]
New comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1313771972
Comment:
Alright, that leaves vidcutter, which I will pull patches from upstream, and orion, which is abandoned upstream.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (13 preceding siblings ...)
2022-11-14 14:12 ` mpv-0.35.0 abenson
@ 2022-11-14 14:18 ` abenson
2022-11-14 14:54 ` mpv-0.35.0 sgn
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: abenson @ 2022-11-14 14:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
There is an updated pull request by abenson against master on the void-packages repository
https://github.com/abenson/void-packages mpv_0.35.0
https://github.com/void-linux/void-packages/pull/40497
mpv-0.35.0
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### Local build testing
- I built this PR locally for my native architecture, x86-64
[ci skip]
A patch file from https://github.com/void-linux/void-packages/pull/40497.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mpv_0.35.0-40497.patch --]
[-- Type: text/x-diff, Size: 3118611 bytes --]
From 85983ca8e1a04658160769239599d4081315040b Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:06:05 -0600
Subject: [PATCH 1/8] mpv: update to 0.35.0.
---
common/shlibs | 2 +-
srcpkgs/mpv/template | 57 ++++++++++++++++++++++++--------------------
2 files changed, 32 insertions(+), 27 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 481250d5c924..aa1bbafb1bba 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2214,7 +2214,7 @@ librrd.so.8 rrdtool-1.6.0_1
librrd_th.so.4 rrdtool-1.4.9_1
libmosquitto.so.1 libmosquitto-1.6.3_5
libmosquittopp.so.1 libmosquittopp-1.6.3_5
-libmpv.so.1 mpv-0.8.0_2
+libmpv.so.2 mpv-0.35.0_1
libmbedtls.so.12 mbedtls-2.13.1_1
libmbedcrypto.so.3 mbedtls-2.9.0_1
libmbedx509.so.0 mbedtls-2.9.0_1
diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template
index ded8c1bbe98f..0e3c3ed8f81c 100644
--- a/srcpkgs/mpv/template
+++ b/srcpkgs/mpv/template
@@ -1,15 +1,26 @@
# Template file for 'mpv'
pkgname=mpv
-version=0.34.1
-revision=2
-build_style=waf3
-configure_args="--confdir=/etc/mpv --docdir=/usr/share/examples/mpv
- --enable-cdda --enable-dvbin --enable-dvdnav --enable-libarchive
- --enable-libmpv-shared --enable-cplugins $(vopt_enable alsa) $(vopt_enable caca)
- $(vopt_enable jack) $(vopt_enable lcms lcms2) $(vopt_enable lua)
- $(vopt_enable openal) $(vopt_enable pulseaudio pulse) $(vopt_enable sdl2)
- $(vopt_enable vapoursynth) $(vopt_enable vdpau) $(vopt_enable vulkan)
- $(vopt_enable vulkan shaderc) $(vopt_enable wayland) $(vopt_enable x11)"
+version=0.35.0
+revision=1
+build_style=meson
+configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled
+ -Dlibmpv=true -Dcplugins=enabled
+ -Dalsa=$(vopt_if alsa enabled disabled)
+ -Dcaca=$(vopt_if caca enabled disabled)
+ -Djack=$(vopt_if jack enabled disabled)
+ -Dlcms2=$(vopt_if lcms enabled disabled)
+ -Dlua=$(vopt_if lua enabled disabled)
+ -Dopenal=$(vopt_if openal enabled disabled)
+ -Dpulse=$(vopt_if pulseaudio enabled disabled)
+ -Dsdl2=$(vopt_if sdl2 enabled disabled)
+ -Dvapoursynth=$(vopt_if vapoursynth enabled disabled)
+ -Dvdpau=$(vopt_if vdpau enabled disabled)
+ -Dvulkan=$(vopt_if vulkan enabled disabled)
+ -Dshaderc=$(vopt_if vulkan enabled disabled)
+ -Dwayland=$(vopt_if wayland enabled disabled)
+ -Dx11=$(vopt_if x11 enabled disabled)
+ -Dpipewire=$(vopt_if pipewire enabled disabled)
+ -Dsndio=$(vopt_if sndio enabled disabled)"
hostmakedepends="pkg-config python3-docutils $(vopt_if wayland wayland-devel)"
makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libass-devel libbluray-devel libcdio-paranoia-devel libdvdnav-devel
@@ -17,11 +28,12 @@ makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libarchive-devel $(vopt_if alsa alsa-lib-devel) $(vopt_if caca libcaca-devel)
$(vopt_if jack jack-devel) $(vopt_if lcms lcms2-devel)
$(vopt_if lua lua52-devel) $(vopt_if openal libopenal-devel)
- $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if sdl2 SDL2-devel)
- $(vopt_if vapoursynth vapoursynth-devel) $(vopt_if vdpau libvdpau-devel)
+ $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if pipewire pipewire-devel)
+ $(vopt_if sdl2 SDL2-devel) $(vopt_if vapoursynth vapoursynth-devel)
+ $(vopt_if vdpau libvdpau-devel) $(vopt_if sndio sndio-devel)
$(vopt_if vulkan "Vulkan-Headers vulkan-loader shaderc libplacebo-devel")
$(vopt_if wayland "wayland-devel wayland-protocols libxkbcommon-devel")
- $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel")"
+ $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel libXpresent-devel")"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Video player based on MPlayer/mplayer2"
maintainer="travankor <travankor@tuta.io>"
@@ -29,30 +41,23 @@ license="GPL-2.0-or-later"
homepage="https://mpv.io"
changelog="https://github.com/mpv-player/mpv/releases"
distfiles="https://github.com/mpv-player/${pkgname}/archive/v${version}.tar.gz"
-checksum=32ded8c13b6398310fa27767378193dc1db6d78b006b70dbcbd3123a1445e746
+checksum=dc411c899a64548250c142bf1fa1aa7528f1b4398a24c86b816093999049ec00
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
-build_options="alsa caca jack lcms lua openal pulseaudio sdl2 vapoursynth vdpau
- vulkan wayland x11"
-build_options_default="alsa jack lcms lua pulseaudio vdpau vulkan wayland x11"
+build_options="alsa caca jack lcms lua openal pulseaudio pipewire sdl2
+ sndio vapoursynth vdpau vulkan wayland x11"
+build_options_default="alsa jack lcms lua pulseaudio pipewire vdpau vulkan
+ sndio wayland x11"
desc_option_caca="Enable support for libcaca video output"
desc_option_lcms="Enable support for LittleCMS 2 engine"
desc_option_openal="Enable support for OpenAL audio output"
vopt_conflict sdl2 wayland
-if [ -z "$CROSS_BUILD" ]; then
- configure_args+=" --zshdir=/usr/share/zsh/site-functions"
-fi
-
-pre_configure() {
- python3 bootstrap.py
-}
-
mpv-devel_package() {
- depends="${sourcepkg}>=${version}_${revision}"
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
From 204fe84127ae3f05fc4d8b14a1521f41d5207153 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 2/8] celluloid: rebuild for mpv-0.35.0
---
srcpkgs/celluloid/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/celluloid/template b/srcpkgs/celluloid/template
index 739911562045..904fe4f631c0 100644
--- a/srcpkgs/celluloid/template
+++ b/srcpkgs/celluloid/template
@@ -1,7 +1,7 @@
# Template file for 'celluloid'
pkgname=celluloid
version=0.23
-revision=1
+revision=2
build_style=meson
hostmakedepends="gettext glib-devel pkg-config"
makedepends="gtk4-devel libepoxy-devel libglib-devel mpv-devel"
From ef732e6b0565624422c33aef59547fb743d41b35 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 3/8] minitube: rebuild for mpv-0.35.0
---
srcpkgs/minitube/patches/mpv-0.35.patch | 14 ++++++++++++++
srcpkgs/minitube/template | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/minitube/patches/mpv-0.35.patch
diff --git a/srcpkgs/minitube/patches/mpv-0.35.patch b/srcpkgs/minitube/patches/mpv-0.35.patch
new file mode 100644
index 000000000000..db13f9058f7f
--- /dev/null
+++ b/srcpkgs/minitube/patches/mpv-0.35.patch
@@ -0,0 +1,14 @@
+https://github.com/mpv-player/mpv/commit/632059816adde518c67f6606e3cfdef5bec18b52
+Index: minitube-3.9.3/lib/media/src/mpv/mpvwidget.cpp
+===================================================================
+--- minitube-3.9.3.orig/lib/media/src/mpv/mpvwidget.cpp
++++ minitube-3.9.3/lib/media/src/mpv/mpvwidget.cpp
+@@ -30,7 +30,7 @@ void MpvWidget::initializeGL() {
+ qDebug() << "initializeGL" << nativeParent;
+ if (nativeParent == nullptr) qFatal("No native parent");
+
+- mpv_opengl_init_params gl_init_params{get_proc_address, this, nullptr};
++ mpv_opengl_init_params gl_init_params{get_proc_address, this};
+ mpv_render_param params[]{{MPV_RENDER_PARAM_API_TYPE, (void *)MPV_RENDER_API_TYPE_OPENGL},
+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
+ {MPV_RENDER_PARAM_INVALID, nullptr},
diff --git a/srcpkgs/minitube/template b/srcpkgs/minitube/template
index 915458a43a6a..b4b50c0f9694 100644
--- a/srcpkgs/minitube/template
+++ b/srcpkgs/minitube/template
@@ -1,7 +1,7 @@
# Template file for 'minitube'
pkgname=minitube
version=3.9.3
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-tools qt5-host-tools qt5-qmake git"
makedepends="qt5-devel phonon-qt5-devel qt5-script-devel qt5-declarative-devel
From 951818f3887589475241f394cef99a82a16ddeeb Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 4/8] mpc-qt: update to 22.02.
---
srcpkgs/mpc-qt/template | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/srcpkgs/mpc-qt/template b/srcpkgs/mpc-qt/template
index 3e60cb06c896..7a7ae6f6cf96 100644
--- a/srcpkgs/mpc-qt/template
+++ b/srcpkgs/mpc-qt/template
@@ -1,6 +1,6 @@
# Template file for 'mpc-qt'
pkgname=mpc-qt
-version=18.08
+version=22.02
revision=1
build_style=qmake
configure_args="MPCQT_VERSION=${version}"
@@ -9,16 +9,6 @@ makedepends="qt5-devel qt5-x11extras-devel mpv-devel"
short_desc="Clone of Media Player Classic reimplemented in Qt"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="GPL-2.0-or-later"
-homepage="https://github.com/cmdrkotori/mpc-qt"
-#distfiles="${homepage}/archive/v${version}.tar.gz"
-# https://github.com/mpv-player/mpv/commit/575197ff8b0a0d8cd14f7ee78461c1d61d045d72
-distfiles="https://sources.voidlinux.org/mpc-qt-18.08/v18.08.tar.gz
- https://raw.githubusercontent.com/mpv-player/mpv/2337fa4e0213993398d36cb3222633766d677dfd/libmpv/qthelper.hpp"
-checksum="c58fd90926773c9da8bdfc1a8e4dba0b95cbc58cee6db9981e8de94fd9534406
- 86e1fcba6001829b7e23a856db84d01ebc76e63528f74064d7bc5705015a2684"
-skip_extraction="qthelper.hpp"
-
-post_extract() {
- mkdir -p mpv
- cp $XBPS_SRCDISTDIR/mpc-qt-$version/qthelper.hpp mpv/
-}
+homepage="https://mpc-qt.github.io/"
+distfiles="https://github.com/mpc-qt/mpc-qt/archive/refs/tags/v${version}.tar.gz"
+checksum=fa6cffd6bde1304b6c0ec3aba8e98d03f4d73999fee4e4546026ec159530350d
From 6f9085568c75b003f86e164fee0129ac8cb54931 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 5/8] [TODO] orion: rebuild for mpv-0.35.0
---
srcpkgs/orion/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/orion/template b/srcpkgs/orion/template
index d69f2ff04dd4..b1f2215b1d43 100644
--- a/srcpkgs/orion/template
+++ b/srcpkgs/orion/template
@@ -1,7 +1,7 @@
# Template file for 'orion'
pkgname=orion
version=1.6.7
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-declarative-devel qt5-quickcontrols2-devel mpv-devel"
From 946ac44c785ce0a7796bd802ebc76d991282c30c Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 6/8] qimgv: rebuild for mpv-0.35.0
---
srcpkgs/qimgv/patches/fix-mpv-opengl.patch | 11 +++++++++++
srcpkgs/qimgv/template | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/qimgv/patches/fix-mpv-opengl.patch
diff --git a/srcpkgs/qimgv/patches/fix-mpv-opengl.patch b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
new file mode 100644
index 000000000000..9fd3dffe9f96
--- /dev/null
+++ b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
@@ -0,0 +1,11 @@
+--- a/plugins/player_mpv/src/mpvwidget.cpp
++++ b/plugins/player_mpv/src/mpvwidget.cpp
+@@ -69,7 +69,7 @@
+ }
+
+ void MpvWidget::initializeGL() {
+- mpv_opengl_init_params gl_init_params{get_proc_address, nullptr, nullptr};
++ mpv_opengl_init_params gl_init_params{get_proc_address, nullptr};
+ mpv_render_param params[]{
+ {MPV_RENDER_PARAM_API_TYPE, const_cast<char *>(MPV_RENDER_API_TYPE_OPENGL)},
+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
diff --git a/srcpkgs/qimgv/template b/srcpkgs/qimgv/template
index bb91ee98eab7..7eb30db33992 100644
--- a/srcpkgs/qimgv/template
+++ b/srcpkgs/qimgv/template
@@ -1,7 +1,7 @@
# Template file for 'qimgv'
pkgname=qimgv
version=1.0.2
-revision=1
+revision=2
build_style=cmake
configure_args="$(vopt_if video -DVIDEO_SUPPORT=ON -DVIDEO_SUPPORT=OFF)
$(vopt_if scale -DOPENCV_SUPPORT=ON -DOPENCV_SUPPORT=OFF)
From 9f55dff699a802589ae61e393559b4045b80c1e9 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 7/8] vidcutter: update to 6.0.5.1.
---
srcpkgs/vidcutter/patches/mpv-0.35-1.patch | 52658 +++++++++++++++++++
srcpkgs/vidcutter/patches/mpv-0.35-2.patch | 24 +
srcpkgs/vidcutter/patches/mpv-0.35-3.patch | 13289 +++++
srcpkgs/vidcutter/template | 6 +-
4 files changed, 65974 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/vidcutter/patches/mpv-0.35-1.patch
create mode 100644 srcpkgs/vidcutter/patches/mpv-0.35-2.patch
create mode 100644 srcpkgs/vidcutter/patches/mpv-0.35-3.patch
diff --git a/srcpkgs/vidcutter/patches/mpv-0.35-1.patch b/srcpkgs/vidcutter/patches/mpv-0.35-1.patch
new file mode 100644
index 000000000000..c33bad4a82bb
--- /dev/null
+++ b/srcpkgs/vidcutter/patches/mpv-0.35-1.patch
@@ -0,0 +1,52658 @@
+https://github.com/ozmartian/vidcutter/commit/1d88825feb5a73a50d019914ba9d0008562a58ce.patch
+
+From 1d88825feb5a73a50d019914ba9d0008562a58ce Mon Sep 17 00:00:00 2001
+From: Pete Alexandrou <pete@ozmartians.com>
+Date: Tue, 22 Feb 2022 11:29:00 +1100
+Subject: [PATCH] Patches to pympv to workaround opengl_cb deprecation from
+ libmpv
+
+---
+ vidcutter/libs/pympv/client.pxd | 54 +-
+ vidcutter/libs/pympv/mpv.c | 46394 ++++++++++++++----------------
+ vidcutter/libs/pympv/mpv.pyx | 192 +-
+ 3 files changed, 21832 insertions(+), 24808 deletions(-)
+
+diff --git a/vidcutter/libs/pympv/client.pxd b/vidcutter/libs/pympv/client.pxd
+index befe219e..d9a8816f 100644
+--- a/vidcutter/libs/pympv/client.pxd
++++ b/vidcutter/libs/pympv/client.pxd
+@@ -112,9 +112,9 @@ cdef extern from "mpv/client.h":
+
+ int mpv_load_config_file(mpv_handle *ctx, const char *filename) nogil
+
+- void mpv_suspend(mpv_handle *ctx) nogil
++ # void mpv_suspend(mpv_handle *ctx) nogil
+
+- void mpv_resume(mpv_handle *ctx) nogil
++ # void mpv_resume(mpv_handle *ctx) nogil
+
+ int64_t mpv_get_time_us(mpv_handle *ctx) nogil
+
+@@ -200,21 +200,21 @@ cdef extern from "mpv/client.h":
+ MPV_EVENT_START_FILE
+ MPV_EVENT_END_FILE
+ MPV_EVENT_FILE_LOADED
+- MPV_EVENT_TRACKS_CHANGED
+- MPV_EVENT_TRACK_SWITCHED
++ # MPV_EVENT_TRACKS_CHANGED
++ # MPV_EVENT_TRACK_SWITCHED
+ MPV_EVENT_IDLE
+- MPV_EVENT_PAUSE
+- MPV_EVENT_UNPAUSE
++ # MPV_EVENT_PAUSE
++ # MPV_EVENT_UNPAUSE
+ MPV_EVENT_TICK
+- MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ # MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ MPV_EVENT_CLIENT_MESSAGE
+ MPV_EVENT_VIDEO_RECONFIG
+ MPV_EVENT_AUDIO_RECONFIG
+- MPV_EVENT_METADATA_UPDATE
++ # MPV_EVENT_METADATA_UPDATE
+ MPV_EVENT_SEEK
+ MPV_EVENT_PLAYBACK_RESTART
+ MPV_EVENT_PROPERTY_CHANGE
+- MPV_EVENT_CHAPTER_CHANGE
++ # MPV_EVENT_CHAPTER_CHANGE
+
+ const char *mpv_event_name(mpv_event_id event) nogil
+
+@@ -249,9 +249,9 @@ cdef extern from "mpv/client.h":
+ int reason
+ int error
+
+- cdef struct mpv_event_script_input_dispatch:
+- int arg0
+- const char *type
++ # cdef struct mpv_event_script_input_dispatch:
++ # int arg0
++ # const char *type
+
+ cdef struct mpv_event_client_message:
+ int num_args
+@@ -282,27 +282,27 @@ cdef extern from "mpv/client.h":
+
+ void *mpv_get_sub_api(mpv_handle *ctx, mpv_sub_api sub_api) nogil
+
+-cdef extern from "mpv/opengl_cb.h":
+- struct mpv_opengl_cb_context:
+- pass
++# cdef extern from "mpv/opengl_cb.h":
++# struct mpv_opengl_cb_context:
++# pass
+
+- ctypedef void (*mpv_opengl_cb_update_fn)(void *cb_ctx) nogil
+- ctypedef void *(*mpv_opengl_cb_get_proc_address_fn)(void *fn_ctx,
+- const char *name) nogil
++# ctypedef void (*mpv_opengl_cb_update_fn)(void *cb_ctx) nogil
++# ctypedef void *(*mpv_opengl_cb_get_proc_address_fn)(void *fn_ctx,
++# const char *name) nogil
+
+- void mpv_opengl_cb_set_update_callback(mpv_opengl_cb_context *ctx,
+- mpv_opengl_cb_update_fn callback,
+- void *callback_ctx) nogil
++# void mpv_opengl_cb_set_update_callback(mpv_opengl_cb_context *ctx,
++# mpv_opengl_cb_update_fn callback,
++# void *callback_ctx) nogil
+
+- int mpv_opengl_cb_init_gl(mpv_opengl_cb_context *ctx, const char *exts,
+- mpv_opengl_cb_get_proc_address_fn get_proc_address,
+- void *get_proc_address_ctx) nogil
++# int mpv_opengl_cb_init_gl(mpv_opengl_cb_context *ctx, const char *exts,
++# mpv_opengl_cb_get_proc_address_fn get_proc_address,
++# void *get_proc_address_ctx) nogil
+
+- int mpv_opengl_cb_draw(mpv_opengl_cb_context *ctx, int fbo, int w, int h) nogil
++# int mpv_opengl_cb_draw(mpv_opengl_cb_context *ctx, int fbo, int w, int h) nogil
+
+- int mpv_opengl_cb_report_flip(mpv_opengl_cb_context *ctx, int64_t time) nogil
++# int mpv_opengl_cb_report_flip(mpv_opengl_cb_context *ctx, int64_t time) nogil
+
+- int mpv_opengl_cb_uninit_gl(mpv_opengl_cb_context *ctx) nogil
++# int mpv_opengl_cb_uninit_gl(mpv_opengl_cb_context *ctx) nogil
+
+
+ cdef extern from "mpv/render.h":
+diff --git a/vidcutter/libs/pympv/mpv.c b/vidcutter/libs/pympv/mpv.c
+index 202aae8c..a3522ef5 100644
+--- a/vidcutter/libs/pympv/mpv.c
++++ b/vidcutter/libs/pympv/mpv.c
+@@ -1,4 +1,4 @@
+-/* Generated by Cython 0.29.21 */
++/* Generated by Cython 0.29.28 */
+
+ /* BEGIN: Cython Metadata
+ {
+@@ -19,15 +19,17 @@
+ }
+ END: Cython Metadata */
+
++#ifndef PY_SSIZE_T_CLEAN
+ #define PY_SSIZE_T_CLEAN
++#endif /* PY_SSIZE_T_CLEAN */
+ #include "Python.h"
+ #ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
+ #error Cython requires Python 2.6+ or Python 3.3+.
+ #else
+-#define CYTHON_ABI "0_29_21"
+-#define CYTHON_HEX_VERSION 0x001D15F0
++#define CYTHON_ABI "0_29_28"
++#define CYTHON_HEX_VERSION 0x001D1CF0
+ #define CYTHON_FUTURE_DIVISION 0
+ #include <stddef.h>
+ #ifndef offsetof
+@@ -174,7 +176,7 @@ END: Cython Metadata */
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+- #if PY_VERSION_HEX < 0x030300F0
++ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #elif !defined(CYTHON_USE_UNICODE_WRITER)
+@@ -189,11 +191,14 @@ END: Cython Metadata */
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+- #ifndef CYTHON_FAST_THREAD_STATE
++ #if PY_VERSION_HEX >= 0x030B00A4
++ #undef CYTHON_FAST_THREAD_STATE
++ #define CYTHON_FAST_THREAD_STATE 0
++ #elif !defined(CYTHON_FAST_THREAD_STATE)
+ #define CYTHON_FAST_THREAD_STATE 1
+ #endif
+ #ifndef CYTHON_FAST_PYCALL
+- #define CYTHON_FAST_PYCALL 1
++ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1)
+ #endif
+ #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
+@@ -204,7 +209,10 @@ END: Cython Metadata */
+ #ifndef CYTHON_USE_DICT_VERSIONS
+ #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
+ #endif
+- #ifndef CYTHON_USE_EXC_INFO_STACK
++ #if PY_VERSION_HEX >= 0x030B00A4
++ #undef CYTHON_USE_EXC_INFO_STACK
++ #define CYTHON_USE_EXC_INFO_STACK 0
++ #elif !defined(CYTHON_USE_EXC_INFO_STACK)
+ #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
+ #endif
+ #endif
+@@ -212,7 +220,9 @@ END: Cython Metadata */
+ #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+- #include "longintrepr.h"
++ #if PY_MAJOR_VERSION < 3
++ #include "longintrepr.h"
++ #endif
+ #undef SHIFT
+ #undef BASE
+ #undef MASK
+@@ -329,9 +339,68 @@ END: Cython Metadata */
+ #define __Pyx_DefaultClassType PyClass_Type
+ #else
+ #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+-#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
+- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
++ #define __Pyx_DefaultClassType PyType_Type
++#if PY_VERSION_HEX >= 0x030B00A1
++ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
++ PyObject *code, PyObject *c, PyObject* n, PyObject *v,
++ PyObject *fv, PyObject *cell, PyObject* fn,
++ PyObject *name, int fline, PyObject *lnos) {
++ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
++ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
++ const char *fn_cstr=NULL;
++ const char *name_cstr=NULL;
++ PyCodeObject* co=NULL;
++ PyObject *type, *value, *traceback;
++ PyErr_Fetch(&type, &value, &traceback);
++ if (!(kwds=PyDict_New())) goto end;
++ if (!(argcount=PyLong_FromLong(a))) goto end;
++ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
++ if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
++ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
++ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
++ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
++ if (!(nlocals=PyLong_FromLong(l))) goto end;
++ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
++ if (!(stacksize=PyLong_FromLong(s))) goto end;
++ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
++ if (!(flags=PyLong_FromLong(f))) goto end;
++ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
++ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
++ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
++ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
++ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
++ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
++ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
++ Py_XDECREF((PyObject*)co);
++ co = (PyCodeObject*)call_result;
++ call_result = NULL;
++ if (0) {
++ cleanup_code_too:
++ Py_XDECREF((PyObject*)co);
++ co = NULL;
++ }
++ end:
++ Py_XDECREF(kwds);
++ Py_XDECREF(argcount);
++ Py_XDECREF(posonlyargcount);
++ Py_XDECREF(kwonlyargcount);
++ Py_XDECREF(nlocals);
++ Py_XDECREF(stacksize);
++ Py_XDECREF(replace);
++ Py_XDECREF(call_result);
++ Py_XDECREF(empty);
++ if (type) {
++ PyErr_Restore(type, value, traceback);
++ }
++ return co;
++ }
+ #else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+@@ -445,8 +514,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
+ #endif
+ #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+ #define CYTHON_PEP393_ENABLED 1
++ #if defined(PyUnicode_IS_READY)
+ #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
+ 0 : _PyUnicode_Ready((PyObject *)(op)))
++ #else
++ #define __Pyx_PyUnicode_READY(op) (0)
++ #endif
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
+@@ -455,7 +528,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
+ #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
++ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
++ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
++ #else
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
++ #endif
+ #else
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
+ #endif
+@@ -627,7 +704,6 @@ static CYTHON_INLINE float __PYX_NAN() {
+ #include <string.h>
+ #include <stdlib.h>
+ #include "mpv/client.h"
+-#include "mpv/opengl_cb.h"
+ #include "mpv/render.h"
+ #include "mpv/render_gl.h"
+ #ifdef _OPENMP
+@@ -857,12 +933,10 @@ static const char *__pyx_f[] = {
+
+ /*--- Type declarations ---*/
+ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached;
+-struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_Property;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_Event;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_Context;
+-struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext;
+ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext;
+@@ -897,21 +971,6 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":169
+- *
+- *
+- * cdef class InputDispatch(object): # <<<<<<<<<<<<<<
+- * """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
+- *
+- */
+-struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch {
+- PyObject_HEAD
+- struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch *__pyx_vtab;
+- PyObject *arg0;
+- PyObject *type;
+-};
+-
+-
+ /* "vidcutter/libs/pympv/mpv.pyx":182
+ *
+ *
+@@ -978,21 +1037,6 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Context {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":822
+- * (<object>ctx)()
+- *
+- * cdef class OpenGLContext(object): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_opengl_cb_context *_ctx
+- */
+-struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext {
+- PyObject_HEAD
+- struct mpv_opengl_cb_context *_ctx;
+- int inited;
+- PyObject *update_cb;
+-};
+-
+-
+ /* "vidcutter/libs/pympv/mpv.pyx":881
+ * DEF MAX_RENDER_PARAMS = 32
+ *
+@@ -1080,20 +1124,6 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":169
+- *
+- *
+- * cdef class InputDispatch(object): # <<<<<<<<<<<<<<
+- * """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
+- *
+- */
+-
+-struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch {
+- PyObject *(*_init)(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *, struct mpv_event_script_input_dispatch *);
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch *__pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch;
+-
+-
+ /* "vidcutter/libs/pympv/mpv.pyx":182
+ *
+ *
+@@ -1318,6 +1348,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args,
+ #ifndef Py_MEMBER_SIZE
+ #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
+ #endif
++#if CYTHON_FAST_PYCALL
+ static size_t __pyx_pyframe_localsplus_offset = 0;
+ #include "frameobject.h"
+ #define __Pxy_PyFrame_Initialize_Offsets()\
+@@ -1325,6 +1356,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args,
+ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
+ #define __Pyx_PyFrame_GetLocalsplus(frame)\
+ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
++#endif // CYTHON_FAST_PYCALL
+ #endif
+
+ /* PyCFunctionFastCall.proto */
+@@ -1747,12 +1779,23 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+ static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename);
+
++/* GCCDiagnostics.proto */
++#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
++#define __Pyx_HAS_GCC_DIAGNOSTIC
++#endif
++
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
++/* CIntFromPy.proto */
++static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
++
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_event_id(enum mpv_event_id value);
+
++/* CIntFromPy.proto */
++static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObject *);
++
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value);
+
+@@ -1768,30 +1811,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_end_file_reason(enum m
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_render_update_flag(enum mpv_render_update_flag value);
+
++/* CIntFromPy.proto */
++static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
++
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);
+
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);
+
+-/* CIntToPy.proto */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value);
+-
+-/* CIntToPy.proto */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+-
+-/* CIntFromPy.proto */
+-static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+-
+-/* CIntFromPy.proto */
+-static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObject *);
+-
+-/* CIntFromPy.proto */
+-static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+-
+ /* CIntFromPy.proto */
+ static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);
+
++/* CIntToPy.proto */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value);
++
+ /* CIntFromPy.proto */
+ static CYTHON_INLINE enum mpv_format __Pyx_PyInt_As_enum__mpv_format(PyObject *);
+
+@@ -1801,6 +1835,9 @@ static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);
+ /* CIntFromPy.proto */
+ static CYTHON_INLINE intptr_t __Pyx_PyInt_As_intptr_t(PyObject *);
+
++/* CIntToPy.proto */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
++
+ /* CheckBinaryVersion.proto */
+ static int __Pyx_check_binary_version(void);
+
+@@ -1808,7 +1845,6 @@ static int __Pyx_check_binary_version(void);
+ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self, struct mpv_event_end_file *__pyx_v_eof); /* proto*/
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, struct mpv_event_script_input_dispatch *__pyx_v_input); /* proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, struct mpv_event_log_message *__pyx_v_msg); /* proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, struct mpv_event_property *__pyx_v_prop); /* proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event); /* proto*/
+@@ -1834,12 +1870,10 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(st
+
+ /* Module declarations from 'vidcutter.libs.mpv' */
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = 0;
+-static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_Property = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_Event = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_Context = 0;
+-static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_OpenGLContext = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = 0;
+@@ -1855,7 +1889,6 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *); /*proto*/
+ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *, PyObject *); /*proto*/
+ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *); /*proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, PyObject *); /*proto*/
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *, PyObject *); /*proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, PyObject *); /*proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, PyObject *); /*proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, PyObject *); /*proto*/
+@@ -1873,7 +1906,6 @@ static PyObject *__pyx_builtin_range;
+ static PyObject *__pyx_builtin_id;
+ static PyObject *__pyx_builtin_enumerate;
+ static PyObject *__pyx_builtin_TypeError;
+-static PyObject *__pyx_builtin_DeprecationWarning;
+ static const char __pyx_k_e[] = "e";
+ static const char __pyx_k_h[] = "h";
+ static const char __pyx_k_k[] = "k";
+@@ -1900,7 +1932,6 @@ static const char __pyx_k_call[] = "call";
+ static const char __pyx_k_code[] = "code";
+ static const char __pyx_k_data[] = "data";
+ static const char __pyx_k_dict[] = "__dict__";
+-static const char __pyx_k_exts[] = "exts";
+ static const char __pyx_k_idle[] = "idle";
+ static const char __pyx_k_info[] = "info";
+ static const char __pyx_k_init[] = "__init__";
+@@ -1926,7 +1957,6 @@ static const char __pyx_k_error[] = "error";
+ static const char __pyx_k_event[] = "event";
+ static const char __pyx_k_fatal[] = "fatal";
+ static const char __pyx_k_nomem[] = "nomem";
+-static const char __pyx_k_pause[] = "pause";
+ static const char __pyx_k_range[] = "range";
+ static const char __pyx_k_start[] = "start";
+ static const char __pyx_k_trace[] = "trace";
+@@ -1973,7 +2003,6 @@ static const char __pyx_k_present[] = "present";
+ static const char __pyx_k_release[] = "release";
+ static const char __pyx_k_success[] = "success";
+ static const char __pyx_k_timeout[] = "timeout";
+-static const char __pyx_k_unpause[] = "unpause";
+ static const char __pyx_k_version[] = "__version__";
+ static const char __pyx_k_wrapped[] = "wrapped";
+ static const char __pyx_k_MPVError[] = "MPVError";
+@@ -1998,7 +2027,6 @@ static const char __pyx_k_pyx_state[] = "__pyx_state";
+ static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
+ static const char __pyx_k_render_fd[] = "render_fd";
+ static const char __pyx_k_threading[] = "threading";
+-static const char __pyx_k_uninit_gl[] = "uninit_gl";
+ static const char __pyx_k_API_OPENGL[] = "API_OPENGL";
+ static const char __pyx_k_CAPI_MAJOR[] = "_CAPI_MAJOR";
+ static const char __pyx_k_CAPI_MINOR[] = "_CAPI_MINOR";
+@@ -2038,8 +2066,6 @@ static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
+ static const char __pyx_k_set_property[] = "set_property";
+ static const char __pyx_k_stringsource[] = "stringsource";
+ static const char __pyx_k_version_info[] = "version_info";
+-static const char __pyx_k_InputDispatch[] = "InputDispatch";
+-static const char __pyx_k_OpenGLContext[] = "OpenGLContext";
+ static const char __pyx_k_RenderContext[] = "RenderContext";
+ static const char __pyx_k_ReplyUserData[] = "_ReplyUserData";
+ static const char __pyx_k_command_error[] = "command_error";
+@@ -2053,18 +2079,15 @@ static const char __pyx_k_CallbackThread[] = "CallbackThread";
+ static const char __pyx_k_MIN_CAPI_MINOR[] = "_MIN_CAPI_MINOR";
+ static const char __pyx_k_ao_init_failed[] = "ao_init_failed";
+ static const char __pyx_k_audio_reconfig[] = "audio_reconfig";
+-static const char __pyx_k_chapter_change[] = "chapter_change";
+ static const char __pyx_k_client_message[] = "client_message";
+ static const char __pyx_k_loading_failed[] = "loading_failed";
+ static const char __pyx_k_property_error[] = "property_error";
+ static const char __pyx_k_skip_rendering[] = "skip_rendering";
+-static const char __pyx_k_tracks_changed[] = "tracks_changed";
+ static const char __pyx_k_unknown_format[] = "unknown_format";
+ static const char __pyx_k_video_reconfig[] = "video_reconfig";
+ static const char __pyx_k_vo_init_failed[] = "vo_init_failed";
+ static const char __pyx_k_MPVError___init[] = "MPVError.__init__";
+ static const char __pyx_k_internal_format[] = "internal_format";
+-static const char __pyx_k_metadata_update[] = "metadata_update";
+ static const char __pyx_k_not_implemented[] = "not_implemented";
+ static const char __pyx_k_nothing_to_play[] = "nothing_to_play";
+ static const char __pyx_k_property_change[] = "property_change";
+@@ -2073,7 +2096,6 @@ static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
+ static const char __pyx_k_set_icc_profile[] = "set_icc_profile";
+ static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
+ static const char __pyx_k_surrogateescape[] = "surrogateescape";
+-static const char __pyx_k_tracks_switched[] = "tracks_switched";
+ static const char __pyx_k_EndOfFileReached[] = "EndOfFileReached";
+ static const char __pyx_k_advanced_control[] = "advanced_control";
+ static const char __pyx_k_drmModeAtomicReq[] = "drmModeAtomicReq*";
+@@ -2085,7 +2107,6 @@ static const char __pyx_k_invalid_parameter[] = "invalid_parameter";
+ static const char __pyx_k_set_ambient_light[] = "set_ambient_light";
+ static const char __pyx_k_CallbackThread_run[] = "CallbackThread.run";
+ static const char __pyx_k_CallbackThread_set[] = "CallbackThread.set";
+-static const char __pyx_k_DeprecationWarning[] = "DeprecationWarning";
+ static const char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError";
+ static const char __pyx_k_UnicodeEncodeError[] = "UnicodeEncodeError";
+ static const char __pyx_k_Unknown_api_type_r[] = "Unknown api_type %r";
+@@ -2109,12 +2130,9 @@ static const char __pyx_k_RenderParams_overflow[] = "RenderParams overflow";
+ static const char __pyx_k_block_for_target_time[] = "block_for_target_time";
+ static const char __pyx_k_errors_locals_wrapped[] = "_errors.<locals>.wrapped";
+ static const char __pyx_k_pyx_unpickle_Property[] = "__pyx_unpickle_Property";
+-static const char __pyx_k_script_input_dispatch[] = "script_input_dispatch";
+ static const char __pyx_k_Context_creation_error[] = "Context creation error";
+ static const char __pyx_k_CallbackThread_shutdown[] = "CallbackThread.shutdown";
+ static const char __pyx_k_pyx_unpickle_LogMessage[] = "__pyx_unpickle_LogMessage";
+-static const char __pyx_k_OpenGL_API_not_available[] = "OpenGL API not available";
+-static const char __pyx_k_pyx_unpickle_InputDispatch[] = "__pyx_unpickle_InputDispatch";
+ static const char __pyx_k_CallbackThread_mpv_callback[] = "CallbackThread.mpv_callback";
+ static const char __pyx_k_pyx_unpickle_RenderFrameInfo[] = "__pyx_unpickle_RenderFrameInfo";
+ static const char __pyx_k_vidcutter_libs_pympv_mpv_pyx[] = "vidcutter/libs/pympv/mpv.pyx";
+@@ -2125,11 +2143,9 @@ static const char __pyx_k_self_params_cannot_be_converted[] = "self.params canno
+ static const char __pyx_k_Incompatible_checksums_s_vs_0x05[] = "Incompatible checksums (%s vs 0x0572d11 = (data, name))";
+ static const char __pyx_k_Incompatible_checksums_s_vs_0x56[] = "Incompatible checksums (%s vs 0x56be9b6 = (error, reason))";
+ static const char __pyx_k_Incompatible_checksums_s_vs_0x87[] = "Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))";
+-static const char __pyx_k_Incompatible_checksums_s_vs_0xbf[] = "Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))";
+ static const char __pyx_k_Incompatible_checksums_s_vs_0xd4[] = "Incompatible checksums (%s vs 0xd41d8cd = ())";
+ static const char __pyx_k_Incompatible_checksums_s_vs_0xda[] = "Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))";
+ static const char __pyx_k_Known_possible_values_for_EndOfF[] = "Known possible values for EndOfFileReached reason.\n\n You should handle the possibility that the reason may not be any of these values.\n ";
+-static const char __pyx_k_OpenGLContext_is_deprecated_plea[] = "OpenGLContext is deprecated, please switch to RenderContext";
+ static const char __pyx_k_Set_of_known_error_codes_from_Mp[] = "Set of known error codes from MpvError and Event responses.\n\n Mostly wraps the enum mpv_error.\n Values might not always be integers in the future.\n You should handle the possibility that error codes may not be any of these values.\n ";
+ static const char __pyx_k_Set_of_known_values_for_Event_id[] = "Set of known values for Event ids.\n\n Mostly wraps the enum mpv_event_id.\n Values might not always be integers in the future.\n You should handle the possibility that event ids may not be any of these values.\n ";
+ static const char __pyx_k_Unknown_or_invalid_pointer_objec[] = "Unknown or invalid pointer object: %r";
+@@ -2151,7 +2167,6 @@ static PyObject *__pyx_n_s_CallbackThread_set;
+ static PyObject *__pyx_n_s_CallbackThread_shutdown;
+ static PyObject *__pyx_n_s_Context;
+ static PyObject *__pyx_kp_s_Context_creation_error;
+-static PyObject *__pyx_n_s_DeprecationWarning;
+ static PyObject *__pyx_n_s_EOFReasons;
+ static PyObject *__pyx_n_s_EndOfFileReached;
+ static PyObject *__pyx_n_s_Errors;
+@@ -2161,20 +2176,15 @@ static PyObject *__pyx_n_s_ImportError;
+ static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x05;
+ static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x56;
+ static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x87;
+-static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xbf;
+ static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd4;
+ static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xda;
+-static PyObject *__pyx_n_s_InputDispatch;
+ static PyObject *__pyx_kp_s_Known_possible_values_for_EndOfF;
+ static PyObject *__pyx_n_s_LogLevels;
+ static PyObject *__pyx_n_s_LogMessage;
+ static PyObject *__pyx_n_s_MIN_CAPI_MINOR;
+ static PyObject *__pyx_n_s_MPVError;
+ static PyObject *__pyx_n_s_MPVError___init;
+-static PyObject *__pyx_n_s_OpenGLContext;
+-static PyObject *__pyx_kp_s_OpenGLContext_is_deprecated_plea;
+ static PyObject *__pyx_n_s_OpenGLRenderContext;
+-static PyObject *__pyx_kp_s_OpenGL_API_not_available;
+ static PyObject *__pyx_n_s_PickleError;
+ static PyObject *__pyx_n_s_Property;
+ static PyObject *__pyx_n_s_PyMPVError;
+@@ -2211,7 +2221,6 @@ static PyObject *__pyx_n_s_block_for_target_time;
+ static PyObject *__pyx_n_s_block_vsync;
+ static PyObject *__pyx_n_s_call;
+ static PyObject *__pyx_n_s_callback;
+-static PyObject *__pyx_n_s_chapter_change;
+ static PyObject *__pyx_n_s_client_message;
+ static PyObject *__pyx_n_s_cline_in_traceback;
+ static PyObject *__pyx_n_s_close;
+@@ -2244,7 +2253,6 @@ static PyObject *__pyx_n_s_error;
+ static PyObject *__pyx_n_s_errors;
+ static PyObject *__pyx_n_s_errors_locals_wrapped;
+ static PyObject *__pyx_n_s_event;
+-static PyObject *__pyx_n_s_exts;
+ static PyObject *__pyx_n_s_fatal;
+ static PyObject *__pyx_n_s_fbo;
+ static PyObject *__pyx_n_s_fd;
+@@ -2280,7 +2288,6 @@ static PyObject *__pyx_n_s_lock;
+ static PyObject *__pyx_n_s_log_message;
+ static PyObject *__pyx_n_s_main;
+ static PyObject *__pyx_n_s_metaclass;
+-static PyObject *__pyx_n_s_metadata_update;
+ static PyObject *__pyx_n_s_module;
+ static PyObject *__pyx_n_s_mpv;
+ static PyObject *__pyx_n_s_mpv_callback;
+@@ -2301,7 +2308,6 @@ static PyObject *__pyx_n_s_opengl_fbo;
+ static PyObject *__pyx_n_s_opengl_init_params;
+ static PyObject *__pyx_n_s_option_error;
+ static PyObject *__pyx_n_s_option_format;
+-static PyObject *__pyx_n_s_pause;
+ static PyObject *__pyx_n_s_pickle;
+ static PyObject *__pyx_n_s_playback_restart;
+ static PyObject *__pyx_n_s_prepare;
+@@ -2319,7 +2325,6 @@ static PyObject *__pyx_n_s_pyx_state;
+ static PyObject *__pyx_n_s_pyx_type;
+ static PyObject *__pyx_n_s_pyx_unpickle_EndOfFileReached;
+ static PyObject *__pyx_n_s_pyx_unpickle_Event;
+-static PyObject *__pyx_n_s_pyx_unpickle_InputDispatch;
+ static PyObject *__pyx_n_s_pyx_unpickle_LogMessage;
+ static PyObject *__pyx_n_s_pyx_unpickle_Property;
+ static PyObject *__pyx_n_s_pyx_unpickle_RenderFrameInfo;
+@@ -2340,7 +2345,6 @@ static PyObject *__pyx_n_s_repeat;
+ static PyObject *__pyx_n_s_request_event;
+ static PyObject *__pyx_n_s_run;
+ static PyObject *__pyx_n_s_s;
+-static PyObject *__pyx_n_s_script_input_dispatch;
+ static PyObject *__pyx_n_s_seek;
+ static PyObject *__pyx_n_s_self;
+ static PyObject *__pyx_kp_s_self__ctx_cannot_be_converted_to;
+@@ -2373,13 +2377,9 @@ static PyObject *__pyx_n_s_threading;
+ static PyObject *__pyx_n_s_tick;
+ static PyObject *__pyx_n_s_timeout;
+ static PyObject *__pyx_n_s_trace;
+-static PyObject *__pyx_n_s_tracks_changed;
+-static PyObject *__pyx_n_s_tracks_switched;
+-static PyObject *__pyx_n_s_uninit_gl;
+ static PyObject *__pyx_n_s_uninitialized;
+ static PyObject *__pyx_n_s_unknown_format;
+ static PyObject *__pyx_n_s_unobserve_property;
+-static PyObject *__pyx_n_s_unpause;
+ static PyObject *__pyx_n_s_unsupported;
+ static PyObject *__pyx_n_s_update;
+ static PyObject *__pyx_kp_s_utf_8;
+@@ -2409,14 +2409,6 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_2__set__(str
+ static int __pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self); /* proto */
+ static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+ static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self); /* proto */
+@@ -2462,41 +2454,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_suspend(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2resume(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_40unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44opengl_cb_api(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_2init_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_exts, PyObject *__pyx_v_get_proc_address); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_4set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_cb); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_6draw(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_fbo, PyObject *__pyx_v_w, PyObject *__pyx_v_h); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_8report_flip(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_time); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_10uninit_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
+-static void __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_12__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self); /* proto */
+ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self); /* proto */
+@@ -2526,18 +2506,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNU
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_InputDispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_InputDispatch(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Property(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Event(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Context(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+@@ -2545,13 +2522,12 @@ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeOb
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_int_0;
+ static PyObject *__pyx_int_1;
++static PyObject *__pyx_int_2;
+ static PyObject *__pyx_int_3;
+-static PyObject *__pyx_int_9;
+ static PyObject *__pyx_int_32;
+ static PyObject *__pyx_int_5713169;
+ static PyObject *__pyx_int_90958262;
+ static PyObject *__pyx_int_142036910;
+-static PyObject *__pyx_int_200688041;
+ static PyObject *__pyx_int_222419149;
+ static PyObject *__pyx_int_228822053;
+ static PyObject *__pyx_int_neg_1;
+@@ -2573,48 +2549,43 @@ static PyObject *__pyx_tuple__16;
+ static PyObject *__pyx_tuple__17;
+ static PyObject *__pyx_tuple__18;
+ static PyObject *__pyx_tuple__19;
+-static PyObject *__pyx_tuple__20;
+ static PyObject *__pyx_tuple__21;
+-static PyObject *__pyx_tuple__22;
+-static PyObject *__pyx_tuple__24;
+-static PyObject *__pyx_tuple__26;
++static PyObject *__pyx_tuple__23;
++static PyObject *__pyx_tuple__25;
++static PyObject *__pyx_tuple__27;
+ static PyObject *__pyx_tuple__28;
+ static PyObject *__pyx_tuple__30;
+-static PyObject *__pyx_tuple__31;
+-static PyObject *__pyx_tuple__33;
+-static PyObject *__pyx_tuple__35;
+-static PyObject *__pyx_tuple__37;
+-static PyObject *__pyx_tuple__39;
+-static PyObject *__pyx_tuple__41;
+-static PyObject *__pyx_tuple__43;
+-static PyObject *__pyx_tuple__45;
+-static PyObject *__pyx_tuple__47;
+-static PyObject *__pyx_tuple__49;
+-static PyObject *__pyx_tuple__51;
+-static PyObject *__pyx_tuple__53;
+-static PyObject *__pyx_tuple__55;
+-static PyObject *__pyx_tuple__57;
+-static PyObject *__pyx_tuple__59;
++static PyObject *__pyx_tuple__32;
++static PyObject *__pyx_tuple__34;
++static PyObject *__pyx_tuple__36;
++static PyObject *__pyx_tuple__38;
++static PyObject *__pyx_tuple__40;
++static PyObject *__pyx_tuple__42;
++static PyObject *__pyx_tuple__44;
++static PyObject *__pyx_tuple__46;
++static PyObject *__pyx_tuple__48;
++static PyObject *__pyx_tuple__50;
++static PyObject *__pyx_tuple__52;
++static PyObject *__pyx_tuple__54;
+ static PyObject *__pyx_codeobj__2;
+-static PyObject *__pyx_codeobj__23;
+-static PyObject *__pyx_codeobj__25;
+-static PyObject *__pyx_codeobj__27;
++static PyObject *__pyx_codeobj__20;
++static PyObject *__pyx_codeobj__22;
++static PyObject *__pyx_codeobj__24;
++static PyObject *__pyx_codeobj__26;
+ static PyObject *__pyx_codeobj__29;
+-static PyObject *__pyx_codeobj__32;
+-static PyObject *__pyx_codeobj__34;
+-static PyObject *__pyx_codeobj__36;
+-static PyObject *__pyx_codeobj__38;
+-static PyObject *__pyx_codeobj__40;
+-static PyObject *__pyx_codeobj__42;
+-static PyObject *__pyx_codeobj__44;
+-static PyObject *__pyx_codeobj__46;
+-static PyObject *__pyx_codeobj__48;
+-static PyObject *__pyx_codeobj__50;
+-static PyObject *__pyx_codeobj__52;
+-static PyObject *__pyx_codeobj__54;
+-static PyObject *__pyx_codeobj__56;
+-static PyObject *__pyx_codeobj__58;
+-static PyObject *__pyx_codeobj__60;
++static PyObject *__pyx_codeobj__31;
++static PyObject *__pyx_codeobj__33;
++static PyObject *__pyx_codeobj__35;
++static PyObject *__pyx_codeobj__37;
++static PyObject *__pyx_codeobj__39;
++static PyObject *__pyx_codeobj__41;
++static PyObject *__pyx_codeobj__43;
++static PyObject *__pyx_codeobj__45;
++static PyObject *__pyx_codeobj__47;
++static PyObject *__pyx_codeobj__49;
++static PyObject *__pyx_codeobj__51;
++static PyObject *__pyx_codeobj__53;
++static PyObject *__pyx_codeobj__55;
+ /* Late includes */
+
+ /* "vidcutter/libs/pympv/mpv.pyx":55
+@@ -2987,7 +2958,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ * # In python2, assume bytes and walk right through
+ * return s # <<<<<<<<<<<<<<
+ *
+- * PyEval_InitThreads()
++ * Py_Initialize()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_s);
+@@ -3616,15 +3587,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_2__setstate_c
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":176
+- * cdef public object arg0, type
++/* "vidcutter/libs/pympv/mpv.pyx":189
++ * cdef public object prefix, level, text, log_level
+ *
+- * cdef _init(self, mpv_event_script_input_dispatch* input): # <<<<<<<<<<<<<<
+- * self.arg0 = input.arg0
+- * self.type = _strdec(input.type)
++ * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
++ * self.level = _strdec(msg.level)
++ * self.prefix = _strdec(msg.prefix)
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, struct mpv_event_script_input_dispatch *__pyx_v_input) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, struct mpv_event_log_message *__pyx_v_msg) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+@@ -3636,31 +3607,82 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":177
++ /* "vidcutter/libs/pympv/mpv.pyx":190
+ *
+- * cdef _init(self, mpv_event_script_input_dispatch* input):
+- * self.arg0 = input.arg0 # <<<<<<<<<<<<<<
+- * self.type = _strdec(input.type)
+- * return self
++ * cdef _init(self, mpv_event_log_message* msg):
++ * self.level = _strdec(msg.level) # <<<<<<<<<<<<<<
++ * self.prefix = _strdec(msg.prefix)
++ * self.text = _strdec(msg.text)
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->level);
++ __Pyx_DECREF(__pyx_v_self->level);
++ __pyx_v_self->level = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":191
++ * cdef _init(self, mpv_event_log_message* msg):
++ * self.level = _strdec(msg.level)
++ * self.prefix = _strdec(msg.prefix) # <<<<<<<<<<<<<<
++ * self.text = _strdec(msg.text)
++ * self.log_level = msg.log_level
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_input->arg0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->arg0);
+- __Pyx_DECREF(__pyx_v_self->arg0);
+- __pyx_v_self->arg0 = __pyx_t_1;
++ __Pyx_GOTREF(__pyx_v_self->prefix);
++ __Pyx_DECREF(__pyx_v_self->prefix);
++ __pyx_v_self->prefix = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":178
+- * cdef _init(self, mpv_event_script_input_dispatch* input):
+- * self.arg0 = input.arg0
+- * self.type = _strdec(input.type) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":192
++ * self.level = _strdec(msg.level)
++ * self.prefix = _strdec(msg.prefix)
++ * self.text = _strdec(msg.text) # <<<<<<<<<<<<<<
++ * self.log_level = msg.log_level
+ * return self
+- *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_input->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -3675,18 +3697,33 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->type);
+- __Pyx_DECREF(__pyx_v_self->type);
+- __pyx_v_self->type = __pyx_t_1;
++ __Pyx_GOTREF(__pyx_v_self->text);
++ __Pyx_DECREF(__pyx_v_self->text);
++ __pyx_v_self->text = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":193
++ * self.prefix = _strdec(msg.prefix)
++ * self.text = _strdec(msg.text)
++ * self.log_level = msg.log_level # <<<<<<<<<<<<<<
++ * return self
++ *
++ */
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->log_level);
++ __Pyx_DECREF(__pyx_v_self->log_level);
++ __pyx_v_self->log_level = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":179
+- * self.arg0 = input.arg0
+- * self.type = _strdec(input.type)
++ /* "vidcutter/libs/pympv/mpv.pyx":194
++ * self.text = _strdec(msg.text)
++ * self.log_level = msg.log_level
+ * return self # <<<<<<<<<<<<<<
+ *
+ *
+@@ -3696,12 +3733,12 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":176
+- * cdef public object arg0, type
++ /* "vidcutter/libs/pympv/mpv.pyx":189
++ * cdef public object prefix, level, text, log_level
+ *
+- * cdef _init(self, mpv_event_script_input_dispatch* input): # <<<<<<<<<<<<<<
+- * self.arg0 = input.arg0
+- * self.type = _strdec(input.type)
++ * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
++ * self.level = _strdec(msg.level)
++ * self.prefix = _strdec(msg.prefix)
+ */
+
+ /* function exit code */
+@@ -3710,7 +3747,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.InputDispatch._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -3718,34 +3755,34 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":174
+- * Wraps: mpv_event_script_input_dispatch
++/* "vidcutter/libs/pympv/mpv.pyx":187
++ * Wraps: mpv_event_log_message
+ * """
+- * cdef public object arg0, type # <<<<<<<<<<<<<<
++ * cdef public object prefix, level, text, log_level # <<<<<<<<<<<<<<
+ *
+- * cdef _init(self, mpv_event_script_input_dispatch* input):
++ * cdef _init(self, mpv_event_log_message* msg):
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->arg0);
+- __pyx_r = __pyx_v_self->arg0;
++ __Pyx_INCREF(__pyx_v_self->prefix);
++ __pyx_r = __pyx_v_self->prefix;
+ goto __pyx_L0;
+
+ /* function exit code */
+@@ -3756,27 +3793,27 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(st
+ }
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value) {
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->arg0);
+- __Pyx_DECREF(__pyx_v_self->arg0);
+- __pyx_v_self->arg0 = __pyx_v_value;
++ __Pyx_GOTREF(__pyx_v_self->prefix);
++ __Pyx_DECREF(__pyx_v_self->prefix);
++ __pyx_v_self->prefix = __pyx_v_value;
+
+ /* function exit code */
+ __pyx_r = 0;
+@@ -3785,27 +3822,27 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(struct
+ }
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_5__del__(PyObject *__pyx_v_self) {
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->arg0);
+- __Pyx_DECREF(__pyx_v_self->arg0);
+- __pyx_v_self->arg0 = Py_None;
++ __Pyx_GOTREF(__pyx_v_self->prefix);
++ __Pyx_DECREF(__pyx_v_self->prefix);
++ __pyx_v_self->prefix = Py_None;
+
+ /* function exit code */
+ __pyx_r = 0;
+@@ -3814,25 +3851,25 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(struct
+ }
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->type);
+- __pyx_r = __pyx_v_self->type;
++ __Pyx_INCREF(__pyx_v_self->level);
++ __pyx_r = __pyx_v_self->level;
+ goto __pyx_L0;
+
+ /* function exit code */
+@@ -3843,27 +3880,27 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(st
+ }
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value) {
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->type);
+- __Pyx_DECREF(__pyx_v_self->type);
+- __pyx_v_self->type = __pyx_v_value;
++ __Pyx_GOTREF(__pyx_v_self->level);
++ __Pyx_DECREF(__pyx_v_self->level);
++ __pyx_v_self->level = __pyx_v_value;
+
+ /* function exit code */
+ __pyx_r = 0;
+@@ -3872,27 +3909,27 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(struct
+ }
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_5__del__(PyObject *__pyx_v_self) {
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->type);
+- __Pyx_DECREF(__pyx_v_self->type);
+- __pyx_v_self->type = Py_None;
++ __Pyx_GOTREF(__pyx_v_self->level);
++ __Pyx_DECREF(__pyx_v_self->level);
++ __pyx_v_self->level = Py_None;
+
+ /* function exit code */
+ __pyx_r = 0;
+@@ -3900,63 +3937,243 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(struct
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
+- */
+-
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
+- PyObject *__pyx_v_state = 0;
+- PyObject *__pyx_v__dict = 0;
+- int __pyx_v_use_setstate;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_self->text);
++ __pyx_r = __pyx_v_self->text;
++ goto __pyx_L0;
+
+- /* "(tree fragment)":5
+- * cdef object _dict
+- * cdef bint use_setstate
+- * state = (self.arg0, self.type) # <<<<<<<<<<<<<<
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- */
+- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v_self->arg0);
+- __Pyx_GIVEREF(__pyx_v_self->arg0);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->arg0);
+- __Pyx_INCREF(__pyx_v_self->type);
+- __Pyx_GIVEREF(__pyx_v_self->type);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->type);
++ /* function exit code */
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->text);
++ __Pyx_DECREF(__pyx_v_self->text);
++ __pyx_v_self->text = __pyx_v_value;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->text);
++ __Pyx_DECREF(__pyx_v_self->text);
++ __pyx_v_self->text = Py_None;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_self->log_level);
++ __pyx_r = __pyx_v_self->log_level;
++ goto __pyx_L0;
++
++ /* function exit code */
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->log_level);
++ __Pyx_DECREF(__pyx_v_self->log_level);
++ __pyx_v_self->log_level = __pyx_v_value;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->log_level);
++ __Pyx_DECREF(__pyx_v_self->log_level);
++ __pyx_v_self->log_level = Py_None;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
++ */
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
++ PyObject *__pyx_v_state = 0;
++ PyObject *__pyx_v__dict = 0;
++ int __pyx_v_use_setstate;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++
++ /* "(tree fragment)":5
++ * cdef object _dict
++ * cdef bint use_setstate
++ * state = (self.level, self.log_level, self.prefix, self.text) # <<<<<<<<<<<<<<
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
++ */
++ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_INCREF(__pyx_v_self->level);
++ __Pyx_GIVEREF(__pyx_v_self->level);
++ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->level);
++ __Pyx_INCREF(__pyx_v_self->log_level);
++ __Pyx_GIVEREF(__pyx_v_self->log_level);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->log_level);
++ __Pyx_INCREF(__pyx_v_self->prefix);
++ __Pyx_GIVEREF(__pyx_v_self->prefix);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->prefix);
++ __Pyx_INCREF(__pyx_v_self->text);
++ __Pyx_GIVEREF(__pyx_v_self->text);
++ PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->text);
+ __pyx_v_state = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "(tree fragment)":6
+ * cdef bint use_setstate
+- * state = (self.arg0, self.type)
++ * state = (self.level, self.log_level, self.prefix, self.text)
+ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
+ * if _dict is not None:
+ * state += (_dict,)
+@@ -3967,7 +4184,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+ __pyx_t_1 = 0;
+
+ /* "(tree fragment)":7
+- * state = (self.arg0, self.type)
++ * state = (self.level, self.log_level, self.prefix, self.text)
+ * _dict = getattr(self, '__dict__', None)
+ * if _dict is not None: # <<<<<<<<<<<<<<
+ * state += (_dict,)
+@@ -4000,12 +4217,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+ * state += (_dict,)
+ * use_setstate = True # <<<<<<<<<<<<<<
+ * else:
+- * use_setstate = self.arg0 is not None or self.type is not None
++ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+ */
+ __pyx_v_use_setstate = 1;
+
+ /* "(tree fragment)":7
+- * state = (self.arg0, self.type)
++ * state = (self.level, self.log_level, self.prefix, self.text)
+ * _dict = getattr(self, '__dict__', None)
+ * if _dict is not None: # <<<<<<<<<<<<<<
+ * state += (_dict,)
+@@ -4017,19 +4234,33 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+ /* "(tree fragment)":11
+ * use_setstate = True
+ * else:
+- * use_setstate = self.arg0 is not None or self.type is not None # <<<<<<<<<<<<<<
++ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None # <<<<<<<<<<<<<<
+ * if use_setstate:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+ */
+ /*else*/ {
+- __pyx_t_2 = (__pyx_v_self->arg0 != Py_None);
++ __pyx_t_2 = (__pyx_v_self->level != Py_None);
++ __pyx_t_5 = (__pyx_t_2 != 0);
++ if (!__pyx_t_5) {
++ } else {
++ __pyx_t_3 = __pyx_t_5;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_5 = (__pyx_v_self->log_level != Py_None);
++ __pyx_t_2 = (__pyx_t_5 != 0);
++ if (!__pyx_t_2) {
++ } else {
++ __pyx_t_3 = __pyx_t_2;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_2 = (__pyx_v_self->prefix != Py_None);
+ __pyx_t_5 = (__pyx_t_2 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+- __pyx_t_5 = (__pyx_v_self->type != Py_None);
++ __pyx_t_5 = (__pyx_v_self->text != Py_None);
+ __pyx_t_2 = (__pyx_t_5 != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L4_bool_binop_done:;
+@@ -4039,32 +4270,32 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+
+ /* "(tree fragment)":12
+ * else:
+- * use_setstate = self.arg0 is not None or self.type is not None
++ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+ * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+ * else:
+ */
+ __pyx_t_3 = (__pyx_v_use_setstate != 0);
+ if (__pyx_t_3) {
+
+ /* "(tree fragment)":13
+- * use_setstate = self.arg0 is not None or self.type is not None
++ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+ * if use_setstate:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state # <<<<<<<<<<<<<<
+ * else:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_InputDispatch); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_200688041);
+- __Pyx_GIVEREF(__pyx_int_200688041);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_200688041);
++ __Pyx_INCREF(__pyx_int_142036910);
++ __Pyx_GIVEREF(__pyx_int_142036910);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+@@ -4085,32 +4316,32 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+
+ /* "(tree fragment)":12
+ * else:
+- * use_setstate = self.arg0 is not None or self.type is not None
++ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+ * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+ * else:
+ */
+ }
+
+ /* "(tree fragment)":15
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+ * else:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state) # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state) # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state)
++ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_InputDispatch); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_200688041);
+- __Pyx_GIVEREF(__pyx_int_200688041);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_200688041);
++ __Pyx_INCREF(__pyx_int_142036910);
++ __Pyx_GIVEREF(__pyx_int_142036910);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
+ __Pyx_INCREF(__pyx_v_state);
+ __Pyx_GIVEREF(__pyx_v_state);
+ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
+@@ -4138,7 +4369,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.InputDispatch.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+@@ -4150,25 +4381,25 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+
+ /* "(tree fragment)":16
+ * else:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state)
++ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+@@ -4178,20 +4409,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cyth
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":17
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+ * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
++ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+ */
+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "(tree fragment)":16
+ * else:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state)
++ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+ */
+
+ /* function exit code */
+@@ -4199,7 +4430,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cyth
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.InputDispatch.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -4207,1494 +4438,1687 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cyth
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":189
+- * cdef public object prefix, level, text, log_level
++/* "vidcutter/libs/pympv/mpv.pyx":197
+ *
+- * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
+- * self.level = _strdec(msg.level)
+- * self.prefix = _strdec(msg.prefix)
++ *
++ * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
++ * if node.format == MPV_FORMAT_STRING:
++ * return _strdec(node.u.string)
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, struct mpv_event_log_message *__pyx_v_msg) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_node __pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_5;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_init", 0);
++ __Pyx_RefNannySetupContext("_convert_node_value", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":190
++ /* "vidcutter/libs/pympv/mpv.pyx":198
+ *
+- * cdef _init(self, mpv_event_log_message* msg):
+- * self.level = _strdec(msg.level) # <<<<<<<<<<<<<<
+- * self.prefix = _strdec(msg.prefix)
+- * self.text = _strdec(msg.text)
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->level);
+- __Pyx_DECREF(__pyx_v_self->level);
+- __pyx_v_self->level = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":191
+- * cdef _init(self, mpv_event_log_message* msg):
+- * self.level = _strdec(msg.level)
+- * self.prefix = _strdec(msg.prefix) # <<<<<<<<<<<<<<
+- * self.text = _strdec(msg.text)
+- * self.log_level = msg.log_level
++ * cdef _convert_node_value(mpv_node node):
++ * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * return _strdec(node.u.string)
++ * elif node.format == MPV_FORMAT_FLAG:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->prefix);
+- __Pyx_DECREF(__pyx_v_self->prefix);
+- __pyx_v_self->prefix = __pyx_t_1;
+- __pyx_t_1 = 0;
++ switch (__pyx_v_node.format) {
++ case MPV_FORMAT_STRING:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":192
+- * self.level = _strdec(msg.level)
+- * self.prefix = _strdec(msg.prefix)
+- * self.text = _strdec(msg.text) # <<<<<<<<<<<<<<
+- * self.log_level = msg.log_level
+- * return self
++ /* "vidcutter/libs/pympv/mpv.pyx":199
++ * cdef _convert_node_value(mpv_node node):
++ * if node.format == MPV_FORMAT_STRING:
++ * return _strdec(node.u.string) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_FLAG:
++ * return not not int(node.u.flag)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
+ }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->text);
+- __Pyx_DECREF(__pyx_v_self->text);
+- __pyx_v_self->text = __pyx_t_1;
+- __pyx_t_1 = 0;
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":193
+- * self.prefix = _strdec(msg.prefix)
+- * self.text = _strdec(msg.text)
+- * self.log_level = msg.log_level # <<<<<<<<<<<<<<
+- * return self
++ /* "vidcutter/libs/pympv/mpv.pyx":198
+ *
++ * cdef _convert_node_value(mpv_node node):
++ * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * return _strdec(node.u.string)
++ * elif node.format == MPV_FORMAT_FLAG:
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->log_level);
+- __Pyx_DECREF(__pyx_v_self->log_level);
+- __pyx_v_self->log_level = __pyx_t_1;
+- __pyx_t_1 = 0;
++ break;
++ case MPV_FORMAT_FLAG:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":194
+- * self.text = _strdec(msg.text)
+- * self.log_level = msg.log_level
+- * return self # <<<<<<<<<<<<<<
+- *
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":201
++ * return _strdec(node.u.string)
++ * elif node.format == MPV_FORMAT_FLAG:
++ * return not not int(node.u.flag) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_INT64:
++ * return int(node.u.int64)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(((PyObject *)__pyx_v_self));
+- __pyx_r = ((PyObject *)__pyx_v_self);
+- goto __pyx_L0;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_r = __pyx_t_2;
++ __pyx_t_2 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":189
+- * cdef public object prefix, level, text, log_level
+- *
+- * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
+- * self.level = _strdec(msg.level)
+- * self.prefix = _strdec(msg.prefix)
++ /* "vidcutter/libs/pympv/mpv.pyx":200
++ * if node.format == MPV_FORMAT_STRING:
++ * return _strdec(node.u.string)
++ * elif node.format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
++ * return not not int(node.u.flag)
++ * elif node.format == MPV_FORMAT_INT64:
+ */
++ break;
++ case MPV_FORMAT_INT64:
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":203
++ * return not not int(node.u.flag)
++ * elif node.format == MPV_FORMAT_INT64:
++ * return int(node.u.int64) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_DOUBLE:
++ * return float(node.u.double_)
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":187
+- * Wraps: mpv_event_log_message
+- * """
+- * cdef public object prefix, level, text, log_level # <<<<<<<<<<<<<<
+- *
+- * cdef _init(self, mpv_event_log_message* msg):
++ /* "vidcutter/libs/pympv/mpv.pyx":202
++ * elif node.format == MPV_FORMAT_FLAG:
++ * return not not int(node.u.flag)
++ * elif node.format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
++ * return int(node.u.int64)
++ * elif node.format == MPV_FORMAT_DOUBLE:
+ */
++ break;
++ case MPV_FORMAT_DOUBLE:
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->prefix);
+- __pyx_r = __pyx_v_self->prefix;
+- goto __pyx_L0;
+-
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":205
++ * return int(node.u.int64)
++ * elif node.format == MPV_FORMAT_DOUBLE:
++ * return float(node.u.double_) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_NODE_MAP:
++ * return _convert_value(node.u.list, node.format)
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":204
++ * elif node.format == MPV_FORMAT_INT64:
++ * return int(node.u.int64)
++ * elif node.format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
++ * return float(node.u.double_)
++ * elif node.format == MPV_FORMAT_NODE_MAP:
++ */
++ break;
++ case MPV_FORMAT_NODE_MAP:
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":207
++ * return float(node.u.double_)
++ * elif node.format == MPV_FORMAT_NODE_MAP:
++ * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_NODE_ARRAY:
++ * return _convert_value(node.u.list, node.format)
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->prefix);
+- __Pyx_DECREF(__pyx_v_self->prefix);
+- __pyx_v_self->prefix = __pyx_v_value;
++ /* "vidcutter/libs/pympv/mpv.pyx":206
++ * elif node.format == MPV_FORMAT_DOUBLE:
++ * return float(node.u.double_)
++ * elif node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * return _convert_value(node.u.list, node.format)
++ * elif node.format == MPV_FORMAT_NODE_ARRAY:
++ */
++ break;
++ case MPV_FORMAT_NODE_ARRAY:
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":209
++ * return _convert_value(node.u.list, node.format)
++ * elif node.format == MPV_FORMAT_NODE_ARRAY:
++ * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
++ * return None
++ *
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":208
++ * elif node.format == MPV_FORMAT_NODE_MAP:
++ * return _convert_value(node.u.list, node.format)
++ * elif node.format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
++ * return _convert_value(node.u.list, node.format)
++ * return None
++ */
++ break;
++ default: break;
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":210
++ * elif node.format == MPV_FORMAT_NODE_ARRAY:
++ * return _convert_value(node.u.list, node.format)
++ * return None # <<<<<<<<<<<<<<
++ *
++ *
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->prefix);
+- __Pyx_DECREF(__pyx_v_self->prefix);
+- __pyx_v_self->prefix = Py_None;
++ /* "vidcutter/libs/pympv/mpv.pyx":197
++ *
++ *
++ * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
++ * if node.format == MPV_FORMAT_STRING:
++ * return _strdec(node.u.string)
++ */
+
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._convert_node_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++/* "vidcutter/libs/pympv/mpv.pyx":213
++ *
++ *
++ * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * cdef mpv_node_list nodelist
++ */
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data, enum mpv_format __pyx_v_format) {
++ struct mpv_node __pyx_v_node;
++ struct mpv_node_list __pyx_v_nodelist;
++ PyObject *__pyx_v_values = NULL;
++ int __pyx_v_i;
++ PyObject *__pyx_v_value = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->level);
+- __pyx_r = __pyx_v_self->level;
+- goto __pyx_L0;
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ int __pyx_t_4;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("_convert_value", 0);
+
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":216
++ * cdef mpv_node node
++ * cdef mpv_node_list nodelist
++ * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
++ * node = (<mpv_node*>data)[0]
++ * return _convert_node_value(node)
++ */
++ switch (__pyx_v_format) {
++ case MPV_FORMAT_NODE:
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":217
++ * cdef mpv_node_list nodelist
++ * if format == MPV_FORMAT_NODE:
++ * node = (<mpv_node*>data)[0] # <<<<<<<<<<<<<<
++ * return _convert_node_value(node)
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ */
++ __pyx_v_node = (((struct mpv_node *)__pyx_v_data)[0]);
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":218
++ * if format == MPV_FORMAT_NODE:
++ * node = (<mpv_node*>data)[0]
++ * return _convert_node_value(node) # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * nodelist = (<mpv_node_list*>data)[0]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->level);
+- __Pyx_DECREF(__pyx_v_self->level);
+- __pyx_v_self->level = __pyx_v_value;
++ /* "vidcutter/libs/pympv/mpv.pyx":216
++ * cdef mpv_node node
++ * cdef mpv_node_list nodelist
++ * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
++ * node = (<mpv_node*>data)[0]
++ * return _convert_node_value(node)
++ */
++ break;
++ case MPV_FORMAT_NODE_ARRAY:
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":220
++ * return _convert_node_value(node)
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
++ * values = []
++ * for i in range(nodelist.num):
++ */
++ __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":221
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = [] # <<<<<<<<<<<<<<
++ * for i in range(nodelist.num):
++ * values.append(_convert_node_value(nodelist.values[i]))
++ */
++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_values = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":222
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = []
++ * for i in range(nodelist.num): # <<<<<<<<<<<<<<
++ * values.append(_convert_node_value(nodelist.values[i]))
++ * return values
++ */
++ __pyx_t_2 = __pyx_v_nodelist.num;
++ __pyx_t_3 = __pyx_t_2;
++ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
++ __pyx_v_i = __pyx_t_4;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->level);
+- __Pyx_DECREF(__pyx_v_self->level);
+- __pyx_v_self->level = Py_None;
++ /* "vidcutter/libs/pympv/mpv.pyx":223
++ * values = []
++ * for i in range(nodelist.num):
++ * values.append(_convert_node_value(nodelist.values[i])) # <<<<<<<<<<<<<<
++ * return values
++ * elif format == MPV_FORMAT_NODE_MAP:
++ */
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":224
++ * for i in range(nodelist.num):
++ * values.append(_convert_node_value(nodelist.values[i]))
++ * return values # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_NODE_MAP:
++ * nodelist = (<mpv_node_list*>data)[0]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_values);
++ __pyx_r = __pyx_v_values;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":219
++ * node = (<mpv_node*>data)[0]
++ * return _convert_node_value(node)
++ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = []
++ */
++ break;
++ case MPV_FORMAT_NODE_MAP:
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":226
++ * return values
++ * elif format == MPV_FORMAT_NODE_MAP:
++ * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
++ * values = {}
++ * for i in range(nodelist.num):
++ */
++ __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->text);
+- __pyx_r = __pyx_v_self->text;
+- goto __pyx_L0;
++ /* "vidcutter/libs/pympv/mpv.pyx":227
++ * elif format == MPV_FORMAT_NODE_MAP:
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = {} # <<<<<<<<<<<<<<
++ * for i in range(nodelist.num):
++ * value = _convert_node_value(nodelist.values[i])
++ */
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_values = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":228
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = {}
++ * for i in range(nodelist.num): # <<<<<<<<<<<<<<
++ * value = _convert_node_value(nodelist.values[i])
++ * values[_strdec(nodelist.keys[i])] = value
++ */
++ __pyx_t_2 = __pyx_v_nodelist.num;
++ __pyx_t_3 = __pyx_t_2;
++ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
++ __pyx_v_i = __pyx_t_4;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":229
++ * values = {}
++ * for i in range(nodelist.num):
++ * value = _convert_node_value(nodelist.values[i]) # <<<<<<<<<<<<<<
++ * values[_strdec(nodelist.keys[i])] = value
++ * return values
++ */
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":230
++ * for i in range(nodelist.num):
++ * value = _convert_node_value(nodelist.values[i])
++ * values[_strdec(nodelist.keys[i])] = value # <<<<<<<<<<<<<<
++ * return values
++ * elif format == MPV_FORMAT_STRING:
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->text);
+- __Pyx_DECREF(__pyx_v_self->text);
+- __pyx_v_self->text = __pyx_v_value;
++ /* "vidcutter/libs/pympv/mpv.pyx":231
++ * value = _convert_node_value(nodelist.values[i])
++ * values[_strdec(nodelist.keys[i])] = value
++ * return values # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_STRING:
++ * return _strdec(((<char**>data)[0]))
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_values);
++ __pyx_r = __pyx_v_values;
++ goto __pyx_L0;
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":225
++ * values.append(_convert_node_value(nodelist.values[i]))
++ * return values
++ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = {}
++ */
++ break;
++ case MPV_FORMAT_STRING:
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->text);
+- __Pyx_DECREF(__pyx_v_self->text);
+- __pyx_v_self->text = Py_None;
+-
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":233
++ * return values
++ * elif format == MPV_FORMAT_STRING:
++ * return _strdec(((<char**>data)[0])) # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_FLAG:
++ * return not not (<uint64_t*>data)[0]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->log_level);
+- __pyx_r = __pyx_v_self->log_level;
+- goto __pyx_L0;
++ /* "vidcutter/libs/pympv/mpv.pyx":232
++ * values[_strdec(nodelist.keys[i])] = value
++ * return values
++ * elif format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * return _strdec(((<char**>data)[0]))
++ * elif format == MPV_FORMAT_FLAG:
++ */
++ break;
++ case MPV_FORMAT_FLAG:
+
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":235
++ * return _strdec(((<char**>data)[0]))
++ * elif format == MPV_FORMAT_FLAG:
++ * return not not (<uint64_t*>data)[0] # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_INT64:
++ * return int((<uint64_t*>data)[0])
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":234
++ * elif format == MPV_FORMAT_STRING:
++ * return _strdec(((<char**>data)[0]))
++ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
++ * return not not (<uint64_t*>data)[0]
++ * elif format == MPV_FORMAT_INT64:
++ */
++ break;
++ case MPV_FORMAT_INT64:
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":237
++ * return not not (<uint64_t*>data)[0]
++ * elif format == MPV_FORMAT_INT64:
++ * return int((<uint64_t*>data)[0]) # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_DOUBLE:
++ * return float((<double*>data)[0])
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_6;
++ __pyx_t_6 = 0;
++ goto __pyx_L0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->log_level);
+- __Pyx_DECREF(__pyx_v_self->log_level);
+- __pyx_v_self->log_level = __pyx_v_value;
++ /* "vidcutter/libs/pympv/mpv.pyx":236
++ * elif format == MPV_FORMAT_FLAG:
++ * return not not (<uint64_t*>data)[0]
++ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
++ * return int((<uint64_t*>data)[0])
++ * elif format == MPV_FORMAT_DOUBLE:
++ */
++ break;
++ case MPV_FORMAT_DOUBLE:
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":239
++ * return int((<uint64_t*>data)[0])
++ * elif format == MPV_FORMAT_DOUBLE:
++ * return float((<double*>data)[0]) # <<<<<<<<<<<<<<
++ * return None
++ *
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_r = __pyx_t_6;
++ __pyx_t_6 = 0;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":238
++ * elif format == MPV_FORMAT_INT64:
++ * return int((<uint64_t*>data)[0])
++ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
++ * return float((<double*>data)[0])
++ * return None
++ */
++ break;
++ default: break;
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":240
++ * elif format == MPV_FORMAT_DOUBLE:
++ * return float((<double*>data)[0])
++ * return None # <<<<<<<<<<<<<<
++ *
++ *
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->log_level);
+- __Pyx_DECREF(__pyx_v_self->log_level);
+- __pyx_v_self->log_level = Py_None;
++ /* "vidcutter/libs/pympv/mpv.pyx":213
++ *
++ *
++ * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * cdef mpv_node_list nodelist
++ */
+
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._convert_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_values);
++ __Pyx_XDECREF(__pyx_v_value);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++/* "vidcutter/libs/pympv/mpv.pyx":250
++ * cdef public object name, data
++ *
++ * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
++ * self.name = _strdec(prop.name)
++ * self.data = _convert_value(prop.data, prop.format)
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, struct mpv_event_property *__pyx_v_prop) {
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- PyObject *__pyx_v_state = 0;
+- PyObject *__pyx_v__dict = 0;
+- int __pyx_v_use_setstate;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+-
+- /* "(tree fragment)":5
+- * cdef object _dict
+- * cdef bint use_setstate
+- * state = (self.level, self.log_level, self.prefix, self.text) # <<<<<<<<<<<<<<
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
++ /* "vidcutter/libs/pympv/mpv.pyx":251
++ *
++ * cdef _init(self, mpv_event_property* prop):
++ * self.name = _strdec(prop.name) # <<<<<<<<<<<<<<
++ * self.data = _convert_value(prop.data, prop.format)
++ * return self
+ */
+- __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v_self->level);
+- __Pyx_GIVEREF(__pyx_v_self->level);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->level);
+- __Pyx_INCREF(__pyx_v_self->log_level);
+- __Pyx_GIVEREF(__pyx_v_self->log_level);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->log_level);
+- __Pyx_INCREF(__pyx_v_self->prefix);
+- __Pyx_GIVEREF(__pyx_v_self->prefix);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->prefix);
+- __Pyx_INCREF(__pyx_v_self->text);
+- __Pyx_GIVEREF(__pyx_v_self->text);
+- PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->text);
+- __pyx_v_state = ((PyObject*)__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->name);
++ __Pyx_DECREF(__pyx_v_self->name);
++ __pyx_v_self->name = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "(tree fragment)":6
+- * cdef bint use_setstate
+- * state = (self.level, self.log_level, self.prefix, self.text)
+- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
+- * if _dict is not None:
+- * state += (_dict,)
++ /* "vidcutter/libs/pympv/mpv.pyx":252
++ * cdef _init(self, mpv_event_property* prop):
++ * self.name = _strdec(prop.name)
++ * self.data = _convert_value(prop.data, prop.format) # <<<<<<<<<<<<<<
++ * return self
++ *
+ */
+- __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v__dict = __pyx_t_1;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "(tree fragment)":7
+- * state = (self.level, self.log_level, self.prefix, self.text)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
++ /* "vidcutter/libs/pympv/mpv.pyx":253
++ * self.name = _strdec(prop.name)
++ * self.data = _convert_value(prop.data, prop.format)
++ * return self # <<<<<<<<<<<<<<
++ *
++ *
+ */
+- __pyx_t_2 = (__pyx_v__dict != Py_None);
+- __pyx_t_3 = (__pyx_t_2 != 0);
+- if (__pyx_t_3) {
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(((PyObject *)__pyx_v_self));
++ __pyx_r = ((PyObject *)__pyx_v_self);
++ goto __pyx_L0;
+
+- /* "(tree fragment)":8
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- * state += (_dict,) # <<<<<<<<<<<<<<
+- * use_setstate = True
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":250
++ * cdef public object name, data
++ *
++ * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
++ * self.name = _strdec(prop.name)
++ * self.data = _convert_value(prop.data, prop.format)
+ */
+- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v__dict);
+- __Pyx_GIVEREF(__pyx_v__dict);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
+- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
+- __pyx_t_4 = 0;
+
+- /* "(tree fragment)":9
+- * if _dict is not None:
+- * state += (_dict,)
+- * use_setstate = True # <<<<<<<<<<<<<<
+- * else:
+- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+- */
+- __pyx_v_use_setstate = 1;
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Property._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "(tree fragment)":7
+- * state = (self.level, self.log_level, self.prefix, self.text)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
++/* "vidcutter/libs/pympv/mpv.pyx":248
++ * Wraps: mpv_event_property
++ * """
++ * cdef public object name, data # <<<<<<<<<<<<<<
++ *
++ * cdef _init(self, mpv_event_property* prop):
+ */
+- goto __pyx_L3;
+- }
+
+- /* "(tree fragment)":11
+- * use_setstate = True
+- * else:
+- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None # <<<<<<<<<<<<<<
+- * if use_setstate:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+- */
+- /*else*/ {
+- __pyx_t_2 = (__pyx_v_self->level != Py_None);
+- __pyx_t_5 = (__pyx_t_2 != 0);
+- if (!__pyx_t_5) {
+- } else {
+- __pyx_t_3 = __pyx_t_5;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_5 = (__pyx_v_self->log_level != Py_None);
+- __pyx_t_2 = (__pyx_t_5 != 0);
+- if (!__pyx_t_2) {
+- } else {
+- __pyx_t_3 = __pyx_t_2;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_2 = (__pyx_v_self->prefix != Py_None);
+- __pyx_t_5 = (__pyx_t_2 != 0);
+- if (!__pyx_t_5) {
+- } else {
+- __pyx_t_3 = __pyx_t_5;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_5 = (__pyx_v_self->text != Py_None);
+- __pyx_t_2 = (__pyx_t_5 != 0);
+- __pyx_t_3 = __pyx_t_2;
+- __pyx_L4_bool_binop_done:;
+- __pyx_v_use_setstate = __pyx_t_3;
+- }
+- __pyx_L3:;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
+
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+- * else:
+- */
+- __pyx_t_3 = (__pyx_v_use_setstate != 0);
+- if (__pyx_t_3) {
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "(tree fragment)":13
+- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+- * if use_setstate:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state # <<<<<<<<<<<<<<
+- * else:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_142036910);
+- __Pyx_GIVEREF(__pyx_int_142036910);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
+- __pyx_t_4 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_6;
+- __pyx_t_6 = 0;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+- * else:
+- */
+- }
+-
+- /* "(tree fragment)":15
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+- * else:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state) # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+- */
+- /*else*/ {
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_142036910);
+- __Pyx_GIVEREF(__pyx_int_142036910);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
+- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_6);
+- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+- __pyx_t_6 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
+- goto __pyx_L0;
+- }
+-
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
+- */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_self->name);
++ __pyx_r = __pyx_v_self->name;
++ goto __pyx_L0;
+
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_state);
+- __Pyx_XDECREF(__pyx_v__dict);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+- */
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->name);
++ __Pyx_DECREF(__pyx_v_self->name);
++ __pyx_v_self->name = __pyx_v_value;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = 0;
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
++static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->name);
++ __Pyx_DECREF(__pyx_v_self->name);
++ __pyx_v_self->name = Py_None;
+
+- /* "(tree fragment)":17
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+- */
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_self->data);
++ __pyx_r = __pyx_v_self->data;
+ goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++
++ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":197
+- *
+- *
+- * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
+- * if node.format == MPV_FORMAT_STRING:
+- * return _strdec(node.u.string)
+- */
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_node __pyx_v_node) {
+- PyObject *__pyx_r = NULL;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_convert_node_value", 0);
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = __pyx_v_value;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":198
+- *
+- * cdef _convert_node_value(mpv_node node):
+- * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * return _strdec(node.u.string)
+- * elif node.format == MPV_FORMAT_FLAG:
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = Py_None;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+- switch (__pyx_v_node.format) {
+- case MPV_FORMAT_STRING:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":199
+- * cdef _convert_node_value(mpv_node node):
+- * if node.format == MPV_FORMAT_STRING:
+- * return _strdec(node.u.string) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_FLAG:
+- * return not not int(node.u.flag)
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++ PyObject *__pyx_v_state = 0;
++ PyObject *__pyx_v__dict = 0;
++ int __pyx_v_use_setstate;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++
++ /* "(tree fragment)":5
++ * cdef object _dict
++ * cdef bint use_setstate
++ * state = (self.data, self.name) # <<<<<<<<<<<<<<
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_INCREF(__pyx_v_self->data);
++ __Pyx_GIVEREF(__pyx_v_self->data);
++ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->data);
++ __Pyx_INCREF(__pyx_v_self->name);
++ __Pyx_GIVEREF(__pyx_v_self->name);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name);
++ __pyx_v_state = ((PyObject*)__pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":198
+- *
+- * cdef _convert_node_value(mpv_node node):
+- * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * return _strdec(node.u.string)
+- * elif node.format == MPV_FORMAT_FLAG:
++ /* "(tree fragment)":6
++ * cdef bint use_setstate
++ * state = (self.data, self.name)
++ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
++ * if _dict is not None:
++ * state += (_dict,)
+ */
+- break;
+- case MPV_FORMAT_FLAG:
++ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v__dict = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":201
+- * return _strdec(node.u.string)
+- * elif node.format == MPV_FORMAT_FLAG:
+- * return not not int(node.u.flag) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_INT64:
+- * return int(node.u.int64)
++ /* "(tree fragment)":7
++ * state = (self.data, self.name)
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __pyx_t_2 = (__pyx_v__dict != Py_None);
++ __pyx_t_3 = (__pyx_t_2 != 0);
++ if (__pyx_t_3) {
++
++ /* "(tree fragment)":8
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
++ * state += (_dict,) # <<<<<<<<<<<<<<
++ * use_setstate = True
++ * else:
++ */
++ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_v__dict);
++ __Pyx_GIVEREF(__pyx_v__dict);
++ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
++ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_r = __pyx_t_2;
+- __pyx_t_2 = 0;
+- goto __pyx_L0;
++ __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
++ __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":200
+- * if node.format == MPV_FORMAT_STRING:
+- * return _strdec(node.u.string)
+- * elif node.format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+- * return not not int(node.u.flag)
+- * elif node.format == MPV_FORMAT_INT64:
++ /* "(tree fragment)":9
++ * if _dict is not None:
++ * state += (_dict,)
++ * use_setstate = True # <<<<<<<<<<<<<<
++ * else:
++ * use_setstate = self.data is not None or self.name is not None
+ */
+- break;
+- case MPV_FORMAT_INT64:
++ __pyx_v_use_setstate = 1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":203
+- * return not not int(node.u.flag)
+- * elif node.format == MPV_FORMAT_INT64:
+- * return int(node.u.int64) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_DOUBLE:
+- * return float(node.u.double_)
++ /* "(tree fragment)":7
++ * state = (self.data, self.name)
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ goto __pyx_L3;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":202
+- * elif node.format == MPV_FORMAT_FLAG:
+- * return not not int(node.u.flag)
+- * elif node.format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+- * return int(node.u.int64)
+- * elif node.format == MPV_FORMAT_DOUBLE:
++ /* "(tree fragment)":11
++ * use_setstate = True
++ * else:
++ * use_setstate = self.data is not None or self.name is not None # <<<<<<<<<<<<<<
++ * if use_setstate:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
+ */
+- break;
+- case MPV_FORMAT_DOUBLE:
++ /*else*/ {
++ __pyx_t_2 = (__pyx_v_self->data != Py_None);
++ __pyx_t_5 = (__pyx_t_2 != 0);
++ if (!__pyx_t_5) {
++ } else {
++ __pyx_t_3 = __pyx_t_5;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_5 = (__pyx_v_self->name != Py_None);
++ __pyx_t_2 = (__pyx_t_5 != 0);
++ __pyx_t_3 = __pyx_t_2;
++ __pyx_L4_bool_binop_done:;
++ __pyx_v_use_setstate = __pyx_t_3;
++ }
++ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":205
+- * return int(node.u.int64)
+- * elif node.format == MPV_FORMAT_DOUBLE:
+- * return float(node.u.double_) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_NODE_MAP:
+- * return _convert_value(node.u.list, node.format)
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = self.data is not None or self.name is not None
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
++ * else:
++ */
++ __pyx_t_3 = (__pyx_v_use_setstate != 0);
++ if (__pyx_t_3) {
++
++ /* "(tree fragment)":13
++ * use_setstate = self.data is not None or self.name is not None
++ * if use_setstate:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state # <<<<<<<<<<<<<<
++ * else:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_5713169);
++ __Pyx_GIVEREF(__pyx_int_5713169);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
++ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
++ __pyx_t_4 = 0;
+ __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_6;
++ __pyx_t_6 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":204
+- * elif node.format == MPV_FORMAT_INT64:
+- * return int(node.u.int64)
+- * elif node.format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+- * return float(node.u.double_)
+- * elif node.format == MPV_FORMAT_NODE_MAP:
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = self.data is not None or self.name is not None
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
++ * else:
+ */
+- break;
+- case MPV_FORMAT_NODE_MAP:
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":207
+- * return float(node.u.double_)
+- * elif node.format == MPV_FORMAT_NODE_MAP:
+- * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_NODE_ARRAY:
+- * return _convert_value(node.u.list, node.format)
++ /* "(tree fragment)":15
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
++ * else:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state) # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_Property__set_state(self, __pyx_state)
+ */
++ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_5713169);
++ __Pyx_GIVEREF(__pyx_int_5713169);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
++ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_6);
++ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
++ __pyx_t_6 = 0;
+ __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_4;
++ __pyx_t_4 = 0;
+ goto __pyx_L0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":206
+- * elif node.format == MPV_FORMAT_DOUBLE:
+- * return float(node.u.double_)
+- * elif node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * return _convert_value(node.u.list, node.format)
+- * elif node.format == MPV_FORMAT_NODE_ARRAY:
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+- break;
+- case MPV_FORMAT_NODE_ARRAY:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":209
+- * return _convert_value(node.u.list, node.format)
+- * elif node.format == MPV_FORMAT_NODE_ARRAY:
+- * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
+- * return None
+- *
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_state);
++ __Pyx_XDECREF(__pyx_v__dict);
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":208
+- * elif node.format == MPV_FORMAT_NODE_MAP:
+- * return _convert_value(node.u.list, node.format)
+- * elif node.format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+- * return _convert_value(node.u.list, node.format)
+- * return None
++/* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Property__set_state(self, __pyx_state)
+ */
+- break;
+- default: break;
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":210
+- * elif node.format == MPV_FORMAT_NODE_ARRAY:
+- * return _convert_value(node.u.list, node.format)
+- * return None # <<<<<<<<<<<<<<
+- *
+- *
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++
++ /* "(tree fragment)":17
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_Property__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":197
+- *
+- *
+- * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
+- * if node.format == MPV_FORMAT_STRING:
+- * return _strdec(node.u.string)
++ /* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Property__set_state(self, __pyx_state)
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._convert_node_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":213
+- *
++/* "vidcutter/libs/pympv/mpv.pyx":263
+ *
+- * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * cdef mpv_node_list nodelist
++ * @property
++ * def error_str(self): # <<<<<<<<<<<<<<
++ * """mpv_error_string of the error proeprty"""
++ * cdef const char* err_c
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data, enum mpv_format __pyx_v_format) {
+- struct mpv_node __pyx_v_node;
+- struct mpv_node_list __pyx_v_nodelist;
+- PyObject *__pyx_v_values = NULL;
+- int __pyx_v_i;
+- PyObject *__pyx_v_value = NULL;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ char const *__pyx_v_err_c;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_convert_value", 0);
++ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":216
+- * cdef mpv_node node
+- * cdef mpv_node_list nodelist
+- * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
+- * node = (<mpv_node*>data)[0]
+- * return _convert_node_value(node)
++ /* "vidcutter/libs/pympv/mpv.pyx":266
++ * """mpv_error_string of the error proeprty"""
++ * cdef const char* err_c
++ * with nogil: # <<<<<<<<<<<<<<
++ * err_c = mpv_error_string(self.error)
++ * return _strdec(err_c)
+ */
+- switch (__pyx_v_format) {
+- case MPV_FORMAT_NODE:
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":217
+- * cdef mpv_node_list nodelist
+- * if format == MPV_FORMAT_NODE:
+- * node = (<mpv_node*>data)[0] # <<<<<<<<<<<<<<
+- * return _convert_node_value(node)
+- * elif format == MPV_FORMAT_NODE_ARRAY:
++ /* "vidcutter/libs/pympv/mpv.pyx":267
++ * cdef const char* err_c
++ * with nogil:
++ * err_c = mpv_error_string(self.error) # <<<<<<<<<<<<<<
++ * return _strdec(err_c)
++ *
+ */
+- __pyx_v_node = (((struct mpv_node *)__pyx_v_data)[0]);
++ __pyx_v_err_c = mpv_error_string(__pyx_v_self->error);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":218
+- * if format == MPV_FORMAT_NODE:
+- * node = (<mpv_node*>data)[0]
+- * return _convert_node_value(node) # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * nodelist = (<mpv_node_list*>data)[0]
++ /* "vidcutter/libs/pympv/mpv.pyx":266
++ * """mpv_error_string of the error proeprty"""
++ * cdef const char* err_c
++ * with nogil: # <<<<<<<<<<<<<<
++ * err_c = mpv_error_string(self.error)
++ * return _strdec(err_c)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":216
+- * cdef mpv_node node
+- * cdef mpv_node_list nodelist
+- * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
+- * node = (<mpv_node*>data)[0]
+- * return _convert_node_value(node)
++ /* "vidcutter/libs/pympv/mpv.pyx":268
++ * with nogil:
++ * err_c = mpv_error_string(self.error)
++ * return _strdec(err_c) # <<<<<<<<<<<<<<
++ *
++ * cdef _data(self, mpv_event* event):
+ */
+- break;
+- case MPV_FORMAT_NODE_ARRAY:
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":220
+- * return _convert_node_value(node)
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
+- * values = []
+- * for i in range(nodelist.num):
++ /* "vidcutter/libs/pympv/mpv.pyx":263
++ *
++ * @property
++ * def error_str(self): # <<<<<<<<<<<<<<
++ * """mpv_error_string of the error proeprty"""
++ * cdef const char* err_c
+ */
+- __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":221
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = [] # <<<<<<<<<<<<<<
+- * for i in range(nodelist.num):
+- * values.append(_convert_node_value(nodelist.values[i]))
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error_str.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":270
++ * return _strdec(err_c)
++ *
++ * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
++ * cdef void* data = event.data
++ * cdef mpv_event_client_message* climsg
+ */
+- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_values = __pyx_t_1;
+- __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":222
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = []
+- * for i in range(nodelist.num): # <<<<<<<<<<<<<<
+- * values.append(_convert_node_value(nodelist.values[i]))
+- * return values
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event) {
++ void *__pyx_v_data;
++ struct mpv_event_client_message *__pyx_v_climsg;
++ PyObject *__pyx_v_args = NULL;
++ int __pyx_v_num_args;
++ int __pyx_v_i;
++ PyObject *__pyx_v_arg = NULL;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ void *__pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_4;
++ int __pyx_t_5;
++ int __pyx_t_6;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_t_8;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("_data", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":271
++ *
++ * cdef _data(self, mpv_event* event):
++ * cdef void* data = event.data # <<<<<<<<<<<<<<
++ * cdef mpv_event_client_message* climsg
++ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
+ */
+- __pyx_t_2 = __pyx_v_nodelist.num;
+- __pyx_t_3 = __pyx_t_2;
+- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+- __pyx_v_i = __pyx_t_4;
++ __pyx_t_1 = __pyx_v_event->data;
++ __pyx_v_data = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":223
+- * values = []
+- * for i in range(nodelist.num):
+- * values.append(_convert_node_value(nodelist.values[i])) # <<<<<<<<<<<<<<
+- * return values
+- * elif format == MPV_FORMAT_NODE_MAP:
++ /* "vidcutter/libs/pympv/mpv.pyx":273
++ * cdef void* data = event.data
++ * cdef mpv_event_client_message* climsg
++ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- }
++ switch (__pyx_v_self->id) {
++ case MPV_EVENT_GET_PROPERTY_REPLY:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":224
+- * for i in range(nodelist.num):
+- * values.append(_convert_node_value(nodelist.values[i]))
+- * return values # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_NODE_MAP:
+- * nodelist = (<mpv_node_list*>data)[0]
++ /* "vidcutter/libs/pympv/mpv.pyx":274
++ * cdef mpv_event_client_message* climsg
++ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
++ * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
++ * return Property()._init(<mpv_event_property*>data)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_values);
+- __pyx_r = __pyx_v_values;
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":219
+- * node = (<mpv_node*>data)[0]
+- * return _convert_node_value(node)
+- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = []
++ /* "vidcutter/libs/pympv/mpv.pyx":273
++ * cdef void* data = event.data
++ * cdef mpv_event_client_message* climsg
++ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+ */
+ break;
+- case MPV_FORMAT_NODE_MAP:
++ case MPV_EVENT_PROPERTY_CHANGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":226
+- * return values
+- * elif format == MPV_FORMAT_NODE_MAP:
+- * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
+- * values = {}
+- * for i in range(nodelist.num):
++ /* "vidcutter/libs/pympv/mpv.pyx":276
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
++ * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
++ * elif self.id == MPV_EVENT_LOG_MESSAGE:
++ * return LogMessage()._init(<mpv_event_log_message*>data)
+ */
+- __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_r = __pyx_t_2;
++ __pyx_t_2 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":227
+- * elif format == MPV_FORMAT_NODE_MAP:
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = {} # <<<<<<<<<<<<<<
+- * for i in range(nodelist.num):
+- * value = _convert_node_value(nodelist.values[i])
++ /* "vidcutter/libs/pympv/mpv.pyx":275
++ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_LOG_MESSAGE:
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_values = __pyx_t_1;
+- __pyx_t_1 = 0;
++ break;
++ case MPV_EVENT_LOG_MESSAGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":228
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = {}
+- * for i in range(nodelist.num): # <<<<<<<<<<<<<<
+- * value = _convert_node_value(nodelist.values[i])
+- * values[_strdec(nodelist.keys[i])] = value
++ /* "vidcutter/libs/pympv/mpv.pyx":278
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_LOG_MESSAGE:
++ * return LogMessage()._init(<mpv_event_log_message*>data) # <<<<<<<<<<<<<<
++ * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+ */
+- __pyx_t_2 = __pyx_v_nodelist.num;
+- __pyx_t_3 = __pyx_t_2;
+- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+- __pyx_v_i = __pyx_t_4;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":229
+- * values = {}
+- * for i in range(nodelist.num):
+- * value = _convert_node_value(nodelist.values[i]) # <<<<<<<<<<<<<<
+- * values[_strdec(nodelist.keys[i])] = value
+- * return values
+- */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
+- __pyx_t_1 = 0;
++ /* "vidcutter/libs/pympv/mpv.pyx":277
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_LOG_MESSAGE: # <<<<<<<<<<<<<<
++ * return LogMessage()._init(<mpv_event_log_message*>data)
++ * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ */
++ break;
++ case MPV_EVENT_CLIENT_MESSAGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":230
+- * for i in range(nodelist.num):
+- * value = _convert_node_value(nodelist.values[i])
+- * values[_strdec(nodelist.keys[i])] = value # <<<<<<<<<<<<<<
+- * return values
+- * elif format == MPV_FORMAT_STRING:
++ /* "vidcutter/libs/pympv/mpv.pyx":282
++ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
++ * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
++ * climsg = <mpv_event_client_message*>data # <<<<<<<<<<<<<<
++ * args = []
++ * num_args = climsg.num_args
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- }
++ __pyx_v_climsg = ((struct mpv_event_client_message *)__pyx_v_data);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":231
+- * value = _convert_node_value(nodelist.values[i])
+- * values[_strdec(nodelist.keys[i])] = value
+- * return values # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_STRING:
+- * return _strdec(((<char**>data)[0]))
++ /* "vidcutter/libs/pympv/mpv.pyx":283
++ * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
++ * climsg = <mpv_event_client_message*>data
++ * args = [] # <<<<<<<<<<<<<<
++ * num_args = climsg.num_args
++ * for i in range(num_args):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_values);
+- __pyx_r = __pyx_v_values;
+- goto __pyx_L0;
++ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_v_args = ((PyObject*)__pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":225
+- * values.append(_convert_node_value(nodelist.values[i]))
+- * return values
+- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = {}
++ /* "vidcutter/libs/pympv/mpv.pyx":284
++ * climsg = <mpv_event_client_message*>data
++ * args = []
++ * num_args = climsg.num_args # <<<<<<<<<<<<<<
++ * for i in range(num_args):
++ * arg = <char*>climsg.args[i]
+ */
+- break;
+- case MPV_FORMAT_STRING:
++ __pyx_t_4 = __pyx_v_climsg->num_args;
++ __pyx_v_num_args = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":233
+- * return values
+- * elif format == MPV_FORMAT_STRING:
+- * return _strdec(((<char**>data)[0])) # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_FLAG:
+- * return not not (<uint64_t*>data)[0]
++ /* "vidcutter/libs/pympv/mpv.pyx":285
++ * args = []
++ * num_args = climsg.num_args
++ * for i in range(num_args): # <<<<<<<<<<<<<<
++ * arg = <char*>climsg.args[i]
++ * arg = _strdec(arg)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_t_4 = __pyx_v_num_args;
++ __pyx_t_5 = __pyx_t_4;
++ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
++ __pyx_v_i = __pyx_t_6;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":232
+- * values[_strdec(nodelist.keys[i])] = value
+- * return values
+- * elif format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * return _strdec(((<char**>data)[0]))
+- * elif format == MPV_FORMAT_FLAG:
++ /* "vidcutter/libs/pympv/mpv.pyx":286
++ * num_args = climsg.num_args
++ * for i in range(num_args):
++ * arg = <char*>climsg.args[i] # <<<<<<<<<<<<<<
++ * arg = _strdec(arg)
++ * args.append(arg)
+ */
+- break;
+- case MPV_FORMAT_FLAG:
++ __pyx_t_3 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":235
+- * return _strdec(((<char**>data)[0]))
+- * elif format == MPV_FORMAT_FLAG:
+- * return not not (<uint64_t*>data)[0] # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_INT64:
+- * return int((<uint64_t*>data)[0])
++ /* "vidcutter/libs/pympv/mpv.pyx":287
++ * for i in range(num_args):
++ * arg = <char*>climsg.args[i]
++ * arg = _strdec(arg) # <<<<<<<<<<<<<<
++ * args.append(arg)
++ * return args
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_arg) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_arg);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":234
+- * elif format == MPV_FORMAT_STRING:
+- * return _strdec(((<char**>data)[0]))
+- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+- * return not not (<uint64_t*>data)[0]
+- * elif format == MPV_FORMAT_INT64:
++ /* "vidcutter/libs/pympv/mpv.pyx":288
++ * arg = <char*>climsg.args[i]
++ * arg = _strdec(arg)
++ * args.append(arg) # <<<<<<<<<<<<<<
++ * return args
++ * elif self.id == MPV_EVENT_END_FILE:
+ */
+- break;
+- case MPV_FORMAT_INT64:
++ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":237
+- * return not not (<uint64_t*>data)[0]
+- * elif format == MPV_FORMAT_INT64:
+- * return int((<uint64_t*>data)[0]) # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_DOUBLE:
+- * return float((<double*>data)[0])
++ /* "vidcutter/libs/pympv/mpv.pyx":289
++ * arg = _strdec(arg)
++ * args.append(arg)
++ * return args # <<<<<<<<<<<<<<
++ * elif self.id == MPV_EVENT_END_FILE:
++ * return EndOfFileReached()._init(<mpv_event_end_file*>data)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_6;
+- __pyx_t_6 = 0;
++ __Pyx_INCREF(__pyx_v_args);
++ __pyx_r = __pyx_v_args;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":236
+- * elif format == MPV_FORMAT_FLAG:
+- * return not not (<uint64_t*>data)[0]
+- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+- * return int((<uint64_t*>data)[0])
+- * elif format == MPV_FORMAT_DOUBLE:
++ /* "vidcutter/libs/pympv/mpv.pyx":281
++ * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
++ * elif self.id == MPV_EVENT_CLIENT_MESSAGE: # <<<<<<<<<<<<<<
++ * climsg = <mpv_event_client_message*>data
++ * args = []
+ */
+ break;
+- case MPV_FORMAT_DOUBLE:
++ case MPV_EVENT_END_FILE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":239
+- * return int((<uint64_t*>data)[0])
+- * elif format == MPV_FORMAT_DOUBLE:
+- * return float((<double*>data)[0]) # <<<<<<<<<<<<<<
+- * return None
++ /* "vidcutter/libs/pympv/mpv.pyx":291
++ * return args
++ * elif self.id == MPV_EVENT_END_FILE:
++ * return EndOfFileReached()._init(<mpv_event_end_file*>data) # <<<<<<<<<<<<<<
++ * return None
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_r = __pyx_t_6;
+- __pyx_t_6 = 0;
++ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_r = __pyx_t_2;
++ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":238
+- * elif format == MPV_FORMAT_INT64:
+- * return int((<uint64_t*>data)[0])
+- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+- * return float((<double*>data)[0])
+- * return None
++ /* "vidcutter/libs/pympv/mpv.pyx":290
++ * args.append(arg)
++ * return args
++ * elif self.id == MPV_EVENT_END_FILE: # <<<<<<<<<<<<<<
++ * return EndOfFileReached()._init(<mpv_event_end_file*>data)
++ * return None
+ */
+ break;
+ default: break;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":240
+- * elif format == MPV_FORMAT_DOUBLE:
+- * return float((<double*>data)[0])
+- * return None # <<<<<<<<<<<<<<
+- *
+- *
+- */
++ /* "vidcutter/libs/pympv/mpv.pyx":292
++ * elif self.id == MPV_EVENT_END_FILE:
++ * return EndOfFileReached()._init(<mpv_event_end_file*>data)
++ * return None # <<<<<<<<<<<<<<
++ *
++ * @property
++ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":213
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":270
++ * return _strdec(err_c)
+ *
+- * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * cdef mpv_node_list nodelist
++ * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
++ * cdef void* data = event.data
++ * cdef mpv_event_client_message* climsg
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._convert_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event._data", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_values);
+- __Pyx_XDECREF(__pyx_v_value);
++ __Pyx_XDECREF(__pyx_v_args);
++ __Pyx_XDECREF(__pyx_v_arg);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":250
+- * cdef public object name, data
++/* "vidcutter/libs/pympv/mpv.pyx":295
+ *
+- * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
+- * self.name = _strdec(prop.name)
+- * self.data = _convert_value(prop.data, prop.format)
++ * @property
++ * def name(self): # <<<<<<<<<<<<<<
++ * """mpv_event_name of the event id"""
++ * cdef const char* name_c
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, struct mpv_event_property *__pyx_v_prop) {
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ char const *__pyx_v_name_c;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+@@ -5704,18 +6128,63 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_init", 0);
++ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":251
++ /* "vidcutter/libs/pympv/mpv.pyx":298
++ * """mpv_event_name of the event id"""
++ * cdef const char* name_c
++ * with nogil: # <<<<<<<<<<<<<<
++ * name_c = mpv_event_name(self.id)
++ * return _strdec(name_c)
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":299
++ * cdef const char* name_c
++ * with nogil:
++ * name_c = mpv_event_name(self.id) # <<<<<<<<<<<<<<
++ * return _strdec(name_c)
+ *
+- * cdef _init(self, mpv_event_property* prop):
+- * self.name = _strdec(prop.name) # <<<<<<<<<<<<<<
+- * self.data = _convert_value(prop.data, prop.format)
+- * return self
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __pyx_v_name_c = mpv_event_name(__pyx_v_self->id);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":298
++ * """mpv_event_name of the event id"""
++ * cdef const char* name_c
++ * with nogil: # <<<<<<<<<<<<<<
++ * name_c = mpv_event_name(self.id)
++ * return _strdec(name_c)
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":300
++ * with nogil:
++ * name_c = mpv_event_name(self.id)
++ * return _strdec(name_c) # <<<<<<<<<<<<<<
++ *
++ * cdef _init(self, mpv_event* event, ctx):
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -5730,48 +6199,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->name);
+- __Pyx_DECREF(__pyx_v_self->name);
+- __pyx_v_self->name = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":252
+- * cdef _init(self, mpv_event_property* prop):
+- * self.name = _strdec(prop.name)
+- * self.data = _convert_value(prop.data, prop.format) # <<<<<<<<<<<<<<
+- * return self
+- *
+- */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = __pyx_t_1;
++ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":253
+- * self.name = _strdec(prop.name)
+- * self.data = _convert_value(prop.data, prop.format)
+- * return self # <<<<<<<<<<<<<<
+- *
+- *
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(((PyObject *)__pyx_v_self));
+- __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":250
+- * cdef public object name, data
++ /* "vidcutter/libs/pympv/mpv.pyx":295
+ *
+- * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
+- * self.name = _strdec(prop.name)
+- * self.data = _convert_value(prop.data, prop.format)
++ * @property
++ * def name(self): # <<<<<<<<<<<<<<
++ * """mpv_event_name of the event id"""
++ * cdef const char* name_c
+ */
+
+ /* function exit code */
+@@ -5780,1547 +6220,1710 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Property._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":248
+- * Wraps: mpv_event_property
+- * """
+- * cdef public object name, data # <<<<<<<<<<<<<<
++/* "vidcutter/libs/pympv/mpv.pyx":302
++ * return _strdec(name_c)
+ *
+- * cdef _init(self, mpv_event_property* prop):
++ * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
++ * cdef uint64_t ctxid = <uint64_t>id(ctx)
++ * self.id = event.event_id
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event, PyObject *__pyx_v_ctx) {
++ uint64_t __pyx_v_ctxid;
++ PyObject *__pyx_v_userdata = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->name);
+- __pyx_r = __pyx_v_self->name;
+- goto __pyx_L0;
+-
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ PyObject *__pyx_t_1 = NULL;
++ uint64_t __pyx_t_2;
++ enum mpv_event_id __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ int __pyx_t_7;
++ PyObject *__pyx_t_8 = NULL;
++ int __pyx_t_9;
++ int __pyx_t_10;
++ int __pyx_t_11;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("_init", 0);
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":303
++ *
++ * cdef _init(self, mpv_event* event, ctx):
++ * cdef uint64_t ctxid = <uint64_t>id(ctx) # <<<<<<<<<<<<<<
++ * self.id = event.event_id
++ * self.data = self._data(event)
++ */
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":304
++ * cdef _init(self, mpv_event* event, ctx):
++ * cdef uint64_t ctxid = <uint64_t>id(ctx)
++ * self.id = event.event_id # <<<<<<<<<<<<<<
++ * self.data = self._data(event)
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ */
++ __pyx_t_3 = __pyx_v_event->event_id;
++ __pyx_v_self->id = __pyx_t_3;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->name);
+- __Pyx_DECREF(__pyx_v_self->name);
+- __pyx_v_self->name = __pyx_v_value;
++ /* "vidcutter/libs/pympv/mpv.pyx":305
++ * cdef uint64_t ctxid = <uint64_t>id(ctx)
++ * self.id = event.event_id
++ * self.data = self._data(event) # <<<<<<<<<<<<<<
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ */
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":306
++ * self.id = event.event_id
++ * self.data = self._data(event)
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None) # <<<<<<<<<<<<<<
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ * userdata.remove()
++ */
++ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_6 = NULL;
++ __pyx_t_7 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_6)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_6);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ __pyx_t_7 = 1;
++ }
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_5)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_8);
++ if (__pyx_t_6) {
++ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
++ }
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_None);
++ __pyx_t_4 = 0;
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ }
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __pyx_v_userdata = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":307
++ * self.data = self._data(event)
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
++ * userdata.remove()
++ * if not userdata.observed and userdata.counter <= 0:
++ */
++ __pyx_t_10 = (__pyx_v_userdata != Py_None);
++ __pyx_t_11 = (__pyx_t_10 != 0);
++ if (__pyx_t_11) {
++ } else {
++ __pyx_t_9 = __pyx_t_11;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_11 = ((__pyx_v_self->id != MPV_EVENT_PROPERTY_CHANGE) != 0);
++ __pyx_t_9 = __pyx_t_11;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_9) {
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":308
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ * userdata.remove() # <<<<<<<<<<<<<<
++ * if not userdata.observed and userdata.counter <= 0:
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ */
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->name);
+- __Pyx_DECREF(__pyx_v_self->name);
+- __pyx_v_self->name = Py_None;
++ /* "vidcutter/libs/pympv/mpv.pyx":309
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ * userdata.remove()
++ * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ * if userdata is not None:
++ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_10 = ((!__pyx_t_11) != 0);
++ if (__pyx_t_10) {
++ } else {
++ __pyx_t_9 = __pyx_t_10;
++ goto __pyx_L7_bool_binop_done;
++ }
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __pyx_t_9 = __pyx_t_10;
++ __pyx_L7_bool_binop_done:;
++ if (__pyx_t_9) {
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":310
++ * userdata.remove()
++ * if not userdata.observed and userdata.counter <= 0:
++ * del _reply_userdatas[ctxid][event.reply_userdata] # <<<<<<<<<<<<<<
++ * if userdata is not None:
++ * userdata = userdata.data
++ */
++ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":309
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ * userdata.remove()
++ * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ * if userdata is not None:
++ */
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":307
++ * self.data = self._data(event)
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
++ * userdata.remove()
++ * if not userdata.observed and userdata.counter <= 0:
++ */
++ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->data);
+- __pyx_r = __pyx_v_self->data;
+- goto __pyx_L0;
++ /* "vidcutter/libs/pympv/mpv.pyx":311
++ * if not userdata.observed and userdata.counter <= 0:
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ * if userdata is not None: # <<<<<<<<<<<<<<
++ * userdata = userdata.data
++ * self.reply_userdata = userdata
++ */
++ __pyx_t_9 = (__pyx_v_userdata != Py_None);
++ __pyx_t_10 = (__pyx_t_9 != 0);
++ if (__pyx_t_10) {
+
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":312
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ * if userdata is not None:
++ * userdata = userdata.data # <<<<<<<<<<<<<<
++ * self.reply_userdata = userdata
++ * self.error = event.error
++ */
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF_SET(__pyx_v_userdata, __pyx_t_5);
++ __pyx_t_5 = 0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":311
++ * if not userdata.observed and userdata.counter <= 0:
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ * if userdata is not None: # <<<<<<<<<<<<<<
++ * userdata = userdata.data
++ * self.reply_userdata = userdata
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":313
++ * if userdata is not None:
++ * userdata = userdata.data
++ * self.reply_userdata = userdata # <<<<<<<<<<<<<<
++ * self.error = event.error
++ * return self
++ */
++ __Pyx_INCREF(__pyx_v_userdata);
++ __Pyx_GIVEREF(__pyx_v_userdata);
++ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
++ __Pyx_DECREF(__pyx_v_self->reply_userdata);
++ __pyx_v_self->reply_userdata = __pyx_v_userdata;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":314
++ * userdata = userdata.data
++ * self.reply_userdata = userdata
++ * self.error = event.error # <<<<<<<<<<<<<<
++ * return self
++ *
++ */
++ __pyx_t_7 = __pyx_v_event->error;
++ __pyx_v_self->error = __pyx_t_7;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":315
++ * self.reply_userdata = userdata
++ * self.error = event.error
++ * return self # <<<<<<<<<<<<<<
++ *
++ *
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(((PyObject *)__pyx_v_self));
++ __pyx_r = ((PyObject *)__pyx_v_self);
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":302
++ * return _strdec(name_c)
++ *
++ * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
++ * cdef uint64_t ctxid = <uint64_t>id(ctx)
++ * self.id = event.event_id
++ */
+
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_userdata);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
++/* "vidcutter/libs/pympv/mpv.pyx":258
++ * cdef class Event(object):
++ * """Wraps: mpv_event"""
++ * cdef public mpv_event_id id # <<<<<<<<<<<<<<
++ * cdef public int error
++ * cdef public object data, reply_userdata
++ */
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = __pyx_v_value;
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+
+ /* function exit code */
+- __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
++
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self) {
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = Py_None;
++ enum mpv_event_id __pyx_t_1;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error)
++ __pyx_v_self->id = __pyx_t_1;
+
+ /* function exit code */
+ __pyx_r = 0;
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = -1;
++ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++/* "vidcutter/libs/pympv/mpv.pyx":259
++ * """Wraps: mpv_event"""
++ * cdef public mpv_event_id id
++ * cdef public int error # <<<<<<<<<<<<<<
++ * cdef public object data, reply_userdata
++ *
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
+- PyObject *__pyx_v_state = 0;
+- PyObject *__pyx_v__dict = 0;
+- int __pyx_v_use_setstate;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+-
+- /* "(tree fragment)":5
+- * cdef object _dict
+- * cdef bint use_setstate
+- * state = (self.data, self.name) # <<<<<<<<<<<<<<
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- */
+- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v_self->data);
+- __Pyx_GIVEREF(__pyx_v_self->data);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->data);
+- __Pyx_INCREF(__pyx_v_self->name);
+- __Pyx_GIVEREF(__pyx_v_self->name);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name);
+- __pyx_v_state = ((PyObject*)__pyx_t_1);
++ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "(tree fragment)":6
+- * cdef bint use_setstate
+- * state = (self.data, self.name)
+- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
+- * if _dict is not None:
+- * state += (_dict,)
+- */
+- __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v__dict = __pyx_t_1;
+- __pyx_t_1 = 0;
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "(tree fragment)":7
+- * state = (self.data, self.name)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- __pyx_t_2 = (__pyx_v__dict != Py_None);
+- __pyx_t_3 = (__pyx_t_2 != 0);
+- if (__pyx_t_3) {
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+- /* "(tree fragment)":8
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- * state += (_dict,) # <<<<<<<<<<<<<<
+- * use_setstate = True
+- * else:
+- */
+- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v__dict);
+- __Pyx_GIVEREF(__pyx_v__dict);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
+- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
+- __pyx_t_4 = 0;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "(tree fragment)":9
+- * if _dict is not None:
+- * state += (_dict,)
+- * use_setstate = True # <<<<<<<<<<<<<<
+- * else:
+- * use_setstate = self.data is not None or self.name is not None
+- */
+- __pyx_v_use_setstate = 1;
+-
+- /* "(tree fragment)":7
+- * state = (self.data, self.name)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "(tree fragment)":11
+- * use_setstate = True
+- * else:
+- * use_setstate = self.data is not None or self.name is not None # <<<<<<<<<<<<<<
+- * if use_setstate:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
+- */
+- /*else*/ {
+- __pyx_t_2 = (__pyx_v_self->data != Py_None);
+- __pyx_t_5 = (__pyx_t_2 != 0);
+- if (!__pyx_t_5) {
+- } else {
+- __pyx_t_3 = __pyx_t_5;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_5 = (__pyx_v_self->name != Py_None);
+- __pyx_t_2 = (__pyx_t_5 != 0);
+- __pyx_t_3 = __pyx_t_2;
+- __pyx_L4_bool_binop_done:;
+- __pyx_v_use_setstate = __pyx_t_3;
+- }
+- __pyx_L3:;
+-
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.data is not None or self.name is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
+- * else:
+- */
+- __pyx_t_3 = (__pyx_v_use_setstate != 0);
+- if (__pyx_t_3) {
+-
+- /* "(tree fragment)":13
+- * use_setstate = self.data is not None or self.name is not None
+- * if use_setstate:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state # <<<<<<<<<<<<<<
+- * else:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_5713169);
+- __Pyx_GIVEREF(__pyx_int_5713169);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
+- __pyx_t_4 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_6;
+- __pyx_t_6 = 0;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.data is not None or self.name is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
+- * else:
+- */
+- }
+-
+- /* "(tree fragment)":15
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
+- * else:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state) # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_Property__set_state(self, __pyx_state)
+- */
+- /*else*/ {
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_5713169);
+- __Pyx_GIVEREF(__pyx_int_5713169);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
+- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_6);
+- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+- __pyx_t_6 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
+- goto __pyx_L0;
+- }
+-
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
+- */
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ int __pyx_t_1;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error)
++ __pyx_v_self->error = __pyx_t_1;
+
+ /* function exit code */
++ __pyx_r = 0;
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = -1;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_state);
+- __Pyx_XDECREF(__pyx_v__dict);
+- __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Property__set_state(self, __pyx_state)
++/* "vidcutter/libs/pympv/mpv.pyx":260
++ * cdef public mpv_event_id id
++ * cdef public int error
++ * cdef public object data, reply_userdata # <<<<<<<<<<<<<<
++ *
++ * @property
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+-
+- /* "(tree fragment)":17
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_Property__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Property__set_state(self, __pyx_state)
+- */
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_self->data);
++ __pyx_r = __pyx_v_self->data;
++ goto __pyx_L0;
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":263
+- *
+- * @property
+- * def error_str(self): # <<<<<<<<<<<<<<
+- * """mpv_error_string of the error proeprty"""
+- * cdef const char* err_c
+- */
+-
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- char const *__pyx_v_err_c;
+- PyObject *__pyx_r = NULL;
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = __pyx_v_value;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":266
+- * """mpv_error_string of the error proeprty"""
+- * cdef const char* err_c
+- * with nogil: # <<<<<<<<<<<<<<
+- * err_c = mpv_error_string(self.error)
+- * return _strdec(err_c)
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":267
+- * cdef const char* err_c
+- * with nogil:
+- * err_c = mpv_error_string(self.error) # <<<<<<<<<<<<<<
+- * return _strdec(err_c)
+- *
+- */
+- __pyx_v_err_c = mpv_error_string(__pyx_v_self->error);
+- }
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":266
+- * """mpv_error_string of the error proeprty"""
+- * cdef const char* err_c
+- * with nogil: # <<<<<<<<<<<<<<
+- * err_c = mpv_error_string(self.error)
+- * return _strdec(err_c)
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":268
+- * with nogil:
+- * err_c = mpv_error_string(self.error)
+- * return _strdec(err_c) # <<<<<<<<<<<<<<
+- *
+- * cdef _data(self, mpv_event* event):
+- */
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = Py_None;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
++ __Pyx_INCREF(__pyx_v_self->reply_userdata);
++ __pyx_r = __pyx_v_self->reply_userdata;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":263
+- *
+- * @property
+- * def error_str(self): # <<<<<<<<<<<<<<
+- * """mpv_error_string of the error proeprty"""
+- * cdef const char* err_c
+- */
+-
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error_str.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":270
+- * return _strdec(err_c)
+- *
+- * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
+- * cdef void* data = event.data
+- * cdef mpv_event_client_message* climsg
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
++ __Pyx_DECREF(__pyx_v_self->reply_userdata);
++ __pyx_v_self->reply_userdata = __pyx_v_value;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
++ __Pyx_DECREF(__pyx_v_self->reply_userdata);
++ __pyx_v_self->reply_userdata = Py_None;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event) {
+- void *__pyx_v_data;
+- struct mpv_event_client_message *__pyx_v_climsg;
+- PyObject *__pyx_v_args = NULL;
+- int __pyx_v_num_args;
+- int __pyx_v_i;
+- PyObject *__pyx_v_arg = NULL;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ PyObject *__pyx_v_state = 0;
++ PyObject *__pyx_v__dict = 0;
++ int __pyx_v_use_setstate;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- void *__pyx_t_1;
++ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ int __pyx_t_6;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_data", 0);
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":271
+- *
+- * cdef _data(self, mpv_event* event):
+- * cdef void* data = event.data # <<<<<<<<<<<<<<
+- * cdef mpv_event_client_message* climsg
+- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
++ /* "(tree fragment)":5
++ * cdef object _dict
++ * cdef bint use_setstate
++ * state = (self.data, self.error, self.id, self.reply_userdata) # <<<<<<<<<<<<<<
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
+ */
+- __pyx_t_1 = __pyx_v_event->data;
+- __pyx_v_data = __pyx_t_1;
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_INCREF(__pyx_v_self->data);
++ __Pyx_GIVEREF(__pyx_v_self->data);
++ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->data);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_2);
++ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
++ __Pyx_INCREF(__pyx_v_self->reply_userdata);
++ __Pyx_GIVEREF(__pyx_v_self->reply_userdata);
++ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->reply_userdata);
++ __pyx_t_1 = 0;
++ __pyx_t_2 = 0;
++ __pyx_v_state = ((PyObject*)__pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":273
+- * cdef void* data = event.data
+- * cdef mpv_event_client_message* climsg
+- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+- */
+- switch (__pyx_v_self->id) {
+- case MPV_EVENT_GET_PROPERTY_REPLY:
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":274
+- * cdef mpv_event_client_message* climsg
+- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
+- * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+- * return Property()._init(<mpv_event_property*>data)
++ /* "(tree fragment)":6
++ * cdef bint use_setstate
++ * state = (self.data, self.error, self.id, self.reply_userdata)
++ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
++ * if _dict is not None:
++ * state += (_dict,)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_v__dict = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":273
+- * cdef void* data = event.data
+- * cdef mpv_event_client_message* climsg
+- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
++ /* "(tree fragment)":7
++ * state = (self.data, self.error, self.id, self.reply_userdata)
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
+ */
+- break;
+- case MPV_EVENT_PROPERTY_CHANGE:
++ __pyx_t_4 = (__pyx_v__dict != Py_None);
++ __pyx_t_5 = (__pyx_t_4 != 0);
++ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":276
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+- * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
+- * elif self.id == MPV_EVENT_LOG_MESSAGE:
+- * return LogMessage()._init(<mpv_event_log_message*>data)
++ /* "(tree fragment)":8
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
++ * state += (_dict,) # <<<<<<<<<<<<<<
++ * use_setstate = True
++ * else:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __Pyx_INCREF(__pyx_v__dict);
++ __Pyx_GIVEREF(__pyx_v__dict);
++ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
++ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_r = __pyx_t_2;
++ __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
+ __pyx_t_2 = 0;
+- goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":275
+- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_LOG_MESSAGE:
++ /* "(tree fragment)":9
++ * if _dict is not None:
++ * state += (_dict,)
++ * use_setstate = True # <<<<<<<<<<<<<<
++ * else:
++ * use_setstate = self.data is not None or self.reply_userdata is not None
+ */
+- break;
+- case MPV_EVENT_LOG_MESSAGE:
++ __pyx_v_use_setstate = 1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":278
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_LOG_MESSAGE:
+- * return LogMessage()._init(<mpv_event_log_message*>data) # <<<<<<<<<<<<<<
+- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
+- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
++ /* "(tree fragment)":7
++ * state = (self.data, self.error, self.id, self.reply_userdata)
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
++ */
++ goto __pyx_L3;
++ }
++
++ /* "(tree fragment)":11
++ * use_setstate = True
++ * else:
++ * use_setstate = self.data is not None or self.reply_userdata is not None # <<<<<<<<<<<<<<
++ * if use_setstate:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
++ */
++ /*else*/ {
++ __pyx_t_4 = (__pyx_v_self->data != Py_None);
++ __pyx_t_6 = (__pyx_t_4 != 0);
++ if (!__pyx_t_6) {
++ } else {
++ __pyx_t_5 = __pyx_t_6;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_6 = (__pyx_v_self->reply_userdata != Py_None);
++ __pyx_t_4 = (__pyx_t_6 != 0);
++ __pyx_t_5 = __pyx_t_4;
++ __pyx_L4_bool_binop_done:;
++ __pyx_v_use_setstate = __pyx_t_5;
++ }
++ __pyx_L3:;
++
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = self.data is not None or self.reply_userdata is not None
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
++ * else:
++ */
++ __pyx_t_5 = (__pyx_v_use_setstate != 0);
++ if (__pyx_t_5) {
++
++ /* "(tree fragment)":13
++ * use_setstate = self.data is not None or self.reply_userdata is not None
++ * if use_setstate:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state # <<<<<<<<<<<<<<
++ * else:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_3;
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_228822053);
++ __Pyx_GIVEREF(__pyx_int_228822053);
++ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
++ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_2);
++ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
++ __pyx_t_2 = 0;
+ __pyx_t_3 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":277
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_LOG_MESSAGE: # <<<<<<<<<<<<<<
+- * return LogMessage()._init(<mpv_event_log_message*>data)
+- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = self.data is not None or self.reply_userdata is not None
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
++ * else:
+ */
+- break;
+- case MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":280
+- * return LogMessage()._init(<mpv_event_log_message*>data)
+- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
+- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data) # <<<<<<<<<<<<<<
+- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+- * climsg = <mpv_event_client_message*>data
++ /* "(tree fragment)":15
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
++ * else:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state) # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_Event__set_state(self, __pyx_state)
+ */
++ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch *)((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_t_3), ((struct mpv_event_script_input_dispatch *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_228822053);
++ __Pyx_GIVEREF(__pyx_int_228822053);
++ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
++ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
++ __pyx_t_1 = 0;
++ __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":279
+- * elif self.id == MPV_EVENT_LOG_MESSAGE:
+- * return LogMessage()._init(<mpv_event_log_message*>data)
+- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH: # <<<<<<<<<<<<<<
+- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+- break;
+- case MPV_EVENT_CLIENT_MESSAGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":282
+- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+- * climsg = <mpv_event_client_message*>data # <<<<<<<<<<<<<<
+- * args = []
+- * num_args = climsg.num_args
+- */
+- __pyx_v_climsg = ((struct mpv_event_client_message *)__pyx_v_data);
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_state);
++ __Pyx_XDECREF(__pyx_v__dict);
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":283
+- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+- * climsg = <mpv_event_client_message*>data
+- * args = [] # <<<<<<<<<<<<<<
+- * num_args = climsg.num_args
+- * for i in range(num_args):
++/* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Event__set_state(self, __pyx_state)
+ */
+- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_v_args = ((PyObject*)__pyx_t_2);
+- __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":284
+- * climsg = <mpv_event_client_message*>data
+- * args = []
+- * num_args = climsg.num_args # <<<<<<<<<<<<<<
+- * for i in range(num_args):
+- * arg = <char*>climsg.args[i]
+- */
+- __pyx_t_4 = __pyx_v_climsg->num_args;
+- __pyx_v_num_args = __pyx_t_4;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":285
+- * args = []
+- * num_args = climsg.num_args
+- * for i in range(num_args): # <<<<<<<<<<<<<<
+- * arg = <char*>climsg.args[i]
+- * arg = _strdec(arg)
+- */
+- __pyx_t_4 = __pyx_v_num_args;
+- __pyx_t_5 = __pyx_t_4;
+- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+- __pyx_v_i = __pyx_t_6;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":286
+- * num_args = climsg.num_args
+- * for i in range(num_args):
+- * arg = <char*>climsg.args[i] # <<<<<<<<<<<<<<
+- * arg = _strdec(arg)
+- * args.append(arg)
+- */
+- __pyx_t_2 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_2);
+- __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":287
+- * for i in range(num_args):
+- * arg = <char*>climsg.args[i]
+- * arg = _strdec(arg) # <<<<<<<<<<<<<<
+- * args.append(arg)
+- * return args
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strdec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_arg) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_arg);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_2);
+- __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":288
+- * arg = <char*>climsg.args[i]
+- * arg = _strdec(arg)
+- * args.append(arg) # <<<<<<<<<<<<<<
+- * return args
+- * elif self.id == MPV_EVENT_END_FILE:
+- */
+- __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
+- }
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":289
+- * arg = _strdec(arg)
+- * args.append(arg)
+- * return args # <<<<<<<<<<<<<<
+- * elif self.id == MPV_EVENT_END_FILE:
+- * return EndOfFileReached()._init(<mpv_event_end_file*>data)
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_args);
+- __pyx_r = __pyx_v_args;
+- goto __pyx_L0;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":281
+- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
+- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+- * elif self.id == MPV_EVENT_CLIENT_MESSAGE: # <<<<<<<<<<<<<<
+- * climsg = <mpv_event_client_message*>data
+- * args = []
+- */
+- break;
+- case MPV_EVENT_END_FILE:
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":291
+- * return args
+- * elif self.id == MPV_EVENT_END_FILE:
+- * return EndOfFileReached()._init(<mpv_event_end_file*>data) # <<<<<<<<<<<<<<
+- * return None
+- *
++ /* "(tree fragment)":17
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_Event__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_2), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":290
+- * args.append(arg)
+- * return args
+- * elif self.id == MPV_EVENT_END_FILE: # <<<<<<<<<<<<<<
+- * return EndOfFileReached()._init(<mpv_event_end_file*>data)
+- * return None
++ /* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Event__set_state(self, __pyx_state)
+ */
+- break;
+- default: break;
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":292
+- * elif self.id == MPV_EVENT_END_FILE:
+- * return EndOfFileReached()._init(<mpv_event_end_file*>data)
+- * return None # <<<<<<<<<<<<<<
+- *
+- * @property
+- */
+- __Pyx_XDECREF(__pyx_r);
++ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":270
+- * return _strdec(err_c)
++/* "vidcutter/libs/pympv/mpv.pyx":318
+ *
+- * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
+- * cdef void* data = event.data
+- * cdef mpv_event_client_message* climsg
++ *
++ * def _errors(fn): # <<<<<<<<<<<<<<
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
+ */
+
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_5_errors = {"_errors", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5_errors, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("_errors (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_4_errors(__pyx_self, ((PyObject *)__pyx_v_fn));
++
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event._data", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_args);
+- __Pyx_XDECREF(__pyx_v_arg);
+- __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":295
++/* "vidcutter/libs/pympv/mpv.pyx":319
+ *
+- * @property
+- * def name(self): # <<<<<<<<<<<<<<
+- * """mpv_event_name of the event id"""
+- * cdef const char* name_c
++ * def _errors(fn):
++ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
++ * v = fn(*k, **kw)
++ * if v < 0:
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped = {"wrapped", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_k = 0;
++ PyObject *__pyx_v_kw = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("wrapped (wrapper)", 0);
++ if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "wrapped", 1))) return NULL;
++ __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
++ __Pyx_GOTREF(__pyx_v_kw);
++ __Pyx_INCREF(__pyx_args);
++ __pyx_v_k = __pyx_args;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(__pyx_self, __pyx_v_k, __pyx_v_kw);
+
+ /* function exit code */
++ __Pyx_XDECREF(__pyx_v_k);
++ __Pyx_XDECREF(__pyx_v_kw);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- char const *__pyx_v_name_c;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_kw) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_outer_scope;
++ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_RefNannySetupContext("wrapped", 0);
++ __pyx_outer_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *) __Pyx_CyFunction_GetClosure(__pyx_self);
++ __pyx_cur_scope = __pyx_outer_scope;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":298
+- * """mpv_event_name of the event id"""
+- * cdef const char* name_c
+- * with nogil: # <<<<<<<<<<<<<<
+- * name_c = mpv_event_name(self.id)
+- * return _strdec(name_c)
++ /* "vidcutter/libs/pympv/mpv.pyx":320
++ * def _errors(fn):
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw) # <<<<<<<<<<<<<<
++ * if v < 0:
++ * raise MPVError(v)
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 320, __pyx_L1_error) }
++ __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_v = __pyx_t_2;
++ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":299
+- * cdef const char* name_c
+- * with nogil:
+- * name_c = mpv_event_name(self.id) # <<<<<<<<<<<<<<
+- * return _strdec(name_c)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":321
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
++ * if v < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(v)
++ * return wrapped
+ */
+- __pyx_v_name_c = mpv_event_name(__pyx_v_self->id);
+- }
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 321, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":298
+- * """mpv_event_name of the event id"""
+- * cdef const char* name_c
+- * with nogil: # <<<<<<<<<<<<<<
+- * name_c = mpv_event_name(self.id)
+- * return _strdec(name_c)
++ /* "vidcutter/libs/pympv/mpv.pyx":322
++ * v = fn(*k, **kw)
++ * if v < 0:
++ * raise MPVError(v) # <<<<<<<<<<<<<<
++ * return wrapped
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+- }
++ }
++ __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_v);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __PYX_ERR(0, 322, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":300
+- * with nogil:
+- * name_c = mpv_event_name(self.id)
+- * return _strdec(name_c) # <<<<<<<<<<<<<<
+- *
+- * cdef _init(self, mpv_event* event, ctx):
++ /* "vidcutter/libs/pympv/mpv.pyx":321
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
++ * if v < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(v)
++ * return wrapped
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+ }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":295
++ /* "vidcutter/libs/pympv/mpv.pyx":319
+ *
+- * @property
+- * def name(self): # <<<<<<<<<<<<<<
+- * """mpv_event_name of the event id"""
+- * cdef const char* name_c
++ * def _errors(fn):
++ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
++ * v = fn(*k, **kw)
++ * if v < 0:
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._errors.wrapped", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":302
+- * return _strdec(name_c)
++/* "vidcutter/libs/pympv/mpv.pyx":318
+ *
+- * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
+- * cdef uint64_t ctxid = <uint64_t>id(ctx)
+- * self.id = event.event_id
++ *
++ * def _errors(fn): # <<<<<<<<<<<<<<
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event, PyObject *__pyx_v_ctx) {
+- uint64_t __pyx_v_ctxid;
+- PyObject *__pyx_v_userdata = NULL;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
++ PyObject *__pyx_v_wrapped = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- uint64_t __pyx_t_2;
+- enum mpv_event_id __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- int __pyx_t_7;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_t_9;
+- int __pyx_t_10;
+- int __pyx_t_11;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_init", 0);
++ __Pyx_RefNannySetupContext("_errors", 0);
++ __pyx_cur_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(__pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, __pyx_empty_tuple, NULL);
++ if (unlikely(!__pyx_cur_scope)) {
++ __pyx_cur_scope = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)Py_None);
++ __Pyx_INCREF(Py_None);
++ __PYX_ERR(0, 318, __pyx_L1_error)
++ } else {
++ __Pyx_GOTREF(__pyx_cur_scope);
++ }
++ __pyx_cur_scope->__pyx_v_fn = __pyx_v_fn;
++ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn);
++ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":303
++ /* "vidcutter/libs/pympv/mpv.pyx":319
+ *
+- * cdef _init(self, mpv_event* event, ctx):
+- * cdef uint64_t ctxid = <uint64_t>id(ctx) # <<<<<<<<<<<<<<
+- * self.id = event.event_id
+- * self.data = self._data(event)
++ * def _errors(fn):
++ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
++ * v = fn(*k, **kw)
++ * if v < 0:
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
++ __pyx_v_wrapped = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":304
+- * cdef _init(self, mpv_event* event, ctx):
+- * cdef uint64_t ctxid = <uint64_t>id(ctx)
+- * self.id = event.event_id # <<<<<<<<<<<<<<
+- * self.data = self._data(event)
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ /* "vidcutter/libs/pympv/mpv.pyx":323
++ * if v < 0:
++ * raise MPVError(v)
++ * return wrapped # <<<<<<<<<<<<<<
++ *
++ *
+ */
+- __pyx_t_3 = __pyx_v_event->event_id;
+- __pyx_v_self->id = __pyx_t_3;
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_wrapped);
++ __pyx_r = __pyx_v_wrapped;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":305
+- * cdef uint64_t ctxid = <uint64_t>id(ctx)
+- * self.id = event.event_id
+- * self.data = self._data(event) # <<<<<<<<<<<<<<
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ /* "vidcutter/libs/pympv/mpv.pyx":318
++ *
++ *
++ * def _errors(fn): # <<<<<<<<<<<<<<
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = __pyx_t_1;
+- __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":306
+- * self.id = event.event_id
+- * self.data = self._data(event)
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None) # <<<<<<<<<<<<<<
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+- * userdata.remove()
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._errors", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_wrapped);
++ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":329
++ * code = None
++ *
++ * def __init__(self, e): # <<<<<<<<<<<<<<
++ * self.code = e
++ * cdef const char* err_c
+ */
+- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_6 = NULL;
+- __pyx_t_7 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- __pyx_t_7 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_5)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_self = 0;
++ PyObject *__pyx_v_e = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_8);
+- if (__pyx_t_6) {
+- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_e,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 329, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 329, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_None);
+- __pyx_t_4 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __pyx_v_self = values[0];
++ __pyx_v_e = values[1];
+ }
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __pyx_v_userdata = __pyx_t_1;
+- __pyx_t_1 = 0;
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(__pyx_self, __pyx_v_self, __pyx_v_e);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":307
+- * self.data = self._data(event)
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+- * userdata.remove()
+- * if not userdata.observed and userdata.counter <= 0:
+- */
+- __pyx_t_10 = (__pyx_v_userdata != Py_None);
+- __pyx_t_11 = (__pyx_t_10 != 0);
+- if (__pyx_t_11) {
+- } else {
+- __pyx_t_9 = __pyx_t_11;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_11 = ((__pyx_v_self->id != MPV_EVENT_PROPERTY_CHANGE) != 0);
+- __pyx_t_9 = __pyx_t_11;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_9) {
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":308
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+- * userdata.remove() # <<<<<<<<<<<<<<
+- * if not userdata.observed and userdata.counter <= 0:
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_e) {
++ char const *__pyx_v_err_c;
++ int __pyx_v_e_i;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ int __pyx_t_1;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__init__", 0);
++ __Pyx_INCREF(__pyx_v_e);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":309
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+- * userdata.remove()
+- * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- * if userdata is not None:
++ /* "vidcutter/libs/pympv/mpv.pyx":330
++ *
++ * def __init__(self, e):
++ * self.code = e # <<<<<<<<<<<<<<
++ * cdef const char* err_c
++ * cdef int e_i
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_10 = ((!__pyx_t_11) != 0);
+- if (__pyx_t_10) {
+- } else {
+- __pyx_t_9 = __pyx_t_10;
+- goto __pyx_L7_bool_binop_done;
+- }
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __pyx_t_9 = __pyx_t_10;
+- __pyx_L7_bool_binop_done:;
+- if (__pyx_t_9) {
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":310
+- * userdata.remove()
+- * if not userdata.observed and userdata.counter <= 0:
+- * del _reply_userdatas[ctxid][event.reply_userdata] # <<<<<<<<<<<<<<
+- * if userdata is not None:
+- * userdata = userdata.data
++ /* "vidcutter/libs/pympv/mpv.pyx":333
++ * cdef const char* err_c
++ * cdef int e_i
++ * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
++ * e_i = e
++ * with nogil:
+ */
+- __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_e);
++ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":309
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+- * userdata.remove()
+- * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- * if userdata is not None:
++ /* "vidcutter/libs/pympv/mpv.pyx":334
++ * cdef int e_i
++ * if not isinstance(e, basestring):
++ * e_i = e # <<<<<<<<<<<<<<
++ * with nogil:
++ * err_c = mpv_error_string(e_i)
+ */
+- }
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
++ __pyx_v_e_i = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":307
+- * self.data = self._data(event)
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+- * userdata.remove()
+- * if not userdata.observed and userdata.counter <= 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":335
++ * if not isinstance(e, basestring):
++ * e_i = e
++ * with nogil: # <<<<<<<<<<<<<<
++ * err_c = mpv_error_string(e_i)
++ * e = _strdec(err_c)
+ */
+- }
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":311
+- * if not userdata.observed and userdata.counter <= 0:
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- * if userdata is not None: # <<<<<<<<<<<<<<
+- * userdata = userdata.data
+- * self.reply_userdata = userdata
++ /* "vidcutter/libs/pympv/mpv.pyx":336
++ * e_i = e
++ * with nogil:
++ * err_c = mpv_error_string(e_i) # <<<<<<<<<<<<<<
++ * e = _strdec(err_c)
++ * Exception.__init__(self, e)
+ */
+- __pyx_t_9 = (__pyx_v_userdata != Py_None);
+- __pyx_t_10 = (__pyx_t_9 != 0);
+- if (__pyx_t_10) {
++ __pyx_v_err_c = mpv_error_string(__pyx_v_e_i);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":312
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- * if userdata is not None:
+- * userdata = userdata.data # <<<<<<<<<<<<<<
+- * self.reply_userdata = userdata
+- * self.error = event.error
++ /* "vidcutter/libs/pympv/mpv.pyx":335
++ * if not isinstance(e, basestring):
++ * e_i = e
++ * with nogil: # <<<<<<<<<<<<<<
++ * err_c = mpv_error_string(e_i)
++ * e = _strdec(err_c)
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF_SET(__pyx_v_userdata, __pyx_t_5);
+- __pyx_t_5 = 0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L6;
++ }
++ __pyx_L6:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":311
+- * if not userdata.observed and userdata.counter <= 0:
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- * if userdata is not None: # <<<<<<<<<<<<<<
+- * userdata = userdata.data
+- * self.reply_userdata = userdata
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":313
+- * if userdata is not None:
+- * userdata = userdata.data
+- * self.reply_userdata = userdata # <<<<<<<<<<<<<<
+- * self.error = event.error
+- * return self
++ /* "vidcutter/libs/pympv/mpv.pyx":337
++ * with nogil:
++ * err_c = mpv_error_string(e_i)
++ * e = _strdec(err_c) # <<<<<<<<<<<<<<
++ * Exception.__init__(self, e)
++ *
+ */
+- __Pyx_INCREF(__pyx_v_userdata);
+- __Pyx_GIVEREF(__pyx_v_userdata);
+- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+- __Pyx_DECREF(__pyx_v_self->reply_userdata);
+- __pyx_v_self->reply_userdata = __pyx_v_userdata;
++ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ }
++ }
++ __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_4);
++ __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":314
+- * userdata = userdata.data
+- * self.reply_userdata = userdata
+- * self.error = event.error # <<<<<<<<<<<<<<
+- * return self
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":333
++ * cdef const char* err_c
++ * cdef int e_i
++ * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
++ * e_i = e
++ * with nogil:
+ */
+- __pyx_t_7 = __pyx_v_event->error;
+- __pyx_v_self->error = __pyx_t_7;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":315
+- * self.reply_userdata = userdata
+- * self.error = event.error
+- * return self # <<<<<<<<<<<<<<
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":338
++ * err_c = mpv_error_string(e_i)
++ * e = _strdec(err_c)
++ * Exception.__init__(self, e) # <<<<<<<<<<<<<<
+ *
++ * class PyMPVError(Exception):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(((PyObject *)__pyx_v_self));
+- __pyx_r = ((PyObject *)__pyx_v_self);
+- goto __pyx_L0;
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_6 = NULL;
++ __pyx_t_3 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_6)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_6);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ __pyx_t_3 = 1;
++ }
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_5)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
++ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GOTREF(__pyx_t_4);
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
++ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GOTREF(__pyx_t_4);
++ } else
++ #endif
++ {
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (__pyx_t_6) {
++ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
++ }
++ __Pyx_INCREF(__pyx_v_self);
++ __Pyx_GIVEREF(__pyx_v_self);
++ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_3, __pyx_v_self);
++ __Pyx_INCREF(__pyx_v_e);
++ __Pyx_GIVEREF(__pyx_v_e);
++ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_3, __pyx_v_e);
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ }
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":302
+- * return _strdec(name_c)
++ /* "vidcutter/libs/pympv/mpv.pyx":329
++ * code = None
+ *
+- * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
+- * cdef uint64_t ctxid = <uint64_t>id(ctx)
+- * self.id = event.event_id
++ * def __init__(self, e): # <<<<<<<<<<<<<<
++ * self.code = e
++ * cdef const char* err_c
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_userdata);
++ __Pyx_XDECREF(__pyx_v_e);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":258
+- * cdef class Event(object):
+- * """Wraps: mpv_event"""
+- * cdef public mpv_event_id id # <<<<<<<<<<<<<<
+- * cdef public int error
+- * cdef public object data, reply_userdata
++/* "vidcutter/libs/pympv/mpv.pyx":347
++ *
++ * class _ReplyUserData(object):
++ * def __init__(self, data): # <<<<<<<<<<<<<<
++ * self.counter = 0
++ * self.data = data
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_self = 0;
++ PyObject *__pyx_v_data = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 347, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 347, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ }
++ __pyx_v_self = values[0];
++ __pyx_v_data = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 347, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(__pyx_self, __pyx_v_self, __pyx_v_data);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ __Pyx_RefNannySetupContext("__init__", 0);
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":348
++ * class _ReplyUserData(object):
++ * def __init__(self, data):
++ * self.counter = 0 # <<<<<<<<<<<<<<
++ * self.data = data
++ * self.observed = False
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":349
++ * def __init__(self, data):
++ * self.counter = 0
++ * self.data = data # <<<<<<<<<<<<<<
++ * self.observed = False
++ *
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- enum mpv_event_id __pyx_t_1;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error)
+- __pyx_v_self->id = __pyx_t_1;
++ /* "vidcutter/libs/pympv/mpv.pyx":350
++ * self.counter = 0
++ * self.data = data
++ * self.observed = False # <<<<<<<<<<<<<<
++ *
++ * def add(self):
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":347
++ *
++ * class _ReplyUserData(object):
++ * def __init__(self, data): # <<<<<<<<<<<<<<
++ * self.counter = 0
++ * self.data = data
++ */
+
+ /* function exit code */
+- __pyx_r = 0;
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
++ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":259
+- * """Wraps: mpv_event"""
+- * cdef public mpv_event_id id
+- * cdef public int error # <<<<<<<<<<<<<<
+- * cdef public object data, reply_userdata
++/* "vidcutter/libs/pympv/mpv.pyx":352
++ * self.observed = False
++ *
++ * def add(self): # <<<<<<<<<<<<<<
++ * self.counter += 1
+ *
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add = {"add", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("add (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
++ __Pyx_RefNannySetupContext("add", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":353
++ *
++ * def add(self):
++ * self.counter += 1 # <<<<<<<<<<<<<<
++ *
++ * def remove(self):
++ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":352
++ * self.observed = False
++ *
++ * def add(self): # <<<<<<<<<<<<<<
++ * self.counter += 1
++ *
++ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -7328,1181 +7931,1253 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __p
+ return __pyx_r;
+ }
+
++/* "vidcutter/libs/pympv/mpv.pyx":355
++ * self.counter += 1
++ *
++ * def remove(self): # <<<<<<<<<<<<<<
++ * self.counter -= 1
++ *
++ */
++
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove = {"remove", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ __Pyx_RefNannySetupContext("remove (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error)
+- __pyx_v_self->error = __pyx_t_1;
++ __Pyx_RefNannySetupContext("remove", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":356
++ *
++ * def remove(self):
++ * self.counter -= 1 # <<<<<<<<<<<<<<
++ *
++ *
++ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":355
++ * self.counter += 1
++ *
++ * def remove(self): # <<<<<<<<<<<<<<
++ * self.counter -= 1
++ *
++ */
+
+ /* function exit code */
+- __pyx_r = 0;
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":260
+- * cdef public mpv_event_id id
+- * cdef public int error
+- * cdef public object data, reply_userdata # <<<<<<<<<<<<<<
++/* "vidcutter/libs/pympv/mpv.pyx":370
+ *
+ * @property
++ * def api_version(self): # <<<<<<<<<<<<<<
++ * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
++ *
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":371
++ * @property
++ * def api_version(self):
++ * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION # <<<<<<<<<<<<<<
++ *
++ * @property
++ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->data);
+- __pyx_r = __pyx_v_self->data;
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_2);
++ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
++ __pyx_t_1 = 0;
++ __pyx_t_2 = 0;
++ __pyx_t_3 = 0;
++ __pyx_r = __pyx_t_4;
++ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
++ /* "vidcutter/libs/pympv/mpv.pyx":370
++ *
++ * @property
++ * def api_version(self): # <<<<<<<<<<<<<<
++ * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
++ *
++ */
++
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.api_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
++/* "vidcutter/libs/pympv/mpv.pyx":374
++ *
++ * @property
++ * def name(self): # <<<<<<<<<<<<<<
++ * """Unique name for every context created.
++ *
++ */
++
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ char const *__pyx_v_name;
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = __pyx_v_value;
+-
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__get__", 0);
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = Py_None;
++ /* "vidcutter/libs/pympv/mpv.pyx":380
++ * """
++ * cdef const char* name
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * with nogil:
++ * name = mpv_client_name(self._ctx)
++ */
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 380, __pyx_L1_error)
++ }
++ }
++ #endif
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":381
++ * cdef const char* name
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * name = mpv_client_name(self._ctx)
++ * return _strdec(name)
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":382
++ * assert self._ctx
++ * with nogil:
++ * name = mpv_client_name(self._ctx) # <<<<<<<<<<<<<<
++ * return _strdec(name)
++ *
++ */
++ __pyx_v_name = mpv_client_name(__pyx_v_self->_ctx);
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":381
++ * cdef const char* name
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * name = mpv_client_name(self._ctx)
++ * return _strdec(name)
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":383
++ * with nogil:
++ * name = mpv_client_name(self._ctx)
++ * return _strdec(name) # <<<<<<<<<<<<<<
++ *
++ * @property
++ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->reply_userdata);
+- __pyx_r = __pyx_v_self->reply_userdata;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
++ /* "vidcutter/libs/pympv/mpv.pyx":374
++ *
++ * @property
++ * def name(self): # <<<<<<<<<<<<<<
++ * """Unique name for every context created.
++ *
++ */
++
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+- __Pyx_DECREF(__pyx_v_self->reply_userdata);
+- __pyx_v_self->reply_userdata = __pyx_v_value;
+-
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+- __Pyx_DECREF(__pyx_v_self->reply_userdata);
+- __pyx_v_self->reply_userdata = Py_None;
+-
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++/* "vidcutter/libs/pympv/mpv.pyx":386
++ *
++ * @property
++ * def time(self): # <<<<<<<<<<<<<<
++ * """Internal mpv client time.
++ *
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- PyObject *__pyx_v_state = 0;
+- PyObject *__pyx_v__dict = 0;
+- int __pyx_v_use_setstate;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ int64_t __pyx_v_time;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "(tree fragment)":5
+- * cdef object _dict
+- * cdef bint use_setstate
+- * state = (self.data, self.error, self.id, self.reply_userdata) # <<<<<<<<<<<<<<
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_INCREF(__pyx_v_self->data);
+- __Pyx_GIVEREF(__pyx_v_self->data);
+- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->data);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_2);
+- PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
+- __Pyx_INCREF(__pyx_v_self->reply_userdata);
+- __Pyx_GIVEREF(__pyx_v_self->reply_userdata);
+- PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->reply_userdata);
+- __pyx_t_1 = 0;
+- __pyx_t_2 = 0;
+- __pyx_v_state = ((PyObject*)__pyx_t_3);
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":6
+- * cdef bint use_setstate
+- * state = (self.data, self.error, self.id, self.reply_userdata)
+- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
+- * if _dict is not None:
+- * state += (_dict,)
+- */
+- __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_v__dict = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":7
+- * state = (self.data, self.error, self.id, self.reply_userdata)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- __pyx_t_4 = (__pyx_v__dict != Py_None);
+- __pyx_t_5 = (__pyx_t_4 != 0);
+- if (__pyx_t_5) {
+-
+- /* "(tree fragment)":8
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- * state += (_dict,) # <<<<<<<<<<<<<<
+- * use_setstate = True
+- * else:
+- */
+- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_INCREF(__pyx_v__dict);
+- __Pyx_GIVEREF(__pyx_v__dict);
+- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
+- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
+- __pyx_t_2 = 0;
+-
+- /* "(tree fragment)":9
+- * if _dict is not None:
+- * state += (_dict,)
+- * use_setstate = True # <<<<<<<<<<<<<<
+- * else:
+- * use_setstate = self.data is not None or self.reply_userdata is not None
+- */
+- __pyx_v_use_setstate = 1;
+-
+- /* "(tree fragment)":7
+- * state = (self.data, self.error, self.id, self.reply_userdata)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "(tree fragment)":11
+- * use_setstate = True
+- * else:
+- * use_setstate = self.data is not None or self.reply_userdata is not None # <<<<<<<<<<<<<<
+- * if use_setstate:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
++ /* "vidcutter/libs/pympv/mpv.pyx":394
++ * """
++ * cdef int64_t time
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * with nogil:
++ * time = mpv_get_time_us(self._ctx)
+ */
+- /*else*/ {
+- __pyx_t_4 = (__pyx_v_self->data != Py_None);
+- __pyx_t_6 = (__pyx_t_4 != 0);
+- if (!__pyx_t_6) {
+- } else {
+- __pyx_t_5 = __pyx_t_6;
+- goto __pyx_L4_bool_binop_done;
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 394, __pyx_L1_error)
+ }
+- __pyx_t_6 = (__pyx_v_self->reply_userdata != Py_None);
+- __pyx_t_4 = (__pyx_t_6 != 0);
+- __pyx_t_5 = __pyx_t_4;
+- __pyx_L4_bool_binop_done:;
+- __pyx_v_use_setstate = __pyx_t_5;
+ }
+- __pyx_L3:;
++ #endif
+
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.data is not None or self.reply_userdata is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":395
++ * cdef int64_t time
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * time = mpv_get_time_us(self._ctx)
++ * return time
+ */
+- __pyx_t_5 = (__pyx_v_use_setstate != 0);
+- if (__pyx_t_5) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "(tree fragment)":13
+- * use_setstate = self.data is not None or self.reply_userdata is not None
+- * if use_setstate:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state # <<<<<<<<<<<<<<
+- * else:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
++ /* "vidcutter/libs/pympv/mpv.pyx":396
++ * assert self._ctx
++ * with nogil:
++ * time = mpv_get_time_us(self._ctx) # <<<<<<<<<<<<<<
++ * return time
++ *
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_228822053);
+- __Pyx_GIVEREF(__pyx_int_228822053);
+- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_2);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
+- __pyx_t_2 = 0;
+- __pyx_t_3 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_v_time = mpv_get_time_us(__pyx_v_self->_ctx);
++ }
+
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.data is not None or self.reply_userdata is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":395
++ * cdef int64_t time
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * time = mpv_get_time_us(self._ctx)
++ * return time
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
+ }
+
+- /* "(tree fragment)":15
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
+- * else:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state) # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_Event__set_state(self, __pyx_state)
++ /* "vidcutter/libs/pympv/mpv.pyx":397
++ * with nogil:
++ * time = mpv_get_time_us(self._ctx)
++ * return time # <<<<<<<<<<<<<<
++ *
++ * # def suspend(self):
+ */
+- /*else*/ {
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_228822053);
+- __Pyx_GIVEREF(__pyx_int_228822053);
+- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
+- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
+- __pyx_t_1 = 0;
+- __pyx_t_3 = 0;
+- __pyx_r = __pyx_t_2;
+- __pyx_t_2 = 0;
+- goto __pyx_L0;
+- }
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++ /* "vidcutter/libs/pympv/mpv.pyx":386
++ *
++ * @property
++ * def time(self): # <<<<<<<<<<<<<<
++ * """Internal mpv client time.
++ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_state);
+- __Pyx_XDECREF(__pyx_v__dict);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Event__set_state(self, __pyx_state)
++/* "vidcutter/libs/pympv/mpv.pyx":412
++ *
++ * @_errors
++ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
++ * """Enable or disable a given event.
++ *
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_request_event[] = "Enable or disable a given event.\n\n Arguments:\n event - See Events\n enable - True to enable, False to disable\n\n Wraps: mpv_request_event\n ";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_event = 0;
++ PyObject *__pyx_v_enable = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __Pyx_RefNannySetupContext("request_event (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_event,&__pyx_n_s_enable,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enable)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 412, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ }
++ __pyx_v_event = values[0];
++ __pyx_v_enable = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_event, __pyx_v_enable);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable) {
++ int __pyx_v_enable_i;
++ int __pyx_v_err;
++ enum mpv_event_id __pyx_v_event_id;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
++ int __pyx_t_2;
++ enum mpv_event_id __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ __Pyx_RefNannySetupContext("request_event", 0);
+
+- /* "(tree fragment)":17
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_Event__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":421
++ * Wraps: mpv_request_event
++ * """
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * cdef int enable_i = 1 if enable else 0
++ * cdef int err
+ */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 421, __pyx_L1_error)
++ }
++ }
++ #endif
+
+- /* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Event__set_state(self, __pyx_state)
++ /* "vidcutter/libs/pympv/mpv.pyx":422
++ * """
++ * assert self._ctx
++ * cdef int enable_i = 1 if enable else 0 # <<<<<<<<<<<<<<
++ * cdef int err
++ * cdef mpv_event_id event_id = event
+ */
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
++ if (__pyx_t_2) {
++ __pyx_t_1 = 1;
++ } else {
++ __pyx_t_1 = 0;
++ }
++ __pyx_v_enable_i = __pyx_t_1;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":424
++ * cdef int enable_i = 1 if enable else 0
++ * cdef int err
++ * cdef mpv_event_id event_id = event # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_request_event(self._ctx, event_id, enable_i)
++ */
++ __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
++ __pyx_v_event_id = __pyx_t_3;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":318
++ /* "vidcutter/libs/pympv/mpv.pyx":425
++ * cdef int err
++ * cdef mpv_event_id event_id = event
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_request_event(self._ctx, event_id, enable_i)
++ * return err
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":426
++ * cdef mpv_event_id event_id = event
++ * with nogil:
++ * err = mpv_request_event(self._ctx, event_id, enable_i) # <<<<<<<<<<<<<<
++ * return err
+ *
++ */
++ __pyx_v_err = mpv_request_event(__pyx_v_self->_ctx, __pyx_v_event_id, __pyx_v_enable_i);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":425
++ * cdef int err
++ * cdef mpv_event_id event_id = event
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_request_event(self._ctx, event_id, enable_i)
++ * return err
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":427
++ * with nogil:
++ * err = mpv_request_event(self._ctx, event_id, enable_i)
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def _errors(fn): # <<<<<<<<<<<<<<
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
++ * @_errors
+ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_r = __pyx_t_4;
++ __pyx_t_4 = 0;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_5_errors = {"_errors", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5_errors, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("_errors (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_4_errors(__pyx_self, ((PyObject *)__pyx_v_fn));
++ /* "vidcutter/libs/pympv/mpv.pyx":412
++ *
++ * @_errors
++ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
++ * """Enable or disable a given event.
++ *
++ */
+
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":319
++/* "vidcutter/libs/pympv/mpv.pyx":430
+ *
+- * def _errors(fn):
+- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+- * v = fn(*k, **kw)
+- * if v < 0:
++ * @_errors
++ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_request_log_messages"""
++ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped = {"wrapped", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_k = 0;
+- PyObject *__pyx_v_kw = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_2set_log_level[] = "Wraps: mpv_request_log_messages";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("wrapped (wrapper)", 0);
+- if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "wrapped", 1))) return NULL;
+- if (unlikely(__pyx_kwds)) {
+- __pyx_v_kw = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kw)) return NULL;
+- __Pyx_GOTREF(__pyx_v_kw);
+- } else {
+- __pyx_v_kw = NULL;
+- }
+- __Pyx_INCREF(__pyx_args);
+- __pyx_v_k = __pyx_args;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(__pyx_self, __pyx_v_k, __pyx_v_kw);
++ __Pyx_RefNannySetupContext("set_log_level (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_loglevel));
+
+ /* function exit code */
+- __Pyx_XDECREF(__pyx_v_k);
+- __Pyx_XDECREF(__pyx_v_kw);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_kw) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_outer_scope;
+- PyObject *__pyx_v_v = NULL;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel) {
++ char const *__pyx_v_loglevel_c;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
++ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
++ char const *__pyx_t_4;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("wrapped", 0);
+- __pyx_outer_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *) __Pyx_CyFunction_GetClosure(__pyx_self);
+- __pyx_cur_scope = __pyx_outer_scope;
++ __Pyx_RefNannySetupContext("set_log_level", 0);
++ __Pyx_INCREF(__pyx_v_loglevel);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":320
+- * def _errors(fn):
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw) # <<<<<<<<<<<<<<
+- * if v < 0:
+- * raise MPVError(v)
++ /* "vidcutter/libs/pympv/mpv.pyx":432
++ * def set_log_level(self, loglevel):
++ * """Wraps: mpv_request_log_messages"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * loglevel = _strenc(loglevel)
++ * cdef const char* loglevel_c = loglevel
+ */
+- if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 320, __pyx_L1_error) }
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 432, __pyx_L1_error)
++ }
++ }
++ #endif
++
++ /* "vidcutter/libs/pympv/mpv.pyx":433
++ * """Wraps: mpv_request_log_messages"""
++ * assert self._ctx
++ * loglevel = _strenc(loglevel) # <<<<<<<<<<<<<<
++ * cdef const char* loglevel_c = loglevel
++ * cdef int err
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_loglevel) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loglevel);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_v = __pyx_t_1;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF_SET(__pyx_v_loglevel, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":321
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
+- * if v < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(v)
+- * return wrapped
++ /* "vidcutter/libs/pympv/mpv.pyx":434
++ * assert self._ctx
++ * loglevel = _strenc(loglevel)
++ * cdef const char* loglevel_c = loglevel # <<<<<<<<<<<<<<
++ * cdef int err
++ * with nogil:
+ */
+- __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 321, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (unlikely(__pyx_t_2)) {
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L1_error)
++ __pyx_v_loglevel_c = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":322
+- * v = fn(*k, **kw)
+- * if v < 0:
+- * raise MPVError(v) # <<<<<<<<<<<<<<
+- * return wrapped
++ /* "vidcutter/libs/pympv/mpv.pyx":436
++ * cdef const char* loglevel_c = loglevel
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_request_log_messages(self._ctx, loglevel_c)
++ * return err
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":437
++ * cdef int err
++ * with nogil:
++ * err = mpv_request_log_messages(self._ctx, loglevel_c) # <<<<<<<<<<<<<<
++ * return err
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
++ __pyx_v_err = mpv_request_log_messages(__pyx_v_self->_ctx, __pyx_v_loglevel_c);
+ }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_v);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 322, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":321
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
+- * if v < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(v)
+- * return wrapped
++ /* "vidcutter/libs/pympv/mpv.pyx":436
++ * cdef const char* loglevel_c = loglevel
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_request_log_messages(self._ctx, loglevel_c)
++ * return err
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":319
++ /* "vidcutter/libs/pympv/mpv.pyx":438
++ * with nogil:
++ * err = mpv_request_log_messages(self._ctx, loglevel_c)
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def _errors(fn):
+- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+- * v = fn(*k, **kw)
+- * if v < 0:
++ * @_errors
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":430
++ *
++ * @_errors
++ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_request_log_messages"""
++ * assert self._ctx
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._errors.wrapped", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_log_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_v);
++ __Pyx_XDECREF(__pyx_v_loglevel);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":318
+- *
++/* "vidcutter/libs/pympv/mpv.pyx":441
+ *
+- * def _errors(fn): # <<<<<<<<<<<<<<
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
++ * @_errors
++ * def load_config(self, filename): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_load_config_file"""
++ * assert self._ctx
+ */
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
+- PyObject *__pyx_v_wrapped = 0;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_4load_config[] = "Wraps: mpv_load_config_file";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("load_config (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_filename));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename) {
++ char const *__pyx_v__filename;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ char const *__pyx_t_4;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_errors", 0);
+- __pyx_cur_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(__pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, __pyx_empty_tuple, NULL);
+- if (unlikely(!__pyx_cur_scope)) {
+- __pyx_cur_scope = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)Py_None);
+- __Pyx_INCREF(Py_None);
+- __PYX_ERR(0, 318, __pyx_L1_error)
+- } else {
+- __Pyx_GOTREF(__pyx_cur_scope);
++ __Pyx_RefNannySetupContext("load_config", 0);
++ __Pyx_INCREF(__pyx_v_filename);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":443
++ * def load_config(self, filename):
++ * """Wraps: mpv_load_config_file"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * filename = _strenc(filename)
++ * cdef const char* _filename = filename
++ */
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 443, __pyx_L1_error)
++ }
+ }
+- __pyx_cur_scope->__pyx_v_fn = __pyx_v_fn;
+- __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn);
+- __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn);
++ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":319
+- *
+- * def _errors(fn):
+- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+- * v = fn(*k, **kw)
+- * if v < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":444
++ * """Wraps: mpv_load_config_file"""
++ * assert self._ctx
++ * filename = _strenc(filename) # <<<<<<<<<<<<<<
++ * cdef const char* _filename = filename
++ * cdef int err
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_wrapped = __pyx_t_1;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":323
+- * if v < 0:
+- * raise MPVError(v)
+- * return wrapped # <<<<<<<<<<<<<<
+- *
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":445
++ * assert self._ctx
++ * filename = _strenc(filename)
++ * cdef const char* _filename = filename # <<<<<<<<<<<<<<
++ * cdef int err
++ * with nogil:
++ */
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
++ __pyx_v__filename = __pyx_t_4;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":447
++ * cdef const char* _filename = filename
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_load_config_file(self._ctx, _filename)
++ * return err
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":448
++ * cdef int err
++ * with nogil:
++ * err = mpv_load_config_file(self._ctx, _filename) # <<<<<<<<<<<<<<
++ * return err
++ *
++ */
++ __pyx_v_err = mpv_load_config_file(__pyx_v_self->_ctx, __pyx_v__filename);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":447
++ * cdef const char* _filename = filename
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_load_config_file(self._ctx, _filename)
++ * return err
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":449
++ * with nogil:
++ * err = mpv_load_config_file(self._ctx, _filename)
++ * return err # <<<<<<<<<<<<<<
++ *
++ * def _format_for(self, value):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_wrapped);
+- __pyx_r = __pyx_v_wrapped;
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":318
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":441
+ *
+- * def _errors(fn): # <<<<<<<<<<<<<<
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
++ * @_errors
++ * def load_config(self, filename): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_load_config_file"""
++ * assert self._ctx
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._errors", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.load_config", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_wrapped);
+- __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
++ __Pyx_XDECREF(__pyx_v_filename);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":329
+- * code = None
++/* "vidcutter/libs/pympv/mpv.pyx":451
++ * return err
+ *
+- * def __init__(self, e): # <<<<<<<<<<<<<<
+- * self.code = e
+- * cdef const char* err_c
++ * def _format_for(self, value): # <<<<<<<<<<<<<<
++ * if isinstance(value, basestring):
++ * return MPV_FORMAT_STRING
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_self = 0;
+- PyObject *__pyx_v_e = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_e,0};
+- PyObject* values[2] = {0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 329, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 329, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- }
+- __pyx_v_self = values[0];
+- __pyx_v_e = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(__pyx_self, __pyx_v_self, __pyx_v_e);
++ __Pyx_RefNannySetupContext("_format_for (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_e) {
+- char const *__pyx_v_err_c;
+- int __pyx_v_e_i;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_4;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
+- __Pyx_INCREF(__pyx_v_e);
++ __Pyx_RefNannySetupContext("_format_for", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":330
++ /* "vidcutter/libs/pympv/mpv.pyx":452
+ *
+- * def __init__(self, e):
+- * self.code = e # <<<<<<<<<<<<<<
+- * cdef const char* err_c
+- * cdef int e_i
+- */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":333
+- * cdef const char* err_c
+- * cdef int e_i
+- * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
+- * e_i = e
+- * with nogil:
++ * def _format_for(self, value):
++ * if isinstance(value, basestring): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_STRING
++ * elif isinstance(value, bool):
+ */
+- __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_e);
+- __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
++ __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_value);
++ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":334
+- * cdef int e_i
+- * if not isinstance(e, basestring):
+- * e_i = e # <<<<<<<<<<<<<<
+- * with nogil:
+- * err_c = mpv_error_string(e_i)
++ /* "vidcutter/libs/pympv/mpv.pyx":453
++ * def _format_for(self, value):
++ * if isinstance(value, basestring):
++ * return MPV_FORMAT_STRING # <<<<<<<<<<<<<<
++ * elif isinstance(value, bool):
++ * return MPV_FORMAT_FLAG
+ */
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
+- __pyx_v_e_i = __pyx_t_3;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":335
+- * if not isinstance(e, basestring):
+- * e_i = e
+- * with nogil: # <<<<<<<<<<<<<<
+- * err_c = mpv_error_string(e_i)
+- * e = _strdec(err_c)
++ /* "vidcutter/libs/pympv/mpv.pyx":452
++ *
++ * def _format_for(self, value):
++ * if isinstance(value, basestring): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_STRING
++ * elif isinstance(value, bool):
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":336
+- * e_i = e
+- * with nogil:
+- * err_c = mpv_error_string(e_i) # <<<<<<<<<<<<<<
+- * e = _strdec(err_c)
+- * Exception.__init__(self, e)
++ /* "vidcutter/libs/pympv/mpv.pyx":454
++ * if isinstance(value, basestring):
++ * return MPV_FORMAT_STRING
++ * elif isinstance(value, bool): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_FLAG
++ * elif isinstance(value, int):
+ */
+- __pyx_v_err_c = mpv_error_string(__pyx_v_e_i);
+- }
++ __pyx_t_3 = ((PyObject*)&PyBool_Type);
++ __Pyx_INCREF(__pyx_t_3);
++ __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 454, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_1 = (__pyx_t_2 != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":335
+- * if not isinstance(e, basestring):
+- * e_i = e
+- * with nogil: # <<<<<<<<<<<<<<
+- * err_c = mpv_error_string(e_i)
+- * e = _strdec(err_c)
++ /* "vidcutter/libs/pympv/mpv.pyx":455
++ * return MPV_FORMAT_STRING
++ * elif isinstance(value, bool):
++ * return MPV_FORMAT_FLAG # <<<<<<<<<<<<<<
++ * elif isinstance(value, int):
++ * return MPV_FORMAT_INT64
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+- }
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":337
+- * with nogil:
+- * err_c = mpv_error_string(e_i)
+- * e = _strdec(err_c) # <<<<<<<<<<<<<<
+- * Exception.__init__(self, e)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":454
++ * if isinstance(value, basestring):
++ * return MPV_FORMAT_STRING
++ * elif isinstance(value, bool): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_FLAG
++ * elif isinstance(value, int):
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- }
+- }
+- __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_4);
+- __pyx_t_4 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":333
+- * cdef const char* err_c
+- * cdef int e_i
+- * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
+- * e_i = e
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":456
++ * elif isinstance(value, bool):
++ * return MPV_FORMAT_FLAG
++ * elif isinstance(value, int): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_INT64
++ * elif isinstance(value, float):
++ */
++ __pyx_t_1 = PyInt_Check(__pyx_v_value);
++ __pyx_t_2 = (__pyx_t_1 != 0);
++ if (__pyx_t_2) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":457
++ * return MPV_FORMAT_FLAG
++ * elif isinstance(value, int):
++ * return MPV_FORMAT_INT64 # <<<<<<<<<<<<<<
++ * elif isinstance(value, float):
++ * return MPV_FORMAT_DOUBLE
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":456
++ * elif isinstance(value, bool):
++ * return MPV_FORMAT_FLAG
++ * elif isinstance(value, int): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_INT64
++ * elif isinstance(value, float):
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":338
+- * err_c = mpv_error_string(e_i)
+- * e = _strdec(err_c)
+- * Exception.__init__(self, e) # <<<<<<<<<<<<<<
+- *
+- * class PyMPVError(Exception):
++ /* "vidcutter/libs/pympv/mpv.pyx":458
++ * elif isinstance(value, int):
++ * return MPV_FORMAT_INT64
++ * elif isinstance(value, float): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_DOUBLE
++ * elif isinstance(value, (tuple, list)):
++ */
++ __pyx_t_2 = PyFloat_Check(__pyx_v_value);
++ __pyx_t_1 = (__pyx_t_2 != 0);
++ if (__pyx_t_1) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":459
++ * return MPV_FORMAT_INT64
++ * elif isinstance(value, float):
++ * return MPV_FORMAT_DOUBLE # <<<<<<<<<<<<<<
++ * elif isinstance(value, (tuple, list)):
++ * return MPV_FORMAT_NODE_ARRAY
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":458
++ * elif isinstance(value, int):
++ * return MPV_FORMAT_INT64
++ * elif isinstance(value, float): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_DOUBLE
++ * elif isinstance(value, (tuple, list)):
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = NULL;
+- __pyx_t_3 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- __pyx_t_3 = 1;
+- }
+ }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_5)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
+- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_GOTREF(__pyx_t_4);
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
+- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_GOTREF(__pyx_t_4);
+- } else
+- #endif
+- {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (__pyx_t_6) {
+- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+- }
+- __Pyx_INCREF(__pyx_v_self);
+- __Pyx_GIVEREF(__pyx_v_self);
+- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_3, __pyx_v_self);
+- __Pyx_INCREF(__pyx_v_e);
+- __Pyx_GIVEREF(__pyx_v_e);
+- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_3, __pyx_v_e);
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":460
++ * elif isinstance(value, float):
++ * return MPV_FORMAT_DOUBLE
++ * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_NODE_ARRAY
++ * elif isinstance(value, dict):
++ */
++ __pyx_t_2 = PyTuple_Check(__pyx_v_value);
++ __pyx_t_4 = (__pyx_t_2 != 0);
++ if (!__pyx_t_4) {
++ } else {
++ __pyx_t_1 = __pyx_t_4;
++ goto __pyx_L4_bool_binop_done;
+ }
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_4 = PyList_Check(__pyx_v_value);
++ __pyx_t_2 = (__pyx_t_4 != 0);
++ __pyx_t_1 = __pyx_t_2;
++ __pyx_L4_bool_binop_done:;
++ __pyx_t_2 = (__pyx_t_1 != 0);
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":329
+- * code = None
+- *
+- * def __init__(self, e): # <<<<<<<<<<<<<<
+- * self.code = e
+- * cdef const char* err_c
++ /* "vidcutter/libs/pympv/mpv.pyx":461
++ * return MPV_FORMAT_DOUBLE
++ * elif isinstance(value, (tuple, list)):
++ * return MPV_FORMAT_NODE_ARRAY # <<<<<<<<<<<<<<
++ * elif isinstance(value, dict):
++ * return MPV_FORMAT_NODE_MAP
+ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_e);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":460
++ * elif isinstance(value, float):
++ * return MPV_FORMAT_DOUBLE
++ * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_NODE_ARRAY
++ * elif isinstance(value, dict):
++ */
++ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":347
+- *
+- * class _ReplyUserData(object):
+- * def __init__(self, data): # <<<<<<<<<<<<<<
+- * self.counter = 0
+- * self.data = data
++ /* "vidcutter/libs/pympv/mpv.pyx":462
++ * elif isinstance(value, (tuple, list)):
++ * return MPV_FORMAT_NODE_ARRAY
++ * elif isinstance(value, dict): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_NODE_MAP
++ * return MPV_FORMAT_NONE
+ */
++ __pyx_t_2 = PyDict_Check(__pyx_v_value);
++ __pyx_t_1 = (__pyx_t_2 != 0);
++ if (__pyx_t_1) {
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_self = 0;
+- PyObject *__pyx_v_data = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
+- PyObject* values[2] = {0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 347, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 347, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- }
+- __pyx_v_self = values[0];
+- __pyx_v_data = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 347, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(__pyx_self, __pyx_v_self, __pyx_v_data);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":348
+- * class _ReplyUserData(object):
+- * def __init__(self, data):
+- * self.counter = 0 # <<<<<<<<<<<<<<
+- * self.data = data
+- * self.observed = False
++ /* "vidcutter/libs/pympv/mpv.pyx":463
++ * return MPV_FORMAT_NODE_ARRAY
++ * elif isinstance(value, dict):
++ * return MPV_FORMAT_NODE_MAP # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_NONE
++ *
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":349
+- * def __init__(self, data):
+- * self.counter = 0
+- * self.data = data # <<<<<<<<<<<<<<
+- * self.observed = False
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":462
++ * elif isinstance(value, (tuple, list)):
++ * return MPV_FORMAT_NODE_ARRAY
++ * elif isinstance(value, dict): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_NODE_MAP
++ * return MPV_FORMAT_NONE
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":350
+- * self.counter = 0
+- * self.data = data
+- * self.observed = False # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":464
++ * elif isinstance(value, dict):
++ * return MPV_FORMAT_NODE_MAP
++ * return MPV_FORMAT_NONE # <<<<<<<<<<<<<<
+ *
+- * def add(self):
++ * cdef mpv_node_list* _prep_node_list(self, values):
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":347
++ /* "vidcutter/libs/pympv/mpv.pyx":451
++ * return err
+ *
+- * class _ReplyUserData(object):
+- * def __init__(self, data): # <<<<<<<<<<<<<<
+- * self.counter = 0
+- * self.data = data
++ * def _format_for(self, value): # <<<<<<<<<<<<<<
++ * if isinstance(value, basestring):
++ * return MPV_FORMAT_STRING
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context._format_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -8510,1160 +9185,1186 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":352
+- * self.observed = False
+- *
+- * def add(self): # <<<<<<<<<<<<<<
+- * self.counter += 1
++/* "vidcutter/libs/pympv/mpv.pyx":466
++ * return MPV_FORMAT_NONE
+ *
++ * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * cdef mpv_format format
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add = {"add", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("add (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(__pyx_self, ((PyObject *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
++static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_values) {
++ struct mpv_node __pyx_v_node;
++ enum mpv_format __pyx_v_format;
++ struct mpv_node_list *__pyx_v_node_list;
++ PyObject *__pyx_v_i = NULL;
++ PyObject *__pyx_v_value = NULL;
++ struct mpv_node_list *__pyx_r;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
++ Py_ssize_t __pyx_t_1;
++ int __pyx_t_2;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *(*__pyx_t_5)(PyObject *);
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
++ enum mpv_format __pyx_t_9;
++ Py_ssize_t __pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("add", 0);
++ __Pyx_RefNannySetupContext("_prep_node_list", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":353
+- *
+- * def add(self):
+- * self.counter += 1 # <<<<<<<<<<<<<<
+- *
+- * def remove(self):
++ /* "vidcutter/libs/pympv/mpv.pyx":469
++ * cdef mpv_node node
++ * cdef mpv_format format
++ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list)) # <<<<<<<<<<<<<<
++ * node_list.num = len(values)
++ * node_list.values = NULL
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_node_list = ((struct mpv_node_list *)malloc((sizeof(struct mpv_node_list))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":352
+- * self.observed = False
+- *
+- * def add(self): # <<<<<<<<<<<<<<
+- * self.counter += 1
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":470
++ * cdef mpv_format format
++ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
++ * node_list.num = len(values) # <<<<<<<<<<<<<<
++ * node_list.values = NULL
++ * node_list.keys = NULL
+ */
++ __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 470, __pyx_L1_error)
++ __pyx_v_node_list->num = __pyx_t_1;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":355
+- * self.counter += 1
+- *
+- * def remove(self): # <<<<<<<<<<<<<<
+- * self.counter -= 1
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":471
++ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
++ * node_list.num = len(values)
++ * node_list.values = NULL # <<<<<<<<<<<<<<
++ * node_list.keys = NULL
++ * if node_list.num:
+ */
++ __pyx_v_node_list->values = NULL;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove = {"remove", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("remove (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(__pyx_self, ((PyObject *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":472
++ * node_list.num = len(values)
++ * node_list.values = NULL
++ * node_list.keys = NULL # <<<<<<<<<<<<<<
++ * if node_list.num:
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ */
++ __pyx_v_node_list->keys = NULL;
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("remove", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":473
++ * node_list.values = NULL
++ * node_list.keys = NULL
++ * if node_list.num: # <<<<<<<<<<<<<<
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ * for i, value in enumerate(values):
++ */
++ __pyx_t_2 = (__pyx_v_node_list->num != 0);
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":356
+- *
+- * def remove(self):
+- * self.counter -= 1 # <<<<<<<<<<<<<<
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":474
++ * node_list.keys = NULL
++ * if node_list.num:
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node)) # <<<<<<<<<<<<<<
++ * for i, value in enumerate(values):
++ * format = self._format_for(value)
++ */
++ __pyx_v_node_list->values = ((struct mpv_node *)malloc((__pyx_v_node_list->num * (sizeof(struct mpv_node)))));
++
++ /* "vidcutter/libs/pympv/mpv.pyx":473
++ * node_list.values = NULL
++ * node_list.keys = NULL
++ * if node_list.num: # <<<<<<<<<<<<<<
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ * for i, value in enumerate(values):
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":475
++ * if node_list.num:
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ * for i, value in enumerate(values): # <<<<<<<<<<<<<<
++ * format = self._format_for(value)
++ * node = self._prep_native_value(value, format)
++ */
++ __Pyx_INCREF(__pyx_int_0);
++ __pyx_t_3 = __pyx_int_0;
++ if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
++ __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
++ __pyx_t_5 = NULL;
++ } else {
++ __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
++ }
++ for (;;) {
++ if (likely(!__pyx_t_5)) {
++ if (likely(PyList_CheckExact(__pyx_t_4))) {
++ if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
++ #else
++ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ #endif
++ } else {
++ if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
++ #else
++ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ #endif
++ }
++ } else {
++ __pyx_t_6 = __pyx_t_5(__pyx_t_4);
++ if (unlikely(!__pyx_t_6)) {
++ PyObject* exc_type = PyErr_Occurred();
++ if (exc_type) {
++ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
++ else __PYX_ERR(0, 475, __pyx_L1_error)
++ }
++ break;
++ }
++ __Pyx_GOTREF(__pyx_t_6);
++ }
++ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
++ __pyx_t_6 = 0;
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
++ __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_DECREF(__pyx_t_3);
++ __pyx_t_3 = __pyx_t_6;
++ __pyx_t_6 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":476
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ * for i, value in enumerate(values):
++ * format = self._format_for(value) # <<<<<<<<<<<<<<
++ * node = self._prep_native_value(value, format)
++ * node_list.values[i] = node
++ */
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 476, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
++ }
++ __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_v_format = __pyx_t_9;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":477
++ * for i, value in enumerate(values):
++ * format = self._format_for(value)
++ * node = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
++ * node_list.values[i] = node
++ * return node_list
++ */
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_6);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":478
++ * format = self._format_for(value)
++ * node = self._prep_native_value(value, format)
++ * node_list.values[i] = node # <<<<<<<<<<<<<<
++ * return node_list
+ *
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
++ (__pyx_v_node_list->values[__pyx_t_10]) = __pyx_v_node;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":355
+- * self.counter += 1
++ /* "vidcutter/libs/pympv/mpv.pyx":475
++ * if node_list.num:
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ * for i, value in enumerate(values): # <<<<<<<<<<<<<<
++ * format = self._format_for(value)
++ * node = self._prep_native_value(value, format)
++ */
++ }
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":479
++ * node = self._prep_native_value(value, format)
++ * node_list.values[i] = node
++ * return node_list # <<<<<<<<<<<<<<
+ *
+- * def remove(self): # <<<<<<<<<<<<<<
+- * self.counter -= 1
++ * cdef mpv_node_list* _prep_node_map(self, map):
++ */
++ __pyx_r = __pyx_v_node_list;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":466
++ * return MPV_FORMAT_NONE
+ *
++ * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * cdef mpv_format format
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_list", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF(__pyx_v_i);
++ __Pyx_XDECREF(__pyx_v_value);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":370
+- *
+- * @property
+- * def api_version(self): # <<<<<<<<<<<<<<
+- * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
++/* "vidcutter/libs/pympv/mpv.pyx":481
++ * return node_list
+ *
++ * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
++ * cdef char* ckey
++ * cdef mpv_node_list* list
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
++static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_map) {
++ char *__pyx_v_ckey;
++ struct mpv_node_list *__pyx_v_list;
++ PyObject *__pyx_v_keys = NULL;
++ PyObject *__pyx_v_i = NULL;
++ PyObject *__pyx_v_key = NULL;
++ struct mpv_node_list *__pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
++ Py_ssize_t __pyx_t_4;
++ int __pyx_t_5;
++ PyObject *(*__pyx_t_6)(PyObject *);
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
++ char *__pyx_t_9;
++ Py_ssize_t __pyx_t_10;
++ Py_ssize_t __pyx_t_11;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_RefNannySetupContext("_prep_node_map", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":371
+- * @property
+- * def api_version(self):
+- * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION # <<<<<<<<<<<<<<
+- *
+- * @property
++ /* "vidcutter/libs/pympv/mpv.pyx":484
++ * cdef char* ckey
++ * cdef mpv_node_list* list
++ * list = self._prep_node_list(map.values()) # <<<<<<<<<<<<<<
++ * keys = map.keys()
++ * if not len(keys):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_2);
+- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
+- __pyx_t_1 = 0;
+- __pyx_t_2 = 0;
+- __pyx_t_3 = 0;
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
+- goto __pyx_L0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":370
+- *
+- * @property
+- * def api_version(self): # <<<<<<<<<<<<<<
+- * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
+- *
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.api_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":374
+- *
+- * @property
+- * def name(self): # <<<<<<<<<<<<<<
+- * """Unique name for every context created.
+- *
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- char const *__pyx_v_name;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":380
+- * """
+- * cdef const char* name
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * with nogil:
+- * name = mpv_client_name(self._ctx)
+- */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 380, __pyx_L1_error)
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- #endif
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":381
+- * cdef const char* name
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * name = mpv_client_name(self._ctx)
+- * return _strdec(name)
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":382
+- * assert self._ctx
+- * with nogil:
+- * name = mpv_client_name(self._ctx) # <<<<<<<<<<<<<<
+- * return _strdec(name)
+- *
+- */
+- __pyx_v_name = mpv_client_name(__pyx_v_self->_ctx);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":381
+- * cdef const char* name
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * name = mpv_client_name(self._ctx)
+- * return _strdec(name)
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":383
+- * with nogil:
+- * name = mpv_client_name(self._ctx)
+- * return _strdec(name) # <<<<<<<<<<<<<<
+- *
+- * @property
++ /* "vidcutter/libs/pympv/mpv.pyx":485
++ * cdef mpv_node_list* list
++ * list = self._prep_node_list(map.values())
++ * keys = map.keys() # <<<<<<<<<<<<<<
++ * if not len(keys):
++ * return list
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_1;
++ __pyx_v_keys = __pyx_t_1;
+ __pyx_t_1 = 0;
+- goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":374
+- *
+- * @property
+- * def name(self): # <<<<<<<<<<<<<<
+- * """Unique name for every context created.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":486
++ * list = self._prep_node_list(map.values())
++ * keys = map.keys()
++ * if not len(keys): # <<<<<<<<<<<<<<
++ * return list
++ * list.keys = <char**>malloc(list.num)
+ */
++ __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 486, __pyx_L1_error)
++ __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
++ if (__pyx_t_5) {
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":386
+- *
+- * @property
+- * def time(self): # <<<<<<<<<<<<<<
+- * """Internal mpv client time.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":487
++ * keys = map.keys()
++ * if not len(keys):
++ * return list # <<<<<<<<<<<<<<
++ * list.keys = <char**>malloc(list.num)
++ * for i, key in enumerate(keys):
+ */
++ __pyx_r = __pyx_v_list;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":486
++ * list = self._prep_node_list(map.values())
++ * keys = map.keys()
++ * if not len(keys): # <<<<<<<<<<<<<<
++ * return list
++ * list.keys = <char**>malloc(list.num)
++ */
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":488
++ * if not len(keys):
++ * return list
++ * list.keys = <char**>malloc(list.num) # <<<<<<<<<<<<<<
++ * for i, key in enumerate(keys):
++ * key = _strenc(key)
++ */
++ __pyx_v_list->keys = ((char **)malloc(__pyx_v_list->num));
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- int64_t __pyx_v_time;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":489
++ * return list
++ * list.keys = <char**>malloc(list.num)
++ * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
++ * key = _strenc(key)
++ * ckey = key
++ */
++ __Pyx_INCREF(__pyx_int_0);
++ __pyx_t_1 = __pyx_int_0;
++ if (likely(PyList_CheckExact(__pyx_v_keys)) || PyTuple_CheckExact(__pyx_v_keys)) {
++ __pyx_t_2 = __pyx_v_keys; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
++ __pyx_t_6 = NULL;
++ } else {
++ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
++ }
++ for (;;) {
++ if (likely(!__pyx_t_6)) {
++ if (likely(PyList_CheckExact(__pyx_t_2))) {
++ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
++ #else
++ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ #endif
++ } else {
++ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
++ #else
++ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ #endif
++ }
++ } else {
++ __pyx_t_3 = __pyx_t_6(__pyx_t_2);
++ if (unlikely(!__pyx_t_3)) {
++ PyObject* exc_type = PyErr_Occurred();
++ if (exc_type) {
++ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
++ else __PYX_ERR(0, 489, __pyx_L1_error)
++ }
++ break;
++ }
++ __Pyx_GOTREF(__pyx_t_3);
++ }
++ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
++ __pyx_t_3 = 0;
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
++ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_1);
++ __pyx_t_1 = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":394
+- * """
+- * cdef int64_t time
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * with nogil:
+- * time = mpv_get_time_us(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":490
++ * list.keys = <char**>malloc(list.num)
++ * for i, key in enumerate(keys):
++ * key = _strenc(key) # <<<<<<<<<<<<<<
++ * ckey = key
++ * list.keys[i] = <char*>malloc(len(key) + 1)
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 394, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
+ }
+- }
+- #endif
++ __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_key);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":395
+- * cdef int64_t time
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * time = mpv_get_time_us(self._ctx)
+- * return time
++ /* "vidcutter/libs/pympv/mpv.pyx":491
++ * for i, key in enumerate(keys):
++ * key = _strenc(key)
++ * ckey = key # <<<<<<<<<<<<<<
++ * list.keys[i] = <char*>malloc(len(key) + 1)
++ * strcpy(list.keys[i], ckey)
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L1_error)
++ __pyx_v_ckey = __pyx_t_9;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":396
+- * assert self._ctx
+- * with nogil:
+- * time = mpv_get_time_us(self._ctx) # <<<<<<<<<<<<<<
+- * return time
++ /* "vidcutter/libs/pympv/mpv.pyx":492
++ * key = _strenc(key)
++ * ckey = key
++ * list.keys[i] = <char*>malloc(len(key) + 1) # <<<<<<<<<<<<<<
++ * strcpy(list.keys[i], ckey)
++ * return list
++ */
++ __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 492, __pyx_L1_error)
++ __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L1_error)
++ (__pyx_v_list->keys[__pyx_t_11]) = ((char *)malloc((__pyx_t_10 + 1)));
++
++ /* "vidcutter/libs/pympv/mpv.pyx":493
++ * ckey = key
++ * list.keys[i] = <char*>malloc(len(key) + 1)
++ * strcpy(list.keys[i], ckey) # <<<<<<<<<<<<<<
++ * return list
+ *
+ */
+- __pyx_v_time = mpv_get_time_us(__pyx_v_self->_ctx);
+- }
++ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
++ (void)(strcpy((__pyx_v_list->keys[__pyx_t_10]), __pyx_v_ckey));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":395
+- * cdef int64_t time
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * time = mpv_get_time_us(self._ctx)
+- * return time
++ /* "vidcutter/libs/pympv/mpv.pyx":489
++ * return list
++ * list.keys = <char**>malloc(list.num)
++ * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
++ * key = _strenc(key)
++ * ckey = key
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+ }
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":397
+- * with nogil:
+- * time = mpv_get_time_us(self._ctx)
+- * return time # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":494
++ * list.keys[i] = <char*>malloc(len(key) + 1)
++ * strcpy(list.keys[i], ckey)
++ * return list # <<<<<<<<<<<<<<
+ *
+- * def suspend(self):
++ * cdef mpv_node _prep_native_value(self, value, format):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
++ __pyx_r = __pyx_v_list;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":386
+- *
+- * @property
+- * def time(self): # <<<<<<<<<<<<<<
+- * """Internal mpv client time.
++ /* "vidcutter/libs/pympv/mpv.pyx":481
++ * return node_list
+ *
++ * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
++ * cdef char* ckey
++ * cdef mpv_node_list* list
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_map", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF(__pyx_v_keys);
++ __Pyx_XDECREF(__pyx_v_i);
++ __Pyx_XDECREF(__pyx_v_key);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":399
+- * return time
++/* "vidcutter/libs/pympv/mpv.pyx":496
++ * return list
+ *
+- * def suspend(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_suspend"""
+- * assert self._ctx
++ * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * node.format = format
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1suspend(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_suspend[] = "Wraps: mpv_suspend";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1suspend(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("suspend (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_suspend(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_suspend(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
++static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format) {
++ struct mpv_node __pyx_v_node;
++ struct mpv_node __pyx_r;
+ __Pyx_RefNannyDeclarations
++ enum mpv_format __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_4;
++ PyObject *__pyx_t_5 = NULL;
++ Py_ssize_t __pyx_t_6;
++ char const *__pyx_t_7;
++ int __pyx_t_8;
++ int64_t __pyx_t_9;
++ double __pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("suspend", 0);
++ __Pyx_RefNannySetupContext("_prep_native_value", 0);
++ __Pyx_INCREF(__pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":401
+- * def suspend(self):
+- * """Wraps: mpv_suspend"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_suspend(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":498
++ * cdef mpv_node _prep_native_value(self, value, format):
++ * cdef mpv_node node
++ * node.format = format # <<<<<<<<<<<<<<
++ * if format == MPV_FORMAT_STRING:
++ * value = _strenc(value)
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 401, __pyx_L1_error)
+- }
+- }
+- #endif
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":402
+- * """Wraps: mpv_suspend"""
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_suspend(self._ctx)
+- *
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error)
++ __pyx_v_node.format = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":403
+- * assert self._ctx
+- * with nogil:
+- * mpv_suspend(self._ctx) # <<<<<<<<<<<<<<
+- *
+- * def resume(self):
++ /* "vidcutter/libs/pympv/mpv.pyx":499
++ * cdef mpv_node node
++ * node.format = format
++ * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * value = _strenc(value)
++ * node.u.string = <char*>malloc(len(value) + 1)
+ */
+- mpv_suspend(__pyx_v_self->_ctx);
+- }
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":402
+- * """Wraps: mpv_suspend"""
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_suspend(self._ctx)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":500
++ * node.format = format
++ * if format == MPV_FORMAT_STRING:
++ * value = _strenc(value) # <<<<<<<<<<<<<<
++ * node.u.string = <char*>malloc(len(value) + 1)
++ * strcpy(node.u.string, value)
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+- }
++ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":399
+- * return time
+- *
+- * def suspend(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_suspend"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":501
++ * if format == MPV_FORMAT_STRING:
++ * value = _strenc(value)
++ * node.u.string = <char*>malloc(len(value) + 1) # <<<<<<<<<<<<<<
++ * strcpy(node.u.string, value)
++ * elif format == MPV_FORMAT_FLAG:
+ */
++ __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 501, __pyx_L1_error)
++ __pyx_v_node.u.string = ((char *)malloc((__pyx_t_6 + 1)));
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.suspend", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":405
+- * mpv_suspend(self._ctx)
+- *
+- * def resume(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_resume"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":502
++ * value = _strenc(value)
++ * node.u.string = <char*>malloc(len(value) + 1)
++ * strcpy(node.u.string, value) # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_FLAG:
++ * node.u.flag = 1 if value else 0
+ */
++ __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
++ (void)(strcpy(__pyx_v_node.u.string, __pyx_t_7));
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3resume(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_2resume[] = "Wraps: mpv_resume";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3resume(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("resume (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_2resume(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":499
++ * cdef mpv_node node
++ * node.format = format
++ * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * value = _strenc(value)
++ * node.u.string = <char*>malloc(len(value) + 1)
++ */
++ goto __pyx_L3;
++ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2resume(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("resume", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":503
++ * node.u.string = <char*>malloc(len(value) + 1)
++ * strcpy(node.u.string, value)
++ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
++ * node.u.flag = 1 if value else 0
++ * elif format == MPV_FORMAT_INT64:
++ */
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":407
+- * def resume(self):
+- * """Wraps: mpv_resume"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_resume(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":504
++ * strcpy(node.u.string, value)
++ * elif format == MPV_FORMAT_FLAG:
++ * node.u.flag = 1 if value else 0 # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_INT64:
++ * node.u.int64 = value
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 407, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 504, __pyx_L1_error)
++ if (__pyx_t_4) {
++ __pyx_t_8 = 1;
++ } else {
++ __pyx_t_8 = 0;
+ }
++ __pyx_v_node.u.flag = __pyx_t_8;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":503
++ * node.u.string = <char*>malloc(len(value) + 1)
++ * strcpy(node.u.string, value)
++ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
++ * node.u.flag = 1 if value else 0
++ * elif format == MPV_FORMAT_INT64:
++ */
++ goto __pyx_L3;
+ }
+- #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":408
+- * """Wraps: mpv_resume"""
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_resume(self._ctx)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":505
++ * elif format == MPV_FORMAT_FLAG:
++ * node.u.flag = 1 if value else 0
++ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
++ * node.u.int64 = value
++ * elif format == MPV_FORMAT_DOUBLE:
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":409
+- * assert self._ctx
+- * with nogil:
+- * mpv_resume(self._ctx) # <<<<<<<<<<<<<<
+- *
+- * @_errors
++ /* "vidcutter/libs/pympv/mpv.pyx":506
++ * node.u.flag = 1 if value else 0
++ * elif format == MPV_FORMAT_INT64:
++ * node.u.int64 = value # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_DOUBLE:
++ * node.u.double_ = value
+ */
+- mpv_resume(__pyx_v_self->_ctx);
+- }
++ __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error)
++ __pyx_v_node.u.int64 = __pyx_t_9;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":408
+- * """Wraps: mpv_resume"""
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_resume(self._ctx)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":505
++ * elif format == MPV_FORMAT_FLAG:
++ * node.u.flag = 1 if value else 0
++ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
++ * node.u.int64 = value
++ * elif format == MPV_FORMAT_DOUBLE:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
++ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":405
+- * mpv_suspend(self._ctx)
+- *
+- * def resume(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_resume"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":507
++ * elif format == MPV_FORMAT_INT64:
++ * node.u.int64 = value
++ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
++ * node.u.double_ = value
++ * elif format == MPV_FORMAT_NODE_ARRAY:
+ */
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (__pyx_t_4) {
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.resume", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":508
++ * node.u.int64 = value
++ * elif format == MPV_FORMAT_DOUBLE:
++ * node.u.double_ = value # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * node.u.list = self._prep_node_list(value)
++ */
++ __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
++ __pyx_v_node.u.double_ = __pyx_t_10;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":412
+- *
+- * @_errors
+- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+- * """Enable or disable a given event.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":507
++ * elif format == MPV_FORMAT_INT64:
++ * node.u.int64 = value
++ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
++ * node.u.double_ = value
++ * elif format == MPV_FORMAT_NODE_ARRAY:
+ */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_4request_event[] = "Enable or disable a given event.\n\n Arguments:\n event - See Events\n enable - True to enable, False to disable\n\n Wraps: mpv_request_event\n ";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_event = 0;
+- PyObject *__pyx_v_enable = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("request_event (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_event,&__pyx_n_s_enable,0};
+- PyObject* values[2] = {0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enable)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 412, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- }
+- __pyx_v_event = values[0];
+- __pyx_v_enable = values[1];
++ goto __pyx_L3;
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4request_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_event, __pyx_v_enable);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable) {
+- int __pyx_v_enable_i;
+- int __pyx_v_err;
+- enum mpv_event_id __pyx_v_event_id;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- int __pyx_t_2;
+- enum mpv_event_id __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("request_event", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":509
++ * elif format == MPV_FORMAT_DOUBLE:
++ * node.u.double_ = value
++ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
++ * node.u.list = self._prep_node_list(value)
++ * elif format == MPV_FORMAT_NODE_MAP:
++ */
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":421
+- * Wraps: mpv_request_event
+- * """
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef int enable_i = 1 if enable else 0
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":510
++ * node.u.double_ = value
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * node.u.list = self._prep_node_list(value) # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_NODE_MAP:
++ * node.u.list = self._prep_node_map(value)
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 421, __pyx_L1_error)
+- }
+- }
+- #endif
++ __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":422
+- * """
+- * assert self._ctx
+- * cdef int enable_i = 1 if enable else 0 # <<<<<<<<<<<<<<
+- * cdef int err
+- * cdef mpv_event_id event_id = event
++ /* "vidcutter/libs/pympv/mpv.pyx":509
++ * elif format == MPV_FORMAT_DOUBLE:
++ * node.u.double_ = value
++ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
++ * node.u.list = self._prep_node_list(value)
++ * elif format == MPV_FORMAT_NODE_MAP:
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
+- if (__pyx_t_2) {
+- __pyx_t_1 = 1;
+- } else {
+- __pyx_t_1 = 0;
++ goto __pyx_L3;
+ }
+- __pyx_v_enable_i = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":424
+- * cdef int enable_i = 1 if enable else 0
+- * cdef int err
+- * cdef mpv_event_id event_id = event # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_request_event(self._ctx, event_id, enable_i)
++ /* "vidcutter/libs/pympv/mpv.pyx":511
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * node.u.list = self._prep_node_list(value)
++ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * node.u.list = self._prep_node_map(value)
++ * else:
+ */
+- __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
+- __pyx_v_event_id = __pyx_t_3;
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":425
+- * cdef int err
+- * cdef mpv_event_id event_id = event
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_request_event(self._ctx, event_id, enable_i)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":512
++ * node.u.list = self._prep_node_list(value)
++ * elif format == MPV_FORMAT_NODE_MAP:
++ * node.u.list = self._prep_node_map(value) # <<<<<<<<<<<<<<
++ * else:
++ * node.format = MPV_FORMAT_NONE
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_map(__pyx_v_self, __pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":426
+- * cdef mpv_event_id event_id = event
+- * with nogil:
+- * err = mpv_request_event(self._ctx, event_id, enable_i) # <<<<<<<<<<<<<<
+- * return err
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":511
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * node.u.list = self._prep_node_list(value)
++ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * node.u.list = self._prep_node_map(value)
++ * else:
+ */
+- __pyx_v_err = mpv_request_event(__pyx_v_self->_ctx, __pyx_v_event_id, __pyx_v_enable_i);
+- }
++ goto __pyx_L3;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":425
+- * cdef int err
+- * cdef mpv_event_id event_id = event
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_request_event(self._ctx, event_id, enable_i)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":514
++ * node.u.list = self._prep_node_map(value)
++ * else:
++ * node.format = MPV_FORMAT_NONE # <<<<<<<<<<<<<<
++ * return node
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
++ /*else*/ {
++ __pyx_v_node.format = MPV_FORMAT_NONE;
+ }
++ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":427
+- * with nogil:
+- * err = mpv_request_event(self._ctx, event_id, enable_i)
+- * return err # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":515
++ * else:
++ * node.format = MPV_FORMAT_NONE
++ * return node # <<<<<<<<<<<<<<
+ *
+- * @_errors
++ * cdef _free_native_value(self, mpv_node node):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
++ __pyx_r = __pyx_v_node;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":412
+- *
+- * @_errors
+- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+- * """Enable or disable a given event.
++ /* "vidcutter/libs/pympv/mpv.pyx":496
++ * return list
+ *
++ * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * node.format = format
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __Pyx_pretend_to_initialize(&__pyx_r);
+ __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF(__pyx_v_value);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":430
++/* "vidcutter/libs/pympv/mpv.pyx":517
++ * return node
+ *
+- * @_errors
+- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_request_log_messages"""
+- * assert self._ctx
++ * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
++ * for i in range(node.u.list.num):
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_6set_log_level[] = "Wraps: mpv_request_log_messages";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_log_level (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_6set_log_level(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_loglevel));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel) {
+- char const *__pyx_v_loglevel_c;
+- int __pyx_v_err;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, struct mpv_node __pyx_v_node) {
++ int __pyx_v_i;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- char const *__pyx_t_4;
++ int __pyx_t_1;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_5;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_log_level", 0);
+- __Pyx_INCREF(__pyx_v_loglevel);
++ __Pyx_RefNannySetupContext("_free_native_value", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":432
+- * def set_log_level(self, loglevel):
+- * """Wraps: mpv_request_log_messages"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * loglevel = _strenc(loglevel)
+- * cdef const char* loglevel_c = loglevel
++ /* "vidcutter/libs/pympv/mpv.pyx":518
++ *
++ * cdef _free_native_value(self, mpv_node node):
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
++ * for i in range(node.u.list.num):
++ * self._free_native_value(node.u.list.values[i])
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 432, __pyx_L1_error)
+- }
+- }
+- #endif
++ switch (__pyx_v_node.format) {
++ case MPV_FORMAT_NODE_ARRAY:
++ case MPV_FORMAT_NODE_MAP:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":433
+- * """Wraps: mpv_request_log_messages"""
+- * assert self._ctx
+- * loglevel = _strenc(loglevel) # <<<<<<<<<<<<<<
+- * cdef const char* loglevel_c = loglevel
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":519
++ * cdef _free_native_value(self, mpv_node node):
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
++ * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
++ * self._free_native_value(node.u.list.values[i])
++ * free(node.u.list.values)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ __pyx_t_1 = __pyx_v_node.u.list->num;
++ __pyx_t_2 = __pyx_t_1;
++ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
++ __pyx_v_i = __pyx_t_3;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":520
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
++ * for i in range(node.u.list.num):
++ * self._free_native_value(node.u.list.values[i]) # <<<<<<<<<<<<<<
++ * free(node.u.list.values)
++ * if node.format == MPV_FORMAT_NODE_MAP:
++ */
++ __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_loglevel) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loglevel);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF_SET(__pyx_v_loglevel, __pyx_t_1);
+- __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":434
+- * assert self._ctx
+- * loglevel = _strenc(loglevel)
+- * cdef const char* loglevel_c = loglevel # <<<<<<<<<<<<<<
+- * cdef int err
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":521
++ * for i in range(node.u.list.num):
++ * self._free_native_value(node.u.list.values[i])
++ * free(node.u.list.values) # <<<<<<<<<<<<<<
++ * if node.format == MPV_FORMAT_NODE_MAP:
++ * for i in range(node.u.list.num):
+ */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L1_error)
+- __pyx_v_loglevel_c = __pyx_t_4;
++ free(__pyx_v_node.u.list->values);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":436
+- * cdef const char* loglevel_c = loglevel
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_request_log_messages(self._ctx, loglevel_c)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":522
++ * self._free_native_value(node.u.list.values[i])
++ * free(node.u.list.values)
++ * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * for i in range(node.u.list.num):
++ * free(node.u.list.keys[i])
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_5 = ((__pyx_v_node.format == MPV_FORMAT_NODE_MAP) != 0);
++ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":437
+- * cdef int err
+- * with nogil:
+- * err = mpv_request_log_messages(self._ctx, loglevel_c) # <<<<<<<<<<<<<<
+- * return err
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":523
++ * free(node.u.list.values)
++ * if node.format == MPV_FORMAT_NODE_MAP:
++ * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
++ * free(node.u.list.keys[i])
++ * free(node.u.list.keys)
+ */
+- __pyx_v_err = mpv_request_log_messages(__pyx_v_self->_ctx, __pyx_v_loglevel_c);
+- }
++ __pyx_t_1 = __pyx_v_node.u.list->num;
++ __pyx_t_2 = __pyx_t_1;
++ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
++ __pyx_v_i = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":436
+- * cdef const char* loglevel_c = loglevel
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_request_log_messages(self._ctx, loglevel_c)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":524
++ * if node.format == MPV_FORMAT_NODE_MAP:
++ * for i in range(node.u.list.num):
++ * free(node.u.list.keys[i]) # <<<<<<<<<<<<<<
++ * free(node.u.list.keys)
++ * free(node.u.list)
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
++ free((__pyx_v_node.u.list->keys[__pyx_v_i]));
+ }
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":438
+- * with nogil:
+- * err = mpv_request_log_messages(self._ctx, loglevel_c)
+- * return err # <<<<<<<<<<<<<<
+- *
+- * @_errors
++ /* "vidcutter/libs/pympv/mpv.pyx":525
++ * for i in range(node.u.list.num):
++ * free(node.u.list.keys[i])
++ * free(node.u.list.keys) # <<<<<<<<<<<<<<
++ * free(node.u.list)
++ * elif node.format == MPV_FORMAT_STRING:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ free(__pyx_v_node.u.list->keys);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":430
+- *
+- * @_errors
+- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_request_log_messages"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":522
++ * self._free_native_value(node.u.list.values[i])
++ * free(node.u.list.values)
++ * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * for i in range(node.u.list.num):
++ * free(node.u.list.keys[i])
+ */
++ }
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_log_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_loglevel);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":526
++ * free(node.u.list.keys[i])
++ * free(node.u.list.keys)
++ * free(node.u.list) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_STRING:
++ * free(node.u.string)
++ */
++ free(__pyx_v_node.u.list);
+
+-/* "vidcutter/libs/pympv/mpv.pyx":441
++ /* "vidcutter/libs/pympv/mpv.pyx":518
+ *
+- * @_errors
+- * def load_config(self, filename): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_load_config_file"""
+- * assert self._ctx
++ * cdef _free_native_value(self, mpv_node node):
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
++ * for i in range(node.u.list.num):
++ * self._free_native_value(node.u.list.values[i])
+ */
++ break;
++ case MPV_FORMAT_STRING:
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_8load_config[] = "Wraps: mpv_load_config_file";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("load_config (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_filename));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename) {
+- char const *__pyx_v__filename;
++ /* "vidcutter/libs/pympv/mpv.pyx":528
++ * free(node.u.list)
++ * elif node.format == MPV_FORMAT_STRING:
++ * free(node.u.string) # <<<<<<<<<<<<<<
++ *
++ * def command(self, *cmdlist, asynchronous=False, data=None):
++ */
++ free(__pyx_v_node.u.string);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":527
++ * free(node.u.list.keys)
++ * free(node.u.list)
++ * elif node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * free(node.u.string)
++ *
++ */
++ break;
++ default: break;
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":517
++ * return node
++ *
++ * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
++ * for i in range(node.u.list.num):
++ */
++
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context._free_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":530
++ * free(node.u.string)
++ *
++ * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
++ * """Send a command to mpv.
++ *
++ */
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_8command[] = "Send a command to mpv.\n\n Non-async success returns the command's response data, otherwise None\n\n Arguments:\n Accepts parameters as args\n\n Keyword Arguments:\n asynchronous: True will return right away, status comes in as MPV_EVENT_COMMAND_REPLY\n data: Only valid if async, gets sent back as reply_userdata in the Event\n\n Wraps: mpv_command_node and mpv_command_node_async\n ";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_asynchronous = 0;
++ PyObject *__pyx_v_data = 0;
++ PyObject *__pyx_v_cmdlist = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("command (wrapper)", 0);
++ if (PyTuple_GET_SIZE(__pyx_args) > 0) {
++ __pyx_v_cmdlist = PyTuple_GetSlice(__pyx_args, 0, PyTuple_GET_SIZE(__pyx_args));
++ if (unlikely(!__pyx_v_cmdlist)) {
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ }
++ __Pyx_GOTREF(__pyx_v_cmdlist);
++ } else {
++ __pyx_v_cmdlist = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
++ }
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
++ PyObject* values[2] = {0,0};
++ values[0] = ((PyObject *)Py_False);
++ values[1] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ default:
++ case 0: break;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ if (kw_args > 0 && likely(kw_args <= 2)) {
++ Py_ssize_t index;
++ for (index = 0; index < 2 && kw_args > 0; index++) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
++ if (value) { values[index] = value; kw_args--; }
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 530, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) < 0) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ }
++ __pyx_v_asynchronous = values[0];
++ __pyx_v_data = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 530, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_DECREF(__pyx_v_cmdlist); __pyx_v_cmdlist = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_asynchronous, __pyx_v_data, __pyx_v_cmdlist);
++
++ /* function exit code */
++ __Pyx_XDECREF(__pyx_v_cmdlist);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist) {
++ struct mpv_node __pyx_v_node;
++ struct mpv_node __pyx_v_noderesult;
+ int __pyx_v_err;
++ uint64_t __pyx_v_data_id;
++ PyObject *__pyx_v_result = NULL;
++ PyObject *__pyx_v_userdatas = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- char const *__pyx_t_4;
++ uint64_t __pyx_t_4;
++ int __pyx_t_5;
++ int __pyx_t_6;
++ int __pyx_t_7;
++ int __pyx_t_8;
++ char const *__pyx_t_9;
++ PyObject *__pyx_t_10 = NULL;
++ PyObject *__pyx_t_11 = NULL;
++ PyObject *__pyx_t_12 = NULL;
++ PyObject *__pyx_t_13 = NULL;
++ PyObject *__pyx_t_14 = NULL;
++ PyObject *__pyx_t_15 = NULL;
++ PyObject *__pyx_t_16 = NULL;
++ PyObject *__pyx_t_17 = NULL;
++ char const *__pyx_t_18;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("load_config", 0);
+- __Pyx_INCREF(__pyx_v_filename);
++ __Pyx_RefNannySetupContext("command", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":443
+- * def load_config(self, filename):
+- * """Wraps: mpv_load_config_file"""
++ /* "vidcutter/libs/pympv/mpv.pyx":544
++ * Wraps: mpv_command_node and mpv_command_node_async
++ * """
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * filename = _strenc(filename)
+- * cdef const char* _filename = filename
++ * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist))
++ * cdef mpv_node noderesult
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 443, __pyx_L1_error)
++ __PYX_ERR(0, 544, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":444
+- * """Wraps: mpv_load_config_file"""
++ /* "vidcutter/libs/pympv/mpv.pyx":545
++ * """
+ * assert self._ctx
+- * filename = _strenc(filename) # <<<<<<<<<<<<<<
+- * cdef const char* _filename = filename
++ * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist)) # <<<<<<<<<<<<<<
++ * cdef mpv_node noderesult
+ * cdef int err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+@@ -9672,679 +10373,724 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(struct __p
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename);
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_cmdlist) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cmdlist);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
+- __pyx_t_1 = 0;
++ __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_cmdlist, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":445
+- * assert self._ctx
+- * filename = _strenc(filename)
+- * cdef const char* _filename = filename # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":549
+ * cdef int err
+- * with nogil:
++ * cdef uint64_t data_id
++ * result = None # <<<<<<<<<<<<<<
++ * try:
++ * data_id = id(data)
+ */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
+- __pyx_v__filename = __pyx_t_4;
++ __Pyx_INCREF(Py_None);
++ __pyx_v_result = Py_None;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":447
+- * cdef const char* _filename = filename
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_load_config_file(self._ctx, _filename)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":550
++ * cdef uint64_t data_id
++ * result = None
++ * try: # <<<<<<<<<<<<<<
++ * data_id = id(data)
++ * if not asynchronous:
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":448
+- * cdef int err
+- * with nogil:
+- * err = mpv_load_config_file(self._ctx, _filename) # <<<<<<<<<<<<<<
+- * return err
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":551
++ * result = None
++ * try:
++ * data_id = id(data) # <<<<<<<<<<<<<<
++ * if not asynchronous:
++ * with nogil:
+ */
+- __pyx_v_err = mpv_load_config_file(__pyx_v_self->_ctx, __pyx_v__filename);
+- }
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L4_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_data_id = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":447
+- * cdef const char* _filename = filename
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_load_config_file(self._ctx, _filename)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":552
++ * try:
++ * data_id = id(data)
++ * if not asynchronous: # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 552, __pyx_L4_error)
++ __pyx_t_6 = ((!__pyx_t_5) != 0);
++ if (__pyx_t_6) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":553
++ * data_id = id(data)
++ * if not asynchronous:
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
++ * try:
++ */
++ {
+ #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
+ #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":449
+- * with nogil:
+- * err = mpv_load_config_file(self._ctx, _filename)
+- * return err # <<<<<<<<<<<<<<
+- *
+- * def _format_for(self, value):
++ /* "vidcutter/libs/pympv/mpv.pyx":554
++ * if not asynchronous:
++ * with nogil:
++ * err = mpv_command_node(self._ctx, &node, &noderesult) # <<<<<<<<<<<<<<
++ * try:
++ * result = _convert_node_value(noderesult) if err >= 0 else None
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_v_err = mpv_command_node(__pyx_v_self->_ctx, (&__pyx_v_node), (&__pyx_v_noderesult));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":441
+- *
+- * @_errors
+- * def load_config(self, filename): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_load_config_file"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":553
++ * data_id = id(data)
++ * if not asynchronous:
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
++ * try:
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L9;
++ }
++ __pyx_L9:;
++ }
++ }
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.load_config", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_filename);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":451
+- * return err
+- *
+- * def _format_for(self, value): # <<<<<<<<<<<<<<
+- * if isinstance(value, basestring):
+- * return MPV_FORMAT_STRING
++ /* "vidcutter/libs/pympv/mpv.pyx":555
++ * with nogil:
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
++ * try: # <<<<<<<<<<<<<<
++ * result = _convert_node_value(noderesult) if err >= 0 else None
++ * finally:
+ */
++ /*try:*/ {
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("_format_for (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_10_format_for(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_t_4;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_format_for", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":452
+- *
+- * def _format_for(self, value):
+- * if isinstance(value, basestring): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_STRING
+- * elif isinstance(value, bool):
++ /* "vidcutter/libs/pympv/mpv.pyx":556
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
++ * try:
++ * result = _convert_node_value(noderesult) if err >= 0 else None # <<<<<<<<<<<<<<
++ * finally:
++ * with nogil:
+ */
+- __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_value);
+- __pyx_t_2 = (__pyx_t_1 != 0);
+- if (__pyx_t_2) {
++ if (((__pyx_v_err >= 0) != 0)) {
++ __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L11_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_1 = __pyx_t_2;
++ __pyx_t_2 = 0;
++ } else {
++ __Pyx_INCREF(Py_None);
++ __pyx_t_1 = Py_None;
++ }
++ __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
++ __pyx_t_1 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":453
+- * def _format_for(self, value):
+- * if isinstance(value, basestring):
+- * return MPV_FORMAT_STRING # <<<<<<<<<<<<<<
+- * elif isinstance(value, bool):
+- * return MPV_FORMAT_FLAG
++ /* "vidcutter/libs/pympv/mpv.pyx":558
++ * result = _convert_node_value(noderesult) if err >= 0 else None
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&noderesult)
++ * else:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":452
+- *
+- * def _format_for(self, value):
+- * if isinstance(value, basestring): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_STRING
+- * elif isinstance(value, bool):
++ /* "vidcutter/libs/pympv/mpv.pyx":559
++ * finally:
++ * with nogil:
++ * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
++ * else:
++ * userdatas = self.reply_userdata.get(data_id, None)
+ */
+- }
++ mpv_free_node_contents((&__pyx_v_noderesult));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":454
+- * if isinstance(value, basestring):
+- * return MPV_FORMAT_STRING
+- * elif isinstance(value, bool): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_FLAG
+- * elif isinstance(value, int):
++ /* "vidcutter/libs/pympv/mpv.pyx":558
++ * result = _convert_node_value(noderesult) if err >= 0 else None
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&noderesult)
++ * else:
+ */
+- __pyx_t_3 = ((PyObject*)&PyBool_Type);
+- __Pyx_INCREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 454, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_1 = (__pyx_t_2 != 0);
+- if (__pyx_t_1) {
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L15;
++ }
++ __pyx_L15:;
++ }
++ }
++ goto __pyx_L12;
++ }
++ __pyx_L11_error:;
++ /*exception exit:*/{
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
++ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
++ __Pyx_XGOTREF(__pyx_t_10);
++ __Pyx_XGOTREF(__pyx_t_11);
++ __Pyx_XGOTREF(__pyx_t_12);
++ __Pyx_XGOTREF(__pyx_t_13);
++ __Pyx_XGOTREF(__pyx_t_14);
++ __Pyx_XGOTREF(__pyx_t_15);
++ __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
++ {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":455
+- * return MPV_FORMAT_STRING
+- * elif isinstance(value, bool):
+- * return MPV_FORMAT_FLAG # <<<<<<<<<<<<<<
+- * elif isinstance(value, int):
+- * return MPV_FORMAT_INT64
++ /* "vidcutter/libs/pympv/mpv.pyx":559
++ * finally:
++ * with nogil:
++ * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
++ * else:
++ * userdatas = self.reply_userdata.get(data_id, None)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ mpv_free_node_contents((&__pyx_v_noderesult));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":454
+- * if isinstance(value, basestring):
+- * return MPV_FORMAT_STRING
+- * elif isinstance(value, bool): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_FLAG
+- * elif isinstance(value, int):
++ /* "vidcutter/libs/pympv/mpv.pyx":558
++ * result = _convert_node_value(noderesult) if err >= 0 else None
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&noderesult)
++ * else:
+ */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":456
+- * elif isinstance(value, bool):
+- * return MPV_FORMAT_FLAG
+- * elif isinstance(value, int): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_INT64
+- * elif isinstance(value, float):
+- */
+- __pyx_t_1 = PyInt_Check(__pyx_v_value);
+- __pyx_t_2 = (__pyx_t_1 != 0);
+- if (__pyx_t_2) {
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L20;
++ }
++ __pyx_L20:;
++ }
++ }
++ }
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_13);
++ __Pyx_XGIVEREF(__pyx_t_14);
++ __Pyx_XGIVEREF(__pyx_t_15);
++ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
++ }
++ __Pyx_XGIVEREF(__pyx_t_10);
++ __Pyx_XGIVEREF(__pyx_t_11);
++ __Pyx_XGIVEREF(__pyx_t_12);
++ __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
++ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
++ __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
++ goto __pyx_L4_error;
++ }
++ __pyx_L12:;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":457
+- * return MPV_FORMAT_FLAG
+- * elif isinstance(value, int):
+- * return MPV_FORMAT_INT64 # <<<<<<<<<<<<<<
+- * elif isinstance(value, float):
+- * return MPV_FORMAT_DOUBLE
++ /* "vidcutter/libs/pympv/mpv.pyx":552
++ * try:
++ * data_id = id(data)
++ * if not asynchronous: # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ goto __pyx_L6;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":456
+- * elif isinstance(value, bool):
+- * return MPV_FORMAT_FLAG
+- * elif isinstance(value, int): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_INT64
+- * elif isinstance(value, float):
++ /* "vidcutter/libs/pympv/mpv.pyx":561
++ * mpv_free_node_contents(&noderesult)
++ * else:
++ * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
++ * if userdatas is None:
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+ */
+- }
++ /*else*/ {
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_16 = NULL;
++ __pyx_t_8 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_16)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_16);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ __pyx_t_8 = 1;
++ }
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_17);
++ if (__pyx_t_16) {
++ __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
++ }
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_8, __pyx_t_3);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_8, Py_None);
++ __pyx_t_3 = 0;
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
++ }
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_userdatas = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":458
+- * elif isinstance(value, int):
+- * return MPV_FORMAT_INT64
+- * elif isinstance(value, float): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_DOUBLE
+- * elif isinstance(value, (tuple, list)):
++ /* "vidcutter/libs/pympv/mpv.pyx":562
++ * else:
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
+ */
+- __pyx_t_2 = PyFloat_Check(__pyx_v_value);
+- __pyx_t_1 = (__pyx_t_2 != 0);
+- if (__pyx_t_1) {
++ __pyx_t_6 = (__pyx_v_userdatas == Py_None);
++ __pyx_t_5 = (__pyx_t_6 != 0);
++ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":459
+- * return MPV_FORMAT_INT64
+- * elif isinstance(value, float):
+- * return MPV_FORMAT_DOUBLE # <<<<<<<<<<<<<<
+- * elif isinstance(value, (tuple, list)):
+- * return MPV_FORMAT_NODE_ARRAY
++ /* "vidcutter/libs/pympv/mpv.pyx":563
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None:
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
++ * userdatas.add()
++ * with nogil:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_17 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_17)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_17);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_17, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
++ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 563, __pyx_L4_error)
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":458
+- * elif isinstance(value, int):
+- * return MPV_FORMAT_INT64
+- * elif isinstance(value, float): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_DOUBLE
+- * elif isinstance(value, (tuple, list)):
++ /* "vidcutter/libs/pympv/mpv.pyx":562
++ * else:
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
+ */
+- }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":460
+- * elif isinstance(value, float):
+- * return MPV_FORMAT_DOUBLE
+- * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_NODE_ARRAY
+- * elif isinstance(value, dict):
++ /* "vidcutter/libs/pympv/mpv.pyx":564
++ * if userdatas is None:
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add() # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_command_node_async(self._ctx, data_id, &node)
+ */
+- __pyx_t_2 = PyTuple_Check(__pyx_v_value);
+- __pyx_t_4 = (__pyx_t_2 != 0);
+- if (!__pyx_t_4) {
+- } else {
+- __pyx_t_1 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_4 = PyList_Check(__pyx_v_value);
+- __pyx_t_2 = (__pyx_t_4 != 0);
+- __pyx_t_1 = __pyx_t_2;
+- __pyx_L4_bool_binop_done:;
+- __pyx_t_2 = (__pyx_t_1 != 0);
+- if (__pyx_t_2) {
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_17 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_17)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_17);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":461
+- * return MPV_FORMAT_DOUBLE
+- * elif isinstance(value, (tuple, list)):
+- * return MPV_FORMAT_NODE_ARRAY # <<<<<<<<<<<<<<
+- * elif isinstance(value, dict):
+- * return MPV_FORMAT_NODE_MAP
++ /* "vidcutter/libs/pympv/mpv.pyx":565
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_command_node_async(self._ctx, data_id, &node)
++ * finally:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":460
+- * elif isinstance(value, float):
+- * return MPV_FORMAT_DOUBLE
+- * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_NODE_ARRAY
+- * elif isinstance(value, dict):
++ /* "vidcutter/libs/pympv/mpv.pyx":566
++ * userdatas.add()
++ * with nogil:
++ * err = mpv_command_node_async(self._ctx, data_id, &node) # <<<<<<<<<<<<<<
++ * finally:
++ * self._free_native_value(node)
++ */
++ __pyx_v_err = mpv_command_node_async(__pyx_v_self->_ctx, __pyx_v_data_id, (&__pyx_v_node));
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":565
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_command_node_async(self._ctx, data_id, &node)
++ * finally:
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L24;
++ }
++ __pyx_L24:;
++ }
++ }
++ }
++ __pyx_L6:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":462
+- * elif isinstance(value, (tuple, list)):
+- * return MPV_FORMAT_NODE_ARRAY
+- * elif isinstance(value, dict): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_NODE_MAP
+- * return MPV_FORMAT_NONE
++ /* "vidcutter/libs/pympv/mpv.pyx":568
++ * err = mpv_command_node_async(self._ctx, data_id, &node)
++ * finally:
++ * self._free_native_value(node) # <<<<<<<<<<<<<<
++ * if err < 0:
++ * raise MPVError(err)
+ */
+- __pyx_t_2 = PyDict_Check(__pyx_v_value);
+- __pyx_t_1 = (__pyx_t_2 != 0);
+- if (__pyx_t_1) {
++ /*finally:*/ {
++ /*normal exit:*/{
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ goto __pyx_L5;
++ }
++ __pyx_L4_error:;
++ /*exception exit:*/{
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
++ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
++ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
++ __Pyx_XGOTREF(__pyx_t_15);
++ __Pyx_XGOTREF(__pyx_t_14);
++ __Pyx_XGOTREF(__pyx_t_13);
++ __Pyx_XGOTREF(__pyx_t_12);
++ __Pyx_XGOTREF(__pyx_t_11);
++ __Pyx_XGOTREF(__pyx_t_10);
++ __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
++ {
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L26_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_12);
++ __Pyx_XGIVEREF(__pyx_t_11);
++ __Pyx_XGIVEREF(__pyx_t_10);
++ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
++ }
++ __Pyx_XGIVEREF(__pyx_t_15);
++ __Pyx_XGIVEREF(__pyx_t_14);
++ __Pyx_XGIVEREF(__pyx_t_13);
++ __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
++ __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
++ __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_18;
++ goto __pyx_L1_error;
++ __pyx_L26_error:;
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_12);
++ __Pyx_XGIVEREF(__pyx_t_11);
++ __Pyx_XGIVEREF(__pyx_t_10);
++ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
++ }
++ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
++ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
++ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
++ __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
++ goto __pyx_L1_error;
++ }
++ __pyx_L5:;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":463
+- * return MPV_FORMAT_NODE_ARRAY
+- * elif isinstance(value, dict):
+- * return MPV_FORMAT_NODE_MAP # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_NONE
++ /* "vidcutter/libs/pympv/mpv.pyx":569
++ * finally:
++ * self._free_native_value(node)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * return result
++ */
++ __pyx_t_5 = ((__pyx_v_err < 0) != 0);
++ if (unlikely(__pyx_t_5)) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":570
++ * self._free_native_value(node)
++ * if err < 0:
++ * raise MPVError(err) # <<<<<<<<<<<<<<
++ * return result
+ *
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 570, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_17);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(0, 570, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":462
+- * elif isinstance(value, (tuple, list)):
+- * return MPV_FORMAT_NODE_ARRAY
+- * elif isinstance(value, dict): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_NODE_MAP
+- * return MPV_FORMAT_NONE
++ /* "vidcutter/libs/pympv/mpv.pyx":569
++ * finally:
++ * self._free_native_value(node)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * return result
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":464
+- * elif isinstance(value, dict):
+- * return MPV_FORMAT_NODE_MAP
+- * return MPV_FORMAT_NONE # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":571
++ * if err < 0:
++ * raise MPVError(err)
++ * return result # <<<<<<<<<<<<<<
+ *
+- * cdef mpv_node_list* _prep_node_list(self, values):
++ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
++ __Pyx_INCREF(__pyx_v_result);
++ __pyx_r = __pyx_v_result;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":451
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":530
++ * free(node.u.string)
++ *
++ * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
++ * """Send a command to mpv.
+ *
+- * def _format_for(self, value): # <<<<<<<<<<<<<<
+- * if isinstance(value, basestring):
+- * return MPV_FORMAT_STRING
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context._format_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_16);
++ __Pyx_XDECREF(__pyx_t_17);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_result);
++ __Pyx_XDECREF(__pyx_v_userdatas);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":466
+- * return MPV_FORMAT_NONE
++/* "vidcutter/libs/pympv/mpv.pyx":574
++ *
++ * @_errors
++ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Gets the value of a property asynchronously.
+ *
+- * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * cdef mpv_format format
+ */
+
+-static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_values) {
+- struct mpv_node __pyx_v_node;
+- enum mpv_format __pyx_v_format;
+- struct mpv_node_list *__pyx_v_node_list;
+- PyObject *__pyx_v_i = NULL;
+- PyObject *__pyx_v_value = NULL;
+- struct mpv_node_list *__pyx_r;
+- __Pyx_RefNannyDeclarations
+- Py_ssize_t __pyx_t_1;
+- int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *(*__pyx_t_5)(PyObject *);
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- enum mpv_format __pyx_t_9;
+- Py_ssize_t __pyx_t_10;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_10get_property_async[] = "Gets the value of a property asynchronously.\n\n Arguments:\n prop: Property to get the value of.\n\n Keyword arguments:\n data: Value to be passed into the reply_userdata of the response event.\n Wraps: mpv_get_property_async";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_prop = 0;
++ PyObject *__pyx_v_data = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_prep_node_list", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":469
+- * cdef mpv_node node
+- * cdef mpv_format format
+- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list)) # <<<<<<<<<<<<<<
+- * node_list.num = len(values)
+- * node_list.values = NULL
+- */
+- __pyx_v_node_list = ((struct mpv_node_list *)malloc((sizeof(struct mpv_node_list))));
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":470
+- * cdef mpv_format format
+- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
+- * node_list.num = len(values) # <<<<<<<<<<<<<<
+- * node_list.values = NULL
+- * node_list.keys = NULL
+- */
+- __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 470, __pyx_L1_error)
+- __pyx_v_node_list->num = __pyx_t_1;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":471
+- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
+- * node_list.num = len(values)
+- * node_list.values = NULL # <<<<<<<<<<<<<<
+- * node_list.keys = NULL
+- * if node_list.num:
+- */
+- __pyx_v_node_list->values = NULL;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":472
+- * node_list.num = len(values)
+- * node_list.values = NULL
+- * node_list.keys = NULL # <<<<<<<<<<<<<<
+- * if node_list.num:
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- */
+- __pyx_v_node_list->keys = NULL;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":473
+- * node_list.values = NULL
+- * node_list.keys = NULL
+- * if node_list.num: # <<<<<<<<<<<<<<
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- * for i, value in enumerate(values):
+- */
+- __pyx_t_2 = (__pyx_v_node_list->num != 0);
+- if (__pyx_t_2) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":474
+- * node_list.keys = NULL
+- * if node_list.num:
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node)) # <<<<<<<<<<<<<<
+- * for i, value in enumerate(values):
+- * format = self._format_for(value)
+- */
+- __pyx_v_node_list->values = ((struct mpv_node *)malloc((__pyx_v_node_list->num * (sizeof(struct mpv_node)))));
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":473
+- * node_list.values = NULL
+- * node_list.keys = NULL
+- * if node_list.num: # <<<<<<<<<<<<<<
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- * for i, value in enumerate(values):
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":475
+- * if node_list.num:
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- * for i, value in enumerate(values): # <<<<<<<<<<<<<<
+- * format = self._format_for(value)
+- * node = self._prep_native_value(value, format)
+- */
+- __Pyx_INCREF(__pyx_int_0);
+- __pyx_t_3 = __pyx_int_0;
+- if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
+- __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
+- __pyx_t_5 = NULL;
+- } else {
+- __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
+- }
+- for (;;) {
+- if (likely(!__pyx_t_5)) {
+- if (likely(PyList_CheckExact(__pyx_t_4))) {
+- if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
+- #else
+- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- #endif
+- } else {
+- if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
+- #else
+- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- #endif
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("get_property_async (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
++ PyObject* values[2] = {0,0};
++ values[1] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
+ }
+- } else {
+- __pyx_t_6 = __pyx_t_5(__pyx_t_4);
+- if (unlikely(!__pyx_t_6)) {
+- PyObject* exc_type = PyErr_Occurred();
+- if (exc_type) {
+- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 475, __pyx_L1_error)
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
++ if (value) { values[1] = value; kw_args--; }
+ }
+- break;
+ }
+- __Pyx_GOTREF(__pyx_t_6);
+- }
+- __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
+- __pyx_t_6 = 0;
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+- __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_3);
+- __pyx_t_3 = __pyx_t_6;
+- __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":476
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- * for i, value in enumerate(values):
+- * format = self._format_for(value) # <<<<<<<<<<<<<<
+- * node = self._prep_native_value(value, format)
+- * node_list.values[i] = node
+- */
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 476, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 574, __pyx_L3_error)
++ }
++ } else {
++ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ break;
++ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+- __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __pyx_v_format = __pyx_t_9;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":477
+- * for i, value in enumerate(values):
+- * format = self._format_for(value)
+- * node = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+- * node_list.values[i] = node
+- * return node_list
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_6);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":478
+- * format = self._format_for(value)
+- * node = self._prep_native_value(value, format)
+- * node_list.values[i] = node # <<<<<<<<<<<<<<
+- * return node_list
+- *
+- */
+- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
+- (__pyx_v_node_list->values[__pyx_t_10]) = __pyx_v_node;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":475
+- * if node_list.num:
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- * for i, value in enumerate(values): # <<<<<<<<<<<<<<
+- * format = self._format_for(value)
+- * node = self._prep_native_value(value, format)
+- */
++ __pyx_v_prop = values[0];
++ __pyx_v_data = values[1];
+ }
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":479
+- * node = self._prep_native_value(value, format)
+- * node_list.values[i] = node
+- * return node_list # <<<<<<<<<<<<<<
+- *
+- * cdef mpv_node_list* _prep_node_map(self, map):
+- */
+- __pyx_r = __pyx_v_node_list;
+- goto __pyx_L0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":466
+- * return MPV_FORMAT_NONE
+- *
+- * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * cdef mpv_format format
+- */
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 574, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
+
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_list", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_i);
+- __Pyx_XDECREF(__pyx_v_value);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":481
+- * return node_list
+- *
+- * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
+- * cdef char* ckey
+- * cdef mpv_node_list* list
+- */
+-
+-static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_map) {
+- char *__pyx_v_ckey;
+- struct mpv_node_list *__pyx_v_list;
+- PyObject *__pyx_v_keys = NULL;
+- PyObject *__pyx_v_i = NULL;
+- PyObject *__pyx_v_key = NULL;
+- struct mpv_node_list *__pyx_r;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
++ uint64_t __pyx_v_id_data;
++ PyObject *__pyx_v_userdatas = NULL;
++ char const *__pyx_v_prop_c;
++ int __pyx_v_err;
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- Py_ssize_t __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *(*__pyx_t_6)(PyObject *);
++ Py_hash_t __pyx_t_4;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- char *__pyx_t_9;
+- Py_ssize_t __pyx_t_10;
+- Py_ssize_t __pyx_t_11;
++ int __pyx_t_8;
++ int __pyx_t_9;
++ char const *__pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_prep_node_map", 0);
++ __Pyx_RefNannySetupContext("get_property_async", 0);
++ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":484
+- * cdef char* ckey
+- * cdef mpv_node_list* list
+- * list = self._prep_node_list(map.values()) # <<<<<<<<<<<<<<
+- * keys = map.keys()
+- * if not len(keys):
++ /* "vidcutter/libs/pympv/mpv.pyx":583
++ * data: Value to be passed into the reply_userdata of the response event.
++ * Wraps: mpv_get_property_async"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * prop = _strenc(prop)
++ * cdef uint64_t id_data = <uint64_t>hash(data)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 583, __pyx_L1_error)
++ }
++ }
++ #endif
++
++ /* "vidcutter/libs/pympv/mpv.pyx":584
++ * Wraps: mpv_get_property_async"""
++ * assert self._ctx
++ * prop = _strenc(prop) # <<<<<<<<<<<<<<
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+@@ -10353,223 +11099,234 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":485
+- * cdef mpv_node_list* list
+- * list = self._prep_node_list(map.values())
+- * keys = map.keys() # <<<<<<<<<<<<<<
+- * if not len(keys):
+- * return list
++ /* "vidcutter/libs/pympv/mpv.pyx":585
++ * assert self._ctx
++ * prop = _strenc(prop)
++ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
++ __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 585, __pyx_L1_error)
++ __pyx_v_id_data = ((uint64_t)__pyx_t_4);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":586
++ * prop = _strenc(prop)
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_5 = NULL;
++ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
++ __pyx_t_6 = 1;
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (__pyx_t_5) {
++ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
++ }
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
++ __pyx_t_3 = 0;
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_keys = __pyx_t_1;
++ __pyx_v_userdatas = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":486
+- * list = self._prep_node_list(map.values())
+- * keys = map.keys()
+- * if not len(keys): # <<<<<<<<<<<<<<
+- * return list
+- * list.keys = <char**>malloc(list.num)
++ /* "vidcutter/libs/pympv/mpv.pyx":587
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
+ */
+- __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 486, __pyx_L1_error)
+- __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
+- if (__pyx_t_5) {
++ __pyx_t_8 = (__pyx_v_userdatas == Py_None);
++ __pyx_t_9 = (__pyx_t_8 != 0);
++ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":487
+- * keys = map.keys()
+- * if not len(keys):
+- * return list # <<<<<<<<<<<<<<
+- * list.keys = <char**>malloc(list.num)
+- * for i, key in enumerate(keys):
++ /* "vidcutter/libs/pympv/mpv.pyx":588
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
++ * userdatas.add()
++ * cdef const char* prop_c = prop
+ */
+- __pyx_r = __pyx_v_list;
+- goto __pyx_L0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 588, __pyx_L1_error)
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":486
+- * list = self._prep_node_list(map.values())
+- * keys = map.keys()
+- * if not len(keys): # <<<<<<<<<<<<<<
+- * return list
+- * list.keys = <char**>malloc(list.num)
++ /* "vidcutter/libs/pympv/mpv.pyx":587
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":488
+- * if not len(keys):
+- * return list
+- * list.keys = <char**>malloc(list.num) # <<<<<<<<<<<<<<
+- * for i, key in enumerate(keys):
+- * key = _strenc(key)
++ /* "vidcutter/libs/pympv/mpv.pyx":589
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.add() # <<<<<<<<<<<<<<
++ * cdef const char* prop_c = prop
++ * with nogil:
+ */
+- __pyx_v_list->keys = ((char **)malloc(__pyx_v_list->num));
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":489
+- * return list
+- * list.keys = <char**>malloc(list.num)
+- * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
+- * key = _strenc(key)
+- * ckey = key
++ /* "vidcutter/libs/pympv/mpv.pyx":590
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_get_property_async(
+ */
+- __Pyx_INCREF(__pyx_int_0);
+- __pyx_t_1 = __pyx_int_0;
+- if (likely(PyList_CheckExact(__pyx_v_keys)) || PyTuple_CheckExact(__pyx_v_keys)) {
+- __pyx_t_2 = __pyx_v_keys; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+- __pyx_t_6 = NULL;
+- } else {
+- __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
+- }
+- for (;;) {
+- if (likely(!__pyx_t_6)) {
+- if (likely(PyList_CheckExact(__pyx_t_2))) {
+- if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
+- #else
+- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- #endif
+- } else {
+- if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
+- #else
+- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- #endif
+- }
+- } else {
+- __pyx_t_3 = __pyx_t_6(__pyx_t_2);
+- if (unlikely(!__pyx_t_3)) {
+- PyObject* exc_type = PyErr_Occurred();
+- if (exc_type) {
+- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 489, __pyx_L1_error)
+- }
+- break;
+- }
+- __Pyx_GOTREF(__pyx_t_3);
+- }
+- __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
+- __pyx_t_3 = 0;
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+- __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_1);
+- __pyx_t_1 = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":490
+- * list.keys = <char**>malloc(list.num)
+- * for i, key in enumerate(keys):
+- * key = _strenc(key) # <<<<<<<<<<<<<<
+- * ckey = key
+- * list.keys[i] = <char*>malloc(len(key) + 1)
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_key);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
+- __pyx_t_3 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":491
+- * for i, key in enumerate(keys):
+- * key = _strenc(key)
+- * ckey = key # <<<<<<<<<<<<<<
+- * list.keys[i] = <char*>malloc(len(key) + 1)
+- * strcpy(list.keys[i], ckey)
+- */
+- __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L1_error)
+- __pyx_v_ckey = __pyx_t_9;
++ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 590, __pyx_L1_error)
++ __pyx_v_prop_c = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":492
+- * key = _strenc(key)
+- * ckey = key
+- * list.keys[i] = <char*>malloc(len(key) + 1) # <<<<<<<<<<<<<<
+- * strcpy(list.keys[i], ckey)
+- * return list
++ /* "vidcutter/libs/pympv/mpv.pyx":591
++ * userdatas.add()
++ * cdef const char* prop_c = prop
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_get_property_async(
++ * self._ctx,
+ */
+- __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 492, __pyx_L1_error)
+- __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L1_error)
+- (__pyx_v_list->keys[__pyx_t_11]) = ((char *)malloc((__pyx_t_10 + 1)));
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":493
+- * ckey = key
+- * list.keys[i] = <char*>malloc(len(key) + 1)
+- * strcpy(list.keys[i], ckey) # <<<<<<<<<<<<<<
+- * return list
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":592
++ * cdef const char* prop_c = prop
++ * with nogil:
++ * err = mpv_get_property_async( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * id_data,
+ */
+- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
+- (void)(strcpy((__pyx_v_list->keys[__pyx_t_10]), __pyx_v_ckey));
++ __pyx_v_err = mpv_get_property_async(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_prop_c, MPV_FORMAT_NODE);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":489
+- * return list
+- * list.keys = <char**>malloc(list.num)
+- * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
+- * key = _strenc(key)
+- * ckey = key
++ /* "vidcutter/libs/pympv/mpv.pyx":591
++ * userdatas.add()
++ * cdef const char* prop_c = prop
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_get_property_async(
++ * self._ctx,
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L6;
++ }
++ __pyx_L6:;
++ }
+ }
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":494
+- * list.keys[i] = <char*>malloc(len(key) + 1)
+- * strcpy(list.keys[i], ckey)
+- * return list # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":598
++ * MPV_FORMAT_NODE,
++ * )
++ * return err # <<<<<<<<<<<<<<
+ *
+- * cdef mpv_node _prep_native_value(self, value, format):
++ * def try_get_property_async(self, prop, data=None, default=None):
+ */
+- __pyx_r = __pyx_v_list;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":481
+- * return node_list
++ /* "vidcutter/libs/pympv/mpv.pyx":574
++ *
++ * @_errors
++ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Gets the value of a property asynchronously.
+ *
+- * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
+- * cdef char* ckey
+- * cdef mpv_node_list* list
+ */
+
+ /* function exit code */
+@@ -10577,618 +11334,539 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_map", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_r = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_keys);
+- __Pyx_XDECREF(__pyx_v_i);
+- __Pyx_XDECREF(__pyx_v_key);
++ __Pyx_XDECREF(__pyx_v_userdatas);
++ __Pyx_XDECREF(__pyx_v_prop);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":496
+- * return list
++/* "vidcutter/libs/pympv/mpv.pyx":600
++ * return err
+ *
+- * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * node.format = format
++ * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
++ * try:
++ * return self.get_property_async(prop, data=data)
+ */
+
+-static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format) {
+- struct mpv_node __pyx_v_node;
+- struct mpv_node __pyx_r;
+- __Pyx_RefNannyDeclarations
+- enum mpv_format __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_t_4;
+- PyObject *__pyx_t_5 = NULL;
+- Py_ssize_t __pyx_t_6;
+- char const *__pyx_t_7;
+- int __pyx_t_8;
+- int64_t __pyx_t_9;
+- double __pyx_t_10;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_prop = 0;
++ PyObject *__pyx_v_data = 0;
++ PyObject *__pyx_v_default = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_prep_native_value", 0);
+- __Pyx_INCREF(__pyx_v_value);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":498
+- * cdef mpv_node _prep_native_value(self, value, format):
+- * cdef mpv_node node
+- * node.format = format # <<<<<<<<<<<<<<
+- * if format == MPV_FORMAT_STRING:
+- * value = _strenc(value)
+- */
+- __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error)
+- __pyx_v_node.format = __pyx_t_1;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":499
+- * cdef mpv_node node
+- * node.format = format
+- * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * value = _strenc(value)
+- * node.u.string = <char*>malloc(len(value) + 1)
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__pyx_t_4) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":500
+- * node.format = format
+- * if format == MPV_FORMAT_STRING:
+- * value = _strenc(value) # <<<<<<<<<<<<<<
+- * node.u.string = <char*>malloc(len(value) + 1)
+- * strcpy(node.u.string, value)
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
+- __pyx_t_3 = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("try_get_property_async (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,&__pyx_n_s_default,0};
++ PyObject* values[3] = {0,0,0};
++ values[1] = ((PyObject *)Py_None);
++ values[2] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
++ if (value) { values[1] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
++ if (value) { values[2] = value; kw_args--; }
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 600, __pyx_L3_error)
++ }
++ } else {
++ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ }
++ __pyx_v_prop = values[0];
++ __pyx_v_data = values[1];
++ __pyx_v_default = values[2];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 600, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data, __pyx_v_default);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":501
+- * if format == MPV_FORMAT_STRING:
+- * value = _strenc(value)
+- * node.u.string = <char*>malloc(len(value) + 1) # <<<<<<<<<<<<<<
+- * strcpy(node.u.string, value)
+- * elif format == MPV_FORMAT_FLAG:
+- */
+- __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 501, __pyx_L1_error)
+- __pyx_v_node.u.string = ((char *)malloc((__pyx_t_6 + 1)));
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":502
+- * value = _strenc(value)
+- * node.u.string = <char*>malloc(len(value) + 1)
+- * strcpy(node.u.string, value) # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_FLAG:
+- * node.u.flag = 1 if value else 0
+- */
+- __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
+- (void)(strcpy(__pyx_v_node.u.string, __pyx_t_7));
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_t_8;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("try_get_property_async", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":499
+- * cdef mpv_node node
+- * node.format = format
+- * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * value = _strenc(value)
+- * node.u.string = <char*>malloc(len(value) + 1)
++ /* "vidcutter/libs/pympv/mpv.pyx":601
++ *
++ * def try_get_property_async(self, prop, data=None, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property_async(prop, data=data)
++ * except MPVError:
+ */
+- goto __pyx_L3;
+- }
++ {
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
++ __Pyx_XGOTREF(__pyx_t_1);
++ __Pyx_XGOTREF(__pyx_t_2);
++ __Pyx_XGOTREF(__pyx_t_3);
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":503
+- * node.u.string = <char*>malloc(len(value) + 1)
+- * strcpy(node.u.string, value)
+- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+- * node.u.flag = 1 if value else 0
+- * elif format == MPV_FORMAT_INT64:
++ /* "vidcutter/libs/pympv/mpv.pyx":602
++ * def try_get_property_async(self, prop, data=None, default=None):
++ * try:
++ * return self.get_property_async(prop, data=data) # <<<<<<<<<<<<<<
++ * except MPVError:
++ * return default
+ */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (__pyx_t_4) {
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_INCREF(__pyx_v_prop);
++ __Pyx_GIVEREF(__pyx_v_prop);
++ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_prop);
++ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 602, __pyx_L3_error)
++ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_r = __pyx_t_7;
++ __pyx_t_7 = 0;
++ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":504
+- * strcpy(node.u.string, value)
+- * elif format == MPV_FORMAT_FLAG:
+- * node.u.flag = 1 if value else 0 # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_INT64:
+- * node.u.int64 = value
++ /* "vidcutter/libs/pympv/mpv.pyx":601
++ *
++ * def try_get_property_async(self, prop, data=None, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property_async(prop, data=data)
++ * except MPVError:
+ */
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 504, __pyx_L1_error)
+- if (__pyx_t_4) {
+- __pyx_t_8 = 1;
+- } else {
+- __pyx_t_8 = 0;
+ }
+- __pyx_v_node.u.flag = __pyx_t_8;
++ __pyx_L3_error:;
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":503
+- * node.u.string = <char*>malloc(len(value) + 1)
+- * strcpy(node.u.string, value)
+- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+- * node.u.flag = 1 if value else 0
+- * elif format == MPV_FORMAT_INT64:
++ /* "vidcutter/libs/pympv/mpv.pyx":603
++ * try:
++ * return self.get_property_async(prop, data=data)
++ * except MPVError: # <<<<<<<<<<<<<<
++ * return default
++ *
+ */
+- goto __pyx_L3;
+- }
++ __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5);
++ __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
++ if (__pyx_t_8) {
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 603, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":505
+- * elif format == MPV_FORMAT_FLAG:
+- * node.u.flag = 1 if value else 0
+- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+- * node.u.int64 = value
+- * elif format == MPV_FORMAT_DOUBLE:
++ /* "vidcutter/libs/pympv/mpv.pyx":604
++ * return self.get_property_async(prop, data=data)
++ * except MPVError:
++ * return default # <<<<<<<<<<<<<<
++ *
++ * def try_get_property(self, prop, default=None):
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__pyx_t_4) {
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_default);
++ __pyx_r = __pyx_v_default;
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ goto __pyx_L6_except_return;
++ }
++ goto __pyx_L5_except_error;
++ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":506
+- * node.u.flag = 1 if value else 0
+- * elif format == MPV_FORMAT_INT64:
+- * node.u.int64 = value # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_DOUBLE:
+- * node.u.double_ = value
++ /* "vidcutter/libs/pympv/mpv.pyx":601
++ *
++ * def try_get_property_async(self, prop, data=None, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property_async(prop, data=data)
++ * except MPVError:
+ */
+- __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error)
+- __pyx_v_node.u.int64 = __pyx_t_9;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":505
+- * elif format == MPV_FORMAT_FLAG:
+- * node.u.flag = 1 if value else 0
+- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+- * node.u.int64 = value
+- * elif format == MPV_FORMAT_DOUBLE:
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":507
+- * elif format == MPV_FORMAT_INT64:
+- * node.u.int64 = value
+- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+- * node.u.double_ = value
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (__pyx_t_4) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":508
+- * node.u.int64 = value
+- * elif format == MPV_FORMAT_DOUBLE:
+- * node.u.double_ = value # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * node.u.list = self._prep_node_list(value)
+- */
+- __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
+- __pyx_v_node.u.double_ = __pyx_t_10;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":507
+- * elif format == MPV_FORMAT_INT64:
+- * node.u.int64 = value
+- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+- * node.u.double_ = value
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":509
+- * elif format == MPV_FORMAT_DOUBLE:
+- * node.u.double_ = value
+- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+- * node.u.list = self._prep_node_list(value)
+- * elif format == MPV_FORMAT_NODE_MAP:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__pyx_t_4) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":510
+- * node.u.double_ = value
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * node.u.list = self._prep_node_list(value) # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_NODE_MAP:
+- * node.u.list = self._prep_node_map(value)
+- */
+- __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_v_value);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":509
+- * elif format == MPV_FORMAT_DOUBLE:
+- * node.u.double_ = value
+- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+- * node.u.list = self._prep_node_list(value)
+- * elif format == MPV_FORMAT_NODE_MAP:
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":511
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * node.u.list = self._prep_node_list(value)
+- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * node.u.list = self._prep_node_map(value)
+- * else:
+- */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (__pyx_t_4) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":512
+- * node.u.list = self._prep_node_list(value)
+- * elif format == MPV_FORMAT_NODE_MAP:
+- * node.u.list = self._prep_node_map(value) # <<<<<<<<<<<<<<
+- * else:
+- * node.format = MPV_FORMAT_NONE
+- */
+- __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_map(__pyx_v_self, __pyx_v_value);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":511
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * node.u.list = self._prep_node_list(value)
+- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * node.u.list = self._prep_node_map(value)
+- * else:
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":514
+- * node.u.list = self._prep_node_map(value)
+- * else:
+- * node.format = MPV_FORMAT_NONE # <<<<<<<<<<<<<<
+- * return node
+- *
+- */
+- /*else*/ {
+- __pyx_v_node.format = MPV_FORMAT_NONE;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L1_error;
++ __pyx_L7_try_return:;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L0;
++ __pyx_L6_except_return:;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L0;
+ }
+- __pyx_L3:;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":515
+- * else:
+- * node.format = MPV_FORMAT_NONE
+- * return node # <<<<<<<<<<<<<<
+- *
+- * cdef _free_native_value(self, mpv_node node):
+- */
+- __pyx_r = __pyx_v_node;
+- goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":496
+- * return list
++ /* "vidcutter/libs/pympv/mpv.pyx":600
++ * return err
+ *
+- * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * node.format = format
++ * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
++ * try:
++ * return self.get_property_async(prop, data=data)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __Pyx_pretend_to_initialize(&__pyx_r);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_value);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":517
+- * return node
++/* "vidcutter/libs/pympv/mpv.pyx":606
++ * return default
+ *
+- * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+- * for i in range(node.u.list.num):
++ * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
++ * try:
++ * return self.get_property(prop)
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, struct mpv_node __pyx_v_node) {
+- int __pyx_v_i;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_prop = 0;
++ PyObject *__pyx_v_default = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_free_native_value", 0);
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("try_get_property (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_default,0};
++ PyObject* values[2] = {0,0};
++ values[1] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
++ if (value) { values[1] = value; kw_args--; }
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 606, __pyx_L3_error)
++ }
++ } else {
++ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ }
++ __pyx_v_prop = values[0];
++ __pyx_v_default = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_default);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":518
+- *
+- * cdef _free_native_value(self, mpv_node node):
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
+- * for i in range(node.u.list.num):
+- * self._free_native_value(node.u.list.values[i])
+- */
+- switch (__pyx_v_node.format) {
+- case MPV_FORMAT_NODE_ARRAY:
+- case MPV_FORMAT_NODE_MAP:
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":519
+- * cdef _free_native_value(self, mpv_node node):
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+- * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
+- * self._free_native_value(node.u.list.values[i])
+- * free(node.u.list.values)
+- */
+- __pyx_t_1 = __pyx_v_node.u.list->num;
+- __pyx_t_2 = __pyx_t_1;
+- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+- __pyx_v_i = __pyx_t_3;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":520
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+- * for i in range(node.u.list.num):
+- * self._free_native_value(node.u.list.values[i]) # <<<<<<<<<<<<<<
+- * free(node.u.list.values)
+- * if node.format == MPV_FORMAT_NODE_MAP:
+- */
+- __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":521
+- * for i in range(node.u.list.num):
+- * self._free_native_value(node.u.list.values[i])
+- * free(node.u.list.values) # <<<<<<<<<<<<<<
+- * if node.format == MPV_FORMAT_NODE_MAP:
+- * for i in range(node.u.list.num):
+- */
+- free(__pyx_v_node.u.list->values);
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":522
+- * self._free_native_value(node.u.list.values[i])
+- * free(node.u.list.values)
+- * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * for i in range(node.u.list.num):
+- * free(node.u.list.keys[i])
+- */
+- __pyx_t_5 = ((__pyx_v_node.format == MPV_FORMAT_NODE_MAP) != 0);
+- if (__pyx_t_5) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_t_8;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("try_get_property", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":523
+- * free(node.u.list.values)
+- * if node.format == MPV_FORMAT_NODE_MAP:
+- * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
+- * free(node.u.list.keys[i])
+- * free(node.u.list.keys)
++ /* "vidcutter/libs/pympv/mpv.pyx":607
++ *
++ * def try_get_property(self, prop, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property(prop)
++ * except MPVError:
+ */
+- __pyx_t_1 = __pyx_v_node.u.list->num;
+- __pyx_t_2 = __pyx_t_1;
+- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+- __pyx_v_i = __pyx_t_3;
++ {
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
++ __Pyx_XGOTREF(__pyx_t_1);
++ __Pyx_XGOTREF(__pyx_t_2);
++ __Pyx_XGOTREF(__pyx_t_3);
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":524
+- * if node.format == MPV_FORMAT_NODE_MAP:
+- * for i in range(node.u.list.num):
+- * free(node.u.list.keys[i]) # <<<<<<<<<<<<<<
+- * free(node.u.list.keys)
+- * free(node.u.list)
++ /* "vidcutter/libs/pympv/mpv.pyx":608
++ * def try_get_property(self, prop, default=None):
++ * try:
++ * return self.get_property(prop) # <<<<<<<<<<<<<<
++ * except MPVError:
++ * return default
+ */
+- free((__pyx_v_node.u.list->keys[__pyx_v_i]));
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_6 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_6)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_6);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ }
+ }
++ __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_prop);
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __pyx_r = __pyx_t_4;
++ __pyx_t_4 = 0;
++ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":525
+- * for i in range(node.u.list.num):
+- * free(node.u.list.keys[i])
+- * free(node.u.list.keys) # <<<<<<<<<<<<<<
+- * free(node.u.list)
+- * elif node.format == MPV_FORMAT_STRING:
+- */
+- free(__pyx_v_node.u.list->keys);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":522
+- * self._free_native_value(node.u.list.values[i])
+- * free(node.u.list.values)
+- * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * for i in range(node.u.list.num):
+- * free(node.u.list.keys[i])
++ /* "vidcutter/libs/pympv/mpv.pyx":607
++ *
++ * def try_get_property(self, prop, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property(prop)
++ * except MPVError:
+ */
+ }
++ __pyx_L3_error:;
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":526
+- * free(node.u.list.keys[i])
+- * free(node.u.list.keys)
+- * free(node.u.list) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_STRING:
+- * free(node.u.string)
+- */
+- free(__pyx_v_node.u.list);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":518
++ /* "vidcutter/libs/pympv/mpv.pyx":609
++ * try:
++ * return self.get_property(prop)
++ * except MPVError: # <<<<<<<<<<<<<<
++ * return default
+ *
+- * cdef _free_native_value(self, mpv_node node):
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
+- * for i in range(node.u.list.num):
+- * self._free_native_value(node.u.list.values[i])
+ */
+- break;
+- case MPV_FORMAT_STRING:
++ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
++ __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
++ if (__pyx_t_8) {
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 609, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_GOTREF(__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":528
+- * free(node.u.list)
+- * elif node.format == MPV_FORMAT_STRING:
+- * free(node.u.string) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":610
++ * return self.get_property(prop)
++ * except MPVError:
++ * return default # <<<<<<<<<<<<<<
+ *
+- * def command(self, *cmdlist, asynchronous=False, data=None):
++ * def get_property(self, prop):
+ */
+- free(__pyx_v_node.u.string);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_default);
++ __pyx_r = __pyx_v_default;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ goto __pyx_L6_except_return;
++ }
++ goto __pyx_L5_except_error;
++ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":527
+- * free(node.u.list.keys)
+- * free(node.u.list)
+- * elif node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * free(node.u.string)
++ /* "vidcutter/libs/pympv/mpv.pyx":607
+ *
++ * def try_get_property(self, prop, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property(prop)
++ * except MPVError:
+ */
+- break;
+- default: break;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L1_error;
++ __pyx_L7_try_return:;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L0;
++ __pyx_L6_except_return:;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":517
+- * return node
++ /* "vidcutter/libs/pympv/mpv.pyx":606
++ * return default
+ *
+- * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+- * for i in range(node.u.list.num):
++ * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
++ * try:
++ * return self.get_property(prop)
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context._free_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":530
+- * free(node.u.string)
+- *
+- * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+- * """Send a command to mpv.
++/* "vidcutter/libs/pympv/mpv.pyx":612
++ * return default
+ *
++ * def get_property(self, prop): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_get_property"""
++ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_12command[] = "Send a command to mpv.\n\n Non-async success returns the command's response data, otherwise None\n\n Arguments:\n Accepts parameters as args\n\n Keyword Arguments:\n asynchronous: True will return right away, status comes in as MPV_EVENT_COMMAND_REPLY\n data: Only valid if async, gets sent back as reply_userdata in the Event\n\n Wraps: mpv_command_node and mpv_command_node_async\n ";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_asynchronous = 0;
+- PyObject *__pyx_v_data = 0;
+- PyObject *__pyx_v_cmdlist = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_16get_property[] = "Wraps: mpv_get_property";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("command (wrapper)", 0);
+- if (PyTuple_GET_SIZE(__pyx_args) > 0) {
+- __pyx_v_cmdlist = PyTuple_GetSlice(__pyx_args, 0, PyTuple_GET_SIZE(__pyx_args));
+- if (unlikely(!__pyx_v_cmdlist)) {
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- }
+- __Pyx_GOTREF(__pyx_v_cmdlist);
+- } else {
+- __pyx_v_cmdlist = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+- }
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
+- PyObject* values[2] = {0,0};
+- values[0] = ((PyObject *)Py_False);
+- values[1] = ((PyObject *)Py_None);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- default:
+- case 0: break;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- if (kw_args > 0 && likely(kw_args <= 2)) {
+- Py_ssize_t index;
+- for (index = 0; index < 2 && kw_args > 0; index++) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
+- if (value) { values[index] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 530, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) < 0) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- }
+- __pyx_v_asynchronous = values[0];
+- __pyx_v_data = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 530, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_DECREF(__pyx_v_cmdlist); __pyx_v_cmdlist = 0;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_asynchronous, __pyx_v_data, __pyx_v_cmdlist);
++ __Pyx_RefNannySetupContext("get_property (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_prop));
+
+ /* function exit code */
+- __Pyx_XDECREF(__pyx_v_cmdlist);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist) {
+- struct mpv_node __pyx_v_node;
+- struct mpv_node __pyx_v_noderesult;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop) {
++ struct mpv_node __pyx_v_result;
++ char const *__pyx_v_prop_c;
+ int __pyx_v_err;
+- uint64_t __pyx_v_data_id;
+- PyObject *__pyx_v_result = NULL;
+- PyObject *__pyx_v_userdatas = NULL;
++ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- uint64_t __pyx_t_4;
++ char const *__pyx_t_4;
+ int __pyx_t_5;
+- int __pyx_t_6;
++ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ int __pyx_t_8;
+ char const *__pyx_t_9;
+@@ -11198,41 +11876,39 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+- PyObject *__pyx_t_16 = NULL;
+- PyObject *__pyx_t_17 = NULL;
+- char const *__pyx_t_18;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("command", 0);
++ __Pyx_RefNannySetupContext("get_property", 0);
++ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":544
+- * Wraps: mpv_command_node and mpv_command_node_async
+- * """
++ /* "vidcutter/libs/pympv/mpv.pyx":614
++ * def get_property(self, prop):
++ * """Wraps: mpv_get_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist))
+- * cdef mpv_node noderesult
++ * cdef mpv_node result
++ * prop = _strenc(prop)
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 544, __pyx_L1_error)
++ __PYX_ERR(0, 614, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":545
+- * """
++ /* "vidcutter/libs/pympv/mpv.pyx":616
+ * assert self._ctx
+- * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist)) # <<<<<<<<<<<<<<
+- * cdef mpv_node noderesult
++ * cdef mpv_node result
++ * prop = _strenc(prop) # <<<<<<<<<<<<<<
++ * cdef const char* prop_c = prop
+ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+@@ -11241,625 +11917,332 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_cmdlist) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cmdlist);
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_cmdlist, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":549
++ /* "vidcutter/libs/pympv/mpv.pyx":617
++ * cdef mpv_node result
++ * prop = _strenc(prop)
++ * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
+ * cdef int err
+- * cdef uint64_t data_id
+- * result = None # <<<<<<<<<<<<<<
+- * try:
+- * data_id = id(data)
+- */
+- __Pyx_INCREF(Py_None);
+- __pyx_v_result = Py_None;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":550
+- * cdef uint64_t data_id
+- * result = None
+- * try: # <<<<<<<<<<<<<<
+- * data_id = id(data)
+- * if not asynchronous:
++ * with nogil:
+ */
+- /*try:*/ {
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error)
++ __pyx_v_prop_c = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":551
+- * result = None
+- * try:
+- * data_id = id(data) # <<<<<<<<<<<<<<
+- * if not asynchronous:
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":619
++ * cdef const char* prop_c = prop
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_get_property(
++ * self._ctx,
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L4_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_data_id = __pyx_t_4;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":552
+- * try:
+- * data_id = id(data)
+- * if not asynchronous: # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
++ /* "vidcutter/libs/pympv/mpv.pyx":620
++ * cdef int err
++ * with nogil:
++ * err = mpv_get_property( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * prop_c,
+ */
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 552, __pyx_L4_error)
+- __pyx_t_6 = ((!__pyx_t_5) != 0);
+- if (__pyx_t_6) {
++ __pyx_v_err = mpv_get_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_result));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":553
+- * data_id = id(data)
+- * if not asynchronous:
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
+- * try:
++ /* "vidcutter/libs/pympv/mpv.pyx":619
++ * cdef const char* prop_c = prop
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_get_property(
++ * self._ctx,
+ */
+- {
++ /*finally:*/ {
++ /*normal exit:*/{
+ #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
+ #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":554
+- * if not asynchronous:
+- * with nogil:
+- * err = mpv_command_node(self._ctx, &node, &noderesult) # <<<<<<<<<<<<<<
+- * try:
+- * result = _convert_node_value(noderesult) if err >= 0 else None
+- */
+- __pyx_v_err = mpv_command_node(__pyx_v_self->_ctx, (&__pyx_v_node), (&__pyx_v_noderesult));
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":553
+- * data_id = id(data)
+- * if not asynchronous:
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
+- * try:
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L9;
+- }
+- __pyx_L9:;
+- }
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
+ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":555
+- * with nogil:
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
+- * try: # <<<<<<<<<<<<<<
+- * result = _convert_node_value(noderesult) if err >= 0 else None
+- * finally:
++ /* "vidcutter/libs/pympv/mpv.pyx":626
++ * &result,
++ * )
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * try:
+ */
+- /*try:*/ {
++ __pyx_t_5 = ((__pyx_v_err < 0) != 0);
++ if (unlikely(__pyx_t_5)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":556
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
+- * try:
+- * result = _convert_node_value(noderesult) if err >= 0 else None # <<<<<<<<<<<<<<
+- * finally:
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":627
++ * )
++ * if err < 0:
++ * raise MPVError(err) # <<<<<<<<<<<<<<
++ * try:
++ * v = _convert_node_value(result)
+ */
+- if (((__pyx_v_err >= 0) != 0)) {
+- __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L11_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __pyx_t_2;
+- __pyx_t_2 = 0;
+- } else {
+- __Pyx_INCREF(Py_None);
+- __pyx_t_1 = Py_None;
+- }
+- __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
+- __pyx_t_1 = 0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_6 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_6)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_6);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
++ }
++ __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(0, 627, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
+- * result = _convert_node_value(noderesult) if err >= 0 else None
+- * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&noderesult)
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":626
++ * &result,
++ * )
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * try:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":559
+- * finally:
+- * with nogil:
+- * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
+- * else:
+- * userdatas = self.reply_userdata.get(data_id, None)
++ /* "vidcutter/libs/pympv/mpv.pyx":628
++ * if err < 0:
++ * raise MPVError(err)
++ * try: # <<<<<<<<<<<<<<
++ * v = _convert_node_value(result)
++ * finally:
+ */
+- mpv_free_node_contents((&__pyx_v_noderesult));
+- }
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
+- * result = _convert_node_value(noderesult) if err >= 0 else None
+- * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&noderesult)
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":629
++ * raise MPVError(err)
++ * try:
++ * v = _convert_node_value(result) # <<<<<<<<<<<<<<
++ * finally:
++ * with nogil:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L15;
+- }
+- __pyx_L15:;
+- }
+- }
+- goto __pyx_L12;
+- }
+- __pyx_L11_error:;
+- /*exception exit:*/{
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
+- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+- __Pyx_XGOTREF(__pyx_t_10);
+- __Pyx_XGOTREF(__pyx_t_11);
+- __Pyx_XGOTREF(__pyx_t_12);
+- __Pyx_XGOTREF(__pyx_t_13);
+- __Pyx_XGOTREF(__pyx_t_14);
+- __Pyx_XGOTREF(__pyx_t_15);
+- __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
+- {
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L8_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_v = __pyx_t_1;
++ __pyx_t_1 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":559
+- * finally:
+- * with nogil:
+- * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
+- * else:
+- * userdatas = self.reply_userdata.get(data_id, None)
++ /* "vidcutter/libs/pympv/mpv.pyx":631
++ * v = _convert_node_value(result)
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&result)
++ * return v
+ */
+- mpv_free_node_contents((&__pyx_v_noderesult));
+- }
++ /*finally:*/ {
++ /*normal exit:*/{
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
+- * result = _convert_node_value(noderesult) if err >= 0 else None
+- * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&noderesult)
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":632
++ * finally:
++ * with nogil:
++ * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
++ * return v
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L20;
+- }
+- __pyx_L20:;
+- }
+- }
+- }
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_13);
+- __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_XGIVEREF(__pyx_t_15);
+- __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
++ mpv_free_node_contents((&__pyx_v_result));
+ }
+- __Pyx_XGIVEREF(__pyx_t_10);
+- __Pyx_XGIVEREF(__pyx_t_11);
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
+- __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
+- goto __pyx_L4_error;
+- }
+- __pyx_L12:;
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":552
+- * try:
+- * data_id = id(data)
+- * if not asynchronous: # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
++ /* "vidcutter/libs/pympv/mpv.pyx":631
++ * v = _convert_node_value(result)
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&result)
++ * return v
+ */
+- goto __pyx_L6;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L12;
++ }
++ __pyx_L12:;
++ }
++ }
++ goto __pyx_L9;
+ }
++ __pyx_L8_error:;
++ /*exception exit:*/{
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
++ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
++ __Pyx_XGOTREF(__pyx_t_10);
++ __Pyx_XGOTREF(__pyx_t_11);
++ __Pyx_XGOTREF(__pyx_t_12);
++ __Pyx_XGOTREF(__pyx_t_13);
++ __Pyx_XGOTREF(__pyx_t_14);
++ __Pyx_XGOTREF(__pyx_t_15);
++ __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
++ {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":561
+- * mpv_free_node_contents(&noderesult)
+- * else:
+- * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
+- * if userdatas is None:
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ /* "vidcutter/libs/pympv/mpv.pyx":632
++ * finally:
++ * with nogil:
++ * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
++ * return v
++ *
+ */
+- /*else*/ {
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_16 = NULL;
+- __pyx_t_8 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_16)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_16);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- __pyx_t_8 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- {
+- __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_17);
+- if (__pyx_t_16) {
+- __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
+- }
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_8, __pyx_t_3);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_8, Py_None);
+- __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+- }
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_userdatas = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":562
+- * else:
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- */
+- __pyx_t_6 = (__pyx_v_userdatas == Py_None);
+- __pyx_t_5 = (__pyx_t_6 != 0);
+- if (__pyx_t_5) {
++ mpv_free_node_contents((&__pyx_v_result));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":563
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None:
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+- * userdatas.add()
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":631
++ * v = _convert_node_value(result)
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&result)
++ * return v
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_17 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_17)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_17);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L17;
++ }
++ __pyx_L17:;
++ }
+ }
+- __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_17, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 563, __pyx_L4_error)
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":562
+- * else:
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- */
+ }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":564
+- * if userdatas is None:
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add() # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_command_node_async(self._ctx, data_id, &node)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_17 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_17)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_17);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_13);
++ __Pyx_XGIVEREF(__pyx_t_14);
++ __Pyx_XGIVEREF(__pyx_t_15);
++ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+ }
+- __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XGIVEREF(__pyx_t_10);
++ __Pyx_XGIVEREF(__pyx_t_11);
++ __Pyx_XGIVEREF(__pyx_t_12);
++ __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
++ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
++ __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
++ goto __pyx_L1_error;
++ }
++ __pyx_L9:;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":565
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_command_node_async(self._ctx, data_id, &node)
+- * finally:
++ /* "vidcutter/libs/pympv/mpv.pyx":633
++ * with nogil:
++ * mpv_free_node_contents(&result)
++ * return v # <<<<<<<<<<<<<<
++ *
++ * @_errors
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_v);
++ __pyx_r = __pyx_v_v;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":566
+- * userdatas.add()
+- * with nogil:
+- * err = mpv_command_node_async(self._ctx, data_id, &node) # <<<<<<<<<<<<<<
+- * finally:
+- * self._free_native_value(node)
++ /* "vidcutter/libs/pympv/mpv.pyx":612
++ * return default
++ *
++ * def get_property(self, prop): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_get_property"""
++ * assert self._ctx
+ */
+- __pyx_v_err = mpv_command_node_async(__pyx_v_self->_ctx, __pyx_v_data_id, (&__pyx_v_node));
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":565
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_command_node_async(self._ctx, data_id, &node)
+- * finally:
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L24;
+- }
+- __pyx_L24:;
+- }
+- }
+- }
+- __pyx_L6:;
+- }
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_v);
++ __Pyx_XDECREF(__pyx_v_prop);
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":568
+- * err = mpv_command_node_async(self._ctx, data_id, &node)
+- * finally:
+- * self._free_native_value(node) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- goto __pyx_L5;
+- }
+- __pyx_L4_error:;
+- /*exception exit:*/{
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
+- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
+- __Pyx_XGOTREF(__pyx_t_15);
+- __Pyx_XGOTREF(__pyx_t_14);
+- __Pyx_XGOTREF(__pyx_t_13);
+- __Pyx_XGOTREF(__pyx_t_12);
+- __Pyx_XGOTREF(__pyx_t_11);
+- __Pyx_XGOTREF(__pyx_t_10);
+- __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
+- {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L26_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- }
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_XGIVEREF(__pyx_t_11);
+- __Pyx_XGIVEREF(__pyx_t_10);
+- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
+- }
+- __Pyx_XGIVEREF(__pyx_t_15);
+- __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_XGIVEREF(__pyx_t_13);
+- __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
+- __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
+- __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_18;
+- goto __pyx_L1_error;
+- __pyx_L26_error:;
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_XGIVEREF(__pyx_t_11);
+- __Pyx_XGIVEREF(__pyx_t_10);
+- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
+- }
+- __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+- __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+- __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+- __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
+- goto __pyx_L1_error;
+- }
+- __pyx_L5:;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":569
+- * finally:
+- * self._free_native_value(node)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * return result
+- */
+- __pyx_t_5 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_5)) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":570
+- * self._free_native_value(node)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- * return result
+- *
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 570, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_17);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 570, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":569
+- * finally:
+- * self._free_native_value(node)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * return result
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":571
+- * if err < 0:
+- * raise MPVError(err)
+- * return result # <<<<<<<<<<<<<<
+- *
+- * @_errors
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_result);
+- __pyx_r = __pyx_v_result;
+- goto __pyx_L0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":530
+- * free(node.u.string)
+- *
+- * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+- * """Send a command to mpv.
+- *
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_16);
+- __Pyx_XDECREF(__pyx_t_17);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_result);
+- __Pyx_XDECREF(__pyx_v_userdatas);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":574
+- *
+- * @_errors
+- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Gets the value of a property asynchronously.
+- *
++/* "vidcutter/libs/pympv/mpv.pyx":636
++ *
++ * @_errors
++ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
++ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_14get_property_async[] = "Gets the value of a property asynchronously.\n\n Arguments:\n prop: Property to get the value of.\n\n Keyword arguments:\n data: Value to be passed into the reply_userdata of the response event.\n Wraps: mpv_get_property_async";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_18set_property[] = "Wraps: mpv_set_property and mpv_set_property_async";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_prop = 0;
++ PyObject *__pyx_v_value = 0;
++ PyObject *__pyx_v_asynchronous = 0;
+ PyObject *__pyx_v_data = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("get_property_async (wrapper)", 0);
++ __Pyx_RefNannySetupContext("set_property (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
+- PyObject* values[2] = {0,0};
+- values[1] = ((PyObject *)Py_None);
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
++ PyObject* values[4] = {0,0,0,0};
++ values[1] = ((PyObject *)Py_True);
++ values[2] = ((PyObject *)Py_False);
++ values[3] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
++ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
++ CYTHON_FALLTHROUGH;
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+@@ -11875,15 +12258,31 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(Py
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
+ if (value) { values[1] = value; kw_args--; }
+ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_asynchronous);
++ if (value) { values[2] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 3:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
++ if (value) { values[3] = value; kw_args--; }
++ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 574, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 636, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
++ CYTHON_FALLTHROUGH;
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+@@ -11892,70 +12291,83 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(Py
+ }
+ }
+ __pyx_v_prop = values[0];
+- __pyx_v_data = values[1];
++ __pyx_v_value = values[1];
++ __pyx_v_asynchronous = values[2];
++ __pyx_v_data = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 574, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value, __pyx_v_asynchronous, __pyx_v_data);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
+- uint64_t __pyx_v_id_data;
+- PyObject *__pyx_v_userdatas = NULL;
+- char const *__pyx_v_prop_c;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data) {
++ enum mpv_format __pyx_v_format;
++ struct mpv_node __pyx_v_v;
+ int __pyx_v_err;
++ uint64_t __pyx_v_data_id;
++ char const *__pyx_v_prop_c;
++ PyObject *__pyx_v_userdatas = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- Py_hash_t __pyx_t_4;
+- PyObject *__pyx_t_5 = NULL;
++ enum mpv_format __pyx_t_4;
++ char const *__pyx_t_5;
+ int __pyx_t_6;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+- int __pyx_t_9;
+- char const *__pyx_t_10;
++ int __pyx_t_7;
++ Py_hash_t __pyx_t_8;
++ PyObject *__pyx_t_9 = NULL;
++ int __pyx_t_10;
++ PyObject *__pyx_t_11 = NULL;
++ int __pyx_t_12;
++ char const *__pyx_t_13;
++ PyObject *__pyx_t_14 = NULL;
++ PyObject *__pyx_t_15 = NULL;
++ PyObject *__pyx_t_16 = NULL;
++ PyObject *__pyx_t_17 = NULL;
++ PyObject *__pyx_t_18 = NULL;
++ PyObject *__pyx_t_19 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("get_property_async", 0);
++ __Pyx_RefNannySetupContext("set_property", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":583
+- * data: Value to be passed into the reply_userdata of the response event.
+- * Wraps: mpv_get_property_async"""
++ /* "vidcutter/libs/pympv/mpv.pyx":638
++ * def set_property(self, prop, value=True, asynchronous=False, data=None):
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+ * prop = _strenc(prop)
+- * cdef uint64_t id_data = <uint64_t>hash(data)
++ * cdef mpv_format format = self._format_for(value)
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 583, __pyx_L1_error)
++ __PYX_ERR(0, 638, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":584
+- * Wraps: mpv_get_property_async"""
++ /* "vidcutter/libs/pympv/mpv.pyx":639
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ * assert self._ctx
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
++ * cdef mpv_format format = self._format_for(value)
++ * cdef mpv_node v = self._prep_native_value(value, format)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -11969,523 +12381,480 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(st
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":585
++ /* "vidcutter/libs/pympv/mpv.pyx":640
+ * assert self._ctx
+ * prop = _strenc(prop)
+- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None:
+- */
+- __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 585, __pyx_L1_error)
+- __pyx_v_id_data = ((uint64_t)__pyx_t_4);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":586
+- * prop = _strenc(prop)
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
++ * cdef mpv_node v = self._prep_native_value(value, format)
++ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_5 = NULL;
+- __pyx_t_6 = 0;
++ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+- __pyx_t_6 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (__pyx_t_5) {
+- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+- __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_userdatas = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":587
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- */
+- __pyx_t_8 = (__pyx_v_userdatas == Py_None);
+- __pyx_t_9 = (__pyx_t_8 != 0);
+- if (__pyx_t_9) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":588
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+- * userdatas.add()
+- * cdef const char* prop_c = prop
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 588, __pyx_L1_error)
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":587
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- */
+- }
++ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_format = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":589
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.add() # <<<<<<<<<<<<<<
+- * cdef const char* prop_c = prop
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":641
++ * prop = _strenc(prop)
++ * cdef mpv_format format = self._format_for(value)
++ * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
++ * cdef int err
++ * cdef uint64_t data_id
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":590
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_get_property_async(
++ /* "vidcutter/libs/pympv/mpv.pyx":645
++ * cdef uint64_t data_id
++ * cdef const char* prop_c
++ * try: # <<<<<<<<<<<<<<
++ * prop_c = prop
++ * if not asynchronous:
+ */
+- __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 590, __pyx_L1_error)
+- __pyx_v_prop_c = __pyx_t_10;
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":591
+- * userdatas.add()
+- * cdef const char* prop_c = prop
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_get_property_async(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":646
++ * cdef const char* prop_c
++ * try:
++ * prop_c = prop # <<<<<<<<<<<<<<
++ * if not asynchronous:
++ * with nogil:
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 646, __pyx_L4_error)
++ __pyx_v_prop_c = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":592
+- * cdef const char* prop_c = prop
+- * with nogil:
+- * err = mpv_get_property_async( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * id_data,
++ /* "vidcutter/libs/pympv/mpv.pyx":647
++ * try:
++ * prop_c = prop
++ * if not asynchronous: # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_set_property(
+ */
+- __pyx_v_err = mpv_get_property_async(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_prop_c, MPV_FORMAT_NODE);
+- }
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 647, __pyx_L4_error)
++ __pyx_t_7 = ((!__pyx_t_6) != 0);
++ if (__pyx_t_7) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":591
+- * userdatas.add()
+- * cdef const char* prop_c = prop
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_get_property_async(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":648
++ * prop_c = prop
++ * if not asynchronous:
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_property(
++ * self._ctx,
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
++ {
+ #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
+ #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+- }
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":598
+- * MPV_FORMAT_NODE,
+- * )
+- * return err # <<<<<<<<<<<<<<
+- *
+- * def try_get_property_async(self, prop, data=None, default=None):
++ /* "vidcutter/libs/pympv/mpv.pyx":649
++ * if not asynchronous:
++ * with nogil:
++ * err = mpv_set_property( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * prop_c,
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_v_err = mpv_set_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":574
+- *
+- * @_errors
+- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Gets the value of a property asynchronously.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":648
++ * prop_c = prop
++ * if not asynchronous:
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_property(
++ * self._ctx,
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L9;
++ }
++ __pyx_L9:;
++ }
++ }
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_userdatas);
+- __Pyx_XDECREF(__pyx_v_prop);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":655
++ * &v
++ * )
++ * return err # <<<<<<<<<<<<<<
++ * data_id = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(data_id, None)
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L3_return;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":600
+- * return err
+- *
+- * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":647
+ * try:
+- * return self.get_property_async(prop, data=data)
++ * prop_c = prop
++ * if not asynchronous: # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_set_property(
+ */
++ }
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_prop = 0;
+- PyObject *__pyx_v_data = 0;
+- PyObject *__pyx_v_default = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("try_get_property_async (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,&__pyx_n_s_default,0};
+- PyObject* values[3] = {0,0,0};
+- values[1] = ((PyObject *)Py_None);
+- values[2] = ((PyObject *)Py_None);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
+- if (value) { values[1] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
+- if (value) { values[2] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 600, __pyx_L3_error)
++ /* "vidcutter/libs/pympv/mpv.pyx":656
++ * )
++ * return err
++ * data_id = <uint64_t>hash(data) # <<<<<<<<<<<<<<
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None:
++ */
++ __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 656, __pyx_L4_error)
++ __pyx_v_data_id = ((uint64_t)__pyx_t_8);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":657
++ * return err
++ * data_id = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
++ * if userdatas is None:
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_9 = NULL;
++ __pyx_t_10 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_9)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_9);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ __pyx_t_10 = 1;
+ }
+- } else {
+- switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- break;
+- default: goto __pyx_L5_argtuple_error;
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_11);
++ if (__pyx_t_9) {
++ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, Py_None);
++ __pyx_t_3 = 0;
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+- __pyx_v_prop = values[0];
+- __pyx_v_data = values[1];
+- __pyx_v_default = values[2];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 600, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_16try_get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data, __pyx_v_default);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_userdatas = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("try_get_property_async", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":658
++ * data_id = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ */
++ __pyx_t_7 = (__pyx_v_userdatas == Py_None);
++ __pyx_t_6 = (__pyx_t_7 != 0);
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
+- *
+- * def try_get_property_async(self, prop, data=None, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property_async(prop, data=data)
+- * except MPVError:
++ /* "vidcutter/libs/pympv/mpv.pyx":659
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None:
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
++ * userdatas.add()
++ * with nogil:
+ */
+- {
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+- __Pyx_XGOTREF(__pyx_t_1);
+- __Pyx_XGOTREF(__pyx_t_2);
+- __Pyx_XGOTREF(__pyx_t_3);
+- /*try:*/ {
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_11 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_11)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_11);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
++ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 659, __pyx_L4_error)
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":602
+- * def try_get_property_async(self, prop, data=None, default=None):
+- * try:
+- * return self.get_property_async(prop, data=data) # <<<<<<<<<<<<<<
+- * except MPVError:
+- * return default
++ /* "vidcutter/libs/pympv/mpv.pyx":658
++ * data_id = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_INCREF(__pyx_v_prop);
+- __Pyx_GIVEREF(__pyx_v_prop);
+- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_prop);
+- __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 602, __pyx_L3_error)
+- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __pyx_r = __pyx_t_7;
+- __pyx_t_7 = 0;
+- goto __pyx_L7_try_return;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
+- *
+- * def try_get_property_async(self, prop, data=None, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property_async(prop, data=data)
+- * except MPVError:
++ /* "vidcutter/libs/pympv/mpv.pyx":660
++ * if userdatas is None:
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add() # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_set_property_async(
+ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_11 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_11)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_11);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
+ }
+- __pyx_L3_error:;
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":603
+- * try:
+- * return self.get_property_async(prop, data=data)
+- * except MPVError: # <<<<<<<<<<<<<<
+- * return default
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":661
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_property_async(
++ * self._ctx,
+ */
+- __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+- __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
+- if (__pyx_t_8) {
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 603, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_GOTREF(__pyx_t_7);
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":604
+- * return self.get_property_async(prop, data=data)
+- * except MPVError:
+- * return default # <<<<<<<<<<<<<<
+- *
+- * def try_get_property(self, prop, default=None):
++ /* "vidcutter/libs/pympv/mpv.pyx":662
++ * userdatas.add()
++ * with nogil:
++ * err = mpv_set_property_async( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * data_id,
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_default);
+- __pyx_r = __pyx_v_default;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- goto __pyx_L6_except_return;
++ __pyx_v_err = mpv_set_property_async(__pyx_v_self->_ctx, __pyx_v_data_id, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":661
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_property_async(
++ * self._ctx,
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L13;
++ }
++ __pyx_L13:;
++ }
+ }
+- goto __pyx_L5_except_error;
+- __pyx_L5_except_error:;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
++ /* "vidcutter/libs/pympv/mpv.pyx":670
++ * )
++ * finally:
++ * self._free_native_value(v) # <<<<<<<<<<<<<<
++ * return err
+ *
+- * def try_get_property_async(self, prop, data=None, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property_async(prop, data=data)
+- * except MPVError:
+ */
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L1_error;
+- __pyx_L7_try_return:;
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L0;
+- __pyx_L6_except_return:;
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ goto __pyx_L5;
++ }
++ __pyx_L4_error:;
++ /*exception exit:*/{
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
++ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
++ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
++ __Pyx_XGOTREF(__pyx_t_14);
++ __Pyx_XGOTREF(__pyx_t_15);
++ __Pyx_XGOTREF(__pyx_t_16);
++ __Pyx_XGOTREF(__pyx_t_17);
++ __Pyx_XGOTREF(__pyx_t_18);
++ __Pyx_XGOTREF(__pyx_t_19);
++ __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
++ {
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L15_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_17);
++ __Pyx_XGIVEREF(__pyx_t_18);
++ __Pyx_XGIVEREF(__pyx_t_19);
++ __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
++ }
++ __Pyx_XGIVEREF(__pyx_t_14);
++ __Pyx_XGIVEREF(__pyx_t_15);
++ __Pyx_XGIVEREF(__pyx_t_16);
++ __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
++ __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
++ __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
++ goto __pyx_L1_error;
++ __pyx_L15_error:;
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_17);
++ __Pyx_XGIVEREF(__pyx_t_18);
++ __Pyx_XGIVEREF(__pyx_t_19);
++ __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
++ }
++ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
++ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
++ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
++ __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
++ goto __pyx_L1_error;
++ }
++ __pyx_L3_return: {
++ __pyx_t_19 = __pyx_r;
++ __pyx_r = 0;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_19;
++ __pyx_t_19 = 0;
++ goto __pyx_L0;
++ }
++ __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":600
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":671
++ * finally:
++ * self._free_native_value(v)
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
+- * try:
+- * return self.get_property_async(prop, data=data)
++ * @_errors
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":636
++ *
++ * @_errors
++ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
++ * assert self._ctx
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_9);
++ __Pyx_XDECREF(__pyx_t_11);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF(__pyx_v_userdatas);
++ __Pyx_XDECREF(__pyx_v_prop);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":606
+- * return default
++/* "vidcutter/libs/pympv/mpv.pyx":674
+ *
+- * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
+- * try:
+- * return self.get_property(prop)
++ * @_errors
++ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_option"""
++ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_20set_option[] = "Wraps: mpv_set_option";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_prop = 0;
+- PyObject *__pyx_v_default = 0;
++ PyObject *__pyx_v_value = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("try_get_property (wrapper)", 0);
++ __Pyx_RefNannySetupContext("set_option (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_default,0};
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,0};
+ PyObject* values[2] = {0,0};
+- values[1] = ((PyObject *)Py_None);
++ values[1] = ((PyObject *)Py_True);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+@@ -12505,12 +12874,12 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyOb
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 606, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 674, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -12522,258 +12891,74 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyOb
+ }
+ }
+ __pyx_v_prop = values[0];
+- __pyx_v_default = values[1];
++ __pyx_v_value = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 674, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_18try_get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_default);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("try_get_property", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":607
+- *
+- * def try_get_property(self, prop, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property(prop)
+- * except MPVError:
+- */
+- {
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+- __Pyx_XGOTREF(__pyx_t_1);
+- __Pyx_XGOTREF(__pyx_t_2);
+- __Pyx_XGOTREF(__pyx_t_3);
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":608
+- * def try_get_property(self, prop, default=None):
+- * try:
+- * return self.get_property(prop) # <<<<<<<<<<<<<<
+- * except MPVError:
+- * return default
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- }
+- }
+- __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_prop);
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
+- goto __pyx_L7_try_return;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":607
+- *
+- * def try_get_property(self, prop, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property(prop)
+- * except MPVError:
+- */
+- }
+- __pyx_L3_error:;
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":609
+- * try:
+- * return self.get_property(prop)
+- * except MPVError: # <<<<<<<<<<<<<<
+- * return default
+- *
+- */
+- __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+- __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
+- if (__pyx_t_8) {
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 609, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GOTREF(__pyx_t_4);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":610
+- * return self.get_property(prop)
+- * except MPVError:
+- * return default # <<<<<<<<<<<<<<
+- *
+- * def get_property(self, prop):
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_default);
+- __pyx_r = __pyx_v_default;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- goto __pyx_L6_except_return;
+- }
+- goto __pyx_L5_except_error;
+- __pyx_L5_except_error:;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":607
+- *
+- * def try_get_property(self, prop, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property(prop)
+- * except MPVError:
+- */
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L1_error;
+- __pyx_L7_try_return:;
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L0;
+- __pyx_L6_except_return:;
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L0;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":606
+- * return default
+- *
+- * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
+- * try:
+- * return self.get_property(prop)
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":612
+- * return default
+- *
+- * def get_property(self, prop): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_get_property"""
+- * assert self._ctx
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_20get_property[] = "Wraps: mpv_get_property";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("get_property (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_prop));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop) {
+- struct mpv_node __pyx_v_result;
+- char const *__pyx_v_prop_c;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value) {
++ enum mpv_format __pyx_v_format;
++ struct mpv_node __pyx_v_v;
+ int __pyx_v_err;
+- PyObject *__pyx_v_v = NULL;
++ char const *__pyx_v_prop_c;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- char const *__pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
++ enum mpv_format __pyx_t_4;
++ char const *__pyx_t_5;
++ int __pyx_t_6;
+ int __pyx_t_7;
+- int __pyx_t_8;
+- char const *__pyx_t_9;
++ char const *__pyx_t_8;
++ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+- PyObject *__pyx_t_15 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("get_property", 0);
++ __Pyx_RefNannySetupContext("set_option", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":614
+- * def get_property(self, prop):
+- * """Wraps: mpv_get_property"""
++ /* "vidcutter/libs/pympv/mpv.pyx":676
++ * def set_option(self, prop, value=True):
++ * """Wraps: mpv_set_option"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef mpv_node result
+ * prop = _strenc(prop)
++ * cdef mpv_format format = self._format_for(value)
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 614, __pyx_L1_error)
++ __PYX_ERR(0, 676, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":616
++ /* "vidcutter/libs/pympv/mpv.pyx":677
++ * """Wraps: mpv_set_option"""
+ * assert self._ctx
+- * cdef mpv_node result
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+- * cdef const char* prop_c = prop
+- * cdef int err
++ * cdef mpv_format format = self._format_for(value)
++ * cdef mpv_node v = self._prep_native_value(value, format)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -12787,275 +12972,200 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":617
+- * cdef mpv_node result
++ /* "vidcutter/libs/pympv/mpv.pyx":678
++ * assert self._ctx
+ * prop = _strenc(prop)
+- * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
+- * cdef int err
+- * with nogil:
+- */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error)
+- __pyx_v_prop_c = __pyx_t_4;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":619
+- * cdef const char* prop_c = prop
++ * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
++ * cdef mpv_node v = self._prep_native_value(value, format)
+ * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_get_property(
+- * self._ctx,
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_format = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":620
++ /* "vidcutter/libs/pympv/mpv.pyx":679
++ * prop = _strenc(prop)
++ * cdef mpv_format format = self._format_for(value)
++ * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+ * cdef int err
+- * with nogil:
+- * err = mpv_get_property( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * prop_c,
++ * cdef const char* prop_c
+ */
+- __pyx_v_err = mpv_get_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_result));
+- }
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":619
+- * cdef const char* prop_c = prop
++ /* "vidcutter/libs/pympv/mpv.pyx":682
+ * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_get_property(
+- * self._ctx,
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":626
+- * &result,
+- * )
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * try:
++ * cdef const char* prop_c
++ * try: # <<<<<<<<<<<<<<
++ * prop_c = prop
++ * with nogil:
+ */
+- __pyx_t_5 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_5)) {
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":627
+- * )
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":683
++ * cdef const char* prop_c
+ * try:
+- * v = _convert_node_value(result)
++ * prop_c = prop # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_set_option(
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_6 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 627, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L4_error)
++ __pyx_v_prop_c = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":626
+- * &result,
+- * )
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":684
+ * try:
++ * prop_c = prop
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_option(
++ * self._ctx,
+ */
+- }
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":628
+- * if err < 0:
+- * raise MPVError(err)
+- * try: # <<<<<<<<<<<<<<
+- * v = _convert_node_value(result)
+- * finally:
++ /* "vidcutter/libs/pympv/mpv.pyx":685
++ * prop_c = prop
++ * with nogil:
++ * err = mpv_set_option( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * prop_c,
+ */
+- /*try:*/ {
++ __pyx_v_err = mpv_set_option(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":629
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":684
+ * try:
+- * v = _convert_node_value(result) # <<<<<<<<<<<<<<
+- * finally:
+- * with nogil:
++ * prop_c = prop
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_option(
++ * self._ctx,
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L8_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_v = __pyx_t_1;
+- __pyx_t_1 = 0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L8;
++ }
++ __pyx_L8:;
++ }
++ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":631
+- * v = _convert_node_value(result)
++ /* "vidcutter/libs/pympv/mpv.pyx":692
++ * )
+ * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&result)
+- * return v
++ * self._free_native_value(v) # <<<<<<<<<<<<<<
++ * return err
++ *
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":632
+- * finally:
+- * with nogil:
+- * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
+- * return v
+- *
+- */
+- mpv_free_node_contents((&__pyx_v_result));
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":631
+- * v = _convert_node_value(result)
+- * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&result)
+- * return v
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L12;
+- }
+- __pyx_L12:;
+- }
+- }
+- goto __pyx_L9;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ goto __pyx_L5;
+ }
+- __pyx_L8_error:;
++ __pyx_L4_error:;
+ /*exception exit:*/{
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
++ __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
+- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
++ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
++ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
++ __Pyx_XGOTREF(__pyx_t_9);
+ __Pyx_XGOTREF(__pyx_t_10);
+ __Pyx_XGOTREF(__pyx_t_11);
+ __Pyx_XGOTREF(__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_14);
+- __Pyx_XGOTREF(__pyx_t_15);
+- __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
++ __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
+ {
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":632
+- * finally:
+- * with nogil:
+- * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
+- * return v
+- *
+- */
+- mpv_free_node_contents((&__pyx_v_result));
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":631
+- * v = _convert_node_value(result)
+- * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&result)
+- * return v
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L17;
+- }
+- __pyx_L17:;
+- }
+- }
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L10_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_XGIVEREF(__pyx_t_15);
+- __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
++ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+ }
++ __Pyx_XGIVEREF(__pyx_t_9);
+ __Pyx_XGIVEREF(__pyx_t_10);
+ __Pyx_XGIVEREF(__pyx_t_11);
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
+- __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
++ __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
++ __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
++ __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
++ goto __pyx_L1_error;
++ __pyx_L10_error:;
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_12);
++ __Pyx_XGIVEREF(__pyx_t_13);
++ __Pyx_XGIVEREF(__pyx_t_14);
++ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
++ }
++ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
++ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
++ __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+ goto __pyx_L1_error;
+ }
+- __pyx_L9:;
++ __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":633
+- * with nogil:
+- * mpv_free_node_contents(&result)
+- * return v # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":693
++ * finally:
++ * self._free_native_value(v)
++ * return err # <<<<<<<<<<<<<<
+ *
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_v);
+- __pyx_r = __pyx_v_v;
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":612
+- * return default
++ /* "vidcutter/libs/pympv/mpv.pyx":674
+ *
+- * def get_property(self, prop): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_get_property"""
++ * @_errors
++ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_option"""
+ * assert self._ctx
+ */
+
+@@ -13064,1047 +13174,798 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct _
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XDECREF(__pyx_v_prop);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":636
++/* "vidcutter/libs/pympv/mpv.pyx":696
+ *
+ * @_errors
+- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
++ * def initialize(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_initialize"""
+ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_22set_property[] = "Wraps: mpv_set_property and mpv_set_property_async";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_prop = 0;
+- PyObject *__pyx_v_value = 0;
+- PyObject *__pyx_v_asynchronous = 0;
+- PyObject *__pyx_v_data = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_22initialize[] = "Wraps: mpv_initialize";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_property (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
+- PyObject* values[4] = {0,0,0,0};
+- values[1] = ((PyObject *)Py_True);
+- values[2] = ((PyObject *)Py_False);
+- values[3] = ((PyObject *)Py_None);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+- CYTHON_FALLTHROUGH;
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
+- if (value) { values[1] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_asynchronous);
+- if (value) { values[2] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 3:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
+- if (value) { values[3] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 636, __pyx_L3_error)
+- }
+- } else {
+- switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+- CYTHON_FALLTHROUGH;
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- }
+- __pyx_v_prop = values[0];
+- __pyx_v_value = values[1];
+- __pyx_v_asynchronous = values[2];
+- __pyx_v_data = values[3];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_22set_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value, __pyx_v_asynchronous, __pyx_v_data);
++ __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data) {
+- enum mpv_format __pyx_v_format;
+- struct mpv_node __pyx_v_v;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+ int __pyx_v_err;
+- uint64_t __pyx_v_data_id;
+- char const *__pyx_v_prop_c;
+- PyObject *__pyx_v_userdatas = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- enum mpv_format __pyx_t_4;
+- char const *__pyx_t_5;
+- int __pyx_t_6;
+- int __pyx_t_7;
+- Py_hash_t __pyx_t_8;
+- PyObject *__pyx_t_9 = NULL;
+- int __pyx_t_10;
+- PyObject *__pyx_t_11 = NULL;
+- int __pyx_t_12;
+- char const *__pyx_t_13;
+- PyObject *__pyx_t_14 = NULL;
+- PyObject *__pyx_t_15 = NULL;
+- PyObject *__pyx_t_16 = NULL;
+- PyObject *__pyx_t_17 = NULL;
+- PyObject *__pyx_t_18 = NULL;
+- PyObject *__pyx_t_19 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_property", 0);
+- __Pyx_INCREF(__pyx_v_prop);
++ __Pyx_RefNannySetupContext("initialize", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":638
+- * def set_property(self, prop, value=True, asynchronous=False, data=None):
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
++ /* "vidcutter/libs/pympv/mpv.pyx":698
++ * def initialize(self):
++ * """Wraps: mpv_initialize"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value)
++ * cdef int err
++ * with nogil:
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 638, __pyx_L1_error)
++ __PYX_ERR(0, 698, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":639
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
++ /* "vidcutter/libs/pympv/mpv.pyx":700
+ * assert self._ctx
+- * prop = _strenc(prop) # <<<<<<<<<<<<<<
+- * cdef mpv_format format = self._format_for(value)
+- * cdef mpv_node v = self._prep_native_value(value, format)
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_initialize(self._ctx)
++ * return err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+- __pyx_t_1 = 0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":640
+- * assert self._ctx
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
+- * cdef mpv_node v = self._prep_native_value(value, format)
++ /* "vidcutter/libs/pympv/mpv.pyx":701
+ * cdef int err
++ * with nogil:
++ * err = mpv_initialize(self._ctx) # <<<<<<<<<<<<<<
++ * return err
++ *
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_format = __pyx_t_4;
++ __pyx_v_err = mpv_initialize(__pyx_v_self->_ctx);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":641
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value)
+- * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":700
++ * assert self._ctx
+ * cdef int err
+- * cdef uint64_t data_id
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":645
+- * cdef uint64_t data_id
+- * cdef const char* prop_c
+- * try: # <<<<<<<<<<<<<<
+- * prop_c = prop
+- * if not asynchronous:
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_initialize(self._ctx)
++ * return err
+ */
+- /*try:*/ {
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":646
+- * cdef const char* prop_c
+- * try:
+- * prop_c = prop # <<<<<<<<<<<<<<
+- * if not asynchronous:
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":702
++ * with nogil:
++ * err = mpv_initialize(self._ctx)
++ * return err # <<<<<<<<<<<<<<
++ *
++ * def wait_event(self, timeout=None):
+ */
+- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 646, __pyx_L4_error)
+- __pyx_v_prop_c = __pyx_t_5;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":647
+- * try:
+- * prop_c = prop
+- * if not asynchronous: # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_set_property(
++ /* "vidcutter/libs/pympv/mpv.pyx":696
++ *
++ * @_errors
++ * def initialize(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_initialize"""
++ * assert self._ctx
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 647, __pyx_L4_error)
+- __pyx_t_7 = ((!__pyx_t_6) != 0);
+- if (__pyx_t_7) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":648
+- * prop_c = prop
+- * if not asynchronous:
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_property(
+- * self._ctx,
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":649
+- * if not asynchronous:
+- * with nogil:
+- * err = mpv_set_property( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * prop_c,
++/* "vidcutter/libs/pympv/mpv.pyx":704
++ * return err
++ *
++ * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_wait_event"""
++ * assert self._ctx
+ */
+- __pyx_v_err = mpv_set_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":648
+- * prop_c = prop
+- * if not asynchronous:
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_property(
+- * self._ctx,
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L9;
+- }
+- __pyx_L9:;
+- }
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_24wait_event[] = "Wraps: mpv_wait_event";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_timeout = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("wait_event (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};
++ PyObject* values[1] = {0};
++ values[0] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout);
++ if (value) { values[0] = value; kw_args--; }
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 704, __pyx_L3_error)
++ }
++ } else {
++ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
+ }
++ }
++ __pyx_v_timeout = values[0];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 704, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_timeout);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":655
+- * &v
+- * )
+- * return err # <<<<<<<<<<<<<<
+- * data_id = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(data_id, None)
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L3_return;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":647
+- * try:
+- * prop_c = prop
+- * if not asynchronous: # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_set_property(
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout) {
++ double __pyx_v_timeout_d;
++ struct mpv_event *__pyx_v_event;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ double __pyx_t_1;
++ int __pyx_t_2;
++ double __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("wait_event", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":706
++ * def wait_event(self, timeout=None):
++ * """Wraps: mpv_wait_event"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * cdef double timeout_d = timeout if timeout is not None else -1
++ * cdef mpv_event* event
+ */
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 706, __pyx_L1_error)
+ }
++ }
++ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":656
+- * )
+- * return err
+- * data_id = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None:
++ /* "vidcutter/libs/pympv/mpv.pyx":707
++ * """Wraps: mpv_wait_event"""
++ * assert self._ctx
++ * cdef double timeout_d = timeout if timeout is not None else -1 # <<<<<<<<<<<<<<
++ * cdef mpv_event* event
++ * with nogil:
+ */
+- __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 656, __pyx_L4_error)
+- __pyx_v_data_id = ((uint64_t)__pyx_t_8);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":657
+- * return err
+- * data_id = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
+- * if userdatas is None:
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_9 = NULL;
+- __pyx_t_10 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_9)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_9);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- __pyx_t_10 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- {
+- __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_11);
+- if (__pyx_t_9) {
+- __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
+- }
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, Py_None);
+- __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+- }
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_userdatas = __pyx_t_1;
+- __pyx_t_1 = 0;
++ __pyx_t_2 = (__pyx_v_timeout != Py_None);
++ if ((__pyx_t_2 != 0)) {
++ __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
++ __pyx_t_1 = __pyx_t_3;
++ } else {
++ __pyx_t_1 = -1.0;
++ }
++ __pyx_v_timeout_d = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":658
+- * data_id = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
++ /* "vidcutter/libs/pympv/mpv.pyx":709
++ * cdef double timeout_d = timeout if timeout is not None else -1
++ * cdef mpv_event* event
++ * with nogil: # <<<<<<<<<<<<<<
++ * event = mpv_wait_event(self._ctx, timeout_d)
++ * return Event()._init(event, self)
+ */
+- __pyx_t_7 = (__pyx_v_userdatas == Py_None);
+- __pyx_t_6 = (__pyx_t_7 != 0);
+- if (__pyx_t_6) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":659
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None:
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+- * userdatas.add()
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":710
++ * cdef mpv_event* event
++ * with nogil:
++ * event = mpv_wait_event(self._ctx, timeout_d) # <<<<<<<<<<<<<<
++ * return Event()._init(event, self)
++ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_11 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_11)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_11);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++ __pyx_v_event = mpv_wait_event(__pyx_v_self->_ctx, __pyx_v_timeout_d);
+ }
+- __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 659, __pyx_L4_error)
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":658
+- * data_id = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- */
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":660
+- * if userdatas is None:
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add() # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_set_property_async(
++ /* "vidcutter/libs/pympv/mpv.pyx":709
++ * cdef double timeout_d = timeout if timeout is not None else -1
++ * cdef mpv_event* event
++ * with nogil: # <<<<<<<<<<<<<<
++ * event = mpv_wait_event(self._ctx, timeout_d)
++ * return Event()._init(event, self)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_11 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_11)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_11);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
+ }
+- }
+- __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":661
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_property_async(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":711
++ * with nogil:
++ * event = mpv_wait_event(self._ctx, timeout_d)
++ * return Event()._init(event, self) # <<<<<<<<<<<<<<
++ *
++ * def wakeup(self):
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_r = __pyx_t_5;
++ __pyx_t_5 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":662
+- * userdatas.add()
+- * with nogil:
+- * err = mpv_set_property_async( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * data_id,
++ /* "vidcutter/libs/pympv/mpv.pyx":704
++ * return err
++ *
++ * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_wait_event"""
++ * assert self._ctx
+ */
+- __pyx_v_err = mpv_set_property_async(__pyx_v_self->_ctx, __pyx_v_data_id, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":661
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_property_async(
+- * self._ctx,
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L13;
+- }
+- __pyx_L13:;
+- }
+- }
+- }
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":670
+- * )
+- * finally:
+- * self._free_native_value(v) # <<<<<<<<<<<<<<
+- * return err
++/* "vidcutter/libs/pympv/mpv.pyx":713
++ * return Event()._init(event, self)
+ *
++ * def wakeup(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_wakeup"""
++ * assert self._ctx
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- goto __pyx_L5;
+- }
+- __pyx_L4_error:;
+- /*exception exit:*/{
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
+- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
+- __Pyx_XGOTREF(__pyx_t_14);
+- __Pyx_XGOTREF(__pyx_t_15);
+- __Pyx_XGOTREF(__pyx_t_16);
+- __Pyx_XGOTREF(__pyx_t_17);
+- __Pyx_XGOTREF(__pyx_t_18);
+- __Pyx_XGOTREF(__pyx_t_19);
+- __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
+- {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L15_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- }
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_17);
+- __Pyx_XGIVEREF(__pyx_t_18);
+- __Pyx_XGIVEREF(__pyx_t_19);
+- __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
+- }
+- __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_XGIVEREF(__pyx_t_15);
+- __Pyx_XGIVEREF(__pyx_t_16);
+- __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
+- __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
+- __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
+- goto __pyx_L1_error;
+- __pyx_L15_error:;
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_17);
+- __Pyx_XGIVEREF(__pyx_t_18);
+- __Pyx_XGIVEREF(__pyx_t_19);
+- __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
+- }
+- __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+- __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+- __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
+- goto __pyx_L1_error;
+- }
+- __pyx_L3_return: {
+- __pyx_t_19 = __pyx_r;
+- __pyx_r = 0;
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_19;
+- __pyx_t_19 = 0;
+- goto __pyx_L0;
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_26wakeup[] = "Wraps: mpv_wakeup";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("wakeup (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("wakeup", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":715
++ * def wakeup(self):
++ * """Wraps: mpv_wakeup"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_wakeup(self._ctx)
++ */
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 715, __pyx_L1_error)
+ }
+- __pyx_L5:;
+ }
++ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":671
+- * finally:
+- * self._free_native_value(v)
+- * return err # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":716
++ * """Wraps: mpv_wakeup"""
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_wakeup(self._ctx)
+ *
+- * @_errors
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":636
++ /* "vidcutter/libs/pympv/mpv.pyx":717
++ * assert self._ctx
++ * with nogil:
++ * mpv_wakeup(self._ctx) # <<<<<<<<<<<<<<
+ *
+- * @_errors
+- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
++ * def set_wakeup_callback(self, callback):
++ */
++ mpv_wakeup(__pyx_v_self->_ctx);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":716
++ * """Wraps: mpv_wakeup"""
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_wakeup(self._ctx)
++ *
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":713
++ * return Event()._init(event, self)
++ *
++ * def wakeup(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_wakeup"""
+ * assert self._ctx
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_9);
+- __Pyx_XDECREF(__pyx_t_11);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wakeup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_userdatas);
+- __Pyx_XDECREF(__pyx_v_prop);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":674
++/* "vidcutter/libs/pympv/mpv.pyx":719
++ * mpv_wakeup(self._ctx)
+ *
+- * @_errors
+- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_option"""
++ * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_wakeup_callback"""
+ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_24set_option[] = "Wraps: mpv_set_option";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_prop = 0;
+- PyObject *__pyx_v_value = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback[] = "Wraps: mpv_set_wakeup_callback";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_option (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,0};
+- PyObject* values[2] = {0,0};
+- values[1] = ((PyObject *)Py_True);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
+- if (value) { values[1] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 674, __pyx_L3_error)
+- }
+- } else {
+- switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- }
+- __pyx_v_prop = values[0];
+- __pyx_v_value = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 674, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_24set_option(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value);
++ __Pyx_RefNannySetupContext("set_wakeup_callback (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value) {
+- enum mpv_format __pyx_v_format;
+- struct mpv_node __pyx_v_v;
+- int __pyx_v_err;
+- char const *__pyx_v_prop_c;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback) {
++ uint64_t __pyx_v_name;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
++ uint64_t __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+- enum mpv_format __pyx_t_4;
+- char const *__pyx_t_5;
+- int __pyx_t_6;
+- int __pyx_t_7;
+- char const *__pyx_t_8;
+- PyObject *__pyx_t_9 = NULL;
+- PyObject *__pyx_t_10 = NULL;
+- PyObject *__pyx_t_11 = NULL;
+- PyObject *__pyx_t_12 = NULL;
+- PyObject *__pyx_t_13 = NULL;
+- PyObject *__pyx_t_14 = NULL;
++ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_option", 0);
+- __Pyx_INCREF(__pyx_v_prop);
++ __Pyx_RefNannySetupContext("set_wakeup_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":676
+- * def set_option(self, prop, value=True):
+- * """Wraps: mpv_set_option"""
++ /* "vidcutter/libs/pympv/mpv.pyx":721
++ * def set_wakeup_callback(self, callback):
++ * """Wraps: mpv_set_wakeup_callback"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value)
++ * cdef uint64_t name = <uint64_t>id(self)
++ * self.callback = callback
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 676, __pyx_L1_error)
++ __PYX_ERR(0, 721, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":677
+- * """Wraps: mpv_set_option"""
++ /* "vidcutter/libs/pympv/mpv.pyx":722
++ * """Wraps: mpv_set_wakeup_callback"""
+ * assert self._ctx
+- * prop = _strenc(prop) # <<<<<<<<<<<<<<
+- * cdef mpv_format format = self._format_for(value)
+- * cdef mpv_node v = self._prep_native_value(value, format)
++ * cdef uint64_t name = <uint64_t>id(self) # <<<<<<<<<<<<<<
++ * self.callback = callback
++ * self.callbackthread.set(callback)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+- __pyx_t_1 = 0;
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_name = ((uint64_t)__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":678
++ /* "vidcutter/libs/pympv/mpv.pyx":723
+ * assert self._ctx
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
+- * cdef mpv_node v = self._prep_native_value(value, format)
+- * cdef int err
++ * cdef uint64_t name = <uint64_t>id(self)
++ * self.callback = callback # <<<<<<<<<<<<<<
++ * self.callbackthread.set(callback)
++ * with nogil:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(__pyx_v_callback);
++ __Pyx_GIVEREF(__pyx_v_callback);
++ __Pyx_GOTREF(__pyx_v_self->callback);
++ __Pyx_DECREF(__pyx_v_self->callback);
++ __pyx_v_self->callback = __pyx_v_callback;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":724
++ * cdef uint64_t name = <uint64_t>id(self)
++ * self.callback = callback
++ * self.callbackthread.set(callback) # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++ */
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callback);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_format = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":679
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value)
+- * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+- * cdef int err
+- * cdef const char* prop_c
++ /* "vidcutter/libs/pympv/mpv.pyx":725
++ * self.callback = callback
++ * self.callbackthread.set(callback)
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++ *
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":682
+- * cdef int err
+- * cdef const char* prop_c
+- * try: # <<<<<<<<<<<<<<
+- * prop_c = prop
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":726
++ * self.callbackthread.set(callback)
++ * with nogil:
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name) # <<<<<<<<<<<<<<
++ *
++ * def get_wakeup_pipe(self):
+ */
+- /*try:*/ {
++ mpv_set_wakeup_callback(__pyx_v_self->_ctx, __pyx_f_9vidcutter_4libs_3mpv__c_callback, ((void *)__pyx_v_name));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":683
+- * cdef const char* prop_c
+- * try:
+- * prop_c = prop # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_set_option(
++ /* "vidcutter/libs/pympv/mpv.pyx":725
++ * self.callback = callback
++ * self.callbackthread.set(callback)
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++ *
+ */
+- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L4_error)
+- __pyx_v_prop_c = __pyx_t_5;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":684
+- * try:
+- * prop_c = prop
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_option(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":719
++ * mpv_wakeup(self._ctx)
++ *
++ * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_wakeup_callback"""
++ * assert self._ctx
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":685
+- * prop_c = prop
+- * with nogil:
+- * err = mpv_set_option( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * prop_c,
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_wakeup_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":728
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++ *
++ * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_get_wakeup_pipe"""
++ * assert self._ctx
+ */
+- __pyx_v_err = mpv_set_option(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":684
+- * try:
+- * prop_c = prop
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_option(
+- * self._ctx,
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe[] = "Wraps: mpv_get_wakeup_pipe";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("get_wakeup_pipe (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ int __pyx_v_pipe;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("get_wakeup_pipe", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":730
++ * def get_wakeup_pipe(self):
++ * """Wraps: mpv_get_wakeup_pipe"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * cdef int pipe
++ * with nogil:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L8;
+- }
+- __pyx_L8:;
+- }
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 730, __pyx_L1_error)
+ }
+ }
++ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":692
+- * )
+- * finally:
+- * self._free_native_value(v) # <<<<<<<<<<<<<<
+- * return err
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":732
++ * assert self._ctx
++ * cdef int pipe
++ * with nogil: # <<<<<<<<<<<<<<
++ * pipe = mpv_get_wakeup_pipe(self._ctx)
++ * return pipe
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- goto __pyx_L5;
+- }
+- __pyx_L4_error:;
+- /*exception exit:*/{
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
+- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
+- __Pyx_XGOTREF(__pyx_t_9);
+- __Pyx_XGOTREF(__pyx_t_10);
+- __Pyx_XGOTREF(__pyx_t_11);
+- __Pyx_XGOTREF(__pyx_t_12);
+- __Pyx_XGOTREF(__pyx_t_13);
+- __Pyx_XGOTREF(__pyx_t_14);
+- __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
+- {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L10_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- }
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_XGIVEREF(__pyx_t_13);
+- __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":733
++ * cdef int pipe
++ * with nogil:
++ * pipe = mpv_get_wakeup_pipe(self._ctx) # <<<<<<<<<<<<<<
++ * return pipe
++ *
++ */
++ __pyx_v_pipe = mpv_get_wakeup_pipe(__pyx_v_self->_ctx);
+ }
+- __Pyx_XGIVEREF(__pyx_t_9);
+- __Pyx_XGIVEREF(__pyx_t_10);
+- __Pyx_XGIVEREF(__pyx_t_11);
+- __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
+- __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+- __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
+- goto __pyx_L1_error;
+- __pyx_L10_error:;
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_XGIVEREF(__pyx_t_13);
+- __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":732
++ * assert self._ctx
++ * cdef int pipe
++ * with nogil: # <<<<<<<<<<<<<<
++ * pipe = mpv_get_wakeup_pipe(self._ctx)
++ * return pipe
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
+ }
+- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+- goto __pyx_L1_error;
+- }
+- __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":693
+- * finally:
+- * self._free_native_value(v)
+- * return err # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":734
++ * with nogil:
++ * pipe = mpv_get_wakeup_pipe(self._ctx)
++ * return pipe # <<<<<<<<<<<<<<
+ *
+- * @_errors
++ * def __cinit__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":674
++ /* "vidcutter/libs/pympv/mpv.pyx":728
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+ *
+- * @_errors
+- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_option"""
++ * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_get_wakeup_pipe"""
+ * assert self._ctx
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_wakeup_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_prop);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":696
++/* "vidcutter/libs/pympv/mpv.pyx":736
++ * return pipe
+ *
+- * @_errors
+- * def initialize(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_initialize"""
+- * assert self._ctx
++ * def __cinit__(self): # <<<<<<<<<<<<<<
++ * cdef uint64_t ctxid = <uint64_t>id(self)
++ * with nogil:
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_26initialize[] = "Wraps: mpv_initialize";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
++static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_33__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_33__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
++ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
++ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
++ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- int __pyx_v_err;
+- PyObject *__pyx_r = NULL;
++static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ uint64_t __pyx_v_ctxid;
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
++ uint64_t __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("initialize", 0);
++ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":698
+- * def initialize(self):
+- * """Wraps: mpv_initialize"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":737
++ *
++ * def __cinit__(self):
++ * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
+ * with nogil:
++ * self._ctx = mpv_create()
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 698, __pyx_L1_error)
+- }
+- }
+- #endif
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":700
+- * assert self._ctx
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":738
++ * def __cinit__(self):
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_initialize(self._ctx)
+- * return err
++ * self._ctx = mpv_create()
++ * if not self._ctx:
+ */
+ {
+ #ifdef WITH_THREAD
+@@ -14114,22 +13975,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __p
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":701
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":739
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil:
+- * err = mpv_initialize(self._ctx) # <<<<<<<<<<<<<<
+- * return err
+- *
++ * self._ctx = mpv_create() # <<<<<<<<<<<<<<
++ * if not self._ctx:
++ * raise MPVError("Context creation error")
+ */
+- __pyx_v_err = mpv_initialize(__pyx_v_self->_ctx);
++ __pyx_v_self->_ctx = mpv_create();
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":700
+- * assert self._ctx
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":738
++ * def __cinit__(self):
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_initialize(self._ctx)
+- * return err
++ * self._ctx = mpv_create()
++ * if not self._ctx:
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+@@ -14143,66 +14004,200 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __p
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":702
++ /* "vidcutter/libs/pympv/mpv.pyx":740
+ * with nogil:
+- * err = mpv_initialize(self._ctx)
+- * return err # <<<<<<<<<<<<<<
+- *
+- * def wait_event(self, timeout=None):
++ * self._ctx = mpv_create()
++ * if not self._ctx: # <<<<<<<<<<<<<<
++ * raise MPVError("Context creation error")
++ * self.callbackthread = CallbackThread()
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_t_3 = ((!(__pyx_v_self->_ctx != 0)) != 0);
++ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":696
+- *
+- * @_errors
+- * def initialize(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_initialize"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":741
++ * self._ctx = mpv_create()
++ * if not self._ctx:
++ * raise MPVError("Context creation error") # <<<<<<<<<<<<<<
++ * self.callbackthread = CallbackThread()
++ * _callbacks[ctxid] = self.callbackthread
+ */
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Context_creation_error) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Context_creation_error);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(0, 741, __pyx_L1_error)
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ /* "vidcutter/libs/pympv/mpv.pyx":740
++ * with nogil:
++ * self._ctx = mpv_create()
++ * if not self._ctx: # <<<<<<<<<<<<<<
++ * raise MPVError("Context creation error")
++ * self.callbackthread = CallbackThread()
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":742
++ * if not self._ctx:
++ * raise MPVError("Context creation error")
++ * self.callbackthread = CallbackThread() # <<<<<<<<<<<<<<
++ * _callbacks[ctxid] = self.callbackthread
++ * self.reply_userdata = dict()
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->callbackthread);
++ __Pyx_DECREF(__pyx_v_self->callbackthread);
++ __pyx_v_self->callbackthread = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":743
++ * raise MPVError("Context creation error")
++ * self.callbackthread = CallbackThread()
++ * _callbacks[ctxid] = self.callbackthread # <<<<<<<<<<<<<<
++ * self.reply_userdata = dict()
++ * _reply_userdatas[ctxid] = self.reply_userdata
++ */
++ __pyx_t_1 = __pyx_v_self->callbackthread;
++ __Pyx_INCREF(__pyx_t_1);
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":744
++ * self.callbackthread = CallbackThread()
++ * _callbacks[ctxid] = self.callbackthread
++ * self.reply_userdata = dict() # <<<<<<<<<<<<<<
++ * _reply_userdatas[ctxid] = self.reply_userdata
++ * self.callbackthread.start()
++ */
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
++ __Pyx_DECREF(__pyx_v_self->reply_userdata);
++ __pyx_v_self->reply_userdata = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":745
++ * _callbacks[ctxid] = self.callbackthread
++ * self.reply_userdata = dict()
++ * _reply_userdatas[ctxid] = self.reply_userdata # <<<<<<<<<<<<<<
++ * self.callbackthread.start()
++ *
++ */
++ __pyx_t_1 = __pyx_v_self->reply_userdata;
++ __Pyx_INCREF(__pyx_t_1);
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":746
++ * self.reply_userdata = dict()
++ * _reply_userdatas[ctxid] = self.reply_userdata
++ * self.callbackthread.start() # <<<<<<<<<<<<<<
++ *
++ * @_errors
++ */
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":736
++ * return pipe
++ *
++ * def __cinit__(self): # <<<<<<<<<<<<<<
++ * cdef uint64_t ctxid = <uint64_t>id(self)
++ * with nogil:
++ */
++
++ /* function exit code */
++ __pyx_r = 0;
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = -1;
++ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":704
+- * return err
++/* "vidcutter/libs/pympv/mpv.pyx":749
+ *
+- * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_wait_event"""
++ * @_errors
++ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_observe_property"""
+ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_28wait_event[] = "Wraps: mpv_wait_event";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_timeout = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_34observe_property[] = "Wraps: mpv_observe_property";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_prop = 0;
++ PyObject *__pyx_v_data = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("wait_event (wrapper)", 0);
++ __Pyx_RefNannySetupContext("observe_property (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};
+- PyObject* values[1] = {0};
+- values[0] = ((PyObject *)Py_None);
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
++ PyObject* values[2] = {0,0};
++ values[1] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+@@ -14211,117 +14206,291 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event(PyObject *
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout);
+- if (value) { values[0] = value; kw_args--; }
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
++ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 704, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 749, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+- case 0: break;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+- __pyx_v_timeout = values[0];
++ __pyx_v_prop = values[0];
++ __pyx_v_data = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 704, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 749, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_timeout);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout) {
+- double __pyx_v_timeout_d;
+- struct mpv_event *__pyx_v_event;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
++ uint64_t __pyx_v_id_data;
++ PyObject *__pyx_v_userdatas = NULL;
++ char *__pyx_v_propc;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- double __pyx_t_1;
+- int __pyx_t_2;
+- double __pyx_t_3;
++ Py_hash_t __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_t_8;
++ int __pyx_t_9;
++ char *__pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("wait_event", 0);
++ __Pyx_RefNannySetupContext("observe_property", 0);
++ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":706
+- * def wait_event(self, timeout=None):
+- * """Wraps: mpv_wait_event"""
++ /* "vidcutter/libs/pympv/mpv.pyx":751
++ * def observe_property(self, prop, data=None):
++ * """Wraps: mpv_observe_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef double timeout_d = timeout if timeout is not None else -1
+- * cdef mpv_event* event
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * id_data = <uint64_t>hash(data)
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 706, __pyx_L1_error)
++ __PYX_ERR(0, 751, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":707
+- * """Wraps: mpv_wait_event"""
++ /* "vidcutter/libs/pympv/mpv.pyx":752
++ * """Wraps: mpv_observe_property"""
+ * assert self._ctx
+- * cdef double timeout_d = timeout if timeout is not None else -1 # <<<<<<<<<<<<<<
+- * cdef mpv_event* event
+- * with nogil:
++ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
++ * id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
+ */
+- __pyx_t_2 = (__pyx_v_timeout != Py_None);
+- if ((__pyx_t_2 != 0)) {
+- __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
+- __pyx_t_1 = __pyx_t_3;
+- } else {
+- __pyx_t_1 = -1.0;
+- }
+- __pyx_v_timeout_d = __pyx_t_1;
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
++ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":709
+- * cdef double timeout_d = timeout if timeout is not None else -1
+- * cdef mpv_event* event
+- * with nogil: # <<<<<<<<<<<<<<
+- * event = mpv_wait_event(self._ctx, timeout_d)
+- * return Event()._init(event, self)
++ /* "vidcutter/libs/pympv/mpv.pyx":753
++ * assert self._ctx
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None:
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 753, __pyx_L1_error)
++ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":710
+- * cdef mpv_event* event
+- * with nogil:
+- * event = mpv_wait_event(self._ctx, timeout_d) # <<<<<<<<<<<<<<
+- * return Event()._init(event, self)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":754
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ */
+- __pyx_v_event = mpv_wait_event(__pyx_v_self->_ctx, __pyx_v_timeout_d);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":709
+- * cdef double timeout_d = timeout if timeout is not None else -1
+- * cdef mpv_event* event
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ __pyx_t_6 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ __pyx_t_6 = 1;
++ }
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_3)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
++ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
++ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (__pyx_t_5) {
++ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
++ }
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
++ __pyx_t_4 = 0;
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ }
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_v_userdatas = __pyx_t_2;
++ __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":755
++ * id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.observed = True
++ */
++ __pyx_t_8 = (__pyx_v_userdatas == Py_None);
++ __pyx_t_9 = (__pyx_t_8 != 0);
++ if (__pyx_t_9) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":756
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
++ * userdatas.observed = True
++ * prop = _strenc(prop)
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
++ }
++ __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
++ __Pyx_INCREF(__pyx_t_2);
++ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":755
++ * id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.observed = True
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":757
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.observed = True # <<<<<<<<<<<<<<
++ * prop = _strenc(prop)
++ * cdef char* propc = prop
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":758
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.observed = True
++ * prop = _strenc(prop) # <<<<<<<<<<<<<<
++ * cdef char* propc = prop
++ * cdef int err
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
++ }
++ __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_prop);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_2);
++ __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":759
++ * userdatas.observed = True
++ * prop = _strenc(prop)
++ * cdef char* propc = prop # <<<<<<<<<<<<<<
++ * cdef int err
++ * with nogil:
++ */
++ __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
++ __pyx_v_propc = __pyx_t_10;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":761
++ * cdef char* propc = prop
++ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+- * event = mpv_wait_event(self._ctx, timeout_d)
+- * return Event()._init(event, self)
++ * err = mpv_observe_property(
++ * self._ctx,
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":762
++ * cdef int err
++ * with nogil:
++ * err = mpv_observe_property( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * id_data,
++ */
++ __pyx_v_err = mpv_observe_property(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_propc, MPV_FORMAT_NODE);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":761
++ * cdef char* propc = prop
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_observe_property(
++ * self._ctx,
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+@@ -14329,101 +14498,248 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(struct __p
+ __Pyx_FastGIL_Forget();
+ Py_BLOCK_THREADS
+ #endif
+- goto __pyx_L5;
++ goto __pyx_L6;
+ }
+- __pyx_L5:;
++ __pyx_L6:;
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":711
+- * with nogil:
+- * event = mpv_wait_event(self._ctx, timeout_d)
+- * return Event()._init(event, self) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":768
++ * MPV_FORMAT_NODE,
++ * )
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def wakeup(self):
++ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_r = __pyx_t_5;
+- __pyx_t_5 = 0;
++ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_r = __pyx_t_2;
++ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":704
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":749
+ *
+- * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_wait_event"""
++ * @_errors
++ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_observe_property"""
+ * assert self._ctx
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_userdatas);
++ __Pyx_XDECREF(__pyx_v_prop);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":713
+- * return Event()._init(event, self)
++/* "vidcutter/libs/pympv/mpv.pyx":771
+ *
+- * def wakeup(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_wakeup"""
++ * @_errors
++ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_30wakeup[] = "Wraps: mpv_wakeup";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_37unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_36unobserve_property[] = "Wraps: mpv_unobserve_property";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_37unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("wakeup (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("unobserve_property (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_data));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data) {
++ uint64_t __pyx_v_id_data;
++ PyObject *__pyx_v_userdatas = NULL;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
++ Py_hash_t __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_t_8;
++ int __pyx_t_9;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("wakeup", 0);
++ __Pyx_RefNannySetupContext("unobserve_property", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":715
+- * def wakeup(self):
+- * """Wraps: mpv_wakeup"""
++ /* "vidcutter/libs/pympv/mpv.pyx":773
++ * def unobserve_property(self, data):
++ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_wakeup(self._ctx)
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 715, __pyx_L1_error)
++ __PYX_ERR(0, 773, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":716
+- * """Wraps: mpv_wakeup"""
++ /* "vidcutter/libs/pympv/mpv.pyx":774
++ * """Wraps: mpv_unobserve_property"""
++ * assert self._ctx
++ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is not None:
++ */
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
++ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":775
+ * assert self._ctx
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
++ * if userdatas is not None:
++ * userdatas.observed = False
++ */
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ __pyx_t_6 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ __pyx_t_6 = 1;
++ }
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_3)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
++ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
++ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (__pyx_t_5) {
++ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
++ }
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
++ __pyx_t_4 = 0;
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ }
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_v_userdatas = __pyx_t_2;
++ __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":776
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is not None: # <<<<<<<<<<<<<<
++ * userdatas.observed = False
++ * if userdatas.counter <= 0:
++ */
++ __pyx_t_8 = (__pyx_v_userdatas != Py_None);
++ __pyx_t_9 = (__pyx_t_8 != 0);
++ if (__pyx_t_9) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":777
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is not None:
++ * userdatas.observed = False # <<<<<<<<<<<<<<
++ * if userdatas.counter <= 0:
++ * del self.reply_userdata[id_data]
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":778
++ * if userdatas is not None:
++ * userdatas.observed = False
++ * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
++ * del self.reply_userdata[id_data]
++ * cdef int err
++ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (__pyx_t_9) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":779
++ * userdatas.observed = False
++ * if userdatas.counter <= 0:
++ * del self.reply_userdata[id_data] # <<<<<<<<<<<<<<
++ * cdef int err
++ * with nogil:
++ */
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 779, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":778
++ * if userdatas is not None:
++ * userdatas.observed = False
++ * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
++ * del self.reply_userdata[id_data]
++ * cdef int err
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":776
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is not None: # <<<<<<<<<<<<<<
++ * userdatas.observed = False
++ * if userdatas.counter <= 0:
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":781
++ * del self.reply_userdata[id_data]
++ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+- * mpv_wakeup(self._ctx)
+- *
++ * err = mpv_unobserve_property(
++ * self._ctx,
+ */
+ {
+ #ifdef WITH_THREAD
+@@ -14433,22 +14749,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":717
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":782
++ * cdef int err
+ * with nogil:
+- * mpv_wakeup(self._ctx) # <<<<<<<<<<<<<<
+- *
+- * def set_wakeup_callback(self, callback):
++ * err = mpv_unobserve_property( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * id_data,
+ */
+- mpv_wakeup(__pyx_v_self->_ctx);
++ __pyx_v_err = mpv_unobserve_property(__pyx_v_self->_ctx, __pyx_v_id_data);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":716
+- * """Wraps: mpv_wakeup"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":781
++ * del self.reply_userdata[id_data]
++ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+- * mpv_wakeup(self._ctx)
+- *
++ * err = mpv_unobserve_property(
++ * self._ctx,
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+@@ -14456,141 +14772,134 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_o
+ __Pyx_FastGIL_Forget();
+ Py_BLOCK_THREADS
+ #endif
+- goto __pyx_L5;
++ goto __pyx_L7;
+ }
+- __pyx_L5:;
++ __pyx_L7:;
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":713
+- * return Event()._init(event, self)
++ /* "vidcutter/libs/pympv/mpv.pyx":786
++ * id_data,
++ * )
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def wakeup(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_wakeup"""
++ * def shutdown(self):
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":771
++ *
++ * @_errors
++ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wakeup", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.unobserve_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_userdatas);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":719
+- * mpv_wakeup(self._ctx)
++/* "vidcutter/libs/pympv/mpv.pyx":788
++ * return err
+ *
+- * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_wakeup_callback"""
+- * assert self._ctx
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * if self._ctx == NULL:
++ * return
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_33set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback[] = "Wraps: mpv_set_wakeup_callback";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_33set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_wakeup_callback (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
++ __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback) {
+- uint64_t __pyx_v_name;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ uint64_t __pyx_v_ctxid;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- uint64_t __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ uint64_t __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_wakeup_callback", 0);
++ __Pyx_RefNannySetupContext("shutdown", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":721
+- * def set_wakeup_callback(self, callback):
+- * """Wraps: mpv_set_wakeup_callback"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef uint64_t name = <uint64_t>id(self)
+- * self.callback = callback
++ /* "vidcutter/libs/pympv/mpv.pyx":789
++ *
++ * def shutdown(self):
++ * if self._ctx == NULL: # <<<<<<<<<<<<<<
++ * return
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 721, __pyx_L1_error)
+- }
+- }
+- #endif
++ __pyx_t_1 = ((__pyx_v_self->_ctx == NULL) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":722
+- * """Wraps: mpv_set_wakeup_callback"""
+- * assert self._ctx
+- * cdef uint64_t name = <uint64_t>id(self) # <<<<<<<<<<<<<<
+- * self.callback = callback
+- * self.callbackthread.set(callback)
+- */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_name = ((uint64_t)__pyx_t_2);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":723
+- * assert self._ctx
+- * cdef uint64_t name = <uint64_t>id(self)
+- * self.callback = callback # <<<<<<<<<<<<<<
+- * self.callbackthread.set(callback)
++ /* "vidcutter/libs/pympv/mpv.pyx":790
++ * def shutdown(self):
++ * if self._ctx == NULL:
++ * return # <<<<<<<<<<<<<<
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil:
+ */
+- __Pyx_INCREF(__pyx_v_callback);
+- __Pyx_GIVEREF(__pyx_v_callback);
+- __Pyx_GOTREF(__pyx_v_self->callback);
+- __Pyx_DECREF(__pyx_v_self->callback);
+- __pyx_v_self->callback = __pyx_v_callback;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":724
+- * cdef uint64_t name = <uint64_t>id(self)
+- * self.callback = callback
+- * self.callbackthread.set(callback) # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++ /* "vidcutter/libs/pympv/mpv.pyx":789
++ *
++ * def shutdown(self):
++ * if self._ctx == NULL: # <<<<<<<<<<<<<<
++ * return
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+ }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callback);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":725
+- * self.callback = callback
+- * self.callbackthread.set(callback)
++ /* "vidcutter/libs/pympv/mpv.pyx":791
++ * if self._ctx == NULL:
++ * return
++ * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_terminate_destroy(self._ctx)
++ */
++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_ctxid = ((uint64_t)__pyx_t_3);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":792
++ * return
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+- *
++ * mpv_terminate_destroy(self._ctx)
++ * self.callbackthread.shutdown()
+ */
+ {
+ #ifdef WITH_THREAD
+@@ -14600,22 +14909,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(s
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":726
+- * self.callbackthread.set(callback)
++ /* "vidcutter/libs/pympv/mpv.pyx":793
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil:
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name) # <<<<<<<<<<<<<<
+- *
+- * def get_wakeup_pipe(self):
++ * mpv_terminate_destroy(self._ctx) # <<<<<<<<<<<<<<
++ * self.callbackthread.shutdown()
++ * del _callbacks[ctxid]
+ */
+- mpv_set_wakeup_callback(__pyx_v_self->_ctx, __pyx_f_9vidcutter_4libs_3mpv__c_callback, ((void *)__pyx_v_name));
++ mpv_terminate_destroy(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":725
+- * self.callback = callback
+- * self.callbackthread.set(callback)
++ /* "vidcutter/libs/pympv/mpv.pyx":792
++ * return
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+- *
++ * mpv_terminate_destroy(self._ctx)
++ * self.callbackthread.shutdown()
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+@@ -14623,28 +14932,107 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(s
+ __Pyx_FastGIL_Forget();
+ Py_BLOCK_THREADS
+ #endif
+- goto __pyx_L5;
++ goto __pyx_L6;
+ }
+- __pyx_L5:;
++ __pyx_L6:;
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":719
+- * mpv_wakeup(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":794
++ * with nogil:
++ * mpv_terminate_destroy(self._ctx)
++ * self.callbackthread.shutdown() # <<<<<<<<<<<<<<
++ * del _callbacks[ctxid]
++ * del _reply_userdatas[ctxid]
++ */
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
++ }
++ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":795
++ * mpv_terminate_destroy(self._ctx)
++ * self.callbackthread.shutdown()
++ * del _callbacks[ctxid] # <<<<<<<<<<<<<<
++ * del _reply_userdatas[ctxid]
++ * self.callback = None
++ */
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":796
++ * self.callbackthread.shutdown()
++ * del _callbacks[ctxid]
++ * del _reply_userdatas[ctxid] # <<<<<<<<<<<<<<
++ * self.callback = None
++ * self.reply_userdata = None
++ */
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 796, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":797
++ * del _callbacks[ctxid]
++ * del _reply_userdatas[ctxid]
++ * self.callback = None # <<<<<<<<<<<<<<
++ * self.reply_userdata = None
++ * self._ctx = NULL
++ */
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->callback);
++ __Pyx_DECREF(__pyx_v_self->callback);
++ __pyx_v_self->callback = Py_None;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":798
++ * del _reply_userdatas[ctxid]
++ * self.callback = None
++ * self.reply_userdata = None # <<<<<<<<<<<<<<
++ * self._ctx = NULL
+ *
+- * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_wakeup_callback"""
+- * assert self._ctx
++ */
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
++ __Pyx_DECREF(__pyx_v_self->reply_userdata);
++ __pyx_v_self->reply_userdata = Py_None;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":799
++ * self.callback = None
++ * self.reply_userdata = None
++ * self._ctx = NULL # <<<<<<<<<<<<<<
++ *
++ * # def opengl_cb_api(self):
++ */
++ __pyx_v_self->_ctx = NULL;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":788
++ * return err
++ *
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * if self._ctx == NULL:
++ * return
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_wakeup_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -14652,374 +15040,403 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(s
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":728
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++/* "vidcutter/libs/pympv/mpv.pyx":813
++ * # return ctx
++ *
++ * def __dealloc__(self): # <<<<<<<<<<<<<<
++ * self.shutdown()
+ *
+- * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_get_wakeup_pipe"""
+- * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe[] = "Wraps: mpv_get_wakeup_pipe";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
++static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_41__dealloc__(PyObject *__pyx_v_self); /*proto*/
++static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_41__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("get_wakeup_pipe (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
++ __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- int __pyx_v_pipe;
+- PyObject *__pyx_r = NULL;
++static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("get_wakeup_pipe", 0);
++ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":730
+- * def get_wakeup_pipe(self):
+- * """Wraps: mpv_get_wakeup_pipe"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef int pipe
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":814
++ *
++ * def __dealloc__(self):
++ * self.shutdown() # <<<<<<<<<<<<<<
++ *
++ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 730, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- #endif
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":732
+- * assert self._ctx
+- * cdef int pipe
+- * with nogil: # <<<<<<<<<<<<<<
+- * pipe = mpv_get_wakeup_pipe(self._ctx)
+- * return pipe
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":733
+- * cdef int pipe
+- * with nogil:
+- * pipe = mpv_get_wakeup_pipe(self._ctx) # <<<<<<<<<<<<<<
+- * return pipe
++ /* "vidcutter/libs/pympv/mpv.pyx":813
++ * # return ctx
++ *
++ * def __dealloc__(self): # <<<<<<<<<<<<<<
++ * self.shutdown()
+ *
+ */
+- __pyx_v_pipe = mpv_get_wakeup_pipe(__pyx_v_self->_ctx);
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":732
+- * assert self._ctx
+- * cdef int pipe
+- * with nogil: # <<<<<<<<<<<<<<
+- * pipe = mpv_get_wakeup_pipe(self._ctx)
+- * return pipe
++ /* function exit code */
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_L0:;
++ __Pyx_RefNannyFinishContext();
++}
++
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":734
+- * with nogil:
+- * pipe = mpv_get_wakeup_pipe(self._ctx)
+- * return pipe # <<<<<<<<<<<<<<
+- *
+- * def __cinit__(self):
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_42__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(1, 2, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":728
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+- *
+- * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_get_wakeup_pipe"""
+- * assert self._ctx
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_wakeup_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+- __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":736
+- * return pipe
+- *
+- * def __cinit__(self): # <<<<<<<<<<<<<<
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil:
++/* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_37__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_37__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- int __pyx_r;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+- if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+- if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- uint64_t __pyx_v_ctxid;
+- int __pyx_r;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- uint64_t __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__cinit__", 0);
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":737
+- *
+- * def __cinit__(self):
+- * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
+- * with nogil:
+- * self._ctx = mpv_create()
++ /* "(tree fragment)":4
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
++ __PYX_ERR(1, 4, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":738
+- * def __cinit__(self):
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil: # <<<<<<<<<<<<<<
+- * self._ctx = mpv_create()
+- * if not self._ctx:
++ /* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":739
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil:
+- * self._ctx = mpv_create() # <<<<<<<<<<<<<<
+- * if not self._ctx:
+- * raise MPVError("Context creation error")
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":816
++ * self.shutdown()
++ *
++ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
++ * return <void *><intptr_t>(<object>ctx)(name)
++ *
+ */
+- __pyx_v_self->_ctx = mpv_create();
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":738
+- * def __cinit__(self):
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil: # <<<<<<<<<<<<<<
+- * self._ctx = mpv_create()
+- * if not self._ctx:
++static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx, char const *__pyx_v_name) {
++ void *__pyx_r;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ intptr_t __pyx_t_5;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ #ifdef WITH_THREAD
++ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
++ #endif
++ __Pyx_RefNannySetupContext("_c_getprocaddress", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":817
++ *
++ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
++ * return <void *><intptr_t>(<object>ctx)(name) # <<<<<<<<<<<<<<
++ *
++ * cdef void _c_updatecb(void *ctx) with gil:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
++ __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
++ __pyx_t_3 = ((PyObject *)__pyx_v_ctx); __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
+ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_r = ((void *)((intptr_t)__pyx_t_5));
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":740
+- * with nogil:
+- * self._ctx = mpv_create()
+- * if not self._ctx: # <<<<<<<<<<<<<<
+- * raise MPVError("Context creation error")
+- * self.callbackthread = CallbackThread()
++ /* "vidcutter/libs/pympv/mpv.pyx":816
++ * self.shutdown()
++ *
++ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
++ * return <void *><intptr_t>(<object>ctx)(name)
++ *
+ */
+- __pyx_t_3 = ((!(__pyx_v_self->_ctx != 0)) != 0);
+- if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":741
+- * self._ctx = mpv_create()
+- * if not self._ctx:
+- * raise MPVError("Context creation error") # <<<<<<<<<<<<<<
+- * self.callbackthread = CallbackThread()
+- * _callbacks[ctxid] = self.callbackthread
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Context_creation_error) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Context_creation_error);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 741, __pyx_L1_error)
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_getprocaddress", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_RefNannyFinishContext();
++ #ifdef WITH_THREAD
++ __Pyx_PyGILState_Release(__pyx_gilstate_save);
++ #endif
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":740
+- * with nogil:
+- * self._ctx = mpv_create()
+- * if not self._ctx: # <<<<<<<<<<<<<<
+- * raise MPVError("Context creation error")
+- * self.callbackthread = CallbackThread()
++/* "vidcutter/libs/pympv/mpv.pyx":819
++ * return <void *><intptr_t>(<object>ctx)(name)
++ *
++ * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
++ * (<object>ctx)()
++ *
+ */
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":742
+- * if not self._ctx:
+- * raise MPVError("Context creation error")
+- * self.callbackthread = CallbackThread() # <<<<<<<<<<<<<<
+- * _callbacks[ctxid] = self.callbackthread
+- * self.reply_userdata = dict()
++static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ #ifdef WITH_THREAD
++ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
++ #endif
++ __Pyx_RefNannySetupContext("_c_updatecb", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":820
++ *
++ * cdef void _c_updatecb(void *ctx) with gil:
++ * (<object>ctx)() # <<<<<<<<<<<<<<
++ *
++ * # cdef class OpenGLContext(object):
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
++ __pyx_t_2 = ((PyObject *)__pyx_v_ctx); __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->callbackthread);
+- __Pyx_DECREF(__pyx_v_self->callbackthread);
+- __pyx_v_self->callbackthread = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":743
+- * raise MPVError("Context creation error")
+- * self.callbackthread = CallbackThread()
+- * _callbacks[ctxid] = self.callbackthread # <<<<<<<<<<<<<<
+- * self.reply_userdata = dict()
+- * _reply_userdatas[ctxid] = self.reply_userdata
+- */
+- __pyx_t_1 = __pyx_v_self->callbackthread;
+- __Pyx_INCREF(__pyx_t_1);
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":744
+- * self.callbackthread = CallbackThread()
+- * _callbacks[ctxid] = self.callbackthread
+- * self.reply_userdata = dict() # <<<<<<<<<<<<<<
+- * _reply_userdatas[ctxid] = self.reply_userdata
+- * self.callbackthread.start()
++ /* "vidcutter/libs/pympv/mpv.pyx":819
++ * return <void *><intptr_t>(<object>ctx)(name)
++ *
++ * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
++ * (<object>ctx)()
++ *
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+- __Pyx_DECREF(__pyx_v_self->reply_userdata);
+- __pyx_v_self->reply_userdata = __pyx_t_1;
+- __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":745
+- * _callbacks[ctxid] = self.callbackthread
+- * self.reply_userdata = dict()
+- * _reply_userdatas[ctxid] = self.reply_userdata # <<<<<<<<<<<<<<
+- * self.callbackthread.start()
++ /* function exit code */
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_updatecb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_L0:;
++ __Pyx_RefNannyFinishContext();
++ #ifdef WITH_THREAD
++ __Pyx_PyGILState_Release(__pyx_gilstate_save);
++ #endif
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":886
++ * object owned
+ *
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * self.owned = []
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ */
+- __pyx_t_1 = __pyx_v_self->reply_userdata;
+- __Pyx_INCREF(__pyx_t_1);
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":746
+- * self.reply_userdata = dict()
+- * _reply_userdatas[ctxid] = self.reply_userdata
+- * self.callbackthread.start() # <<<<<<<<<<<<<<
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
++ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
++ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__init__", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":887
++ *
++ * def __init__(self):
++ * self.owned = [] # <<<<<<<<<<<<<<
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+- * @_errors
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->owned);
++ __Pyx_DECREF(__pyx_v_self->owned);
++ __pyx_v_self->owned = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":736
+- * return pipe
++ /* "vidcutter/libs/pympv/mpv.pyx":888
++ * def __init__(self):
++ * self.owned = []
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
+ *
+- * def __cinit__(self): # <<<<<<<<<<<<<<
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil:
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
++ */
++ (__pyx_v_self->params[0]).type = MPV_RENDER_PARAM_INVALID;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":886
++ * object owned
++ *
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * self.owned = []
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ */
+
+ /* function exit code */
+@@ -15027,1094 +15444,479 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(struct __pyx_obj_
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":749
++/* "vidcutter/libs/pympv/mpv.pyx":890
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+- * @_errors
+- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_observe_property"""
+- * assert self._ctx
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS:
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_38observe_property[] = "Wraps: mpv_observe_property";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_prop = 0;
+- PyObject *__pyx_v_data = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("observe_property (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
+- PyObject* values[2] = {0,0};
+- values[1] = ((PyObject *)Py_None);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
+- if (value) { values[1] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 749, __pyx_L3_error)
+- }
+- } else {
+- switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- }
+- __pyx_v_prop = values[0];
+- __pyx_v_data = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 749, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_38observe_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
+- uint64_t __pyx_v_id_data;
+- PyObject *__pyx_v_userdatas = NULL;
+- char *__pyx_v_propc;
+- int __pyx_v_err;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, void *__pyx_v_p, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args) {
++ int __pyx_v_owned = ((int)0);
++ PyObject *__pyx_v_count = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- Py_hash_t __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_1 = NULL;
++ Py_ssize_t __pyx_t_2;
++ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+- int __pyx_t_9;
+- char *__pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("observe_property", 0);
+- __Pyx_INCREF(__pyx_v_prop);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":751
+- * def observe_property(self, prop, data=None):
+- * """Wraps: mpv_observe_property"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * id_data = <uint64_t>hash(data)
+- */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 751, __pyx_L1_error)
++ __Pyx_RefNannySetupContext("add_voidp", 0);
++ if (__pyx_optional_args) {
++ if (__pyx_optional_args->__pyx_n > 0) {
++ __pyx_v_owned = __pyx_optional_args->owned;
+ }
+ }
+- #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":752
+- * """Wraps: mpv_observe_property"""
+- * assert self._ctx
+- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+- * id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
++ /* "vidcutter/libs/pympv/mpv.pyx":891
++ *
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
++ * count = len(self.owned) # <<<<<<<<<<<<<<
++ * if count >= MAX_RENDER_PARAMS:
++ * if owned:
+ */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
+- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
++ __pyx_t_1 = __pyx_v_self->owned;
++ __Pyx_INCREF(__pyx_t_1);
++ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 891, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_count = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":753
+- * assert self._ctx
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None:
++ /* "vidcutter/libs/pympv/mpv.pyx":892
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
++ * if owned:
++ * free(p)
+ */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 753, __pyx_L1_error)
+- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
++ __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":754
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ /* "vidcutter/libs/pympv/mpv.pyx":893
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS:
++ * if owned: # <<<<<<<<<<<<<<
++ * free(p)
++ * raise PyMPVError("RenderParams overflow")
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- __pyx_t_6 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- __pyx_t_6 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_3)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
+- {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (__pyx_t_5) {
+- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+- }
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+- __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- }
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_v_userdatas = __pyx_t_2;
+- __pyx_t_2 = 0;
++ __pyx_t_3 = (__pyx_v_owned != 0);
++ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":755
+- * id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.observed = True
++ /* "vidcutter/libs/pympv/mpv.pyx":894
++ * if count >= MAX_RENDER_PARAMS:
++ * if owned:
++ * free(p) # <<<<<<<<<<<<<<
++ * raise PyMPVError("RenderParams overflow")
++ *
+ */
+- __pyx_t_8 = (__pyx_v_userdatas == Py_None);
+- __pyx_t_9 = (__pyx_t_8 != 0);
+- if (__pyx_t_9) {
++ free(__pyx_v_p);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":756
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+- * userdatas.observed = True
+- * prop = _strenc(prop)
++ /* "vidcutter/libs/pympv/mpv.pyx":893
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS:
++ * if owned: # <<<<<<<<<<<<<<
++ * free(p)
++ * raise PyMPVError("RenderParams overflow")
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+ }
+- __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
+- __Pyx_INCREF(__pyx_t_2);
+- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":755
+- * id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.observed = True
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":757
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.observed = True # <<<<<<<<<<<<<<
+- * prop = _strenc(prop)
+- * cdef char* propc = prop
+- */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":758
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.observed = True
+- * prop = _strenc(prop) # <<<<<<<<<<<<<<
+- * cdef char* propc = prop
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":895
++ * if owned:
++ * free(p)
++ * raise PyMPVError("RenderParams overflow") # <<<<<<<<<<<<<<
++ *
++ * self.params[count].type = t
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
+ }
+- }
+- __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_prop);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_2);
+- __pyx_t_2 = 0;
++ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_RenderParams_overflow) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_RenderParams_overflow);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(0, 895, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":759
+- * userdatas.observed = True
+- * prop = _strenc(prop)
+- * cdef char* propc = prop # <<<<<<<<<<<<<<
+- * cdef int err
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":892
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
++ * if owned:
++ * free(p)
+ */
+- __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
+- __pyx_v_propc = __pyx_t_10;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":761
+- * cdef char* propc = prop
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_observe_property(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":897
++ * raise PyMPVError("RenderParams overflow")
++ *
++ * self.params[count].type = t # <<<<<<<<<<<<<<
++ * self.params[count].data = p
++ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error)
++ (__pyx_v_self->params[__pyx_t_2]).type = __pyx_v_t;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":762
+- * cdef int err
+- * with nogil:
+- * err = mpv_observe_property( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * id_data,
++ /* "vidcutter/libs/pympv/mpv.pyx":898
++ *
++ * self.params[count].type = t
++ * self.params[count].data = p # <<<<<<<<<<<<<<
++ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
++ * self.owned.append(owned)
+ */
+- __pyx_v_err = mpv_observe_property(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_propc, MPV_FORMAT_NODE);
+- }
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error)
++ (__pyx_v_self->params[__pyx_t_2]).data = __pyx_v_p;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":761
+- * cdef char* propc = prop
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_observe_property(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":899
++ * self.params[count].type = t
++ * self.params[count].data = p
++ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
++ * self.owned.append(owned)
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+- }
++ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ (__pyx_v_self->params[__pyx_t_2]).type = MPV_RENDER_PARAM_INVALID;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":768
+- * MPV_FORMAT_NODE,
+- * )
+- * return err # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":900
++ * self.params[count].data = p
++ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
++ * self.owned.append(owned) # <<<<<<<<<<<<<<
+ *
+- * @_errors
++ * cdef add_int(self, mpv_render_param_type t, int val):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_r = __pyx_t_2;
+- __pyx_t_2 = 0;
+- goto __pyx_L0;
++ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 900, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":749
++ /* "vidcutter/libs/pympv/mpv.pyx":890
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+- * @_errors
+- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_observe_property"""
+- * assert self._ctx
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS:
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_voidp", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_userdatas);
+- __Pyx_XDECREF(__pyx_v_prop);
++ __Pyx_XDECREF(__pyx_v_count);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":771
++/* "vidcutter/libs/pympv/mpv.pyx":902
++ * self.owned.append(owned)
+ *
+- * @_errors
+- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_unobserve_property"""
+- * assert self._ctx
++ * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
++ * cdef int *p = <int *>malloc(sizeof(int))
++ * p[0] = val
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_41unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_40unobserve_property[] = "Wraps: mpv_unobserve_property";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_41unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("unobserve_property (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_40unobserve_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_data));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_40unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data) {
+- uint64_t __pyx_v_id_data;
+- PyObject *__pyx_v_userdatas = NULL;
+- int __pyx_v_err;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, int __pyx_v_val) {
++ int *__pyx_v_p;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- Py_hash_t __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+- int __pyx_t_9;
++ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("unobserve_property", 0);
++ __Pyx_RefNannySetupContext("add_int", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":773
+- * def unobserve_property(self, data):
+- * """Wraps: mpv_unobserve_property"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
++ /* "vidcutter/libs/pympv/mpv.pyx":903
++ *
++ * cdef add_int(self, mpv_render_param_type t, int val):
++ * cdef int *p = <int *>malloc(sizeof(int)) # <<<<<<<<<<<<<<
++ * p[0] = val
++ * self.add_voidp(t, p)
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 773, __pyx_L1_error)
+- }
+- }
+- #endif
++ __pyx_v_p = ((int *)malloc((sizeof(int))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":774
+- * """Wraps: mpv_unobserve_property"""
+- * assert self._ctx
+- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is not None:
+- */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
+- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":775
+- * assert self._ctx
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+- * if userdatas is not None:
+- * userdatas.observed = False
+- */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- __pyx_t_6 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- __pyx_t_6 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_3)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
+- {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (__pyx_t_5) {
+- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+- }
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+- __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- }
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_v_userdatas = __pyx_t_2;
+- __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":776
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is not None: # <<<<<<<<<<<<<<
+- * userdatas.observed = False
+- * if userdatas.counter <= 0:
+- */
+- __pyx_t_8 = (__pyx_v_userdatas != Py_None);
+- __pyx_t_9 = (__pyx_t_8 != 0);
+- if (__pyx_t_9) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":777
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is not None:
+- * userdatas.observed = False # <<<<<<<<<<<<<<
+- * if userdatas.counter <= 0:
+- * del self.reply_userdata[id_data]
+- */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":778
+- * if userdatas is not None:
+- * userdatas.observed = False
+- * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
+- * del self.reply_userdata[id_data]
+- * cdef int err
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 778, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__pyx_t_9) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":779
+- * userdatas.observed = False
+- * if userdatas.counter <= 0:
+- * del self.reply_userdata[id_data] # <<<<<<<<<<<<<<
+- * cdef int err
+- * with nogil:
+- */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 779, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":778
+- * if userdatas is not None:
+- * userdatas.observed = False
+- * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
+- * del self.reply_userdata[id_data]
+- * cdef int err
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":776
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is not None: # <<<<<<<<<<<<<<
+- * userdatas.observed = False
+- * if userdatas.counter <= 0:
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":781
+- * del self.reply_userdata[id_data]
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_unobserve_property(
+- * self._ctx,
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":782
+- * cdef int err
+- * with nogil:
+- * err = mpv_unobserve_property( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * id_data,
+- */
+- __pyx_v_err = mpv_unobserve_property(__pyx_v_self->_ctx, __pyx_v_id_data);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":781
+- * del self.reply_userdata[id_data]
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_unobserve_property(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":904
++ * cdef add_int(self, mpv_render_param_type t, int val):
++ * cdef int *p = <int *>malloc(sizeof(int))
++ * p[0] = val # <<<<<<<<<<<<<<
++ * self.add_voidp(t, p)
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L7;
+- }
+- __pyx_L7:;
+- }
+- }
++ (__pyx_v_p[0]) = __pyx_v_val;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":786
+- * id_data,
+- * )
+- * return err # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":905
++ * cdef int *p = <int *>malloc(sizeof(int))
++ * p[0] = val
++ * self.add_voidp(t, p) # <<<<<<<<<<<<<<
+ *
+- * def shutdown(self):
++ * cdef add_string(self, mpv_render_param_type t, char *s):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":771
++ /* "vidcutter/libs/pympv/mpv.pyx":902
++ * self.owned.append(owned)
+ *
+- * @_errors
+- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_unobserve_property"""
+- * assert self._ctx
++ * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
++ * cdef int *p = <int *>malloc(sizeof(int))
++ * p[0] = val
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.unobserve_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_userdatas);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":788
+- * return err
++/* "vidcutter/libs/pympv/mpv.pyx":907
++ * self.add_voidp(t, p)
+ *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * if self._ctx == NULL:
+- * return
++ * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
++ * cdef char *p = <char *>malloc(strlen(s) + 1)
++ * strcpy(p, s)
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_42shutdown(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- uint64_t __pyx_v_ctxid;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, char *__pyx_v_s) {
++ char *__pyx_v_p;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- uint64_t __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("shutdown", 0);
++ __Pyx_RefNannySetupContext("add_string", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":789
++ /* "vidcutter/libs/pympv/mpv.pyx":908
+ *
+- * def shutdown(self):
+- * if self._ctx == NULL: # <<<<<<<<<<<<<<
+- * return
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- */
+- __pyx_t_1 = ((__pyx_v_self->_ctx == NULL) != 0);
+- if (__pyx_t_1) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":790
+- * def shutdown(self):
+- * if self._ctx == NULL:
+- * return # <<<<<<<<<<<<<<
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil:
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":789
+- *
+- * def shutdown(self):
+- * if self._ctx == NULL: # <<<<<<<<<<<<<<
+- * return
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":791
+- * if self._ctx == NULL:
+- * return
+- * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_terminate_destroy(self._ctx)
+- */
+- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_ctxid = ((uint64_t)__pyx_t_3);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":792
+- * return
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_terminate_destroy(self._ctx)
+- * self.callbackthread.shutdown()
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":793
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil:
+- * mpv_terminate_destroy(self._ctx) # <<<<<<<<<<<<<<
+- * self.callbackthread.shutdown()
+- * del _callbacks[ctxid]
+- */
+- mpv_terminate_destroy(__pyx_v_self->_ctx);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":792
+- * return
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_terminate_destroy(self._ctx)
+- * self.callbackthread.shutdown()
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":794
+- * with nogil:
+- * mpv_terminate_destroy(self._ctx)
+- * self.callbackthread.shutdown() # <<<<<<<<<<<<<<
+- * del _callbacks[ctxid]
+- * del _reply_userdatas[ctxid]
+- */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":795
+- * mpv_terminate_destroy(self._ctx)
+- * self.callbackthread.shutdown()
+- * del _callbacks[ctxid] # <<<<<<<<<<<<<<
+- * del _reply_userdatas[ctxid]
+- * self.callback = None
+- */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":796
+- * self.callbackthread.shutdown()
+- * del _callbacks[ctxid]
+- * del _reply_userdatas[ctxid] # <<<<<<<<<<<<<<
+- * self.callback = None
+- * self.reply_userdata = None
+- */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 796, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":797
+- * del _callbacks[ctxid]
+- * del _reply_userdatas[ctxid]
+- * self.callback = None # <<<<<<<<<<<<<<
+- * self.reply_userdata = None
+- * self._ctx = NULL
++ * cdef add_string(self, mpv_render_param_type t, char *s):
++ * cdef char *p = <char *>malloc(strlen(s) + 1) # <<<<<<<<<<<<<<
++ * strcpy(p, s)
++ * self.add_voidp(t, p)
+ */
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->callback);
+- __Pyx_DECREF(__pyx_v_self->callback);
+- __pyx_v_self->callback = Py_None;
++ __pyx_v_p = ((char *)malloc((strlen(__pyx_v_s) + 1)));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":798
+- * del _reply_userdatas[ctxid]
+- * self.callback = None
+- * self.reply_userdata = None # <<<<<<<<<<<<<<
+- * self._ctx = NULL
++ /* "vidcutter/libs/pympv/mpv.pyx":909
++ * cdef add_string(self, mpv_render_param_type t, char *s):
++ * cdef char *p = <char *>malloc(strlen(s) + 1)
++ * strcpy(p, s) # <<<<<<<<<<<<<<
++ * self.add_voidp(t, p)
+ *
+ */
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+- __Pyx_DECREF(__pyx_v_self->reply_userdata);
+- __pyx_v_self->reply_userdata = Py_None;
++ (void)(strcpy(__pyx_v_p, __pyx_v_s));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":799
+- * self.callback = None
+- * self.reply_userdata = None
+- * self._ctx = NULL # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":910
++ * cdef char *p = <char *>malloc(strlen(s) + 1)
++ * strcpy(p, s)
++ * self.add_voidp(t, p) # <<<<<<<<<<<<<<
+ *
+- * def opengl_cb_api(self):
++ * def __dealloc__(self):
+ */
+- __pyx_v_self->_ctx = NULL;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":788
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":907
++ * self.add_voidp(t, p)
+ *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * if self._ctx == NULL:
+- * return
++ * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
++ * cdef char *p = <char *>malloc(strlen(s) + 1)
++ * strcpy(p, s)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":801
+- * self._ctx = NULL
+- *
+- * def opengl_cb_api(self): # <<<<<<<<<<<<<<
+- * cdef void *cb
++/* "vidcutter/libs/pympv/mpv.pyx":912
++ * self.add_voidp(t, p)
+ *
++ * def __dealloc__(self): # <<<<<<<<<<<<<<
++ * for i, j in enumerate(self.owned):
++ * if j:
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45opengl_cb_api(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45opengl_cb_api(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
++static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
++static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("opengl_cb_api (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_44opengl_cb_api(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
++ __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44opengl_cb_api(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- void *__pyx_v__ctx;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_ctx = NULL;
+- PyObject *__pyx_r = NULL;
++static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
++ PyObject *__pyx_v_i = NULL;
++ PyObject *__pyx_v_j = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
++ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
++ Py_ssize_t __pyx_t_3;
++ PyObject *(*__pyx_t_4)(PyObject *);
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
++ Py_ssize_t __pyx_t_7;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("opengl_cb_api", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":804
+- * cdef void *cb
+- *
+- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB) # <<<<<<<<<<<<<<
+- * if not _ctx:
+- * raise MPVError("OpenGL API not available")
+- */
+- __pyx_v__ctx = mpv_get_sub_api(__pyx_v_self->_ctx, MPV_SUB_API_OPENGL_CB);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":805
+- *
+- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
+- * if not _ctx: # <<<<<<<<<<<<<<
+- * raise MPVError("OpenGL API not available")
+- *
+- */
+- __pyx_t_1 = ((!(__pyx_v__ctx != 0)) != 0);
+- if (unlikely(__pyx_t_1)) {
++ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":806
+- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
+- * if not _ctx:
+- * raise MPVError("OpenGL API not available") # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":913
+ *
+- * ctx = OpenGLContext()
++ * def __dealloc__(self):
++ * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
++ * if j:
++ * free(self.params[i].data)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 806, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_INCREF(__pyx_int_0);
++ __pyx_t_1 = __pyx_int_0;
++ if (likely(PyList_CheckExact(__pyx_v_self->owned)) || PyTuple_CheckExact(__pyx_v_self->owned)) {
++ __pyx_t_2 = __pyx_v_self->owned; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_OpenGL_API_not_available) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_OpenGL_API_not_available);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error)
++ } else {
++ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 806, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":805
+- *
+- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
+- * if not _ctx: # <<<<<<<<<<<<<<
+- * raise MPVError("OpenGL API not available")
+- *
+- */
++ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error)
+ }
++ for (;;) {
++ if (likely(!__pyx_t_4)) {
++ if (likely(PyList_CheckExact(__pyx_t_2))) {
++ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
++ #else
++ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ #endif
++ } else {
++ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
++ #else
++ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ #endif
++ }
++ } else {
++ __pyx_t_5 = __pyx_t_4(__pyx_t_2);
++ if (unlikely(!__pyx_t_5)) {
++ PyObject* exc_type = PyErr_Occurred();
++ if (exc_type) {
++ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
++ else __PYX_ERR(0, 913, __pyx_L1_error)
++ }
++ break;
++ }
++ __Pyx_GOTREF(__pyx_t_5);
++ }
++ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_5);
++ __pyx_t_5 = 0;
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
++ __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_1);
++ __pyx_t_1 = __pyx_t_5;
++ __pyx_t_5 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":808
+- * raise MPVError("OpenGL API not available")
+- *
+- * ctx = OpenGLContext() # <<<<<<<<<<<<<<
+- * ctx._ctx = <mpv_opengl_cb_context*>_ctx
+- *
+- */
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_OpenGLContext)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_v_ctx = ((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_t_2);
+- __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":809
+- *
+- * ctx = OpenGLContext()
+- * ctx._ctx = <mpv_opengl_cb_context*>_ctx # <<<<<<<<<<<<<<
+- *
+- * return ctx
+- */
+- __pyx_v_ctx->_ctx = ((struct mpv_opengl_cb_context *)__pyx_v__ctx);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":811
+- * ctx._ctx = <mpv_opengl_cb_context*>_ctx
+- *
+- * return ctx # <<<<<<<<<<<<<<
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":914
+ * def __dealloc__(self):
++ * for i, j in enumerate(self.owned):
++ * if j: # <<<<<<<<<<<<<<
++ * free(self.params[i].data)
++ *
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
+- __pyx_r = ((PyObject *)__pyx_v_ctx);
+- goto __pyx_L0;
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 914, __pyx_L1_error)
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":801
+- * self._ctx = NULL
+- *
+- * def opengl_cb_api(self): # <<<<<<<<<<<<<<
+- * cdef void *cb
++ /* "vidcutter/libs/pympv/mpv.pyx":915
++ * for i, j in enumerate(self.owned):
++ * if j:
++ * free(self.params[i].data) # <<<<<<<<<<<<<<
+ *
++ * cdef void *get_pointer(const char *name, object obj):
+ */
++ __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
++ free((__pyx_v_self->params[__pyx_t_7]).data);
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.opengl_cb_api", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF((PyObject *)__pyx_v_ctx);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":813
+- * return ctx
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.shutdown()
++ /* "vidcutter/libs/pympv/mpv.pyx":914
++ * def __dealloc__(self):
++ * for i, j in enumerate(self.owned):
++ * if j: # <<<<<<<<<<<<<<
++ * free(self.params[i].data)
+ *
+ */
++ }
+
+-/* Python wrapper */
+-static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_47__dealloc__(PyObject *__pyx_v_self); /*proto*/
+-static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_47__dealloc__(PyObject *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+- __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+-}
+-
+-static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__dealloc__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":814
++ /* "vidcutter/libs/pympv/mpv.pyx":913
+ *
+ * def __dealloc__(self):
+- * self.shutdown() # <<<<<<<<<<<<<<
+- *
+- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
++ * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
++ * if j:
++ * free(self.params[i].data)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":813
+- * return ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":912
++ * self.add_voidp(t, p)
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.shutdown()
+- *
++ * for i, j in enumerate(self.owned):
++ * if j:
+ */
+
+ /* function exit code */
+@@ -16122,32 +15924,34 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(struct __pyx_o
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv._RenderParams.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_i);
++ __Pyx_XDECREF(__pyx_v_j);
+ __Pyx_RefNannyFinishContext();
+ }
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_49__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_49__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+@@ -16158,11 +15962,11 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYT
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
++ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+@@ -16170,14 +15974,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYT
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+@@ -16186,25 +15990,25 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYT
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_51__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_51__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+@@ -16214,11 +16018,11 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(C
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
++ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+@@ -16226,2675 +16030,2187 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(C
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":816
+- * self.shutdown()
+- *
+- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
+- * return <void *><intptr_t>(<object>ctx)(name)
++/* "vidcutter/libs/pympv/mpv.pyx":917
++ * free(self.params[i].data)
+ *
++ * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
++ * cdef void *p
++ * if PyCapsule_IsValid(obj, name):
+ */
+
+-static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx, char const *__pyx_v_name) {
++static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name, PyObject *__pyx_v_obj) {
++ void *__pyx_v_p;
+ void *__pyx_r;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_1;
++ void *__pyx_t_2;
++ int __pyx_t_3;
++ int __pyx_t_4;
+ intptr_t __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
++ PyObject *__pyx_t_9 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- #ifdef WITH_THREAD
+- PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
+- #endif
+- __Pyx_RefNannySetupContext("_c_getprocaddress", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":817
+- *
+- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
+- * return <void *><intptr_t>(<object>ctx)(name) # <<<<<<<<<<<<<<
+- *
+- * cdef void _c_updatecb(void *ctx) with gil:
+- */
+- __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
+- __pyx_t_3 = ((PyObject *)__pyx_v_ctx); __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_r = ((void *)((intptr_t)__pyx_t_5));
+- goto __pyx_L0;
++ __Pyx_RefNannySetupContext("get_pointer", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":816
+- * self.shutdown()
+- *
+- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
+- * return <void *><intptr_t>(<object>ctx)(name)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":919
++ * cdef void *get_pointer(const char *name, object obj):
++ * cdef void *p
++ * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
++ * p = PyCapsule_GetPointer(obj, name)
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+ */
++ __pyx_t_1 = (PyCapsule_IsValid(__pyx_v_obj, __pyx_v_name) != 0);
++ if (__pyx_t_1) {
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_getprocaddress", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+- #ifdef WITH_THREAD
+- __Pyx_PyGILState_Release(__pyx_gilstate_save);
+- #endif
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":920
++ * cdef void *p
++ * if PyCapsule_IsValid(obj, name):
++ * p = PyCapsule_GetPointer(obj, name) # <<<<<<<<<<<<<<
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
++ * p = <void *><intptr_t>obj
++ */
++ __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error)
++ __pyx_v_p = __pyx_t_2;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":819
+- * return <void *><intptr_t>(<object>ctx)(name)
+- *
+- * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
+- * (<object>ctx)()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":919
++ * cdef void *get_pointer(const char *name, object obj):
++ * cdef void *p
++ * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
++ * p = PyCapsule_GetPointer(obj, name)
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+ */
++ goto __pyx_L3;
++ }
+
+-static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- #ifdef WITH_THREAD
+- PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
+- #endif
+- __Pyx_RefNannySetupContext("_c_updatecb", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":921
++ * if PyCapsule_IsValid(obj, name):
++ * p = PyCapsule_GetPointer(obj, name)
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
++ * p = <void *><intptr_t>obj
++ * else:
++ */
++ __pyx_t_3 = PyInt_Check(__pyx_v_obj);
++ __pyx_t_4 = (__pyx_t_3 != 0);
++ if (!__pyx_t_4) {
++ } else {
++ __pyx_t_1 = __pyx_t_4;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_4 = PyLong_Check(__pyx_v_obj);
++ __pyx_t_3 = (__pyx_t_4 != 0);
++ if (__pyx_t_3) {
++ } else {
++ __pyx_t_1 = __pyx_t_3;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
++ __pyx_t_1 = __pyx_t_3;
++ __pyx_L4_bool_binop_done:;
++ if (likely(__pyx_t_1)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":820
+- *
+- * cdef void _c_updatecb(void *ctx) with gil:
+- * (<object>ctx)() # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":922
++ * p = PyCapsule_GetPointer(obj, name)
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
++ * p = <void *><intptr_t>obj # <<<<<<<<<<<<<<
++ * else:
++ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
++ */
++ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
++ __pyx_v_p = ((void *)((intptr_t)__pyx_t_5));
++
++ /* "vidcutter/libs/pympv/mpv.pyx":921
++ * if PyCapsule_IsValid(obj, name):
++ * p = PyCapsule_GetPointer(obj, name)
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
++ * p = <void *><intptr_t>obj
++ * else:
++ */
++ goto __pyx_L3;
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":924
++ * p = <void *><intptr_t>obj
++ * else:
++ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj) # <<<<<<<<<<<<<<
++ * return p
+ *
+- * cdef class OpenGLContext(object):
+ */
+- __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
+- __pyx_t_2 = ((PyObject *)__pyx_v_ctx); __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ /*else*/ {
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_8);
++ __pyx_t_9 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_9)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_9);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
+ }
++ __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
++ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 924, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __PYX_ERR(0, 924, __pyx_L1_error)
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":819
+- * return <void *><intptr_t>(<object>ctx)(name)
+- *
+- * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
+- * (<object>ctx)()
++ /* "vidcutter/libs/pympv/mpv.pyx":925
++ * else:
++ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
++ * return p # <<<<<<<<<<<<<<
+ *
++ * @cython.internal
+ */
+-
+- /* function exit code */
++ __pyx_r = __pyx_v_p;
+ goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_updatecb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+- #ifdef WITH_THREAD
+- __Pyx_PyGILState_Release(__pyx_gilstate_save);
+- #endif
+-}
+
+-/* "vidcutter/libs/pympv/mpv.pyx":828
+- * object update_cb
++ /* "vidcutter/libs/pympv/mpv.pyx":917
++ * free(self.params[i].data)
+ *
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * self.inited = False
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
++ * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
++ * cdef void *p
++ * if PyCapsule_IsValid(obj, name):
+ */
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+- if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
+-
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_XDECREF(__pyx_t_9);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.get_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_r = 0;
++ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
+- int __pyx_r;
++/* "vidcutter/libs/pympv/mpv.pyx":929
++ * @cython.internal
++ * cdef class RenderFrameInfo(object):
++ * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
++ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ */
++
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, struct mpv_render_frame_info *__pyx_v_info) {
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
++ int __pyx_t_2;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
++ __Pyx_RefNannySetupContext("_from_struct", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":829
+- *
+- * def __init__(self):
+- * self.inited = False # <<<<<<<<<<<<<<
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":930
++ * cdef class RenderFrameInfo(object):
++ * cdef _from_struct(self, mpv_render_frame_info *info):
++ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT) # <<<<<<<<<<<<<<
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+ */
+- __pyx_v_self->inited = 0;
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":830
+- * def __init__(self):
+- * self.inited = False
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning) # <<<<<<<<<<<<<<
+- *
+- * def init_gl(self, exts, get_proc_address):
++ /* "vidcutter/libs/pympv/mpv.pyx":931
++ * cdef _from_struct(self, mpv_render_frame_info *info):
++ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW) # <<<<<<<<<<<<<<
++ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
++ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 931, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":828
+- * object update_cb
+- *
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * self.inited = False
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
++ /* "vidcutter/libs/pympv/mpv.pyx":932
++ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT) # <<<<<<<<<<<<<<
++ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
++ * self.target_time = info[0].target_time
+ */
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* function exit code */
+- __pyx_r = 0;
+- goto __pyx_L0;
++ /* "vidcutter/libs/pympv/mpv.pyx":933
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
++ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC) # <<<<<<<<<<<<<<
++ * self.target_time = info[0].target_time
++ * return self
++ */
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":934
++ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
++ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
++ * self.target_time = info[0].target_time # <<<<<<<<<<<<<<
++ * return self
++ *
++ */
++ __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":935
++ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
++ * self.target_time = info[0].target_time
++ * return self # <<<<<<<<<<<<<<
++ *
++ * cdef class RenderContext(object):
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(((PyObject *)__pyx_v_self));
++ __pyx_r = ((PyObject *)__pyx_v_self);
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":929
++ * @cython.internal
++ * cdef class RenderFrameInfo(object):
++ * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
++ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ */
++
++ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo._from_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":832
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
+- *
+- * def init_gl(self, exts, get_proc_address): # <<<<<<<<<<<<<<
+- * exts = _strenc(exts) if exts is not None else None
+- * cdef char* extsc = NULL
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_3init_gl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_3init_gl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_exts = 0;
+- PyObject *__pyx_v_get_proc_address = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("init_gl (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exts,&__pyx_n_s_get_proc_address,0};
+- PyObject* values[2] = {0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exts)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("init_gl", 1, 2, 2, 1); __PYX_ERR(0, 832, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "init_gl") < 0)) __PYX_ERR(0, 832, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- }
+- __pyx_v_exts = values[0];
+- __pyx_v_get_proc_address = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("init_gl", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 832, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.init_gl", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_2init_gl(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), __pyx_v_exts, __pyx_v_get_proc_address);
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_2init_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_exts, PyObject *__pyx_v_get_proc_address) {
+- char *__pyx_v_extsc;
+- int __pyx_v_err;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self) {
++ PyObject *__pyx_v_state = 0;
++ PyObject *__pyx_v__dict = 0;
++ int __pyx_v_use_setstate;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- char *__pyx_t_7;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("init_gl", 0);
+- __Pyx_INCREF(__pyx_v_exts);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":833
+- *
+- * def init_gl(self, exts, get_proc_address):
+- * exts = _strenc(exts) if exts is not None else None # <<<<<<<<<<<<<<
+- * cdef char* extsc = NULL
+- * if exts is not None:
+- */
+- __pyx_t_2 = (__pyx_v_exts != Py_None);
+- if ((__pyx_t_2 != 0)) {
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_strenc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_exts) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exts);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_1 = __pyx_t_3;
+- __pyx_t_3 = 0;
+- } else {
+- __Pyx_INCREF(Py_None);
+- __pyx_t_1 = Py_None;
+- }
+- __Pyx_DECREF_SET(__pyx_v_exts, __pyx_t_1);
+- __pyx_t_1 = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":834
+- * def init_gl(self, exts, get_proc_address):
+- * exts = _strenc(exts) if exts is not None else None
+- * cdef char* extsc = NULL # <<<<<<<<<<<<<<
+- * if exts is not None:
+- * extsc = exts
++ /* "(tree fragment)":5
++ * cdef object _dict
++ * cdef bint use_setstate
++ * state = () # <<<<<<<<<<<<<<
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
+ */
+- __pyx_v_extsc = NULL;
++ __Pyx_INCREF(__pyx_empty_tuple);
++ __pyx_v_state = __pyx_empty_tuple;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":835
+- * exts = _strenc(exts) if exts is not None else None
+- * cdef char* extsc = NULL
+- * if exts is not None: # <<<<<<<<<<<<<<
+- * extsc = exts
+- * with nogil:
++ /* "(tree fragment)":6
++ * cdef bint use_setstate
++ * state = ()
++ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
++ * if _dict is not None:
++ * state += (_dict,)
+ */
+- __pyx_t_2 = (__pyx_v_exts != Py_None);
+- __pyx_t_6 = (__pyx_t_2 != 0);
+- if (__pyx_t_6) {
++ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v__dict = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":836
+- * cdef char* extsc = NULL
+- * if exts is not None:
+- * extsc = exts # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
++ /* "(tree fragment)":7
++ * state = ()
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
+ */
+- __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_exts); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 836, __pyx_L1_error)
+- __pyx_v_extsc = __pyx_t_7;
++ __pyx_t_2 = (__pyx_v__dict != Py_None);
++ __pyx_t_3 = (__pyx_t_2 != 0);
++ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":835
+- * exts = _strenc(exts) if exts is not None else None
+- * cdef char* extsc = NULL
+- * if exts is not None: # <<<<<<<<<<<<<<
+- * extsc = exts
+- * with nogil:
++ /* "(tree fragment)":8
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
++ * state += (_dict,) # <<<<<<<<<<<<<<
++ * use_setstate = True
++ * else:
+ */
+- }
++ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_INCREF(__pyx_v__dict);
++ __Pyx_GIVEREF(__pyx_v__dict);
++ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
++ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
++ __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":837
+- * if exts is not None:
+- * extsc = exts
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
+- * <void *>get_proc_address)
++ /* "(tree fragment)":9
++ * if _dict is not None:
++ * state += (_dict,)
++ * use_setstate = True # <<<<<<<<<<<<<<
++ * else:
++ * use_setstate = False
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_v_use_setstate = 1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":838
+- * extsc = exts
+- * with nogil:
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress, # <<<<<<<<<<<<<<
+- * <void *>get_proc_address)
+- * if err < 0:
++ /* "(tree fragment)":7
++ * state = ()
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
+ */
+- __pyx_v_err = mpv_opengl_cb_init_gl(__pyx_v_self->_ctx, __pyx_v_extsc, (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress), ((void *)__pyx_v_get_proc_address));
+- }
++ goto __pyx_L3;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":837
+- * if exts is not None:
+- * extsc = exts
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
+- * <void *>get_proc_address)
++ /* "(tree fragment)":11
++ * use_setstate = True
++ * else:
++ * use_setstate = False # <<<<<<<<<<<<<<
++ * if use_setstate:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
++ /*else*/ {
++ __pyx_v_use_setstate = 0;
+ }
++ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":840
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
+- * <void *>get_proc_address)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- *
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = False
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
++ * else:
+ */
+- __pyx_t_6 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_6)) {
++ __pyx_t_3 = (__pyx_v_use_setstate != 0);
++ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":841
+- * <void *>get_proc_address)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- *
+- * self.inited = True
++ /* "(tree fragment)":13
++ * use_setstate = False
++ * if use_setstate:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<<
++ * else:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
++ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 841, __pyx_L1_error)
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_222419149);
++ __Pyx_GIVEREF(__pyx_int_222419149);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
++ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
++ __pyx_t_4 = 0;
++ __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_5;
++ __pyx_t_5 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":840
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
+- * <void *>get_proc_address)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- *
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = False
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
++ * else:
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":843
+- * raise MPVError(err)
+- *
+- * self.inited = True # <<<<<<<<<<<<<<
+- *
+- * def set_update_callback(self, cb):
++ /* "(tree fragment)":15
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
++ * else:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
+ */
+- __pyx_v_self->inited = 1;
++ /*else*/ {
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_222419149);
++ __Pyx_GIVEREF(__pyx_int_222419149);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
++ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_5);
++ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
++ __pyx_t_5 = 0;
++ __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_4;
++ __pyx_t_4 = 0;
++ goto __pyx_L0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":832
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
+- *
+- * def init_gl(self, exts, get_proc_address): # <<<<<<<<<<<<<<
+- * exts = _strenc(exts) if exts is not None else None
+- * cdef char* extsc = NULL
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.init_gl", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_exts);
++ __Pyx_XDECREF(__pyx_v_state);
++ __Pyx_XDECREF(__pyx_v__dict);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":845
+- * self.inited = True
+- *
+- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+- * self.update_cb = cb
+- * with nogil:
++/* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_5set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_5set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_update_callback (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_4set_update_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), ((PyObject *)__pyx_v_cb));
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_4set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_cb) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_update_callback", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":846
+- *
+- * def set_update_callback(self, cb):
+- * self.update_cb = cb # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- */
+- __Pyx_INCREF(__pyx_v_cb);
+- __Pyx_GIVEREF(__pyx_v_cb);
+- __Pyx_GOTREF(__pyx_v_self->update_cb);
+- __Pyx_DECREF(__pyx_v_self->update_cb);
+- __pyx_v_self->update_cb = __pyx_v_cb;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":847
+- * def set_update_callback(self, cb):
+- * self.update_cb = cb
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- *
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":848
+- * self.update_cb = cb
+- * with nogil:
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
+- *
+- * def draw(self, fbo, w, h):
+- */
+- mpv_opengl_cb_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
+- }
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":847
+- * def set_update_callback(self, cb):
+- * self.update_cb = cb
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- *
++ /* "(tree fragment)":17
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":845
+- * self.inited = True
+- *
+- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+- * self.update_cb = cb
+- * with nogil:
++ /* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":850
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++/* "vidcutter/libs/pympv/mpv.pyx":950
++ * bint inited
+ *
+- * def draw(self, fbo, w, h): # <<<<<<<<<<<<<<
+- * cdef:
+- * int fboc = fbo
++ * def __init__(self, mpv, # <<<<<<<<<<<<<<
++ * api_type,
++ * opengl_init_params=None,
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_7draw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_7draw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_fbo = 0;
+- PyObject *__pyx_v_w = 0;
+- PyObject *__pyx_v_h = 0;
++static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_mpv = 0;
++ PyObject *__pyx_v_api_type = 0;
++ PyObject *__pyx_v_opengl_init_params = 0;
++ PyObject *__pyx_v_advanced_control = 0;
++ PyObject *__pyx_v_x11_display = 0;
++ PyObject *__pyx_v_wl_display = 0;
++ PyObject *__pyx_v_drm_display = 0;
++ PyObject *__pyx_v_drm_osd_size = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("draw (wrapper)", 0);
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fbo,&__pyx_n_s_w,&__pyx_n_s_h,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fbo)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("draw", 1, 3, 3, 1); __PYX_ERR(0, 850, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("draw", 1, 3, 3, 2); __PYX_ERR(0, 850, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 850, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v_fbo = values[0];
+- __pyx_v_w = values[1];
+- __pyx_v_h = values[2];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("draw", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 850, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_6draw(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), __pyx_v_fbo, __pyx_v_w, __pyx_v_h);
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_api_type,&__pyx_n_s_opengl_init_params,&__pyx_n_s_advanced_control,&__pyx_n_s_x11_display,&__pyx_n_s_wl_display,&__pyx_n_s_drm_display,&__pyx_n_s_drm_osd_size,0};
++ PyObject* values[8] = {0,0,0,0,0,0,0,0};
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_6draw(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_fbo, PyObject *__pyx_v_w, PyObject *__pyx_v_h) {
+- int __pyx_v_fboc;
+- int __pyx_v_wc;
+- int __pyx_v_hc;
+- int __pyx_v_err;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("draw", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":852
+- * def draw(self, fbo, w, h):
+- * cdef:
+- * int fboc = fbo # <<<<<<<<<<<<<<
+- * int wc = w
+- * int hc = h
++ /* "vidcutter/libs/pympv/mpv.pyx":952
++ * def __init__(self, mpv,
++ * api_type,
++ * opengl_init_params=None, # <<<<<<<<<<<<<<
++ * advanced_control=False,
++ * x11_display=None,
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_fbo); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L1_error)
+- __pyx_v_fboc = __pyx_t_1;
++ values[2] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":853
+- * cdef:
+- * int fboc = fbo
+- * int wc = w # <<<<<<<<<<<<<<
+- * int hc = h
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":953
++ * api_type,
++ * opengl_init_params=None,
++ * advanced_control=False, # <<<<<<<<<<<<<<
++ * x11_display=None,
++ * wl_display=None,
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_w); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 853, __pyx_L1_error)
+- __pyx_v_wc = __pyx_t_1;
++ values[3] = ((PyObject *)Py_False);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":854
+- * int fboc = fbo
+- * int wc = w
+- * int hc = h # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
++ /* "vidcutter/libs/pympv/mpv.pyx":954
++ * opengl_init_params=None,
++ * advanced_control=False,
++ * x11_display=None, # <<<<<<<<<<<<<<
++ * wl_display=None,
++ * drm_display=None,
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_h); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L1_error)
+- __pyx_v_hc = __pyx_t_1;
++ values[4] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":855
+- * int wc = w
+- * int hc = h
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":955
++ * advanced_control=False,
++ * x11_display=None,
++ * wl_display=None, # <<<<<<<<<<<<<<
++ * drm_display=None,
++ * drm_osd_size=None
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ values[5] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":856
+- * int hc = h
+- * with nogil:
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":956
++ * x11_display=None,
++ * wl_display=None,
++ * drm_display=None, # <<<<<<<<<<<<<<
++ * drm_osd_size=None
++ * ):
+ */
+- __pyx_v_err = mpv_opengl_cb_draw(__pyx_v_self->_ctx, __pyx_v_fboc, __pyx_v_wc, __pyx_v_hc);
+- }
++ values[6] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":855
+- * int wc = w
+- * int hc = h
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":957
++ * wl_display=None,
++ * drm_display=None,
++ * drm_osd_size=None # <<<<<<<<<<<<<<
++ * ):
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
++ values[7] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
++ CYTHON_FALLTHROUGH;
++ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
++ CYTHON_FALLTHROUGH;
++ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
++ CYTHON_FALLTHROUGH;
++ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
++ CYTHON_FALLTHROUGH;
++ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
++ CYTHON_FALLTHROUGH;
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_api_type)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 950, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_init_params);
++ if (value) { values[2] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 3:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advanced_control);
++ if (value) { values[3] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 4:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x11_display);
++ if (value) { values[4] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 5:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wl_display);
++ if (value) { values[5] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 6:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_display);
++ if (value) { values[6] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 7:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_osd_size);
++ if (value) { values[7] = value; kw_args--; }
+ }
+- __pyx_L5:;
+ }
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":857
+- * with nogil:
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- *
+- */
+- __pyx_t_2 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_2)) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":858
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- *
+- * def report_flip(self, time):
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 858, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 950, __pyx_L3_error)
++ }
++ } else {
++ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
++ CYTHON_FALLTHROUGH;
++ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
++ CYTHON_FALLTHROUGH;
++ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
++ CYTHON_FALLTHROUGH;
++ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
++ CYTHON_FALLTHROUGH;
++ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
++ CYTHON_FALLTHROUGH;
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ break;
++ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+- __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 858, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(0, 858, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":857
+- * with nogil:
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- *
+- */
++ __pyx_v_mpv = values[0];
++ __pyx_v_api_type = values[1];
++ __pyx_v_opengl_init_params = values[2];
++ __pyx_v_advanced_control = values[3];
++ __pyx_v_x11_display = values[4];
++ __pyx_v_wl_display = values[5];
++ __pyx_v_drm_display = values[6];
++ __pyx_v_drm_osd_size = values[7];
+ }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":850
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- *
+- * def draw(self, fbo, w, h): # <<<<<<<<<<<<<<
+- * cdef:
+- * int fboc = fbo
+- */
+-
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 950, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ return -1;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_api_type, __pyx_v_opengl_init_params, __pyx_v_advanced_control, __pyx_v_x11_display, __pyx_v_wl_display, __pyx_v_drm_display, __pyx_v_drm_osd_size);
+
+-/* "vidcutter/libs/pympv/mpv.pyx":860
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":950
++ * bint inited
+ *
+- * def report_flip(self, time): # <<<<<<<<<<<<<<
+- * cdef int64_t ctime = time
+- * with nogil:
++ * def __init__(self, mpv, # <<<<<<<<<<<<<<
++ * api_type,
++ * opengl_init_params=None,
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_9report_flip(PyObject *__pyx_v_self, PyObject *__pyx_v_time); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_9report_flip(PyObject *__pyx_v_self, PyObject *__pyx_v_time) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("report_flip (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_8report_flip(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), ((PyObject *)__pyx_v_time));
+-
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_8report_flip(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_time) {
+- int64_t __pyx_v_ctime;
+- int __pyx_v_err;
+- PyObject *__pyx_r = NULL;
++static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_api_type, PyObject *__pyx_v_opengl_init_params, PyObject *__pyx_v_advanced_control, PyObject *__pyx_v_x11_display, PyObject *__pyx_v_wl_display, PyObject *__pyx_v_drm_display, PyObject *__pyx_v_drm_osd_size) {
++ struct mpv_opengl_init_params __pyx_v_gl_params;
++ struct mpv_opengl_drm_params __pyx_v_drm_params;
++ struct mpv_opengl_drm_osd_size __pyx_v__drm_osd_size;
++ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_params = NULL;
++ PyObject *__pyx_v_arp = NULL;
++ int __pyx_v_err;
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- int64_t __pyx_t_1;
+- int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
++ int __pyx_t_6;
++ int __pyx_t_7;
++ char const *__pyx_t_8;
++ PyObject *(*__pyx_t_9)(PyObject *);
++ int __pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("report_flip", 0);
++ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":861
++ /* "vidcutter/libs/pympv/mpv.pyx":965
++ * mpv_opengl_drm_osd_size _drm_osd_size
+ *
+- * def report_flip(self, time):
+- * cdef int64_t ctime = time # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
++ * self._mpv = mpv # <<<<<<<<<<<<<<
++ *
++ * memset(&gl_params, 0, sizeof(gl_params))
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_time); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L1_error)
+- __pyx_v_ctime = __pyx_t_1;
++ if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 965, __pyx_L1_error)
++ __pyx_t_1 = __pyx_v_mpv;
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->_mpv);
++ __Pyx_DECREF(((PyObject *)__pyx_v_self->_mpv));
++ __pyx_v_self->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":862
+- * def report_flip(self, time):
+- * cdef int64_t ctime = time
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":967
++ * self._mpv = mpv
++ *
++ * memset(&gl_params, 0, sizeof(gl_params)) # <<<<<<<<<<<<<<
++ * memset(&drm_params, 0, sizeof(drm_params))
++ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ (void)(memset((&__pyx_v_gl_params), 0, (sizeof(__pyx_v_gl_params))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":863
+- * cdef int64_t ctime = time
+- * with nogil:
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":968
++ *
++ * memset(&gl_params, 0, sizeof(gl_params))
++ * memset(&drm_params, 0, sizeof(drm_params)) # <<<<<<<<<<<<<<
++ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
++ *
+ */
+- __pyx_v_err = mpv_opengl_cb_report_flip(__pyx_v_self->_ctx, __pyx_v_ctime);
+- }
++ (void)(memset((&__pyx_v_drm_params), 0, (sizeof(__pyx_v_drm_params))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":862
+- * def report_flip(self, time):
+- * cdef int64_t ctime = time
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":969
++ * memset(&gl_params, 0, sizeof(gl_params))
++ * memset(&drm_params, 0, sizeof(drm_params))
++ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size)) # <<<<<<<<<<<<<<
++ *
++ * params = _RenderParams()
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ (void)(memset((&__pyx_v__drm_osd_size), 0, (sizeof(__pyx_v__drm_osd_size))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":864
+- * with nogil:
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":971
++ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
++ *
++ * params = _RenderParams() # <<<<<<<<<<<<<<
+ *
++ * if api_type == self.API_OPENGL:
+ */
+- __pyx_t_2 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_2)) {
++ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":865
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":973
++ * params = _RenderParams()
++ *
++ * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
++ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
++ * else:
++ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (likely(__pyx_t_3)) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":974
++ *
++ * if api_type == self.API_OPENGL:
++ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL) # <<<<<<<<<<<<<<
++ * else:
++ * raise PyMPVError("Unknown api_type %r" % api_type)
++ */
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":973
++ * params = _RenderParams()
++ *
++ * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
++ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
++ * else:
++ */
++ goto __pyx_L3;
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":976
++ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
++ * else:
++ * raise PyMPVError("Unknown api_type %r" % api_type) # <<<<<<<<<<<<<<
+ *
+- * def uninit_gl(self):
++ * if opengl_init_params is not None:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L1_error)
++ /*else*/ {
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 865, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_6);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
++ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
++ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+- __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(0, 865, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __PYX_ERR(0, 976, __pyx_L1_error)
++ }
++ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":864
+- * with nogil:
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":978
++ * raise PyMPVError("Unknown api_type %r" % api_type)
+ *
++ * if opengl_init_params is not None: # <<<<<<<<<<<<<<
++ * self._get_proc_address = opengl_init_params["get_proc_address"]
++ * gl_params.get_proc_address = &_c_getprocaddress
+ */
+- }
++ __pyx_t_3 = (__pyx_v_opengl_init_params != Py_None);
++ __pyx_t_6 = (__pyx_t_3 != 0);
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":860
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":979
+ *
+- * def report_flip(self, time): # <<<<<<<<<<<<<<
+- * cdef int64_t ctime = time
+- * with nogil:
++ * if opengl_init_params is not None:
++ * self._get_proc_address = opengl_init_params["get_proc_address"] # <<<<<<<<<<<<<<
++ * gl_params.get_proc_address = &_c_getprocaddress
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+ */
++ __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_GIVEREF(__pyx_t_2);
++ __Pyx_GOTREF(__pyx_v_self->_get_proc_address);
++ __Pyx_DECREF(__pyx_v_self->_get_proc_address);
++ __pyx_v_self->_get_proc_address = __pyx_t_2;
++ __pyx_t_2 = 0;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.report_flip", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":980
++ * if opengl_init_params is not None:
++ * self._get_proc_address = opengl_init_params["get_proc_address"]
++ * gl_params.get_proc_address = &_c_getprocaddress # <<<<<<<<<<<<<<
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ */
++ __pyx_v_gl_params.get_proc_address = (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress);
+
+-/* "vidcutter/libs/pympv/mpv.pyx":867
+- * raise MPVError(err)
+- *
+- * def uninit_gl(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
++ /* "vidcutter/libs/pympv/mpv.pyx":981
++ * self._get_proc_address = opengl_init_params["get_proc_address"]
++ * gl_params.get_proc_address = &_c_getprocaddress
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ * if advanced_control:
+ */
++ __pyx_v_gl_params.get_proc_address_ctx = ((void *)__pyx_v_self->_get_proc_address);
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_11uninit_gl(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_11uninit_gl(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("uninit_gl (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_10uninit_gl(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":982
++ * gl_params.get_proc_address = &_c_getprocaddress
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params) # <<<<<<<<<<<<<<
++ * if advanced_control:
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ */
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":978
++ * raise PyMPVError("Unknown api_type %r" % api_type)
++ *
++ * if opengl_init_params is not None: # <<<<<<<<<<<<<<
++ * self._get_proc_address = opengl_init_params["get_proc_address"]
++ * gl_params.get_proc_address = &_c_getprocaddress
++ */
++ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_10uninit_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
+- int __pyx_v_err;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("uninit_gl", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":868
+- *
+- * def uninit_gl(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":983
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ * if advanced_control: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ * if x11_display:
+ */
+- __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
+- if (__pyx_t_1) {
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 983, __pyx_L1_error)
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":869
+- * def uninit_gl(self):
+- * if not self.inited:
+- * return # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":984
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ * if advanced_control:
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1) # <<<<<<<<<<<<<<
++ * if x11_display:
++ * self._x11_display = x11_display
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":868
+- *
+- * def uninit_gl(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":983
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ * if advanced_control: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ * if x11_display:
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":870
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":985
++ * if advanced_control:
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ * if x11_display: # <<<<<<<<<<<<<<
++ * self._x11_display = x11_display
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":871
+- * return
+- * with nogil:
+- * err = mpv_opengl_cb_uninit_gl(self._ctx) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":986
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ * if x11_display:
++ * self._x11_display = x11_display # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ * if wl_display:
+ */
+- __pyx_v_err = mpv_opengl_cb_uninit_gl(__pyx_v_self->_ctx);
+- }
++ __Pyx_INCREF(__pyx_v_x11_display);
++ __Pyx_GIVEREF(__pyx_v_x11_display);
++ __Pyx_GOTREF(__pyx_v_self->_x11_display);
++ __Pyx_DECREF(__pyx_v_self->_x11_display);
++ __pyx_v_self->_x11_display = __pyx_v_x11_display;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":870
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":987
++ * if x11_display:
++ * self._x11_display = x11_display
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display)) # <<<<<<<<<<<<<<
++ * if wl_display:
++ * self._wl_display = wl_display
++ */
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":985
++ * if advanced_control:
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ * if x11_display: # <<<<<<<<<<<<<<
++ * self._x11_display = x11_display
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":872
+- * with nogil:
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * self.inited = False
++ /* "vidcutter/libs/pympv/mpv.pyx":988
++ * self._x11_display = x11_display
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ * if wl_display: # <<<<<<<<<<<<<<
++ * self._wl_display = wl_display
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ */
+- __pyx_t_1 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_1)) {
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":873
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- * self.inited = False
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":989
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ * if wl_display:
++ * self._wl_display = wl_display # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ * if drm_display:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 873, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error)
++ __Pyx_INCREF(__pyx_v_wl_display);
++ __Pyx_GIVEREF(__pyx_v_wl_display);
++ __Pyx_GOTREF(__pyx_v_self->_wl_display);
++ __Pyx_DECREF(__pyx_v_self->_wl_display);
++ __pyx_v_self->_wl_display = __pyx_v_wl_display;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":990
++ * if wl_display:
++ * self._wl_display = wl_display
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display)) # <<<<<<<<<<<<<<
++ * if drm_display:
++ * drm_params.fd = drm_display.get("fd", -1)
++ */
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 873, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":872
+- * with nogil:
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * self.inited = False
++ /* "vidcutter/libs/pympv/mpv.pyx":988
++ * self._x11_display = x11_display
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ * if wl_display: # <<<<<<<<<<<<<<
++ * self._wl_display = wl_display
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":874
+- * if err < 0:
+- * raise MPVError(err)
+- * self.inited = False # <<<<<<<<<<<<<<
+- *
+- * def __dealloc__(self):
++ /* "vidcutter/libs/pympv/mpv.pyx":991
++ * self._wl_display = wl_display
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ * if drm_display: # <<<<<<<<<<<<<<
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ */
+- __pyx_v_self->inited = 0;
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 991, __pyx_L1_error)
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":867
+- * raise MPVError(err)
+- *
+- * def uninit_gl(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
++ /* "vidcutter/libs/pympv/mpv.pyx":992
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ * if drm_display:
++ * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_drm_params.fd = __pyx_t_7;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.uninit_gl", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":876
+- * self.inited = False
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.uninit_gl()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":993
++ * if drm_display:
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None)
+ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 993, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_drm_params.crtc_id = __pyx_t_7;
+
+-/* Python wrapper */
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_13__dealloc__(PyObject *__pyx_v_self); /*proto*/
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_13__dealloc__(PyObject *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+- __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_12__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+-}
+-
+-static void __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_12__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__dealloc__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":877
+- *
+- * def __dealloc__(self):
+- * self.uninit_gl() # <<<<<<<<<<<<<<
+- *
+- * DEF MAX_RENDER_PARAMS = 32
++ /* "vidcutter/libs/pympv/mpv.pyx":994
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
++ * arp = drm_display.get("atomic_request_ptr", None)
++ * if arp is not None:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uninit_gl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_drm_params.connector_id = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":876
+- * self.inited = False
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.uninit_gl()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":995
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
++ * if arp is not None:
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_arp = __pyx_t_2;
++ __pyx_t_2 = 0;
+
+- /* function exit code */
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.OpenGLContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+-}
+-
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ /* "vidcutter/libs/pympv/mpv.pyx":996
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None)
++ * if arp is not None: # <<<<<<<<<<<<<<
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ */
++ __pyx_t_6 = (__pyx_v_arp != Py_None);
++ __pyx_t_3 = (__pyx_t_6 != 0);
++ if (__pyx_t_3) {
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_14__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":997
++ * arp = drm_display.get("atomic_request_ptr", None)
++ * if arp is not None:
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*") # <<<<<<<<<<<<<<
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 2, __pyx_L1_error)
++ __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L1_error)
++ __pyx_v_drm_params.atomic_request_ptr = ((struct _drmModeAtomicReq **)__pyx_f_9vidcutter_4libs_3mpv_get_pointer(__pyx_t_8, __pyx_kp_s_drmModeAtomicReq));
+
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ /* "vidcutter/libs/pympv/mpv.pyx":996
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None)
++ * if arp is not None: # <<<<<<<<<<<<<<
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ */
++ }
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":998
++ * if arp is not None:
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
++ * if drm_osd_size:
+ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_drm_params.render_fd = __pyx_t_7;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_16__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":999
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params) # <<<<<<<<<<<<<<
++ * if drm_osd_size:
++ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 4, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":991
++ * self._wl_display = wl_display
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ * if drm_display: # <<<<<<<<<<<<<<
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ */
++ }
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":886
+- * object owned
+- *
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * self.owned = []
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID
++ /* "vidcutter/libs/pympv/mpv.pyx":1000
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
++ * if drm_osd_size: # <<<<<<<<<<<<<<
++ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ */
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1000, __pyx_L1_error)
++ if (__pyx_t_3) {
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+- if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":887
+- *
+- * def __init__(self):
+- * self.owned = [] # <<<<<<<<<<<<<<
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID
++ /* "vidcutter/libs/pympv/mpv.pyx":1001
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
++ * if drm_osd_size:
++ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ *
+ */
+- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->owned);
+- __Pyx_DECREF(__pyx_v_self->owned);
+- __pyx_v_self->owned = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":888
+- * def __init__(self):
+- * self.owned = []
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
+- *
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+- */
+- (__pyx_v_self->params[0]).type = MPV_RENDER_PARAM_INVALID;
++ if ((likely(PyTuple_CheckExact(__pyx_v_drm_osd_size))) || (PyList_CheckExact(__pyx_v_drm_osd_size))) {
++ PyObject* sequence = __pyx_v_drm_osd_size;
++ Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
++ if (unlikely(size != 2)) {
++ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
++ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
++ __PYX_ERR(0, 1001, __pyx_L1_error)
++ }
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ if (likely(PyTuple_CheckExact(sequence))) {
++ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
++ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
++ } else {
++ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
++ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
++ }
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(__pyx_t_2);
++ #else
++ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ #endif
++ } else {
++ Py_ssize_t index = -1;
++ __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
++ index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
++ __Pyx_GOTREF(__pyx_t_1);
++ index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
++ __Pyx_GOTREF(__pyx_t_2);
++ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_9 = NULL;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ goto __pyx_L12_unpacking_done;
++ __pyx_L11_unpacking_failed:;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_9 = NULL;
++ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
++ __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_L12_unpacking_done:;
++ }
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v__drm_osd_size.width = __pyx_t_7;
++ __pyx_v__drm_osd_size.height = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":886
+- * object owned
++ /* "vidcutter/libs/pympv/mpv.pyx":1002
++ * if drm_osd_size:
++ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size) # <<<<<<<<<<<<<<
+ *
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * self.owned = []
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID
++ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+ */
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* function exit code */
+- __pyx_r = 0;
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":890
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID
+- *
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS:
++ /* "vidcutter/libs/pympv/mpv.pyx":1000
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
++ * if drm_osd_size: # <<<<<<<<<<<<<<
++ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ */
+-
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, void *__pyx_v_p, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args) {
+- int __pyx_v_owned = ((int)0);
+- PyObject *__pyx_v_count = NULL;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- Py_ssize_t __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("add_voidp", 0);
+- if (__pyx_optional_args) {
+- if (__pyx_optional_args->__pyx_n > 0) {
+- __pyx_v_owned = __pyx_optional_args->owned;
+- }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":891
++ /* "vidcutter/libs/pympv/mpv.pyx":1004
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ *
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+- * count = len(self.owned) # <<<<<<<<<<<<<<
+- * if count >= MAX_RENDER_PARAMS:
+- * if owned:
+- */
+- __pyx_t_1 = __pyx_v_self->owned;
+- __Pyx_INCREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 891, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_count = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":892
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
+- * if owned:
+- * free(p)
+- */
+- __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (__pyx_t_3) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":893
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS:
+- * if owned: # <<<<<<<<<<<<<<
+- * free(p)
+- * raise PyMPVError("RenderParams overflow")
++ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params) # <<<<<<<<<<<<<<
++ * if err < 0:
++ * raise MPVError(err)
+ */
+- __pyx_t_3 = (__pyx_v_owned != 0);
+- if (__pyx_t_3) {
++ __pyx_v_err = mpv_render_context_create((&__pyx_v_self->_ctx), __pyx_v_self->_mpv->_ctx, __pyx_v_params->params);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":894
+- * if count >= MAX_RENDER_PARAMS:
+- * if owned:
+- * free(p) # <<<<<<<<<<<<<<
+- * raise PyMPVError("RenderParams overflow")
++ /* "vidcutter/libs/pympv/mpv.pyx":1005
+ *
++ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * self.inited = True
+ */
+- free(__pyx_v_p);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":893
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS:
+- * if owned: # <<<<<<<<<<<<<<
+- * free(p)
+- * raise PyMPVError("RenderParams overflow")
+- */
+- }
++ __pyx_t_3 = ((__pyx_v_err < 0) != 0);
++ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":895
+- * if owned:
+- * free(p)
+- * raise PyMPVError("RenderParams overflow") # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1006
++ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
++ * if err < 0:
++ * raise MPVError(err) # <<<<<<<<<<<<<<
++ * self.inited = True
+ *
+- * self.params[count].type = t
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
++ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_RenderParams_overflow) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_RenderParams_overflow);
++ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 895, __pyx_L1_error)
++ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __PYX_ERR(0, 1006, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":892
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
+- * if owned:
+- * free(p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1005
++ *
++ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * self.inited = True
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":897
+- * raise PyMPVError("RenderParams overflow")
++ /* "vidcutter/libs/pympv/mpv.pyx":1007
++ * if err < 0:
++ * raise MPVError(err)
++ * self.inited = True # <<<<<<<<<<<<<<
+ *
+- * self.params[count].type = t # <<<<<<<<<<<<<<
+- * self.params[count].data = p
+- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
++ * @_errors
+ */
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error)
+- (__pyx_v_self->params[__pyx_t_2]).type = __pyx_v_t;
++ __pyx_v_self->inited = 1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":898
++ /* "vidcutter/libs/pympv/mpv.pyx":950
++ * bint inited
+ *
+- * self.params[count].type = t
+- * self.params[count].data = p # <<<<<<<<<<<<<<
+- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+- * self.owned.append(owned)
+- */
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error)
+- (__pyx_v_self->params[__pyx_t_2]).data = __pyx_v_p;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":899
+- * self.params[count].type = t
+- * self.params[count].data = p
+- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
+- * self.owned.append(owned)
+- *
+- */
+- __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- (__pyx_v_self->params[__pyx_t_2]).type = MPV_RENDER_PARAM_INVALID;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":900
+- * self.params[count].data = p
+- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+- * self.owned.append(owned) # <<<<<<<<<<<<<<
+- *
+- * cdef add_int(self, mpv_render_param_type t, int val):
+- */
+- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 900, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":890
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID
+- *
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS:
++ * def __init__(self, mpv, # <<<<<<<<<<<<<<
++ * api_type,
++ * opengl_init_params=None,
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_voidp", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = -1;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_count);
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF((PyObject *)__pyx_v_params);
++ __Pyx_XDECREF(__pyx_v_arp);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":902
+- * self.owned.append(owned)
++/* "vidcutter/libs/pympv/mpv.pyx":1010
+ *
+- * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
+- * cdef int *p = <int *>malloc(sizeof(int))
+- * p[0] = val
++ * @_errors
++ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, int __pyx_v_val) {
+- int *__pyx_v_p;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("set_icc_profile (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_icc_blob));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
++ struct mpv_render_param __pyx_v_param;
++ struct mpv_byte_array __pyx_v_val;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
++ int __pyx_t_2;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ char *__pyx_t_6;
++ Py_ssize_t __pyx_t_7;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("add_int", 0);
++ __Pyx_RefNannySetupContext("set_icc_profile", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":903
++ /* "vidcutter/libs/pympv/mpv.pyx":1016
++ * int err
+ *
+- * cdef add_int(self, mpv_render_param_type t, int val):
+- * cdef int *p = <int *>malloc(sizeof(int)) # <<<<<<<<<<<<<<
+- * p[0] = val
+- * self.add_voidp(t, p)
++ * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
++ * raise PyMPVError("icc_blob should be a bytes instance")
++ * val.data = <void *><char *>icc_blob
+ */
+- __pyx_v_p = ((int *)malloc((sizeof(int))));
++ __pyx_t_1 = PyBytes_Check(__pyx_v_icc_blob);
++ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
++ if (unlikely(__pyx_t_2)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":904
+- * cdef add_int(self, mpv_render_param_type t, int val):
+- * cdef int *p = <int *>malloc(sizeof(int))
+- * p[0] = val # <<<<<<<<<<<<<<
+- * self.add_voidp(t, p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1017
+ *
++ * if not isinstance(icc_blob, bytes):
++ * raise PyMPVError("icc_blob should be a bytes instance") # <<<<<<<<<<<<<<
++ * val.data = <void *><char *>icc_blob
++ * val.size = len(icc_blob)
+ */
+- (__pyx_v_p[0]) = __pyx_v_val;
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_icc_blob_should_be_a_bytes_insta) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_icc_blob_should_be_a_bytes_insta);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(0, 1017, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":905
+- * cdef int *p = <int *>malloc(sizeof(int))
+- * p[0] = val
+- * self.add_voidp(t, p) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1016
++ * int err
+ *
+- * cdef add_string(self, mpv_render_param_type t, char *s):
++ * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
++ * raise PyMPVError("icc_blob should be a bytes instance")
++ * val.data = <void *><char *>icc_blob
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":902
+- * self.owned.append(owned)
++ /* "vidcutter/libs/pympv/mpv.pyx":1018
++ * if not isinstance(icc_blob, bytes):
++ * raise PyMPVError("icc_blob should be a bytes instance")
++ * val.data = <void *><char *>icc_blob # <<<<<<<<<<<<<<
++ * val.size = len(icc_blob)
+ *
+- * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
+- * cdef int *p = <int *>malloc(sizeof(int))
+- * p[0] = val
+ */
++ __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
++ __pyx_v_val.data = ((void *)((char *)__pyx_t_6));
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":907
+- * self.add_voidp(t, p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1019
++ * raise PyMPVError("icc_blob should be a bytes instance")
++ * val.data = <void *><char *>icc_blob
++ * val.size = len(icc_blob) # <<<<<<<<<<<<<<
+ *
+- * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
+- * cdef char *p = <char *>malloc(strlen(s) + 1)
+- * strcpy(p, s)
++ * param.type = MPV_RENDER_PARAM_ICC_PROFILE
+ */
++ __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1019, __pyx_L1_error)
++ __pyx_v_val.size = __pyx_t_7;
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, char *__pyx_v_s) {
+- char *__pyx_v_p;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("add_string", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":908
++ /* "vidcutter/libs/pympv/mpv.pyx":1021
++ * val.size = len(icc_blob)
++ *
++ * param.type = MPV_RENDER_PARAM_ICC_PROFILE # <<<<<<<<<<<<<<
++ * param.data = &val
+ *
+- * cdef add_string(self, mpv_render_param_type t, char *s):
+- * cdef char *p = <char *>malloc(strlen(s) + 1) # <<<<<<<<<<<<<<
+- * strcpy(p, s)
+- * self.add_voidp(t, p)
+ */
+- __pyx_v_p = ((char *)malloc((strlen(__pyx_v_s) + 1)));
++ __pyx_v_param.type = MPV_RENDER_PARAM_ICC_PROFILE;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":909
+- * cdef add_string(self, mpv_render_param_type t, char *s):
+- * cdef char *p = <char *>malloc(strlen(s) + 1)
+- * strcpy(p, s) # <<<<<<<<<<<<<<
+- * self.add_voidp(t, p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1022
++ *
++ * param.type = MPV_RENDER_PARAM_ICC_PROFILE
++ * param.data = &val # <<<<<<<<<<<<<<
+ *
++ * with nogil:
+ */
+- (void)(strcpy(__pyx_v_p, __pyx_v_s));
++ __pyx_v_param.data = (&__pyx_v_val);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":910
+- * cdef char *p = <char *>malloc(strlen(s) + 1)
+- * strcpy(p, s)
+- * self.add_voidp(t, p) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1024
++ * param.data = &val
+ *
+- * def __dealloc__(self):
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":907
+- * self.add_voidp(t, p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1025
++ *
++ * with nogil:
++ * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
++ * return err
+ *
+- * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
+- * cdef char *p = <char *>malloc(strlen(s) + 1)
+- * strcpy(p, s)
+ */
++ __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
++ }
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":912
+- * self.add_voidp(t, p)
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * for i, j in enumerate(self.owned):
+- * if j:
+- */
+-
+-/* Python wrapper */
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+- __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+-}
+-
+-static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
+- PyObject *__pyx_v_i = NULL;
+- PyObject *__pyx_v_j = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- Py_ssize_t __pyx_t_3;
+- PyObject *(*__pyx_t_4)(PyObject *);
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- Py_ssize_t __pyx_t_7;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__dealloc__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":913
++ /* "vidcutter/libs/pympv/mpv.pyx":1024
++ * param.data = &val
+ *
+- * def __dealloc__(self):
+- * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
+- * if j:
+- * free(self.params[i].data)
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err
+ */
+- __Pyx_INCREF(__pyx_int_0);
+- __pyx_t_1 = __pyx_int_0;
+- if (likely(PyList_CheckExact(__pyx_v_self->owned)) || PyTuple_CheckExact(__pyx_v_self->owned)) {
+- __pyx_t_2 = __pyx_v_self->owned; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+- __pyx_t_4 = NULL;
+- } else {
+- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error)
+- }
+- for (;;) {
+- if (likely(!__pyx_t_4)) {
+- if (likely(PyList_CheckExact(__pyx_t_2))) {
+- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
+- #else
+- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- #endif
+- } else {
+- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
+- #else
+- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- #endif
+- }
+- } else {
+- __pyx_t_5 = __pyx_t_4(__pyx_t_2);
+- if (unlikely(!__pyx_t_5)) {
+- PyObject* exc_type = PyErr_Occurred();
+- if (exc_type) {
+- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 913, __pyx_L1_error)
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L6;
+ }
+- break;
++ __pyx_L6:;
+ }
+- __Pyx_GOTREF(__pyx_t_5);
+- }
+- __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_5);
+- __pyx_t_5 = 0;
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+- __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_1);
+- __pyx_t_1 = __pyx_t_5;
+- __pyx_t_5 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":914
+- * def __dealloc__(self):
+- * for i, j in enumerate(self.owned):
+- * if j: # <<<<<<<<<<<<<<
+- * free(self.params[i].data)
+- *
+- */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 914, __pyx_L1_error)
+- if (__pyx_t_6) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":915
+- * for i, j in enumerate(self.owned):
+- * if j:
+- * free(self.params[i].data) # <<<<<<<<<<<<<<
+- *
+- * cdef void *get_pointer(const char *name, object obj):
+- */
+- __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
+- free((__pyx_v_self->params[__pyx_t_7]).data);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":914
+- * def __dealloc__(self):
+- * for i, j in enumerate(self.owned):
+- * if j: # <<<<<<<<<<<<<<
+- * free(self.params[i].data)
+- *
+- */
+- }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":913
++ /* "vidcutter/libs/pympv/mpv.pyx":1026
++ * with nogil:
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def __dealloc__(self):
+- * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
+- * if j:
+- * free(self.params[i].data)
++ * @_errors
+ */
+- }
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":912
+- * self.add_voidp(t, p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1010
+ *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * for i, j in enumerate(self.owned):
+- * if j:
++ * @_errors
++ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
+ */
+
+ /* function exit code */
+- goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv._RenderParams.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_icc_profile", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_i);
+- __Pyx_XDECREF(__pyx_v_j);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
+ }
+
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++/* "vidcutter/libs/pympv/mpv.pyx":1029
++ *
++ * @_errors
++ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("set_ambient_light (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_lux));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_lux) {
++ struct mpv_render_param __pyx_v_param;
++ int __pyx_v_val;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++ __Pyx_RefNannySetupContext("set_ambient_light", 0);
+
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":1035
++ * int err
++ *
++ * val = lux # <<<<<<<<<<<<<<
++ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
++ * param.data = &val
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 2, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
++ __pyx_v_val = __pyx_t_1;
+
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ /* "vidcutter/libs/pympv/mpv.pyx":1036
++ *
++ * val = lux
++ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT # <<<<<<<<<<<<<<
++ * param.data = &val
++ *
+ */
++ __pyx_v_param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT;
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":1037
++ * val = lux
++ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
++ * param.data = &val # <<<<<<<<<<<<<<
++ *
++ * with nogil:
+ */
++ __pyx_v_param.data = (&__pyx_v_val);
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ /* "vidcutter/libs/pympv/mpv.pyx":1039
++ * param.data = &val
++ *
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":1040
++ *
++ * with nogil:
++ * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
++ * return err
++ *
++ */
++ __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
++ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":1039
++ * param.data = &val
++ *
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+- /* "(tree fragment)":4
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1041
++ * with nogil:
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err # <<<<<<<<<<<<<<
++ *
++ * def get_next_frame_info(self):
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_r = __pyx_t_2;
++ __pyx_t_2 = 0;
++ goto __pyx_L0;
+
+- /* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":1029
++ *
++ * @_errors
++ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_ambient_light", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
++ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":917
+- * free(self.params[i].data)
++/* "vidcutter/libs/pympv/mpv.pyx":1043
++ * return err
+ *
+- * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
+- * cdef void *p
+- * if PyCapsule_IsValid(obj, name):
++ * def get_next_frame_info(self): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_frame_info info
+ */
+
+-static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name, PyObject *__pyx_v_obj) {
+- void *__pyx_v_p;
+- void *__pyx_r;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("get_next_frame_info (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++ struct mpv_render_frame_info __pyx_v_info;
++ struct mpv_render_param __pyx_v_param;
++ int __pyx_v_err;
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+- void *__pyx_t_2;
+- int __pyx_t_3;
+- int __pyx_t_4;
+- intptr_t __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- PyObject *__pyx_t_9 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("get_pointer", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":919
+- * cdef void *get_pointer(const char *name, object obj):
+- * cdef void *p
+- * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
+- * p = PyCapsule_GetPointer(obj, name)
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+- */
+- __pyx_t_1 = (PyCapsule_IsValid(__pyx_v_obj, __pyx_v_name) != 0);
+- if (__pyx_t_1) {
++ __Pyx_RefNannySetupContext("get_next_frame_info", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":920
+- * cdef void *p
+- * if PyCapsule_IsValid(obj, name):
+- * p = PyCapsule_GetPointer(obj, name) # <<<<<<<<<<<<<<
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+- * p = <void *><intptr_t>obj
++ /* "vidcutter/libs/pympv/mpv.pyx":1048
++ * mpv_render_param param
++ *
++ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO # <<<<<<<<<<<<<<
++ * param.data = &info
++ * with nogil:
+ */
+- __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error)
+- __pyx_v_p = __pyx_t_2;
++ __pyx_v_param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":919
+- * cdef void *get_pointer(const char *name, object obj):
+- * cdef void *p
+- * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
+- * p = PyCapsule_GetPointer(obj, name)
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
++ /* "vidcutter/libs/pympv/mpv.pyx":1049
++ *
++ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
++ * param.data = &info # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_render_context_get_info(self._ctx, param)
+ */
+- goto __pyx_L3;
+- }
++ __pyx_v_param.data = (&__pyx_v_info);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":921
+- * if PyCapsule_IsValid(obj, name):
+- * p = PyCapsule_GetPointer(obj, name)
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
+- * p = <void *><intptr_t>obj
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":1050
++ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
++ * param.data = &info
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_get_info(self._ctx, param)
++ * if err < 0:
+ */
+- __pyx_t_3 = PyInt_Check(__pyx_v_obj);
+- __pyx_t_4 = (__pyx_t_3 != 0);
+- if (!__pyx_t_4) {
+- } else {
+- __pyx_t_1 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_4 = PyLong_Check(__pyx_v_obj);
+- __pyx_t_3 = (__pyx_t_4 != 0);
+- if (__pyx_t_3) {
+- } else {
+- __pyx_t_1 = __pyx_t_3;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
+- __pyx_t_1 = __pyx_t_3;
+- __pyx_L4_bool_binop_done:;
+- if (likely(__pyx_t_1)) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":922
+- * p = PyCapsule_GetPointer(obj, name)
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+- * p = <void *><intptr_t>obj # <<<<<<<<<<<<<<
+- * else:
+- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
++ /* "vidcutter/libs/pympv/mpv.pyx":1051
++ * param.data = &info
++ * with nogil:
++ * err = mpv_render_context_get_info(self._ctx, param) # <<<<<<<<<<<<<<
++ * if err < 0:
++ * raise MPVError(err)
+ */
+- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
+- __pyx_v_p = ((void *)((intptr_t)__pyx_t_5));
++ __pyx_v_err = mpv_render_context_get_info(__pyx_v_self->_ctx, __pyx_v_param);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":921
+- * if PyCapsule_IsValid(obj, name):
+- * p = PyCapsule_GetPointer(obj, name)
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
+- * p = <void *><intptr_t>obj
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":1050
++ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
++ * param.data = &info
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_get_info(self._ctx, param)
++ * if err < 0:
+ */
+- goto __pyx_L3;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":924
+- * p = <void *><intptr_t>obj
+- * else:
+- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj) # <<<<<<<<<<<<<<
+- * return p
++ /* "vidcutter/libs/pympv/mpv.pyx":1052
++ * with nogil:
++ * err = mpv_render_context_get_info(self._ctx, param)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
+ *
+ */
+- /*else*/ {
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_8);
+- __pyx_t_9 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_9)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_9);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
+- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 924, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __PYX_ERR(0, 924, __pyx_L1_error)
+- }
+- __pyx_L3:;
++ __pyx_t_1 = ((__pyx_v_err < 0) != 0);
++ if (unlikely(__pyx_t_1)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":925
+- * else:
+- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
+- * return p # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1053
++ * err = mpv_render_context_get_info(self._ctx, param)
++ * if err < 0:
++ * raise MPVError(err) # <<<<<<<<<<<<<<
+ *
+- * @cython.internal
++ * return RenderFrameInfo()._from_struct(&info)
+ */
+- __pyx_r = __pyx_v_p;
+- goto __pyx_L0;
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
++ }
++ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __PYX_ERR(0, 1053, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":917
+- * free(self.params[i].data)
++ /* "vidcutter/libs/pympv/mpv.pyx":1052
++ * with nogil:
++ * err = mpv_render_context_get_info(self._ctx, param)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
+ *
+- * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
+- * cdef void *p
+- * if PyCapsule_IsValid(obj, name):
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_XDECREF(__pyx_t_9);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.get_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":929
+- * @cython.internal
+- * cdef class RenderFrameInfo(object):
+- * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
+- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+- */
+-
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, struct mpv_render_frame_info *__pyx_v_info) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_from_struct", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":930
+- * cdef class RenderFrameInfo(object):
+- * cdef _from_struct(self, mpv_render_frame_info *info):
+- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT) # <<<<<<<<<<<<<<
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":931
+- * cdef _from_struct(self, mpv_render_frame_info *info):
+- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW) # <<<<<<<<<<<<<<
+- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 931, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":932
+- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT) # <<<<<<<<<<<<<<
+- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+- * self.target_time = info[0].target_time
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":933
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC) # <<<<<<<<<<<<<<
+- * self.target_time = info[0].target_time
+- * return self
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":934
+- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+- * self.target_time = info[0].target_time # <<<<<<<<<<<<<<
+- * return self
++ /* "vidcutter/libs/pympv/mpv.pyx":1055
++ * raise MPVError(err)
+ *
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":935
+- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+- * self.target_time = info[0].target_time
+- * return self # <<<<<<<<<<<<<<
++ * return RenderFrameInfo()._from_struct(&info) # <<<<<<<<<<<<<<
+ *
+- * cdef class RenderContext(object):
++ * def set_update_callback(self, cb):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(((PyObject *)__pyx_v_self));
+- __pyx_r = ((PyObject *)__pyx_v_self);
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":929
+- * @cython.internal
+- * cdef class RenderFrameInfo(object):
+- * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
+- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ /* "vidcutter/libs/pympv/mpv.pyx":1043
++ * return err
++ *
++ * def get_next_frame_info(self): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_frame_info info
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo._from_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.get_next_frame_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++/* "vidcutter/libs/pympv/mpv.pyx":1057
++ * return RenderFrameInfo()._from_struct(&info)
++ *
++ * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("set_update_callback (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_cb));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self) {
+- PyObject *__pyx_v_state = 0;
+- PyObject *__pyx_v__dict = 0;
+- int __pyx_v_use_setstate;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_cb) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+-
+- /* "(tree fragment)":5
+- * cdef object _dict
+- * cdef bint use_setstate
+- * state = () # <<<<<<<<<<<<<<
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- */
+- __Pyx_INCREF(__pyx_empty_tuple);
+- __pyx_v_state = __pyx_empty_tuple;
+-
+- /* "(tree fragment)":6
+- * cdef bint use_setstate
+- * state = ()
+- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
+- * if _dict is not None:
+- * state += (_dict,)
+- */
+- __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v__dict = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "(tree fragment)":7
+- * state = ()
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- __pyx_t_2 = (__pyx_v__dict != Py_None);
+- __pyx_t_3 = (__pyx_t_2 != 0);
+- if (__pyx_t_3) {
+-
+- /* "(tree fragment)":8
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- * state += (_dict,) # <<<<<<<<<<<<<<
+- * use_setstate = True
+- * else:
+- */
+- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v__dict);
+- __Pyx_GIVEREF(__pyx_v__dict);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
+- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
+- __pyx_t_4 = 0;
+-
+- /* "(tree fragment)":9
+- * if _dict is not None:
+- * state += (_dict,)
+- * use_setstate = True # <<<<<<<<<<<<<<
+- * else:
+- * use_setstate = False
+- */
+- __pyx_v_use_setstate = 1;
+-
+- /* "(tree fragment)":7
+- * state = ()
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "(tree fragment)":11
+- * use_setstate = True
+- * else:
+- * use_setstate = False # <<<<<<<<<<<<<<
+- * if use_setstate:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
+- */
+- /*else*/ {
+- __pyx_v_use_setstate = 0;
+- }
+- __pyx_L3:;
++ __Pyx_RefNannySetupContext("set_update_callback", 0);
+
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = False
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":1058
++ *
++ * def set_update_callback(self, cb):
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++ * self.update_cb = cb
+ */
+- __pyx_t_3 = (__pyx_v_use_setstate != 0);
+- if (__pyx_t_3) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "(tree fragment)":13
+- * use_setstate = False
+- * if use_setstate:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<<
+- * else:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
++ /* "vidcutter/libs/pympv/mpv.pyx":1059
++ * def set_update_callback(self, cb):
++ * with nogil:
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
++ * self.update_cb = cb
++ *
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_222419149);
+- __Pyx_GIVEREF(__pyx_int_222419149);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+- __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
+- __pyx_t_4 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_5;
+- __pyx_t_5 = 0;
+- goto __pyx_L0;
++ mpv_render_context_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
++ }
+
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = False
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":1058
++ *
++ * def set_update_callback(self, cb):
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++ * self.update_cb = cb
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
+ }
+
+- /* "(tree fragment)":15
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
+- * else:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
++ /* "vidcutter/libs/pympv/mpv.pyx":1060
++ * with nogil:
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++ * self.update_cb = cb # <<<<<<<<<<<<<<
++ *
++ * def update(self):
+ */
+- /*else*/ {
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_222419149);
+- __Pyx_GIVEREF(__pyx_int_222419149);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
+- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_5);
+- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+- __pyx_t_5 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
+- goto __pyx_L0;
+- }
++ __Pyx_INCREF(__pyx_v_cb);
++ __Pyx_GIVEREF(__pyx_v_cb);
++ __Pyx_GOTREF(__pyx_v_self->update_cb);
++ __Pyx_DECREF(__pyx_v_self->update_cb);
++ __pyx_v_self->update_cb = __pyx_v_cb;
+
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++ /* "vidcutter/libs/pympv/mpv.pyx":1057
++ * return RenderFrameInfo()._from_struct(&info)
++ *
++ * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+ */
+
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_state);
+- __Pyx_XDECREF(__pyx_v__dict);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
++/* "vidcutter/libs/pympv/mpv.pyx":1062
++ * self.update_cb = cb
++ *
++ * def update(self): # <<<<<<<<<<<<<<
++ * cdef uint64_t ret
++ * with nogil:
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __Pyx_RefNannySetupContext("update (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++ uint64_t __pyx_v_ret;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ __Pyx_RefNannySetupContext("update", 0);
+
+- /* "(tree fragment)":17
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1064
++ * def update(self):
++ * cdef uint64_t ret
++ * with nogil: # <<<<<<<<<<<<<<
++ * ret = mpv_render_context_update(self._ctx)
++ * return ret
+ */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1065
++ * cdef uint64_t ret
++ * with nogil:
++ * ret = mpv_render_context_update(self._ctx) # <<<<<<<<<<<<<<
++ * return ret
++ *
++ */
++ __pyx_v_ret = mpv_render_context_update(__pyx_v_self->_ctx);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1064
++ * def update(self):
++ * cdef uint64_t ret
++ * with nogil: # <<<<<<<<<<<<<<
++ * ret = mpv_render_context_update(self._ctx)
++ * return ret
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1066
++ * with nogil:
++ * ret = mpv_render_context_update(self._ctx)
++ * return ret # <<<<<<<<<<<<<<
++ *
++ * @_errors
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
++ /* "vidcutter/libs/pympv/mpv.pyx":1062
++ * self.update_cb = cb
++ *
++ * def update(self): # <<<<<<<<<<<<<<
++ * cdef uint64_t ret
++ * with nogil:
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -18902,98 +18218,80 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cy
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":950
+- * bint inited
++/* "vidcutter/libs/pympv/mpv.pyx":1069
+ *
+- * def __init__(self, mpv, # <<<<<<<<<<<<<<
+- * api_type,
+- * opengl_init_params=None,
++ * @_errors
++ * def render(self, # <<<<<<<<<<<<<<
++ * opengl_fbo=None,
++ * flip_y=False,
+ */
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_mpv = 0;
+- PyObject *__pyx_v_api_type = 0;
+- PyObject *__pyx_v_opengl_init_params = 0;
+- PyObject *__pyx_v_advanced_control = 0;
+- PyObject *__pyx_v_x11_display = 0;
+- PyObject *__pyx_v_wl_display = 0;
+- PyObject *__pyx_v_drm_display = 0;
+- PyObject *__pyx_v_drm_osd_size = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_opengl_fbo = 0;
++ PyObject *__pyx_v_flip_y = 0;
++ PyObject *__pyx_v_depth = 0;
++ PyObject *__pyx_v_block_for_target_time = 0;
++ PyObject *__pyx_v_skip_rendering = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- int __pyx_r;
++ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
++ __Pyx_RefNannySetupContext("render (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_api_type,&__pyx_n_s_opengl_init_params,&__pyx_n_s_advanced_control,&__pyx_n_s_x11_display,&__pyx_n_s_wl_display,&__pyx_n_s_drm_display,&__pyx_n_s_drm_osd_size,0};
+- PyObject* values[8] = {0,0,0,0,0,0,0,0};
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":952
+- * def __init__(self, mpv,
+- * api_type,
+- * opengl_init_params=None, # <<<<<<<<<<<<<<
+- * advanced_control=False,
+- * x11_display=None,
+- */
+- values[2] = ((PyObject *)Py_None);
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_opengl_fbo,&__pyx_n_s_flip_y,&__pyx_n_s_depth,&__pyx_n_s_block_for_target_time,&__pyx_n_s_skip_rendering,0};
++ PyObject* values[5] = {0,0,0,0,0};
+
+- /* "vidcutter/libs/pympv/mpv.pyx":953
+- * api_type,
+- * opengl_init_params=None,
+- * advanced_control=False, # <<<<<<<<<<<<<<
+- * x11_display=None,
+- * wl_display=None,
++ /* "vidcutter/libs/pympv/mpv.pyx":1070
++ * @_errors
++ * def render(self,
++ * opengl_fbo=None, # <<<<<<<<<<<<<<
++ * flip_y=False,
++ * depth=None,
+ */
+- values[3] = ((PyObject *)Py_False);
++ values[0] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":954
+- * opengl_init_params=None,
+- * advanced_control=False,
+- * x11_display=None, # <<<<<<<<<<<<<<
+- * wl_display=None,
+- * drm_display=None,
++ /* "vidcutter/libs/pympv/mpv.pyx":1071
++ * def render(self,
++ * opengl_fbo=None,
++ * flip_y=False, # <<<<<<<<<<<<<<
++ * depth=None,
++ * block_for_target_time=True,
+ */
+- values[4] = ((PyObject *)Py_None);
++ values[1] = ((PyObject *)Py_False);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":955
+- * advanced_control=False,
+- * x11_display=None,
+- * wl_display=None, # <<<<<<<<<<<<<<
+- * drm_display=None,
+- * drm_osd_size=None
++ /* "vidcutter/libs/pympv/mpv.pyx":1072
++ * opengl_fbo=None,
++ * flip_y=False,
++ * depth=None, # <<<<<<<<<<<<<<
++ * block_for_target_time=True,
++ * skip_rendering=False):
+ */
+- values[5] = ((PyObject *)Py_None);
++ values[2] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":956
+- * x11_display=None,
+- * wl_display=None,
+- * drm_display=None, # <<<<<<<<<<<<<<
+- * drm_osd_size=None
+- * ):
++ /* "vidcutter/libs/pympv/mpv.pyx":1073
++ * flip_y=False,
++ * depth=None,
++ * block_for_target_time=True, # <<<<<<<<<<<<<<
++ * skip_rendering=False):
++ *
+ */
+- values[6] = ((PyObject *)Py_None);
++ values[3] = ((PyObject *)Py_True);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":957
+- * wl_display=None,
+- * drm_display=None,
+- * drm_osd_size=None # <<<<<<<<<<<<<<
+- * ):
++ /* "vidcutter/libs/pympv/mpv.pyx":1074
++ * depth=None,
++ * block_for_target_time=True,
++ * skip_rendering=False): # <<<<<<<<<<<<<<
+ *
++ * cdef:
+ */
+- values[7] = ((PyObject *)Py_None);
++ values[4] = ((PyObject *)Py_False);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+- case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+- CYTHON_FALLTHROUGH;
+- case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+- CYTHON_FALLTHROUGH;
+- case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+- CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+@@ -19010,62 +18308,40 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_fbo);
++ if (value) { values[0] = value; kw_args--; }
++ }
+ CYTHON_FALLTHROUGH;
+ case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_api_type)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 950, __pyx_L3_error)
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flip_y);
++ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_init_params);
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_depth);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advanced_control);
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_block_for_target_time);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x11_display);
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_rendering);
+ if (value) { values[4] = value; kw_args--; }
+ }
+- CYTHON_FALLTHROUGH;
+- case 5:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wl_display);
+- if (value) { values[5] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 6:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_display);
+- if (value) { values[6] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 7:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_osd_size);
+- if (value) { values[7] = value; kw_args--; }
+- }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 950, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1069, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+- CYTHON_FALLTHROUGH;
+- case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+- CYTHON_FALLTHROUGH;
+- case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+- CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+@@ -19073,36 +18349,35 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- break;
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+- __pyx_v_mpv = values[0];
+- __pyx_v_api_type = values[1];
+- __pyx_v_opengl_init_params = values[2];
+- __pyx_v_advanced_control = values[3];
+- __pyx_v_x11_display = values[4];
+- __pyx_v_wl_display = values[5];
+- __pyx_v_drm_display = values[6];
+- __pyx_v_drm_osd_size = values[7];
+- }
+- goto __pyx_L4_argument_unpacking_done;
++ __pyx_v_opengl_fbo = values[0];
++ __pyx_v_flip_y = values[1];
++ __pyx_v_depth = values[2];
++ __pyx_v_block_for_target_time = values[3];
++ __pyx_v_skip_rendering = values[4];
++ }
++ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 950, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1069, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+- return -1;
++ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_api_type, __pyx_v_opengl_init_params, __pyx_v_advanced_control, __pyx_v_x11_display, __pyx_v_wl_display, __pyx_v_drm_display, __pyx_v_drm_osd_size);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_opengl_fbo, __pyx_v_flip_y, __pyx_v_depth, __pyx_v_block_for_target_time, __pyx_v_skip_rendering);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":950
+- * bint inited
++ /* "vidcutter/libs/pympv/mpv.pyx":1069
+ *
+- * def __init__(self, mpv, # <<<<<<<<<<<<<<
+- * api_type,
+- * opengl_init_params=None,
++ * @_errors
++ * def render(self, # <<<<<<<<<<<<<<
++ * opengl_fbo=None,
++ * flip_y=False,
+ */
+
+ /* function exit code */
+@@ -19110,786 +18385,626 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_api_type, PyObject *__pyx_v_opengl_init_params, PyObject *__pyx_v_advanced_control, PyObject *__pyx_v_x11_display, PyObject *__pyx_v_wl_display, PyObject *__pyx_v_drm_display, PyObject *__pyx_v_drm_osd_size) {
+- struct mpv_opengl_init_params __pyx_v_gl_params;
+- struct mpv_opengl_drm_params __pyx_v_drm_params;
+- struct mpv_opengl_drm_osd_size __pyx_v__drm_osd_size;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_opengl_fbo, PyObject *__pyx_v_flip_y, PyObject *__pyx_v_depth, PyObject *__pyx_v_block_for_target_time, PyObject *__pyx_v_skip_rendering) {
++ struct mpv_opengl_fbo __pyx_v_fbo;
+ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_params = NULL;
+- PyObject *__pyx_v_arp = NULL;
+- int __pyx_v_err;
+- int __pyx_r;
++ int __pyx_v_ret;
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
++ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_5;
+ int __pyx_t_6;
+- int __pyx_t_7;
+- char const *__pyx_t_8;
+- PyObject *(*__pyx_t_9)(PyObject *);
+- int __pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
++ __Pyx_RefNannySetupContext("render", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":965
+- * mpv_opengl_drm_osd_size _drm_osd_size
++ /* "vidcutter/libs/pympv/mpv.pyx":1079
++ * mpv_opengl_fbo fbo
+ *
+- * self._mpv = mpv # <<<<<<<<<<<<<<
++ * params = _RenderParams() # <<<<<<<<<<<<<<
+ *
+- * memset(&gl_params, 0, sizeof(gl_params))
++ * if opengl_fbo:
+ */
+- if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 965, __pyx_L1_error)
+- __pyx_t_1 = __pyx_v_mpv;
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->_mpv);
+- __Pyx_DECREF(((PyObject *)__pyx_v_self->_mpv));
+- __pyx_v_self->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_t_1);
++ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":967
+- * self._mpv = mpv
++ /* "vidcutter/libs/pympv/mpv.pyx":1081
++ * params = _RenderParams()
+ *
+- * memset(&gl_params, 0, sizeof(gl_params)) # <<<<<<<<<<<<<<
+- * memset(&drm_params, 0, sizeof(drm_params))
+- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
++ * if opengl_fbo: # <<<<<<<<<<<<<<
++ * memset(&fbo, 0, sizeof(fbo))
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ */
+- (void)(memset((&__pyx_v_gl_params), 0, (sizeof(__pyx_v_gl_params))));
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":968
+- *
+- * memset(&gl_params, 0, sizeof(gl_params))
+- * memset(&drm_params, 0, sizeof(drm_params)) # <<<<<<<<<<<<<<
+- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
++ /* "vidcutter/libs/pympv/mpv.pyx":1082
+ *
++ * if opengl_fbo:
++ * memset(&fbo, 0, sizeof(fbo)) # <<<<<<<<<<<<<<
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
++ * fbo.w = opengl_fbo["w"]
+ */
+- (void)(memset((&__pyx_v_drm_params), 0, (sizeof(__pyx_v_drm_params))));
++ (void)(memset((&__pyx_v_fbo), 0, (sizeof(__pyx_v_fbo))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":969
+- * memset(&gl_params, 0, sizeof(gl_params))
+- * memset(&drm_params, 0, sizeof(drm_params))
+- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size)) # <<<<<<<<<<<<<<
+- *
+- * params = _RenderParams()
++ /* "vidcutter/libs/pympv/mpv.pyx":1083
++ * if opengl_fbo:
++ * memset(&fbo, 0, sizeof(fbo))
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
++ * fbo.w = opengl_fbo["w"]
++ * fbo.h = opengl_fbo["h"]
+ */
+- (void)(memset((&__pyx_v__drm_osd_size), 0, (sizeof(__pyx_v__drm_osd_size))));
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ if (!__pyx_t_2) {
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else {
++ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_t_3 = __pyx_t_5;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_3 = 0;
++ __pyx_L4_bool_binop_done:;
++ __pyx_v_fbo.fbo = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":971
+- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
+- *
+- * params = _RenderParams() # <<<<<<<<<<<<<<
+- *
+- * if api_type == self.API_OPENGL:
++ /* "vidcutter/libs/pympv/mpv.pyx":1084
++ * memset(&fbo, 0, sizeof(fbo))
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
++ * fbo.w = opengl_fbo["w"] # <<<<<<<<<<<<<<
++ * fbo.h = opengl_fbo["h"]
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
+- __pyx_t_1 = 0;
++ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_v_fbo.w = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":973
+- * params = _RenderParams()
+- *
+- * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
+- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":1085
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
++ * fbo.w = opengl_fbo["w"]
++ * fbo.h = opengl_fbo["h"] # <<<<<<<<<<<<<<
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (likely(__pyx_t_3)) {
++ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_v_fbo.h = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":974
+- *
+- * if api_type == self.API_OPENGL:
+- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL) # <<<<<<<<<<<<<<
+- * else:
+- * raise PyMPVError("Unknown api_type %r" % api_type)
++ /* "vidcutter/libs/pympv/mpv.pyx":1086
++ * fbo.w = opengl_fbo["w"]
++ * fbo.h = opengl_fbo["h"]
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
++ * if flip_y:
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ if (!__pyx_t_2) {
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ } else {
++ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_t_3 = __pyx_t_5;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ goto __pyx_L6_bool_binop_done;
++ }
++ __pyx_t_3 = 0;
++ __pyx_L6_bool_binop_done:;
++ __pyx_v_fbo.internal_format = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":973
++ /* "vidcutter/libs/pympv/mpv.pyx":1087
++ * fbo.h = opengl_fbo["h"]
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo) # <<<<<<<<<<<<<<
++ * if flip_y:
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ */
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1081
+ * params = _RenderParams()
+ *
+- * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
+- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
+- * else:
++ * if opengl_fbo: # <<<<<<<<<<<<<<
++ * memset(&fbo, 0, sizeof(fbo))
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ */
+- goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":976
+- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
+- * else:
+- * raise PyMPVError("Unknown api_type %r" % api_type) # <<<<<<<<<<<<<<
+- *
+- * if opengl_init_params is not None:
++ /* "vidcutter/libs/pympv/mpv.pyx":1088
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
++ * if flip_y: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ * if depth is not None:
+ */
+- /*else*/ {
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
++ if (__pyx_t_2) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1089
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
++ * if flip_y:
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1) # <<<<<<<<<<<<<<
++ * if depth is not None:
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ */
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_1, function);
+- }
+- }
+- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 976, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1088
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
++ * if flip_y: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ * if depth is not None:
++ */
+ }
+- __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":978
+- * raise PyMPVError("Unknown api_type %r" % api_type)
+- *
+- * if opengl_init_params is not None: # <<<<<<<<<<<<<<
+- * self._get_proc_address = opengl_init_params["get_proc_address"]
+- * gl_params.get_proc_address = &_c_getprocaddress
++ /* "vidcutter/libs/pympv/mpv.pyx":1090
++ * if flip_y:
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ * if depth is not None: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ * if not block_for_target_time:
+ */
+- __pyx_t_3 = (__pyx_v_opengl_init_params != Py_None);
+- __pyx_t_6 = (__pyx_t_3 != 0);
++ __pyx_t_2 = (__pyx_v_depth != Py_None);
++ __pyx_t_6 = (__pyx_t_2 != 0);
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":979
+- *
+- * if opengl_init_params is not None:
+- * self._get_proc_address = opengl_init_params["get_proc_address"] # <<<<<<<<<<<<<<
+- * gl_params.get_proc_address = &_c_getprocaddress
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
++ /* "vidcutter/libs/pympv/mpv.pyx":1091
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ * if depth is not None:
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth) # <<<<<<<<<<<<<<
++ * if not block_for_target_time:
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ */
+- __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GIVEREF(__pyx_t_2);
+- __Pyx_GOTREF(__pyx_v_self->_get_proc_address);
+- __Pyx_DECREF(__pyx_v_self->_get_proc_address);
+- __pyx_v_self->_get_proc_address = __pyx_t_2;
+- __pyx_t_2 = 0;
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":980
+- * if opengl_init_params is not None:
+- * self._get_proc_address = opengl_init_params["get_proc_address"]
+- * gl_params.get_proc_address = &_c_getprocaddress # <<<<<<<<<<<<<<
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ /* "vidcutter/libs/pympv/mpv.pyx":1090
++ * if flip_y:
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ * if depth is not None: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ * if not block_for_target_time:
+ */
+- __pyx_v_gl_params.get_proc_address = (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":981
+- * self._get_proc_address = opengl_init_params["get_proc_address"]
+- * gl_params.get_proc_address = &_c_getprocaddress
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+- * if advanced_control:
++ /* "vidcutter/libs/pympv/mpv.pyx":1092
++ * if depth is not None:
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ * if not block_for_target_time: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ * if skip_rendering:
+ */
+- __pyx_v_gl_params.get_proc_address_ctx = ((void *)__pyx_v_self->_get_proc_address);
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
++ __pyx_t_2 = ((!__pyx_t_6) != 0);
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":982
+- * gl_params.get_proc_address = &_c_getprocaddress
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params) # <<<<<<<<<<<<<<
+- * if advanced_control:
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ /* "vidcutter/libs/pympv/mpv.pyx":1093
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ * if not block_for_target_time:
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0) # <<<<<<<<<<<<<<
++ * if skip_rendering:
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":978
+- * raise PyMPVError("Unknown api_type %r" % api_type)
+- *
+- * if opengl_init_params is not None: # <<<<<<<<<<<<<<
+- * self._get_proc_address = opengl_init_params["get_proc_address"]
+- * gl_params.get_proc_address = &_c_getprocaddress
++ /* "vidcutter/libs/pympv/mpv.pyx":1092
++ * if depth is not None:
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ * if not block_for_target_time: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ * if skip_rendering:
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":983
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+- * if advanced_control: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+- * if x11_display:
++ /* "vidcutter/libs/pympv/mpv.pyx":1094
++ * if not block_for_target_time:
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ * if skip_rendering: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
++ *
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 983, __pyx_L1_error)
+- if (__pyx_t_6) {
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":984
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+- * if advanced_control:
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1) # <<<<<<<<<<<<<<
+- * if x11_display:
+- * self._x11_display = x11_display
++ /* "vidcutter/libs/pympv/mpv.pyx":1095
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ * if skip_rendering:
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1) # <<<<<<<<<<<<<<
++ *
++ * with nogil:
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":983
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+- * if advanced_control: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+- * if x11_display:
++ /* "vidcutter/libs/pympv/mpv.pyx":1094
++ * if not block_for_target_time:
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ * if skip_rendering: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
++ *
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":985
+- * if advanced_control:
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+- * if x11_display: # <<<<<<<<<<<<<<
+- * self._x11_display = x11_display
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ /* "vidcutter/libs/pympv/mpv.pyx":1097
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
++ *
++ * with nogil: # <<<<<<<<<<<<<<
++ * ret = mpv_render_context_render(self._ctx, params.params)
++ * return ret
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
+- if (__pyx_t_6) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":986
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+- * if x11_display:
+- * self._x11_display = x11_display # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+- * if wl_display:
++ /* "vidcutter/libs/pympv/mpv.pyx":1098
++ *
++ * with nogil:
++ * ret = mpv_render_context_render(self._ctx, params.params) # <<<<<<<<<<<<<<
++ * return ret
++ *
+ */
+- __Pyx_INCREF(__pyx_v_x11_display);
+- __Pyx_GIVEREF(__pyx_v_x11_display);
+- __Pyx_GOTREF(__pyx_v_self->_x11_display);
+- __Pyx_DECREF(__pyx_v_self->_x11_display);
+- __pyx_v_self->_x11_display = __pyx_v_x11_display;
++ __pyx_v_ret = mpv_render_context_render(__pyx_v_self->_ctx, __pyx_v_params->params);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":987
+- * if x11_display:
+- * self._x11_display = x11_display
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display)) # <<<<<<<<<<<<<<
+- * if wl_display:
+- * self._wl_display = wl_display
++ /* "vidcutter/libs/pympv/mpv.pyx":1097
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
++ *
++ * with nogil: # <<<<<<<<<<<<<<
++ * ret = mpv_render_context_render(self._ctx, params.params)
++ * return ret
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L14;
++ }
++ __pyx_L14:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":985
+- * if advanced_control:
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+- * if x11_display: # <<<<<<<<<<<<<<
+- * self._x11_display = x11_display
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ /* "vidcutter/libs/pympv/mpv.pyx":1099
++ * with nogil:
++ * ret = mpv_render_context_render(self._ctx, params.params)
++ * return ret # <<<<<<<<<<<<<<
++ *
++ * def report_swap(self):
+ */
+- }
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":988
+- * self._x11_display = x11_display
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+- * if wl_display: # <<<<<<<<<<<<<<
+- * self._wl_display = wl_display
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ /* "vidcutter/libs/pympv/mpv.pyx":1069
++ *
++ * @_errors
++ * def render(self, # <<<<<<<<<<<<<<
++ * opengl_fbo=None,
++ * flip_y=False,
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
+- if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":989
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+- * if wl_display:
+- * self._wl_display = wl_display # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- * if drm_display:
+- */
+- __Pyx_INCREF(__pyx_v_wl_display);
+- __Pyx_GIVEREF(__pyx_v_wl_display);
+- __Pyx_GOTREF(__pyx_v_self->_wl_display);
+- __Pyx_DECREF(__pyx_v_self->_wl_display);
+- __pyx_v_self->_wl_display = __pyx_v_wl_display;
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF((PyObject *)__pyx_v_params);
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":990
+- * if wl_display:
+- * self._wl_display = wl_display
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display)) # <<<<<<<<<<<<<<
+- * if drm_display:
+- * drm_params.fd = drm_display.get("fd", -1)
++/* "vidcutter/libs/pympv/mpv.pyx":1101
++ * return ret
++ *
++ * def report_swap(self): # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_report_swap(self._ctx)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":988
+- * self._x11_display = x11_display
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+- * if wl_display: # <<<<<<<<<<<<<<
+- * self._wl_display = wl_display
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- */
+- }
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("report_swap (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":991
+- * self._wl_display = wl_display
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- * if drm_display: # <<<<<<<<<<<<<<
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 991, __pyx_L1_error)
+- if (__pyx_t_6) {
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":992
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- * if drm_display:
+- * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_drm_params.fd = __pyx_t_7;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("report_swap", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":993
+- * if drm_display:
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None)
++ /* "vidcutter/libs/pympv/mpv.pyx":1102
++ *
++ * def report_swap(self):
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_report_swap(self._ctx)
++ *
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 993, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_drm_params.crtc_id = __pyx_t_7;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":994
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
+- * arp = drm_display.get("atomic_request_ptr", None)
+- * if arp is not None:
++ /* "vidcutter/libs/pympv/mpv.pyx":1103
++ * def report_swap(self):
++ * with nogil:
++ * mpv_render_context_report_swap(self._ctx) # <<<<<<<<<<<<<<
++ *
++ * def free(self):
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_drm_params.connector_id = __pyx_t_7;
++ mpv_render_context_report_swap(__pyx_v_self->_ctx);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":995
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
+- * if arp is not None:
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ /* "vidcutter/libs/pympv/mpv.pyx":1102
++ *
++ * def report_swap(self):
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_report_swap(self._ctx)
++ *
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_arp = __pyx_t_2;
+- __pyx_t_2 = 0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":996
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None)
+- * if arp is not None: # <<<<<<<<<<<<<<
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
++ /* "vidcutter/libs/pympv/mpv.pyx":1101
++ * return ret
++ *
++ * def report_swap(self): # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_report_swap(self._ctx)
+ */
+- __pyx_t_6 = (__pyx_v_arp != Py_None);
+- __pyx_t_3 = (__pyx_t_6 != 0);
+- if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":997
+- * arp = drm_display.get("atomic_request_ptr", None)
+- * if arp is not None:
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*") # <<<<<<<<<<<<<<
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- */
+- __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L1_error)
+- __pyx_v_drm_params.atomic_request_ptr = ((struct _drmModeAtomicReq **)__pyx_f_9vidcutter_4libs_3mpv_get_pointer(__pyx_t_8, __pyx_kp_s_drmModeAtomicReq));
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":996
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None)
+- * if arp is not None: # <<<<<<<<<<<<<<
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
++/* "vidcutter/libs/pympv/mpv.pyx":1105
++ * mpv_render_context_report_swap(self._ctx)
++ *
++ * def free(self): # <<<<<<<<<<<<<<
++ * if not self.inited:
++ * return
+ */
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":998
+- * if arp is not None:
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- * if drm_osd_size:
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_drm_params.render_fd = __pyx_t_7;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("free (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":999
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params) # <<<<<<<<<<<<<<
+- * if drm_osd_size:
+- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+- */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":991
+- * self._wl_display = wl_display
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- * if drm_display: # <<<<<<<<<<<<<<
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- */
+- }
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ int __pyx_t_1;
++ __Pyx_RefNannySetupContext("free", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1000
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- * if drm_osd_size: # <<<<<<<<<<<<<<
+- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+- */
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1000, __pyx_L1_error)
+- if (__pyx_t_3) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1001
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- * if drm_osd_size:
+- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+- *
+- */
+- if ((likely(PyTuple_CheckExact(__pyx_v_drm_osd_size))) || (PyList_CheckExact(__pyx_v_drm_osd_size))) {
+- PyObject* sequence = __pyx_v_drm_osd_size;
+- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
+- if (unlikely(size != 2)) {
+- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+- __PYX_ERR(0, 1001, __pyx_L1_error)
+- }
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- if (likely(PyTuple_CheckExact(sequence))) {
+- __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+- __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+- } else {
+- __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+- __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+- }
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_t_2);
+- #else
+- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- #endif
+- } else {
+- Py_ssize_t index = -1;
+- __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
+- index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
+- __Pyx_GOTREF(__pyx_t_1);
+- index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
+- __Pyx_GOTREF(__pyx_t_2);
+- if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __pyx_t_9 = NULL;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- goto __pyx_L12_unpacking_done;
+- __pyx_L11_unpacking_failed:;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_9 = NULL;
+- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+- __PYX_ERR(0, 1001, __pyx_L1_error)
+- __pyx_L12_unpacking_done:;
+- }
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v__drm_osd_size.width = __pyx_t_7;
+- __pyx_v__drm_osd_size.height = __pyx_t_10;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1002
+- * if drm_osd_size:
+- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1106
+ *
+- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
++ * def free(self):
++ * if not self.inited: # <<<<<<<<<<<<<<
++ * return
++ * with nogil:
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1000
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- * if drm_osd_size: # <<<<<<<<<<<<<<
+- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
++ /* "vidcutter/libs/pympv/mpv.pyx":1107
++ * def free(self):
++ * if not self.inited:
++ * return # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_free(self._ctx)
+ */
+- }
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1004
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
++ /* "vidcutter/libs/pympv/mpv.pyx":1106
+ *
+- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
++ * def free(self):
++ * if not self.inited: # <<<<<<<<<<<<<<
++ * return
++ * with nogil:
+ */
+- __pyx_v_err = mpv_render_context_create((&__pyx_v_self->_ctx), __pyx_v_self->_mpv->_ctx, __pyx_v_params->params);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1005
+- *
+- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * self.inited = True
++ /* "vidcutter/libs/pympv/mpv.pyx":1108
++ * if not self.inited:
++ * return
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False
+ */
+- __pyx_t_3 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_3)) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1006
+- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- * self.inited = True
++ /* "vidcutter/libs/pympv/mpv.pyx":1109
++ * return
++ * with nogil:
++ * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
++ * self.inited = False
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_1, function);
++ mpv_render_context_free(__pyx_v_self->_ctx);
+ }
+- }
+- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 1006, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1005
+- *
+- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * self.inited = True
++ /* "vidcutter/libs/pympv/mpv.pyx":1108
++ * if not self.inited:
++ * return
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L6;
++ }
++ __pyx_L6:;
++ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1007
+- * if err < 0:
+- * raise MPVError(err)
+- * self.inited = True # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1110
++ * with nogil:
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False # <<<<<<<<<<<<<<
+ *
+- * @_errors
++ * def close(self):
+ */
+- __pyx_v_self->inited = 1;
++ __pyx_v_self->inited = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":950
+- * bint inited
++ /* "vidcutter/libs/pympv/mpv.pyx":1105
++ * mpv_render_context_report_swap(self._ctx)
+ *
+- * def __init__(self, mpv, # <<<<<<<<<<<<<<
+- * api_type,
+- * opengl_init_params=None,
++ * def free(self): # <<<<<<<<<<<<<<
++ * if not self.inited:
++ * return
+ */
+
+ /* function exit code */
+- __pyx_r = 0;
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+- __Pyx_XDECREF((PyObject *)__pyx_v_params);
+- __Pyx_XDECREF(__pyx_v_arp);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1010
++/* "vidcutter/libs/pympv/mpv.pyx":1112
++ * self.inited = False
+ *
+- * @_errors
+- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
++ * def close(self): # <<<<<<<<<<<<<<
++ * if not self.inited:
++ * return
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_icc_profile (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_icc_blob));
++ __Pyx_RefNannySetupContext("close (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
+- struct mpv_render_param __pyx_v_param;
+- struct mpv_byte_array __pyx_v_val;
+- int __pyx_v_err;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+- int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- char *__pyx_t_6;
+- Py_ssize_t __pyx_t_7;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_icc_profile", 0);
++ __Pyx_RefNannySetupContext("close", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1016
+- * int err
++ /* "vidcutter/libs/pympv/mpv.pyx":1113
+ *
+- * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
+- * raise PyMPVError("icc_blob should be a bytes instance")
+- * val.data = <void *><char *>icc_blob
+- */
+- __pyx_t_1 = PyBytes_Check(__pyx_v_icc_blob);
+- __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
+- if (unlikely(__pyx_t_2)) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1017
+- *
+- * if not isinstance(icc_blob, bytes):
+- * raise PyMPVError("icc_blob should be a bytes instance") # <<<<<<<<<<<<<<
+- * val.data = <void *><char *>icc_blob
+- * val.size = len(icc_blob)
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_icc_blob_should_be_a_bytes_insta) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_icc_blob_should_be_a_bytes_insta);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(0, 1017, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1016
+- * int err
+- *
+- * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
+- * raise PyMPVError("icc_blob should be a bytes instance")
+- * val.data = <void *><char *>icc_blob
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1018
+- * if not isinstance(icc_blob, bytes):
+- * raise PyMPVError("icc_blob should be a bytes instance")
+- * val.data = <void *><char *>icc_blob # <<<<<<<<<<<<<<
+- * val.size = len(icc_blob)
+- *
+- */
+- __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
+- __pyx_v_val.data = ((void *)((char *)__pyx_t_6));
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1019
+- * raise PyMPVError("icc_blob should be a bytes instance")
+- * val.data = <void *><char *>icc_blob
+- * val.size = len(icc_blob) # <<<<<<<<<<<<<<
+- *
+- * param.type = MPV_RENDER_PARAM_ICC_PROFILE
++ * def close(self):
++ * if not self.inited: # <<<<<<<<<<<<<<
++ * return
++ * with nogil:
+ */
+- __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1019, __pyx_L1_error)
+- __pyx_v_val.size = __pyx_t_7;
++ __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1021
+- * val.size = len(icc_blob)
+- *
+- * param.type = MPV_RENDER_PARAM_ICC_PROFILE # <<<<<<<<<<<<<<
+- * param.data = &val
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1114
++ * def close(self):
++ * if not self.inited:
++ * return # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_free(self._ctx)
+ */
+- __pyx_v_param.type = MPV_RENDER_PARAM_ICC_PROFILE;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1022
+- *
+- * param.type = MPV_RENDER_PARAM_ICC_PROFILE
+- * param.data = &val # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1113
+ *
++ * def close(self):
++ * if not self.inited: # <<<<<<<<<<<<<<
++ * return
+ * with nogil:
+ */
+- __pyx_v_param.data = (&__pyx_v_val);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1024
+- * param.data = &val
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1115
++ * if not self.inited:
++ * return
+ * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False
+ */
+ {
+ #ifdef WITH_THREAD
+@@ -19899,22 +19014,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1025
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1116
++ * return
+ * with nogil:
+- * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
+- * return err
++ * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
++ * self.inited = False
+ *
+ */
+- __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
++ mpv_render_context_free(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1024
+- * param.data = &val
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1115
++ * if not self.inited:
++ * return
+ * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+@@ -19928,1485 +19043,1505 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1026
++ /* "vidcutter/libs/pympv/mpv.pyx":1117
+ * with nogil:
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err # <<<<<<<<<<<<<<
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False # <<<<<<<<<<<<<<
+ *
+- * @_errors
++ * def __dealloc__(self):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __pyx_v_self->inited = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1010
++ /* "vidcutter/libs/pympv/mpv.pyx":1112
++ * self.inited = False
+ *
+- * @_errors
+- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
++ * def close(self): # <<<<<<<<<<<<<<
++ * if not self.inited:
++ * return
+ */
+
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_icc_profile", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1029
++/* "vidcutter/libs/pympv/mpv.pyx":1119
++ * self.inited = False
++ *
++ * def __dealloc__(self): # <<<<<<<<<<<<<<
++ * self.close()
+ *
+- * @_errors
+- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux) {
+- PyObject *__pyx_r = 0;
++static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self); /*proto*/
++static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_ambient_light (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_lux));
++ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
++ __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_lux) {
+- struct mpv_render_param __pyx_v_param;
+- int __pyx_v_val;
+- int __pyx_v_err;
+- PyObject *__pyx_r = NULL;
++static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
++ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_ambient_light", 0);
++ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1035
+- * int err
++ /* "vidcutter/libs/pympv/mpv.pyx":1120
+ *
+- * val = lux # <<<<<<<<<<<<<<
+- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
+- * param.data = &val
++ * def __dealloc__(self):
++ * self.close() # <<<<<<<<<<<<<<
++ *
++ * cdef class OpenGLRenderContext(RenderContext):
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
+- __pyx_v_val = __pyx_t_1;
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1036
++ /* "vidcutter/libs/pympv/mpv.pyx":1119
++ * self.inited = False
+ *
+- * val = lux
+- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT # <<<<<<<<<<<<<<
+- * param.data = &val
++ * def __dealloc__(self): # <<<<<<<<<<<<<<
++ * self.close()
+ *
+ */
+- __pyx_v_param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1037
+- * val = lux
+- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
+- * param.data = &val # <<<<<<<<<<<<<<
+- *
+- * with nogil:
+- */
+- __pyx_v_param.data = (&__pyx_v_val);
++ /* function exit code */
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.RenderContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_L0:;
++ __Pyx_RefNannyFinishContext();
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1039
+- * param.data = &val
+- *
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1040
+- *
+- * with nogil:
+- * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
+- * return err
+- *
+- */
+- __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
+- }
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1039
+- * param.data = &val
+- *
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1041
+- * with nogil:
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err # <<<<<<<<<<<<<<
+- *
+- * def get_next_frame_info(self):
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_r = __pyx_t_2;
+- __pyx_t_2 = 0;
+- goto __pyx_L0;
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(1, 2, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1029
+- *
+- * @_errors
+- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_ambient_light", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+- __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1043
+- * return err
+- *
+- * def get_next_frame_info(self): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_frame_info info
++/* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("get_next_frame_info (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+- struct mpv_render_frame_info __pyx_v_info;
+- struct mpv_render_param __pyx_v_param;
+- int __pyx_v_err;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("get_next_frame_info", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1048
+- * mpv_render_param param
+- *
+- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO # <<<<<<<<<<<<<<
+- * param.data = &info
+- * with nogil:
+- */
+- __pyx_v_param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1049
+- *
+- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+- * param.data = &info # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_render_context_get_info(self._ctx, param)
+- */
+- __pyx_v_param.data = (&__pyx_v_info);
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1050
+- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+- * param.data = &info
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_get_info(self._ctx, param)
+- * if err < 0:
++ /* "(tree fragment)":4
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(1, 4, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1051
+- * param.data = &info
+- * with nogil:
+- * err = mpv_render_context_get_info(self._ctx, param) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
++ /* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+- __pyx_v_err = mpv_render_context_get_info(__pyx_v_self->_ctx, __pyx_v_param);
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1050
+- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+- * param.data = &info
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_get_info(self._ctx, param)
+- * if err < 0:
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1052
+- * with nogil:
+- * err = mpv_render_context_get_info(self._ctx, param)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
++/* "vidcutter/libs/pympv/mpv.pyx":1123
+ *
++ * cdef class OpenGLRenderContext(RenderContext):
++ * def __init__(self, mpv, # <<<<<<<<<<<<<<
++ * get_proc_address,
++ * *args, **kwargs):
+ */
+- __pyx_t_1 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_1)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1053
+- * err = mpv_render_context_get_info(self._ctx, param)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- *
+- * return RenderFrameInfo()._from_struct(&info)
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_mpv = 0;
++ PyObject *__pyx_v_get_proc_address = 0;
++ PyObject *__pyx_v_args = 0;
++ PyObject *__pyx_v_kwargs = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
++ __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
++ __Pyx_GOTREF(__pyx_v_kwargs);
++ if (PyTuple_GET_SIZE(__pyx_args) > 2) {
++ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
++ if (unlikely(!__pyx_v_args)) {
++ __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
++ __Pyx_RefNannyFinishContext();
++ return -1;
+ }
+- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 1053, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_v_args);
++ } else {
++ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
++ }
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_get_proc_address,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ default:
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1123, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1123, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ }
++ __pyx_v_mpv = values[0];
++ __pyx_v_get_proc_address = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1123, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
++ __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return -1;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_get_proc_address, __pyx_v_args, __pyx_v_kwargs);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1052
+- * with nogil:
+- * err = mpv_render_context_get_info(self._ctx, param)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
++ /* function exit code */
++ __Pyx_XDECREF(__pyx_v_args);
++ __Pyx_XDECREF(__pyx_v_kwargs);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_get_proc_address, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
++ PyObject *__pyx_v_init_params = NULL;
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__init__", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1127
++ * *args, **kwargs):
++ * init_params = {
++ * "get_proc_address": get_proc_address # <<<<<<<<<<<<<<
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
++ */
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1127, __pyx_L1_error)
++ __pyx_v_init_params = ((PyObject*)__pyx_t_1);
++ __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1129
++ * "get_proc_address": get_proc_address
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
++ * init_params, *args, **kwargs)
+ *
+ */
+- }
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1055
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":1130
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
++ * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
+ *
+- * return RenderFrameInfo()._from_struct(&info) # <<<<<<<<<<<<<<
++ * class CallbackThread(Thread):
++ */
++ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_INCREF(((PyObject *)__pyx_v_self));
++ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
++ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
++ __Pyx_INCREF(__pyx_v_mpv);
++ __Pyx_GIVEREF(__pyx_v_mpv);
++ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_mpv);
++ __Pyx_GIVEREF(__pyx_t_2);
++ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
++ __Pyx_INCREF(__pyx_v_init_params);
++ __Pyx_GIVEREF(__pyx_v_init_params);
++ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_init_params);
++ __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1129
++ * "get_proc_address": get_proc_address
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
++ * init_params, *args, **kwargs)
+ *
+- * def set_update_callback(self, cb):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1130
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
++ * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
++ *
++ * class CallbackThread(Thread):
++ */
++ __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1129
++ * "get_proc_address": get_proc_address
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
++ * init_params, *args, **kwargs)
++ *
++ */
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1043
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":1123
+ *
+- * def get_next_frame_info(self): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_frame_info info
++ * cdef class OpenGLRenderContext(RenderContext):
++ * def __init__(self, mpv, # <<<<<<<<<<<<<<
++ * get_proc_address,
++ * *args, **kwargs):
+ */
+
+ /* function exit code */
++ __pyx_r = 0;
++ goto __pyx_L0;
+ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.get_next_frame_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = -1;
+ __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF(__pyx_v_init_params);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1057
+- * return RenderFrameInfo()._from_struct(&info)
+- *
+- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_update_callback (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_cb));
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_cb) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_update_callback", 0);
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1058
+- *
+- * def set_update_callback(self, cb):
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- * self.update_cb = cb
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(1, 2, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1059
+- * def set_update_callback(self, cb):
+- * with nogil:
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
+- * self.update_cb = cb
+- *
+- */
+- mpv_render_context_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1058
+- *
+- * def set_update_callback(self, cb):
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- * self.update_cb = cb
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1060
+- * with nogil:
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- * self.update_cb = cb # <<<<<<<<<<<<<<
+- *
+- * def update(self):
+- */
+- __Pyx_INCREF(__pyx_v_cb);
+- __Pyx_GIVEREF(__pyx_v_cb);
+- __Pyx_GOTREF(__pyx_v_self->update_cb);
+- __Pyx_DECREF(__pyx_v_self->update_cb);
+- __pyx_v_self->update_cb = __pyx_v_cb;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1057
+- * return RenderFrameInfo()._from_struct(&info)
+- *
+- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1062
+- * self.update_cb = cb
+- *
+- * def update(self): # <<<<<<<<<<<<<<
+- * cdef uint64_t ret
+- * with nogil:
++/* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("update (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+- uint64_t __pyx_v_ret;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("update", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1064
+- * def update(self):
+- * cdef uint64_t ret
+- * with nogil: # <<<<<<<<<<<<<<
+- * ret = mpv_render_context_update(self._ctx)
+- * return ret
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1065
+- * cdef uint64_t ret
+- * with nogil:
+- * ret = mpv_render_context_update(self._ctx) # <<<<<<<<<<<<<<
+- * return ret
+- *
+- */
+- __pyx_v_ret = mpv_render_context_update(__pyx_v_self->_ctx);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1064
+- * def update(self):
+- * cdef uint64_t ret
+- * with nogil: # <<<<<<<<<<<<<<
+- * ret = mpv_render_context_update(self._ctx)
+- * return ret
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1066
+- * with nogil:
+- * ret = mpv_render_context_update(self._ctx)
+- * return ret # <<<<<<<<<<<<<<
+- *
+- * @_errors
++ /* "(tree fragment)":4
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(1, 4, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1062
+- * self.update_cb = cb
+- *
+- * def update(self): # <<<<<<<<<<<<<<
+- * cdef uint64_t ret
+- * with nogil:
++ /* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+- __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1069
++/* "vidcutter/libs/pympv/mpv.pyx":1133
+ *
+- * @_errors
+- * def render(self, # <<<<<<<<<<<<<<
+- * opengl_fbo=None,
+- * flip_y=False,
++ * class CallbackThread(Thread):
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * Thread.__init__(self)
++ * self.daemon = True
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_opengl_fbo = 0;
+- PyObject *__pyx_v_flip_y = 0;
+- PyObject *__pyx_v_depth = 0;
+- PyObject *__pyx_v_block_for_target_time = 0;
+- PyObject *__pyx_v_skip_rendering = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__ = {"__init__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("render (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_opengl_fbo,&__pyx_n_s_flip_y,&__pyx_n_s_depth,&__pyx_n_s_block_for_target_time,&__pyx_n_s_skip_rendering,0};
+- PyObject* values[5] = {0,0,0,0,0};
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1070
+- * @_errors
+- * def render(self,
+- * opengl_fbo=None, # <<<<<<<<<<<<<<
+- * flip_y=False,
+- * depth=None,
+- */
+- values[0] = ((PyObject *)Py_None);
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1071
+- * def render(self,
+- * opengl_fbo=None,
+- * flip_y=False, # <<<<<<<<<<<<<<
+- * depth=None,
+- * block_for_target_time=True,
+- */
+- values[1] = ((PyObject *)Py_False);
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1072
+- * opengl_fbo=None,
+- * flip_y=False,
+- * depth=None, # <<<<<<<<<<<<<<
+- * block_for_target_time=True,
+- * skip_rendering=False):
++ /* "vidcutter/libs/pympv/mpv.pyx":1134
++ * class CallbackThread(Thread):
++ * def __init__(self):
++ * Thread.__init__(self) # <<<<<<<<<<<<<<
++ * self.daemon = True
++ * self.lock = Semaphore()
+ */
+- values[2] = ((PyObject *)Py_None);
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_2)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_2);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self);
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1073
+- * flip_y=False,
+- * depth=None,
+- * block_for_target_time=True, # <<<<<<<<<<<<<<
+- * skip_rendering=False):
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1135
++ * def __init__(self):
++ * Thread.__init__(self)
++ * self.daemon = True # <<<<<<<<<<<<<<
++ * self.lock = Semaphore()
++ * self.lock.acquire(True)
+ */
+- values[3] = ((PyObject *)Py_True);
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1074
+- * depth=None,
+- * block_for_target_time=True,
+- * skip_rendering=False): # <<<<<<<<<<<<<<
+- *
+- * cdef:
++ /* "vidcutter/libs/pympv/mpv.pyx":1136
++ * Thread.__init__(self)
++ * self.daemon = True
++ * self.lock = Semaphore() # <<<<<<<<<<<<<<
++ * self.lock.acquire(True)
++ * self.callback = None
+ */
+- values[4] = ((PyObject *)Py_False);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+- CYTHON_FALLTHROUGH;
+- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+- CYTHON_FALLTHROUGH;
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_fbo);
+- if (value) { values[0] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flip_y);
+- if (value) { values[1] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_depth);
+- if (value) { values[2] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 3:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_block_for_target_time);
+- if (value) { values[3] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 4:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_rendering);
+- if (value) { values[4] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1069, __pyx_L3_error)
+- }
+- } else {
+- switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+- CYTHON_FALLTHROUGH;
+- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+- CYTHON_FALLTHROUGH;
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_2)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_2);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+- __pyx_v_opengl_fbo = values[0];
+- __pyx_v_flip_y = values[1];
+- __pyx_v_depth = values[2];
+- __pyx_v_block_for_target_time = values[3];
+- __pyx_v_skip_rendering = values[4];
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1069, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1137
++ * self.daemon = True
++ * self.lock = Semaphore()
++ * self.lock.acquire(True) # <<<<<<<<<<<<<<
++ * self.callback = None
++ * self.isshutdown = False
++ */
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_True);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1138
++ * self.lock = Semaphore()
++ * self.lock.acquire(True)
++ * self.callback = None # <<<<<<<<<<<<<<
++ * self.isshutdown = False
++ *
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1139
++ * self.lock.acquire(True)
++ * self.callback = None
++ * self.isshutdown = False # <<<<<<<<<<<<<<
++ *
++ * def shutdown(self):
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1133
++ *
++ * class CallbackThread(Thread):
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * Thread.__init__(self)
++ * self.daemon = True
++ */
++
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_opengl_fbo, __pyx_v_flip_y, __pyx_v_depth, __pyx_v_block_for_target_time, __pyx_v_skip_rendering);
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
++/* "vidcutter/libs/pympv/mpv.pyx":1141
++ * self.isshutdown = False
+ *
+- * @_errors
+- * def render(self, # <<<<<<<<<<<<<<
+- * opengl_fbo=None,
+- * flip_y=False,
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * self.isshutdown = True
++ * self.callback = None
+ */
+
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown = {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(__pyx_self, ((PyObject *)__pyx_v_self));
++
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_opengl_fbo, PyObject *__pyx_v_flip_y, PyObject *__pyx_v_depth, PyObject *__pyx_v_block_for_target_time, PyObject *__pyx_v_skip_rendering) {
+- struct mpv_opengl_fbo __pyx_v_fbo;
+- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_params = NULL;
+- int __pyx_v_ret;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- int __pyx_t_6;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("render", 0);
++ __Pyx_RefNannySetupContext("shutdown", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1079
+- * mpv_opengl_fbo fbo
+- *
+- * params = _RenderParams() # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1142
+ *
+- * if opengl_fbo:
++ * def shutdown(self):
++ * self.isshutdown = True # <<<<<<<<<<<<<<
++ * self.callback = None
++ * self.lock.release()
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
+- __pyx_t_1 = 0;
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1081
+- * params = _RenderParams()
++ /* "vidcutter/libs/pympv/mpv.pyx":1143
++ * def shutdown(self):
++ * self.isshutdown = True
++ * self.callback = None # <<<<<<<<<<<<<<
++ * self.lock.release()
+ *
+- * if opengl_fbo: # <<<<<<<<<<<<<<
+- * memset(&fbo, 0, sizeof(fbo))
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
+- if (__pyx_t_2) {
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1082
++ /* "vidcutter/libs/pympv/mpv.pyx":1144
++ * self.isshutdown = True
++ * self.callback = None
++ * self.lock.release() # <<<<<<<<<<<<<<
+ *
+- * if opengl_fbo:
+- * memset(&fbo, 0, sizeof(fbo)) # <<<<<<<<<<<<<<
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+- * fbo.w = opengl_fbo["w"]
+- */
+- (void)(memset((&__pyx_v_fbo), 0, (sizeof(__pyx_v_fbo))));
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1083
+- * if opengl_fbo:
+- * memset(&fbo, 0, sizeof(fbo))
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
+- * fbo.w = opengl_fbo["w"]
+- * fbo.h = opengl_fbo["h"]
++ * def call(self):
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
+- if (!__pyx_t_2) {
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else {
+- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error)
+- __pyx_t_3 = __pyx_t_5;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- goto __pyx_L4_bool_binop_done;
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_2)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_2);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+- __pyx_t_3 = 0;
+- __pyx_L4_bool_binop_done:;
+- __pyx_v_fbo.fbo = __pyx_t_3;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1084
+- * memset(&fbo, 0, sizeof(fbo))
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+- * fbo.w = opengl_fbo["w"] # <<<<<<<<<<<<<<
+- * fbo.h = opengl_fbo["h"]
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+- */
+- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_v_fbo.w = __pyx_t_3;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1085
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+- * fbo.w = opengl_fbo["w"]
+- * fbo.h = opengl_fbo["h"] # <<<<<<<<<<<<<<
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- */
+- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_v_fbo.h = __pyx_t_3;
++ }
++ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1086
+- * fbo.w = opengl_fbo["w"]
+- * fbo.h = opengl_fbo["h"]
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- * if flip_y:
++ /* "vidcutter/libs/pympv/mpv.pyx":1141
++ * self.isshutdown = False
++ *
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * self.isshutdown = True
++ * self.callback = None
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error)
+- if (!__pyx_t_2) {
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- } else {
+- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
+- __pyx_t_3 = __pyx_t_5;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- goto __pyx_L6_bool_binop_done;
+- }
+- __pyx_t_3 = 0;
+- __pyx_L6_bool_binop_done:;
+- __pyx_v_fbo.internal_format = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1087
+- * fbo.h = opengl_fbo["h"]
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo) # <<<<<<<<<<<<<<
+- * if flip_y:
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1081
+- * params = _RenderParams()
++/* "vidcutter/libs/pympv/mpv.pyx":1146
++ * self.lock.release()
++ *
++ * def call(self): # <<<<<<<<<<<<<<
++ * self.lock.release()
+ *
+- * if opengl_fbo: # <<<<<<<<<<<<<<
+- * memset(&fbo, 0, sizeof(fbo))
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ */
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1088
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- * if flip_y: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- * if depth is not None:
+- */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
+- if (__pyx_t_2) {
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call = {"call", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("call (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(__pyx_self, ((PyObject *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1089
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- * if flip_y:
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1) # <<<<<<<<<<<<<<
+- * if depth is not None:
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1088
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- * if flip_y: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- * if depth is not None:
+- */
+- }
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("call", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1090
+- * if flip_y:
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- * if depth is not None: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- * if not block_for_target_time:
++ /* "vidcutter/libs/pympv/mpv.pyx":1147
++ *
++ * def call(self):
++ * self.lock.release() # <<<<<<<<<<<<<<
++ *
++ * def set(self, callback):
+ */
+- __pyx_t_2 = (__pyx_v_depth != Py_None);
+- __pyx_t_6 = (__pyx_t_2 != 0);
+- if (__pyx_t_6) {
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_2)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_2);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1091
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- * if depth is not None:
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth) # <<<<<<<<<<<<<<
+- * if not block_for_target_time:
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ /* "vidcutter/libs/pympv/mpv.pyx":1146
++ * self.lock.release()
++ *
++ * def call(self): # <<<<<<<<<<<<<<
++ * self.lock.release()
++ *
+ */
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1090
+- * if flip_y:
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- * if depth is not None: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- * if not block_for_target_time:
+- */
+- }
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.call", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1092
+- * if depth is not None:
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- * if not block_for_target_time: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+- * if skip_rendering:
++/* "vidcutter/libs/pympv/mpv.pyx":1149
++ * self.lock.release()
++ *
++ * def set(self, callback): # <<<<<<<<<<<<<<
++ * self.callback = callback
++ *
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
+- __pyx_t_2 = ((!__pyx_t_6) != 0);
+- if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1093
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- * if not block_for_target_time:
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0) # <<<<<<<<<<<<<<
+- * if skip_rendering:
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+- */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1092
+- * if depth is not None:
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- * if not block_for_target_time: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+- * if skip_rendering:
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1094
+- * if not block_for_target_time:
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+- * if skip_rendering: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+- *
+- */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
+- if (__pyx_t_2) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1095
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+- * if skip_rendering:
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1) # <<<<<<<<<<<<<<
+- *
+- * with nogil:
+- */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1094
+- * if not block_for_target_time:
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+- * if skip_rendering: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+- *
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1097
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+- *
+- * with nogil: # <<<<<<<<<<<<<<
+- * ret = mpv_render_context_render(self._ctx, params.params)
+- * return ret
+- */
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set = {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_self = 0;
++ PyObject *__pyx_v_callback = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("set (wrapper)", 0);
+ {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1098
+- *
+- * with nogil:
+- * ret = mpv_render_context_render(self._ctx, params.params) # <<<<<<<<<<<<<<
+- * return ret
+- *
+- */
+- __pyx_v_ret = mpv_render_context_render(__pyx_v_self->_ctx, __pyx_v_params->params);
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
+ }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1097
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+- *
+- * with nogil: # <<<<<<<<<<<<<<
+- * ret = mpv_render_context_render(self._ctx, params.params)
+- * return ret
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L14;
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1149, __pyx_L3_error)
+ }
+- __pyx_L14:;
+ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1149, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ }
++ __pyx_v_self = values[0];
++ __pyx_v_callback = values[1];
+ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1149, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(__pyx_self, __pyx_v_self, __pyx_v_callback);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1099
+- * with nogil:
+- * ret = mpv_render_context_render(self._ctx, params.params)
+- * return ret # <<<<<<<<<<<<<<
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("set", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1150
+ *
+- * def report_swap(self):
++ * def set(self, callback):
++ * self.callback = callback # <<<<<<<<<<<<<<
++ *
++ * def run(self):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
++ /* "vidcutter/libs/pympv/mpv.pyx":1149
++ * self.lock.release()
++ *
++ * def set(self, callback): # <<<<<<<<<<<<<<
++ * self.callback = callback
+ *
+- * @_errors
+- * def render(self, # <<<<<<<<<<<<<<
+- * opengl_fbo=None,
+- * flip_y=False,
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF((PyObject *)__pyx_v_params);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1101
+- * return ret
++/* "vidcutter/libs/pympv/mpv.pyx":1152
++ * self.callback = callback
+ *
+- * def report_swap(self): # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_report_swap(self._ctx)
++ * def run(self): # <<<<<<<<<<<<<<
++ * while not self.isshutdown:
++ * self.lock.acquire(True)
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run = {"run", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("report_swap (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("run (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("report_swap", 0);
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("run", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1102
+- *
+- * def report_swap(self):
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_report_swap(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":1153
+ *
++ * def run(self):
++ * while not self.isshutdown: # <<<<<<<<<<<<<<
++ * self.lock.acquire(True)
++ * self.mpv_callback(self.callback) if self.callback else None
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ while (1) {
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_3 = ((!__pyx_t_2) != 0);
++ if (!__pyx_t_3) break;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1103
+- * def report_swap(self):
+- * with nogil:
+- * mpv_render_context_report_swap(self._ctx) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1154
++ * def run(self):
++ * while not self.isshutdown:
++ * self.lock.acquire(True) # <<<<<<<<<<<<<<
++ * self.mpv_callback(self.callback) if self.callback else None
+ *
+- * def free(self):
+ */
+- mpv_render_context_report_swap(__pyx_v_self->_ctx);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1102
+- *
+- * def report_swap(self):
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_report_swap(self._ctx)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_True);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1155
++ * while not self.isshutdown:
++ * self.lock.acquire(True)
++ * self.mpv_callback(self.callback) if self.callback else None # <<<<<<<<<<<<<<
+ *
++ * def mpv_callback(self, callback):
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (__pyx_t_3) {
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+- __pyx_L5:;
+ }
++ __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_1 = __pyx_t_5;
++ __pyx_t_5 = 0;
++ } else {
++ __Pyx_INCREF(Py_None);
++ __pyx_t_1 = Py_None;
++ }
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1101
+- * return ret
++ /* "vidcutter/libs/pympv/mpv.pyx":1152
++ * self.callback = callback
+ *
+- * def report_swap(self): # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_report_swap(self._ctx)
++ * def run(self): # <<<<<<<<<<<<<<
++ * while not self.isshutdown:
++ * self.lock.acquire(True)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1105
+- * mpv_render_context_report_swap(self._ctx)
++/* "vidcutter/libs/pympv/mpv.pyx":1157
++ * self.mpv_callback(self.callback) if self.callback else None
+ *
+- * def free(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
++ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
++ * try:
++ * callback()
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback = {"mpv_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
++ PyObject *__pyx_v_callback = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("free (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("mpv_callback (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1157, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ }
++ __pyx_v_self = values[0];
++ __pyx_v_callback = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1157, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(__pyx_self, __pyx_v_self, __pyx_v_callback);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
++ PyObject *__pyx_v_e = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- __Pyx_RefNannySetupContext("free", 0);
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ int __pyx_t_7;
++ PyObject *__pyx_t_8 = NULL;
++ PyObject *__pyx_t_9 = NULL;
++ PyObject *__pyx_t_10 = NULL;
++ PyObject *__pyx_t_11 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("mpv_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1106
++ /* "vidcutter/libs/pympv/mpv.pyx":1158
+ *
+- * def free(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ * def mpv_callback(self, callback):
++ * try: # <<<<<<<<<<<<<<
++ * callback()
++ * except Exception as e:
+ */
+- __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
+- if (__pyx_t_1) {
++ {
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
++ __Pyx_XGOTREF(__pyx_t_1);
++ __Pyx_XGOTREF(__pyx_t_2);
++ __Pyx_XGOTREF(__pyx_t_3);
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1107
+- * def free(self):
+- * if not self.inited:
+- * return # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_free(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":1159
++ * def mpv_callback(self, callback):
++ * try:
++ * callback() # <<<<<<<<<<<<<<
++ * except Exception as e:
++ * sys.stderr.write("pympv error during callback: %s\n" % e)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
++ __Pyx_INCREF(__pyx_v_callback);
++ __pyx_t_5 = __pyx_v_callback; __pyx_t_6 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_6)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_6);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ }
++ }
++ __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1106
++ /* "vidcutter/libs/pympv/mpv.pyx":1158
+ *
+- * def free(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ * def mpv_callback(self, callback):
++ * try: # <<<<<<<<<<<<<<
++ * callback()
++ * except Exception as e:
+ */
+- }
++ }
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ goto __pyx_L8_try_end;
++ __pyx_L3_error:;
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1108
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1109
+- * return
+- * with nogil:
+- * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
+- * self.inited = False
++ /* "vidcutter/libs/pympv/mpv.pyx":1160
++ * try:
++ * callback()
++ * except Exception as e: # <<<<<<<<<<<<<<
++ * sys.stderr.write("pympv error during callback: %s\n" % e)
+ *
+ */
+- mpv_render_context_free(__pyx_v_self->_ctx);
+- }
++ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ if (__pyx_t_7) {
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1160, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_5);
++ __pyx_v_e = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1108
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False
++ /* "vidcutter/libs/pympv/mpv.pyx":1161
++ * callback()
++ * except Exception as e:
++ * sys.stderr.write("pympv error during callback: %s\n" % e) # <<<<<<<<<<<<<<
++ *
++ * cdef void _c_callback(void* d) with gil:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
++ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_9);
++ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_10);
++ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_9);
++ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
++ __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_10);
++ __pyx_t_11 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
++ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
++ if (likely(__pyx_t_11)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
++ __Pyx_INCREF(__pyx_t_11);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+- __pyx_L6:;
+ }
+- }
++ __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
++ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
++ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
++ if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_8);
++ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ goto __pyx_L4_exception_handled;
++ }
++ goto __pyx_L5_except_error;
++ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1110
+- * with nogil:
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1158
+ *
+- * def close(self):
++ * def mpv_callback(self, callback):
++ * try: # <<<<<<<<<<<<<<
++ * callback()
++ * except Exception as e:
+ */
+- __pyx_v_self->inited = 0;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L1_error;
++ __pyx_L4_exception_handled:;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ __pyx_L8_try_end:;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1105
+- * mpv_render_context_report_swap(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":1157
++ * self.mpv_callback(self.callback) if self.callback else None
+ *
+- * def free(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
++ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
++ * try:
++ * callback()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_XDECREF(__pyx_t_9);
++ __Pyx_XDECREF(__pyx_t_10);
++ __Pyx_XDECREF(__pyx_t_11);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_e);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1112
+- * self.inited = False
++/* "vidcutter/libs/pympv/mpv.pyx":1163
++ * sys.stderr.write("pympv error during callback: %s\n" % e)
+ *
+- * def close(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
++ * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
++ * cdef uint64_t name = <uint64_t>d
++ * callback = _callbacks.get(name)
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("close (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
++static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
++ uint64_t __pyx_v_name;
++ PyObject *__pyx_v_callback = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- __Pyx_RefNannySetupContext("close", 0);
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ #ifdef WITH_THREAD
++ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
++ #endif
++ __Pyx_RefNannySetupContext("_c_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1113
++ /* "vidcutter/libs/pympv/mpv.pyx":1164
+ *
+- * def close(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ * cdef void _c_callback(void* d) with gil:
++ * cdef uint64_t name = <uint64_t>d # <<<<<<<<<<<<<<
++ * callback = _callbacks.get(name)
++ * callback.call()
+ */
+- __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
+- if (__pyx_t_1) {
++ __pyx_v_name = ((uint64_t)__pyx_v_d);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1114
+- * def close(self):
+- * if not self.inited:
+- * return # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_free(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":1165
++ * cdef void _c_callback(void* d) with gil:
++ * cdef uint64_t name = <uint64_t>d
++ * callback = _callbacks.get(name) # <<<<<<<<<<<<<<
++ * callback.call()
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_callback = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1113
+- *
+- * def close(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":1166
++ * cdef uint64_t name = <uint64_t>d
++ * callback = _callbacks.get(name)
++ * callback.call() # <<<<<<<<<<<<<<
+ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
+ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1115
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1116
+- * return
+- * with nogil:
+- * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
+- * self.inited = False
+- *
+- */
+- mpv_render_context_free(__pyx_v_self->_ctx);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1115
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1117
+- * with nogil:
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False # <<<<<<<<<<<<<<
+- *
+- * def __dealloc__(self):
+- */
+- __pyx_v_self->inited = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1112
+- * self.inited = False
+- *
+- * def close(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
+- */
+-
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":1119
+- * self.inited = False
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.close()
+- *
+- */
+-
+-/* Python wrapper */
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self); /*proto*/
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+- __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+-}
+-
+-static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__dealloc__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1120
+- *
+- * def __dealloc__(self):
+- * self.close() # <<<<<<<<<<<<<<
+- *
+- * cdef class OpenGLRenderContext(RenderContext):
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1119
+- * self.inited = False
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.close()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1163
++ * sys.stderr.write("pympv error during callback: %s\n" % e)
++ *
++ * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
++ * cdef uint64_t name = <uint64_t>d
++ * callback = _callbacks.get(name)
+ */
+
+ /* function exit code */
+@@ -21415,774 +20550,1244 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.RenderContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_callback);
+ __Pyx_RefNannyFinishContext();
++ #ifdef WITH_THREAD
++ __Pyx_PyGILState_Release(__pyx_gilstate_save);
++ #endif
+ }
+
+ /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached = {"__pyx_unpickle_EndOfFileReached", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v___pyx_type = 0;
++ long __pyx_v___pyx_checksum;
++ PyObject *__pyx_v___pyx_state = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
++ PyObject* values[3] = {0,0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_EndOfFileReached") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ }
++ __pyx_v___pyx_type = values[0];
++ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_v___pyx_state = values[2];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_v___pyx_PickleError = 0;
++ PyObject *__pyx_v___pyx_result = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached", 0);
+
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 2, __pyx_L1_error)
++ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x56be9b6) != 0);
++ if (__pyx_t_1) {
+
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ /* "(tree fragment)":5
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x56be9b6:
++ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+ */
++ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_n_s_PickleError);
++ __Pyx_GIVEREF(__pyx_n_s_PickleError);
++ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
++ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_2);
++ __pyx_v___pyx_PickleError = __pyx_t_2;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "(tree fragment)":6
++ * if __pyx_checksum != 0x56be9b6:
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum) # <<<<<<<<<<<<<<
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
++ * if __pyx_state is not None:
+ */
++ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_INCREF(__pyx_v___pyx_PickleError);
++ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(1, 6, __pyx_L1_error)
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
++ */
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "(tree fragment)":7
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type) # <<<<<<<<<<<<<<
++ * if __pyx_state is not None:
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v___pyx_result = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
++ __pyx_t_6 = (__pyx_t_1 != 0);
++ if (__pyx_t_6) {
+
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ /* "(tree fragment)":9
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
++ * return __pyx_result
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 4, __pyx_L1_error)
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
++ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ }
++
++ /* "(tree fragment)":10
++ * if __pyx_state is not None:
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result # <<<<<<<<<<<<<<
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v___pyx_result);
++ __pyx_r = __pyx_v___pyx_result;
++ goto __pyx_L0;
++
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
++ __Pyx_XDECREF(__pyx_v___pyx_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1123
+- *
+- * cdef class OpenGLRenderContext(RenderContext):
+- * def __init__(self, mpv, # <<<<<<<<<<<<<<
+- * get_proc_address,
+- * *args, **kwargs):
++/* "(tree fragment)":11
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+ */
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_mpv = 0;
+- PyObject *__pyx_v_get_proc_address = 0;
+- PyObject *__pyx_v_args = 0;
+- PyObject *__pyx_v_kwargs = 0;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ Py_ssize_t __pyx_t_3;
++ int __pyx_t_4;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+- __Pyx_GOTREF(__pyx_v_kwargs);
+- if (PyTuple_GET_SIZE(__pyx_args) > 2) {
+- __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
+- if (unlikely(!__pyx_v_args)) {
+- __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+- __Pyx_RefNannyFinishContext();
+- return -1;
+- }
+- __Pyx_GOTREF(__pyx_v_args);
+- } else {
+- __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached__set_state", 0);
++
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1] # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[2])
++ */
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
+ }
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_get_proc_address,0};
+- PyObject* values[2] = {0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- default:
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1123, __pyx_L3_error)
+- }
+- }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->error);
++ __Pyx_DECREF(__pyx_v___pyx_result->error);
++ __pyx_v___pyx_result->error = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->reason);
++ __Pyx_DECREF(__pyx_v___pyx_result->reason);
++ __pyx_v___pyx_result->reason = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[2])
++ */
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
++ __PYX_ERR(1, 13, __pyx_L1_error)
++ }
++ __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
++ if (__pyx_t_4) {
++ } else {
++ __pyx_t_2 = __pyx_t_4;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_5 = (__pyx_t_4 != 0);
++ __pyx_t_2 = __pyx_t_5;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_2) {
++
++ /* "(tree fragment)":14
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
++ */
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 14, __pyx_L1_error)
++ }
++ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[2])
++ */
++ }
++
++ /* "(tree fragment)":11
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ */
++
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "(tree fragment)":1
++ * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage = {"__pyx_unpickle_LogMessage", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v___pyx_type = 0;
++ long __pyx_v___pyx_checksum;
++ PyObject *__pyx_v___pyx_state = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
++ PyObject* values[3] = {0,0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ }
+ if (unlikely(kw_args > 0)) {
+- const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1123, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_LogMessage") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+ }
+- } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+- __pyx_v_mpv = values[0];
+- __pyx_v_get_proc_address = values[1];
++ __pyx_v___pyx_type = values[0];
++ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_v___pyx_state = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1123, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+- __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+- return -1;
++ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_get_proc_address, __pyx_v_args, __pyx_v_kwargs);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_LogMessage(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+
+ /* function exit code */
+- __Pyx_XDECREF(__pyx_v_args);
+- __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_get_proc_address, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+- PyObject *__pyx_v_init_params = NULL;
+- int __pyx_r;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_v___pyx_PickleError = 0;
++ PyObject *__pyx_v___pyx_result = 0;
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1127
+- * *args, **kwargs):
+- * init_params = {
+- * "get_proc_address": get_proc_address # <<<<<<<<<<<<<<
+- * }
+- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1127, __pyx_L1_error)
+- __pyx_v_init_params = ((PyObject*)__pyx_t_1);
+- __pyx_t_1 = 0;
++ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x8774fae) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1129
+- * "get_proc_address": get_proc_address
+- * }
+- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
+- * init_params, *args, **kwargs)
+- *
++ /* "(tree fragment)":5
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x8774fae:
++ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
++ * __pyx_result = LogMessage.__new__(__pyx_type)
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_n_s_PickleError);
++ __Pyx_GIVEREF(__pyx_n_s_PickleError);
++ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
++ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_2);
++ __pyx_v___pyx_PickleError = __pyx_t_2;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1130
+- * }
+- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
+- * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
+- *
+- * class CallbackThread(Thread):
++ /* "(tree fragment)":6
++ * if __pyx_checksum != 0x8774fae:
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum) # <<<<<<<<<<<<<<
++ * __pyx_result = LogMessage.__new__(__pyx_type)
++ * if __pyx_state is not None:
+ */
+- __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_INCREF(((PyObject *)__pyx_v_self));
+- __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+- PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
+- __Pyx_INCREF(__pyx_v_mpv);
+- __Pyx_GIVEREF(__pyx_v_mpv);
+- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_mpv);
+- __Pyx_GIVEREF(__pyx_t_2);
+- PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
+- __Pyx_INCREF(__pyx_v_init_params);
+- __Pyx_GIVEREF(__pyx_v_init_params);
+- PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_init_params);
+- __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_INCREF(__pyx_v___pyx_PickleError);
++ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(1, 6, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1129
+- * "get_proc_address": get_proc_address
+- * }
+- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
+- * init_params, *args, **kwargs)
+- *
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+ */
+- __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1130
+- * }
+- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
+- * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
+- *
+- * class CallbackThread(Thread):
++ /* "(tree fragment)":7
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
++ * __pyx_result = LogMessage.__new__(__pyx_type) # <<<<<<<<<<<<<<
++ * if __pyx_state is not None:
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+ */
+- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_v___pyx_result = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1123
+- *
+- * cdef class OpenGLRenderContext(RenderContext):
+- * def __init__(self, mpv, # <<<<<<<<<<<<<<
+- * get_proc_address,
+- * *args, **kwargs):
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
++ * __pyx_result = LogMessage.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
++ * return __pyx_result
+ */
++ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
++ __pyx_t_6 = (__pyx_t_1 != 0);
++ if (__pyx_t_6) {
+
+- /* function exit code */
+- __pyx_r = 0;
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_init_params);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ /* "(tree fragment)":9
++ * __pyx_result = LogMessage.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
++ * return __pyx_result
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+ */
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
++ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
++ * __pyx_result = LogMessage.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ }
+
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "(tree fragment)":10
++ * if __pyx_state is not None:
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
++ * return __pyx_result # <<<<<<<<<<<<<<
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v___pyx_result);
++ __pyx_r = __pyx_v___pyx_result;
++ goto __pyx_L0;
+
+ /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
++ __Pyx_XDECREF(__pyx_v___pyx_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++/* "(tree fragment)":11
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ Py_ssize_t __pyx_t_3;
++ int __pyx_t_4;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage__set_state", 0);
+
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3] # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[4])
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 4, __pyx_L1_error)
+-
+- /* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->level);
++ __Pyx_DECREF(__pyx_v___pyx_result->level);
++ __pyx_v___pyx_result->level = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->log_level);
++ __Pyx_DECREF(__pyx_v___pyx_result->log_level);
++ __pyx_v___pyx_result->log_level = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->prefix);
++ __Pyx_DECREF(__pyx_v___pyx_result->prefix);
++ __pyx_v___pyx_result->prefix = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->text);
++ __Pyx_DECREF(__pyx_v___pyx_result->text);
++ __pyx_v___pyx_result->text = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[4])
++ */
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
++ __PYX_ERR(1, 13, __pyx_L1_error)
++ }
++ __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_4 = ((__pyx_t_3 > 4) != 0);
++ if (__pyx_t_4) {
++ } else {
++ __pyx_t_2 = __pyx_t_4;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_5 = (__pyx_t_4 != 0);
++ __pyx_t_2 = __pyx_t_5;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_2) {
++
++ /* "(tree fragment)":14
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
++ */
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 14, __pyx_L1_error)
++ }
++ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[4])
++ */
++ }
++
++ /* "(tree fragment)":11
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ */
++
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
++ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1133
+- *
+- * class CallbackThread(Thread):
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * Thread.__init__(self)
+- * self.daemon = True
++/* "(tree fragment)":1
++ * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__ = {"__init__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property = {"__pyx_unpickle_Property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v___pyx_type = 0;
++ long __pyx_v___pyx_checksum;
++ PyObject *__pyx_v___pyx_state = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(__pyx_self, ((PyObject *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Property (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
++ PyObject* values[3] = {0,0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Property") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ }
++ __pyx_v___pyx_type = values[0];
++ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_v___pyx_state = values[2];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_Property(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_v___pyx_PickleError = 0;
++ PyObject *__pyx_v___pyx_result = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Property", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1134
+- * class CallbackThread(Thread):
+- * def __init__(self):
+- * Thread.__init__(self) # <<<<<<<<<<<<<<
+- * self.daemon = True
+- * self.lock = Semaphore()
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_2)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_2);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self);
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0572d11) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1135
+- * def __init__(self):
+- * Thread.__init__(self)
+- * self.daemon = True # <<<<<<<<<<<<<<
+- * self.lock = Semaphore()
+- * self.lock.acquire(True)
+- */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
++ /* "(tree fragment)":5
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x0572d11:
++ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
++ * __pyx_result = Property.__new__(__pyx_type)
++ */
++ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_n_s_PickleError);
++ __Pyx_GIVEREF(__pyx_n_s_PickleError);
++ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
++ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_2);
++ __pyx_v___pyx_PickleError = __pyx_t_2;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1136
+- * Thread.__init__(self)
+- * self.daemon = True
+- * self.lock = Semaphore() # <<<<<<<<<<<<<<
+- * self.lock.acquire(True)
+- * self.callback = None
++ /* "(tree fragment)":6
++ * if __pyx_checksum != 0x0572d11:
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum) # <<<<<<<<<<<<<<
++ * __pyx_result = Property.__new__(__pyx_type)
++ * if __pyx_state is not None:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_2)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_2);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
++ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_INCREF(__pyx_v___pyx_PickleError);
++ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
+ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(1, 6, __pyx_L1_error)
++
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
++ */
+ }
+- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1137
+- * self.daemon = True
+- * self.lock = Semaphore()
+- * self.lock.acquire(True) # <<<<<<<<<<<<<<
+- * self.callback = None
+- * self.isshutdown = False
++ /* "(tree fragment)":7
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
++ * __pyx_result = Property.__new__(__pyx_type) # <<<<<<<<<<<<<<
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_3 = NULL;
++ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_True);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v___pyx_result = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1138
+- * self.lock = Semaphore()
+- * self.lock.acquire(True)
+- * self.callback = None # <<<<<<<<<<<<<<
+- * self.isshutdown = False
+- *
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
++ * __pyx_result = Property.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
++ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
++ __pyx_t_6 = (__pyx_t_1 != 0);
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1139
+- * self.lock.acquire(True)
+- * self.callback = None
+- * self.isshutdown = False # <<<<<<<<<<<<<<
+- *
+- * def shutdown(self):
++ /* "(tree fragment)":9
++ * __pyx_result = Property.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
++ * return __pyx_result
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
++ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
+- *
+- * class CallbackThread(Thread):
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * Thread.__init__(self)
+- * self.daemon = True
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
++ * __pyx_result = Property.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result
+ */
++ }
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ /* "(tree fragment)":10
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result # <<<<<<<<<<<<<<
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v___pyx_result);
++ __pyx_r = __pyx_v___pyx_result;
+ goto __pyx_L0;
++
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++
++ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
++ __Pyx_XDECREF(__pyx_v___pyx_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1141
+- * self.isshutdown = False
+- *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * self.isshutdown = True
+- * self.callback = None
++/* "(tree fragment)":11
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown = {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(__pyx_self, ((PyObject *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_2;
++ Py_ssize_t __pyx_t_3;
++ int __pyx_t_4;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("shutdown", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1142
+- *
+- * def shutdown(self):
+- * self.isshutdown = True # <<<<<<<<<<<<<<
+- * self.callback = None
+- * self.lock.release()
+- */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Property__set_state", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1143
+- * def shutdown(self):
+- * self.isshutdown = True
+- * self.callback = None # <<<<<<<<<<<<<<
+- * self.lock.release()
+- *
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[2])
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1144
+- * self.isshutdown = True
+- * self.callback = None
+- * self.lock.release() # <<<<<<<<<<<<<<
+- *
+- * def call(self):
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_2)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_2);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
+ }
+- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->data);
++ __Pyx_DECREF(__pyx_v___pyx_result->data);
++ __pyx_v___pyx_result->data = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->name);
++ __Pyx_DECREF(__pyx_v___pyx_result->name);
++ __pyx_v___pyx_result->name = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
+- * self.isshutdown = False
+- *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * self.isshutdown = True
+- * self.callback = None
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[2])
+ */
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
++ __PYX_ERR(1, 13, __pyx_L1_error)
++ }
++ __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
++ if (__pyx_t_4) {
++ } else {
++ __pyx_t_2 = __pyx_t_4;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_5 = (__pyx_t_4 != 0);
++ __pyx_t_2 = __pyx_t_5;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_2) {
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":1146
+- * self.lock.release()
+- *
+- * def call(self): # <<<<<<<<<<<<<<
+- * self.lock.release()
+- *
++ /* "(tree fragment)":14
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
+ */
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 14, __pyx_L1_error)
++ }
++ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call = {"call", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("call (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(__pyx_self, ((PyObject *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("call", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1147
+- *
+- * def call(self):
+- * self.lock.release() # <<<<<<<<<<<<<<
+- *
+- * def set(self, callback):
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[2])
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_2)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_2);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+ }
+- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
+- * self.lock.release()
+- *
+- * def call(self): # <<<<<<<<<<<<<<
+- * self.lock.release()
+- *
++ /* "(tree fragment)":11
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+ */
+
+ /* function exit code */
+@@ -22190,43 +21795,45 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.call", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1149
+- * self.lock.release()
+- *
+- * def set(self, callback): # <<<<<<<<<<<<<<
+- * self.callback = callback
+- *
++/* "(tree fragment)":1
++ * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set = {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_self = 0;
+- PyObject *__pyx_v_callback = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event = {"__pyx_unpickle_Event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v___pyx_type = 0;
++ long __pyx_v___pyx_checksum;
++ PyObject *__pyx_v___pyx_state = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set (wrapper)", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Event (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
+- PyObject* values[2] = {0,0};
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
++ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+@@ -22237,207 +21844,378 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1149, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1149, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Event") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+ }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+- __pyx_v_self = values[0];
+- __pyx_v_callback = values[1];
++ __pyx_v___pyx_type = values[0];
++ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_v___pyx_state = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1149, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(__pyx_self, __pyx_v_self, __pyx_v_callback);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Event(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_v___pyx_PickleError = 0;
++ PyObject *__pyx_v___pyx_result = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
++ int __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Event", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1150
+- *
+- * def set(self, callback):
+- * self.callback = callback # <<<<<<<<<<<<<<
+- *
+- * def run(self):
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
++ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xda38c25) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
+- * self.lock.release()
+- *
+- * def set(self, callback): # <<<<<<<<<<<<<<
+- * self.callback = callback
+- *
++ /* "(tree fragment)":5
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xda38c25:
++ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
++ * __pyx_result = Event.__new__(__pyx_type)
+ */
++ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_n_s_PickleError);
++ __Pyx_GIVEREF(__pyx_n_s_PickleError);
++ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
++ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_2);
++ __pyx_v___pyx_PickleError = __pyx_t_2;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ /* "(tree fragment)":6
++ * if __pyx_checksum != 0xda38c25:
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum) # <<<<<<<<<<<<<<
++ * __pyx_result = Event.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ */
++ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_INCREF(__pyx_v___pyx_PickleError);
++ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(1, 6, __pyx_L1_error)
++
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
++ */
++ }
++
++ /* "(tree fragment)":7
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
++ * __pyx_result = Event.__new__(__pyx_type) # <<<<<<<<<<<<<<
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v___pyx_result = __pyx_t_3;
++ __pyx_t_3 = 0;
++
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
++ * __pyx_result = Event.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
++ __pyx_t_6 = (__pyx_t_1 != 0);
++ if (__pyx_t_6) {
++
++ /* "(tree fragment)":9
++ * __pyx_result = Event.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
++ * return __pyx_result
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
++ */
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
++ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
++ * __pyx_result = Event.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ }
++
++ /* "(tree fragment)":10
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ * return __pyx_result # <<<<<<<<<<<<<<
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v___pyx_result);
++ __pyx_r = __pyx_v___pyx_result;
+ goto __pyx_L0;
++
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++
++ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
++ __Pyx_XDECREF(__pyx_v___pyx_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1152
+- * self.callback = callback
+- *
+- * def run(self): # <<<<<<<<<<<<<<
+- * while not self.isshutdown:
+- * self.lock.acquire(True)
++/* "(tree fragment)":11
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run = {"run", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("run (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(__pyx_self, ((PyObject *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
++ enum mpv_event_id __pyx_t_3;
++ int __pyx_t_4;
++ Py_ssize_t __pyx_t_5;
++ int __pyx_t_6;
++ int __pyx_t_7;
++ PyObject *__pyx_t_8 = NULL;
++ PyObject *__pyx_t_9 = NULL;
++ PyObject *__pyx_t_10 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("run", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1153
+- *
+- * def run(self):
+- * while not self.isshutdown: # <<<<<<<<<<<<<<
+- * self.lock.acquire(True)
+- * self.mpv_callback(self.callback) if self.callback else None
+- */
+- while (1) {
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_3 = ((!__pyx_t_2) != 0);
+- if (!__pyx_t_3) break;
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Event__set_state", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1154
+- * def run(self):
+- * while not self.isshutdown:
+- * self.lock.acquire(True) # <<<<<<<<<<<<<<
+- * self.mpv_callback(self.callback) if self.callback else None
+- *
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3] # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[4])
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_4);
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->data);
++ __Pyx_DECREF(__pyx_v___pyx_result->data);
++ __pyx_v___pyx_result->data = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v___pyx_result->error = __pyx_t_2;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v___pyx_result->id = __pyx_t_3;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->reply_userdata);
++ __Pyx_DECREF(__pyx_v___pyx_result->reply_userdata);
++ __pyx_v___pyx_result->reply_userdata = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[4])
++ */
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
++ __PYX_ERR(1, 13, __pyx_L1_error)
++ }
++ __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_6 = ((__pyx_t_5 > 4) != 0);
++ if (__pyx_t_6) {
++ } else {
++ __pyx_t_4 = __pyx_t_6;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_7 = (__pyx_t_6 != 0);
++ __pyx_t_4 = __pyx_t_7;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_4) {
++
++ /* "(tree fragment)":14
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
++ */
++ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_8);
++ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_9);
++ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 14, __pyx_L1_error)
++ }
++ __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_8);
++ __pyx_t_10 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
++ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
++ if (likely(__pyx_t_10)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
++ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
++ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_True);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
++ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
++ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1155
+- * while not self.isshutdown:
+- * self.lock.acquire(True)
+- * self.mpv_callback(self.callback) if self.callback else None # <<<<<<<<<<<<<<
+- *
+- * def mpv_callback(self, callback):
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[4])
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (__pyx_t_3) {
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1155, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_1 = __pyx_t_5;
+- __pyx_t_5 = 0;
+- } else {
+- __Pyx_INCREF(Py_None);
+- __pyx_t_1 = Py_None;
+- }
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
+- * self.callback = callback
+- *
+- * def run(self): # <<<<<<<<<<<<<<
+- * while not self.isshutdown:
+- * self.lock.acquire(True)
++ /* "(tree fragment)":11
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+ */
+
+ /* function exit code */
+@@ -22445,45 +22223,45 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_XDECREF(__pyx_t_9);
++ __Pyx_XDECREF(__pyx_t_10);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1157
+- * self.mpv_callback(self.callback) if self.callback else None
+- *
+- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+- * try:
+- * callback()
++/* "(tree fragment)":1
++ * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback = {"mpv_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+- PyObject *__pyx_v_callback = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo = {"__pyx_unpickle_RenderFrameInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v___pyx_type = 0;
++ long __pyx_v___pyx_checksum;
++ PyObject *__pyx_v___pyx_state = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("mpv_callback (wrapper)", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
+- PyObject* values[2] = {0,0};
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
++ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+@@ -22494,6068 +22272,2370 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1157, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RenderFrameInfo") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+ }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+- __pyx_v_self = values[0];
+- __pyx_v_callback = values[1];
++ __pyx_v___pyx_type = values[0];
++ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_v___pyx_state = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1157, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(__pyx_self, __pyx_v_self, __pyx_v_callback);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_RenderFrameInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
+- PyObject *__pyx_v_e = NULL;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_v___pyx_PickleError = 0;
++ PyObject *__pyx_v___pyx_result = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- int __pyx_t_7;
+- PyObject *__pyx_t_8 = NULL;
+- PyObject *__pyx_t_9 = NULL;
+- PyObject *__pyx_t_10 = NULL;
+- PyObject *__pyx_t_11 = NULL;
++ int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("mpv_callback", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
+- *
+- * def mpv_callback(self, callback):
+- * try: # <<<<<<<<<<<<<<
+- * callback()
+- * except Exception as e:
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+ */
+- {
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+- __Pyx_XGOTREF(__pyx_t_1);
+- __Pyx_XGOTREF(__pyx_t_2);
+- __Pyx_XGOTREF(__pyx_t_3);
+- /*try:*/ {
++ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1159
+- * def mpv_callback(self, callback):
+- * try:
+- * callback() # <<<<<<<<<<<<<<
+- * except Exception as e:
+- * sys.stderr.write("pympv error during callback: %s\n" % e)
++ /* "(tree fragment)":5
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xd41d8cd:
++ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+ */
+- __Pyx_INCREF(__pyx_v_callback);
+- __pyx_t_5 = __pyx_v_callback; __pyx_t_6 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- }
+- }
+- __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_n_s_PickleError);
++ __Pyx_GIVEREF(__pyx_n_s_PickleError);
++ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
++ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_2);
++ __pyx_v___pyx_PickleError = __pyx_t_2;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
+- *
+- * def mpv_callback(self, callback):
+- * try: # <<<<<<<<<<<<<<
+- * callback()
+- * except Exception as e:
++ /* "(tree fragment)":6
++ * if __pyx_checksum != 0xd41d8cd:
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<<
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
++ * if __pyx_state is not None:
+ */
++ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_INCREF(__pyx_v___pyx_PickleError);
++ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
+ }
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- goto __pyx_L8_try_end;
+- __pyx_L3_error:;
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(1, 6, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1160
+- * try:
+- * callback()
+- * except Exception as e: # <<<<<<<<<<<<<<
+- * sys.stderr.write("pympv error during callback: %s\n" % e)
+- *
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+ */
+- __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- if (__pyx_t_7) {
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1160, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_5);
+- __pyx_v_e = __pyx_t_5;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1161
+- * callback()
+- * except Exception as e:
+- * sys.stderr.write("pympv error during callback: %s\n" % e) # <<<<<<<<<<<<<<
+- *
+- * cdef void _c_callback(void* d) with gil:
++ /* "(tree fragment)":7
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type) # <<<<<<<<<<<<<<
++ * if __pyx_state is not None:
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_9);
+- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_10);
+- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_9);
+- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+- __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_10);
+- __pyx_t_11 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
+- if (likely(__pyx_t_11)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+- __Pyx_INCREF(__pyx_t_11);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_9, function);
+- }
+- }
+- __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
+- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_8);
+- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- goto __pyx_L4_exception_handled;
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+- goto __pyx_L5_except_error;
+- __pyx_L5_except_error:;
++ }
++ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v___pyx_result = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
+- *
+- * def mpv_callback(self, callback):
+- * try: # <<<<<<<<<<<<<<
+- * callback()
+- * except Exception as e:
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
++ __pyx_t_6 = (__pyx_t_1 != 0);
++ if (__pyx_t_6) {
++
++ /* "(tree fragment)":9
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
++ * return __pyx_result
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
++ */
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
++ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
++ * return __pyx_result
+ */
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L1_error;
+- __pyx_L4_exception_handled:;
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- __pyx_L8_try_end:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
+- * self.mpv_callback(self.callback) if self.callback else None
+- *
+- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+- * try:
+- * callback()
++ /* "(tree fragment)":10
++ * if __pyx_state is not None:
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
++ * return __pyx_result # <<<<<<<<<<<<<<
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v___pyx_result);
++ __pyx_r = __pyx_v___pyx_result;
++ goto __pyx_L0;
++
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_XDECREF(__pyx_t_9);
+- __Pyx_XDECREF(__pyx_t_10);
+- __Pyx_XDECREF(__pyx_t_11);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_e);
++ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
++ __Pyx_XDECREF(__pyx_v___pyx_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1163
+- * sys.stderr.write("pympv error during callback: %s\n" % e)
+- *
+- * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
+- * cdef uint64_t name = <uint64_t>d
+- * callback = _callbacks.get(name)
++/* "(tree fragment)":11
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[0])
+ */
+
+-static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
+- uint64_t __pyx_v_name;
+- PyObject *__pyx_v_callback = NULL;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_1;
++ Py_ssize_t __pyx_t_2;
++ int __pyx_t_3;
++ int __pyx_t_4;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- #ifdef WITH_THREAD
+- PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
+- #endif
+- __Pyx_RefNannySetupContext("_c_callback", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo__set_state", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1164
+- *
+- * cdef void _c_callback(void* d) with gil:
+- * cdef uint64_t name = <uint64_t>d # <<<<<<<<<<<<<<
+- * callback = _callbacks.get(name)
+- * callback.call()
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[0])
+ */
+- __pyx_v_name = ((uint64_t)__pyx_v_d);
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
++ __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
++ if (__pyx_t_3) {
++ } else {
++ __pyx_t_1 = __pyx_t_3;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
++ __pyx_t_4 = (__pyx_t_3 != 0);
++ __pyx_t_1 = __pyx_t_4;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1165
+- * cdef void _c_callback(void* d) with gil:
+- * cdef uint64_t name = <uint64_t>d
+- * callback = _callbacks.get(name) # <<<<<<<<<<<<<<
+- * callback.call()
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<<
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 13, __pyx_L1_error)
+ }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_callback = __pyx_t_1;
+- __pyx_t_1 = 0;
++ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
++ }
++ __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1166
+- * cdef uint64_t name = <uint64_t>d
+- * callback = _callbacks.get(name)
+- * callback.call() # <<<<<<<<<<<<<<
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[0])
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1163
+- * sys.stderr.write("pympv error during callback: %s\n" % e)
+- *
+- * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
+- * cdef uint64_t name = <uint64_t>d
+- * callback = _callbacks.get(name)
++ /* "(tree fragment)":11
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[0])
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_callback);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+- #ifdef WITH_THREAD
+- __Pyx_PyGILState_Release(__pyx_gilstate_save);
++ return __pyx_r;
++}
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
++
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
++ }
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
++ p->reason = Py_None; Py_INCREF(Py_None);
++ p->error = Py_None; Py_INCREF(Py_None);
++ return o;
++}
++
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
+ #endif
++ PyObject_GC_UnTrack(o);
++ Py_CLEAR(p->reason);
++ Py_CLEAR(p->error);
++ (*Py_TYPE(o)->tp_free)(o);
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
++ if (p->reason) {
++ e = (*v)(p->reason, a); if (e) return e;
++ }
++ if (p->error) {
++ e = (*v)(p->error, a); if (e) return e;
++ }
++ return 0;
++}
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached = {"__pyx_unpickle_EndOfFileReached", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_EndOfFileReached") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
++ tmp = ((PyObject*)p->reason);
++ p->reason = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->error);
++ p->error = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached", 0);
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x56be9b6) != 0);
+- if (__pyx_t_1) {
+-
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x56be9b6:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0x56be9b6:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_1__get__(o);
++}
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- */
++static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_3__set__(o, v);
+ }
+-
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_5__del__(o);
+ }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
++}
+
+- /* "(tree fragment)":9
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_1__get__(o);
++}
+
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
++static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_3__set__(o, v);
++ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_5__del__(o);
+ }
+-
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-/* "(tree fragment)":11
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_1__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_3__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- Py_ssize_t __pyx_t_3;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached__set_state", 0);
++static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
++ {(char *)"reason", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, (char *)0, 0},
++ {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, (char *)0, 0},
++ {0, 0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1] # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->error);
+- __Pyx_DECREF(__pyx_v___pyx_result->error);
+- __pyx_v___pyx_result->error = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->reason);
+- __Pyx_DECREF(__pyx_v___pyx_result->reason);
+- __pyx_v___pyx_result->reason = __pyx_t_1;
+- __pyx_t_1 = 0;
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.EndOfFileReached", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ "Data field for MPV_EVENT_END_FILE events\n\n Wraps: mpv_event_end_file\n ", /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_methods*/
++ 0, /*tp_members*/
++ __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 13, __pyx_L1_error)
+- }
+- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
+- if (__pyx_t_4) {
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
+ } else {
+- __pyx_t_2 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_5 = (__pyx_t_4 != 0);
+- __pyx_t_2 = __pyx_t_5;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_2) {
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage;
++ p->prefix = Py_None; Py_INCREF(Py_None);
++ p->level = Py_None; Py_INCREF(Py_None);
++ p->text = Py_None; Py_INCREF(Py_None);
++ p->log_level = Py_None; Py_INCREF(Py_None);
++ return o;
++}
+
+- /* "(tree fragment)":14
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 14, __pyx_L1_error)
+- }
+- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
++ #endif
++ PyObject_GC_UnTrack(o);
++ Py_CLEAR(p->prefix);
++ Py_CLEAR(p->level);
++ Py_CLEAR(p->text);
++ Py_CLEAR(p->log_level);
++ (*Py_TYPE(o)->tp_free)(o);
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
++ if (p->prefix) {
++ e = (*v)(p->prefix, a); if (e) return e;
++ }
++ if (p->level) {
++ e = (*v)(p->level, a); if (e) return e;
++ }
++ if (p->text) {
++ e = (*v)(p->text, a); if (e) return e;
++ }
++ if (p->log_level) {
++ e = (*v)(p->log_level, a); if (e) return e;
+ }
++ return 0;
++}
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
++ tmp = ((PyObject*)p->prefix);
++ p->prefix = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->level);
++ p->level = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->text);
++ p->text = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->log_level);
++ p->log_level = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
++}
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(o);
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_InputDispatch(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch = {"__pyx_unpickle_InputDispatch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_InputDispatch (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_InputDispatch", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_InputDispatch", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_InputDispatch") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
++static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(o, v);
++ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(o);
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_InputDispatch", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_InputDispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_InputDispatch(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_InputDispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_InputDispatch", 0);
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xbf641a9: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xbf641a9) != 0);
+- if (__pyx_t_1) {
+-
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xbf641a9:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- * __pyx_result = InputDispatch.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0xbf641a9:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = InputDispatch.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xbf, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(o);
++}
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xbf641a9: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- */
++static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(o, v);
+ }
+-
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- * __pyx_result = InputDispatch.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(o);
+ }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- * __pyx_result = InputDispatch.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
++}
+
+- /* "(tree fragment)":9
+- * __pyx_result = InputDispatch.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(o);
++}
+
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- * __pyx_result = InputDispatch.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
++static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(o, v);
+ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(o);
++ }
++}
+
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_InputDispatch(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(o);
++}
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_InputDispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(o, v);
++ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(o);
++ }
+ }
+
+-/* "(tree fragment)":11
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_LogMessage[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- Py_ssize_t __pyx_t_3;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_InputDispatch__set_state", 0);
++static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage[] = {
++ {(char *)"prefix", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, (char *)0, 0},
++ {(char *)"level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level, (char *)0, 0},
++ {(char *)"text", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text, (char *)0, 0},
++ {(char *)"log_level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, (char *)0, 0},
++ {0, 0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1] # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_LogMessage = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.LogMessage", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ "Data field for MPV_EVENT_LOG_MESSAGE events.\n\n Wraps: mpv_event_log_message\n ", /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_LogMessage, /*tp_methods*/
++ 0, /*tp_members*/
++ __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property __pyx_vtable_9vidcutter_4libs_3mpv_Property;
++
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Property(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->arg0);
+- __Pyx_DECREF(__pyx_v___pyx_result->arg0);
+- __pyx_v___pyx_result->arg0 = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Property;
++ p->name = Py_None; Py_INCREF(Py_None);
++ p->data = Py_None; Py_INCREF(Py_None);
++ return o;
++}
++
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->type);
+- __Pyx_DECREF(__pyx_v___pyx_result->type);
+- __pyx_v___pyx_result->type = __pyx_t_1;
+- __pyx_t_1 = 0;
++ #endif
++ PyObject_GC_UnTrack(o);
++ Py_CLEAR(p->name);
++ Py_CLEAR(p->data);
++ (*Py_TYPE(o)->tp_free)(o);
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 13, __pyx_L1_error)
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
++ if (p->name) {
++ e = (*v)(p->name, a); if (e) return e;
+ }
+- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
+- if (__pyx_t_4) {
+- } else {
+- __pyx_t_2 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
++ if (p->data) {
++ e = (*v)(p->data, a); if (e) return e;
+ }
+- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_5 = (__pyx_t_4 != 0);
+- __pyx_t_2 = __pyx_t_5;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_2) {
++ return 0;
++}
+
+- /* "(tree fragment)":14
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 14, __pyx_L1_error)
+- }
+- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Property(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
++ tmp = ((PyObject*)p->name);
++ p->name = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->data);
++ p->data = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(o);
++}
++
++static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(o, v);
++ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(o);
+ }
++}
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(o);
++}
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_InputDispatch__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(o, v);
++ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(o);
++ }
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Property[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage = {"__pyx_unpickle_LogMessage", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_LogMessage") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
++static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Property[] = {
++ {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_name, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name, (char *)0, 0},
++ {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_data, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data, (char *)0, 0},
++ {0, 0, 0, 0, 0}
++};
++
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Property = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.Property", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Property), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ "Data field for MPV_EVENT_PROPERTY_CHANGE and MPV_EVENT_GET_PROPERTY_REPLY.\n\n Wraps: mpv_event_property\n ", /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_Property, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_Property, /*tp_methods*/
++ 0, /*tp_members*/
++ __pyx_getsets_9vidcutter_4libs_3mpv_Property, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_Property, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event __pyx_vtable_9vidcutter_4libs_3mpv_Event;
++
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Event(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_LogMessage(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Event;
++ p->data = Py_None; Py_INCREF(Py_None);
++ p->reply_userdata = Py_None; Py_INCREF(Py_None);
++ return o;
++}
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
++ #endif
++ PyObject_GC_UnTrack(o);
++ Py_CLEAR(p->data);
++ Py_CLEAR(p->reply_userdata);
++ (*Py_TYPE(o)->tp_free)(o);
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage", 0);
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
++ if (p->data) {
++ e = (*v)(p->data, a); if (e) return e;
++ }
++ if (p->reply_userdata) {
++ e = (*v)(p->reply_userdata, a); if (e) return e;
++ }
++ return 0;
++}
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x8774fae) != 0);
+- if (__pyx_t_1) {
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Event(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
++ tmp = ((PyObject*)p->data);
++ p->data = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->reply_userdata);
++ p->reply_userdata = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
++}
+
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x8774fae:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- * __pyx_result = LogMessage.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(o);
++}
+
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0x8774fae:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = LogMessage.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_name(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(o);
++}
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- */
+- }
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(o);
++}
+
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- * __pyx_result = LogMessage.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(o, v);
+ }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- * __pyx_result = LogMessage.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
+-
+- /* "(tree fragment)":9
+- * __pyx_result = LogMessage.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- * __pyx_result = LogMessage.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
++ else {
++ PyErr_SetString(PyExc_NotImplementedError, "__del__");
++ return -1;
+ }
+-
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-/* "(tree fragment)":11
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- */
+-
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- Py_ssize_t __pyx_t_3;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage__set_state", 0);
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(o);
++}
+
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3] # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(o, v);
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->level);
+- __Pyx_DECREF(__pyx_v___pyx_result->level);
+- __pyx_v___pyx_result->level = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++ else {
++ PyErr_SetString(PyExc_NotImplementedError, "__del__");
++ return -1;
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->log_level);
+- __Pyx_DECREF(__pyx_v___pyx_result->log_level);
+- __pyx_v___pyx_result->log_level = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++}
++
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(o);
++}
++
++static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(o, v);
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->prefix);
+- __Pyx_DECREF(__pyx_v___pyx_result->prefix);
+- __pyx_v___pyx_result->prefix = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(o);
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->text);
+- __Pyx_DECREF(__pyx_v___pyx_result->text);
+- __pyx_v___pyx_result->text = __pyx_t_1;
+- __pyx_t_1 = 0;
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 13, __pyx_L1_error)
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(o);
++}
++
++static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(o, v);
+ }
+- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_4 = ((__pyx_t_3 > 4) != 0);
+- if (__pyx_t_4) {
+- } else {
+- __pyx_t_2 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(o);
+ }
+- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_5 = (__pyx_t_4 != 0);
+- __pyx_t_2 = __pyx_t_5;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_2) {
++}
+
+- /* "(tree fragment)":14
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 14, __pyx_L1_error)
+- }
+- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Event[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
+- }
++static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Event[] = {
++ {(char *)"error_str", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str, 0, (char *)"mpv_error_string of the error proeprty", 0},
++ {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_name, 0, (char *)"mpv_event_name of the event id", 0},
++ {(char *)"id", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_id, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id, (char *)0, 0},
++ {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error, (char *)0, 0},
++ {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_data, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data, (char *)0, 0},
++ {(char *)"reply_userdata", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, (char *)0, 0},
++ {0, 0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Event = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.Event", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Event), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ "Wraps: mpv_event", /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_Event, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_Event, /*tp_methods*/
++ 0, /*tp_members*/
++ __pyx_getsets_9vidcutter_4libs_3mpv_Event, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_Event, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context __pyx_vtable_9vidcutter_4libs_3mpv_Context;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Context(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
++ }
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Context;
++ p->callback = Py_None; Py_INCREF(Py_None);
++ p->callbackthread = Py_None; Py_INCREF(Py_None);
++ p->reply_userdata = Py_None; Py_INCREF(Py_None);
++ if (unlikely(__pyx_pw_9vidcutter_4libs_3mpv_7Context_33__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
++ return o;
++ bad:
++ Py_DECREF(o); o = 0;
++ return NULL;
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property = {"__pyx_unpickle_Property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Property (wrapper)", 0);
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
++ #endif
++ PyObject_GC_UnTrack(o);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Property") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
++ PyObject *etype, *eval, *etb;
++ PyErr_Fetch(&etype, &eval, &etb);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
++ __pyx_pw_9vidcutter_4libs_3mpv_7Context_41__dealloc__(o);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
++ PyErr_Restore(etype, eval, etb);
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Property(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
++ Py_CLEAR(p->callback);
++ Py_CLEAR(p->callbackthread);
++ Py_CLEAR(p->reply_userdata);
++ (*Py_TYPE(o)->tp_free)(o);
++}
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
++ if (p->callback) {
++ e = (*v)(p->callback, a); if (e) return e;
++ }
++ if (p->callbackthread) {
++ e = (*v)(p->callbackthread, a); if (e) return e;
++ }
++ if (p->reply_userdata) {
++ e = (*v)(p->reply_userdata, a); if (e) return e;
++ }
++ return 0;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Property", 0);
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0572d11) != 0);
+- if (__pyx_t_1) {
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Context(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
++ tmp = ((PyObject*)p->callback);
++ p->callback = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->callbackthread);
++ p->callbackthread = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->reply_userdata);
++ p->reply_userdata = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
++}
+
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x0572d11:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- * __pyx_result = Property.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(o);
++}
+
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0x0572d11:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = Property.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_name(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(o);
++}
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- */
+- }
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_time(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(o);
++}
+
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- * __pyx_result = Property.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Context[] = {
++ {"request_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_request_event},
++ {"set_log_level", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_3set_log_level, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_2set_log_level},
++ {"load_config", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_5load_config, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_4load_config},
++ {"_format_for", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_7_format_for, METH_O, 0},
++ {"command", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_8command},
++ {"get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_10get_property_async},
++ {"try_get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_async, METH_VARARGS|METH_KEYWORDS, 0},
++ {"try_get_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property, METH_VARARGS|METH_KEYWORDS, 0},
++ {"get_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_17get_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_16get_property},
++ {"set_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_18set_property},
++ {"set_option", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_20set_option},
++ {"initialize", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_23initialize, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_22initialize},
++ {"wait_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_24wait_event},
++ {"wakeup", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_27wakeup, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_26wakeup},
++ {"set_wakeup_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_29set_wakeup_callback, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback},
++ {"get_wakeup_pipe", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_31get_wakeup_pipe, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe},
++ {"observe_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_34observe_property},
++ {"unobserve_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_37unobserve_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_36unobserve_property},
++ {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_39shutdown, METH_NOARGS, 0},
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_43__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_45__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- * __pyx_result = Property.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
++static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Context[] = {
++ {(char *)"api_version", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version, 0, (char *)0, 0},
++ {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_name, 0, (char *)"Unique name for every context created.\n\n Wraps: mpv_client_name\n ", 0},
++ {(char *)"time", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_time, 0, (char *)"Internal mpv client time.\n\n Has an arbitrary start offset, but will never wrap or go backwards.\n\n Wraps: mpv_get_time_us\n ", 0},
++ {0, 0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":9
+- * __pyx_result = Property.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Context = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.Context", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Context), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ "Base class wrapping a context to interact with mpv.\n\n Assume all calls can raise MPVError.\n\n Wraps: mpv_create, mpv_destroy and all mpv_handle related calls\n ", /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_Context, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_Context, /*tp_methods*/
++ 0, /*tp_members*/
++ __pyx_getsets_9vidcutter_4libs_3mpv_Context, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_Context, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
+
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- * __pyx_result = Property.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams;
++ p->owned = Py_None; Py_INCREF(Py_None);
++ return o;
++}
+
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
++ #endif
++ PyObject_GC_UnTrack(o);
++ {
++ PyObject *etype, *eval, *etb;
++ PyErr_Fetch(&etype, &eval, &etb);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
++ __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(o);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
++ PyErr_Restore(etype, eval, etb);
++ }
++ Py_CLEAR(p->owned);
++ (*Py_TYPE(o)->tp_free)(o);
++}
+
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
++ if (p->owned) {
++ e = (*v)(p->owned, a); if (e) return e;
++ }
++ return 0;
++}
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
++ tmp = ((PyObject*)p->owned);
++ p->owned = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
+ }
+
+-/* "(tree fragment)":11
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv__RenderParams[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- Py_ssize_t __pyx_t_3;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Property__set_state", 0);
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv__RenderParams = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv._RenderParams", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ 0, /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv__RenderParams, /*tp_methods*/
++ 0, /*tp_members*/
++ 0, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
+
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->data);
+- __Pyx_DECREF(__pyx_v___pyx_result->data);
+- __pyx_v___pyx_result->data = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->name);
+- __Pyx_DECREF(__pyx_v___pyx_result->name);
+- __pyx_v___pyx_result->name = __pyx_t_1;
+- __pyx_t_1 = 0;
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo;
++ return o;
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 13, __pyx_L1_error)
+- }
+- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
+- if (__pyx_t_4) {
+- } else {
+- __pyx_t_2 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo(PyObject *o) {
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_5 = (__pyx_t_4 != 0);
+- __pyx_t_2 = __pyx_t_5;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_2) {
++ #endif
++ (*Py_TYPE(o)->tp_free)(o);
++}
+
+- /* "(tree fragment)":14
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 14, __pyx_L1_error)
+- }
+- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- }
+-
+- /* "(tree fragment)":11
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.RenderFrameInfo", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
++ 0, /*tp_doc*/
++ 0, /*tp_traverse*/
++ 0, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_methods*/
++ 0, /*tp_members*/
++ 0, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
++ }
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o);
++ p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
++ p->update_cb = Py_None; Py_INCREF(Py_None);
++ p->_x11_display = Py_None; Py_INCREF(Py_None);
++ p->_wl_display = Py_None; Py_INCREF(Py_None);
++ p->_get_proc_address = Py_None; Py_INCREF(Py_None);
++ return o;
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event = {"__pyx_unpickle_Event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Event (wrapper)", 0);
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
++ #endif
++ PyObject_GC_UnTrack(o);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Event") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
++ PyObject *etype, *eval, *etb;
++ PyErr_Fetch(&etype, &eval, &etb);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
++ __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(o);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
++ PyErr_Restore(etype, eval, etb);
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_Event(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++ Py_CLEAR(p->_mpv);
++ Py_CLEAR(p->update_cb);
++ Py_CLEAR(p->_x11_display);
++ Py_CLEAR(p->_wl_display);
++ Py_CLEAR(p->_get_proc_address);
++ (*Py_TYPE(o)->tp_free)(o);
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Event", 0);
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xda38c25) != 0);
+- if (__pyx_t_1) {
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
++ if (p->_mpv) {
++ e = (*v)(((PyObject *)p->_mpv), a); if (e) return e;
++ }
++ if (p->update_cb) {
++ e = (*v)(p->update_cb, a); if (e) return e;
++ }
++ if (p->_x11_display) {
++ e = (*v)(p->_x11_display, a); if (e) return e;
++ }
++ if (p->_wl_display) {
++ e = (*v)(p->_wl_display, a); if (e) return e;
++ }
++ if (p->_get_proc_address) {
++ e = (*v)(p->_get_proc_address, a); if (e) return e;
++ }
++ return 0;
++}
+
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xda38c25:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- * __pyx_result = Event.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0xda38c25:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = Event.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- */
+- }
+-
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- * __pyx_result = Event.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- * __pyx_result = Event.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
+-
+- /* "(tree fragment)":9
+- * __pyx_result = Event.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- * __pyx_result = Event.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- }
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
++ tmp = ((PyObject*)p->_mpv);
++ p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->update_cb);
++ p->update_cb = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->_x11_display);
++ p->_x11_display = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->_wl_display);
++ p->_wl_display = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->_get_proc_address);
++ p->_get_proc_address = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
++}
+
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderContext[] = {
++ {"set_icc_profile", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile, METH_O, 0},
++ {"set_ambient_light", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light, METH_O, 0},
++ {"get_next_frame_info", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info, METH_NOARGS, 0},
++ {"set_update_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback, METH_O, 0},
++ {"update", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update, METH_NOARGS, 0},
++ {"render", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render, METH_VARARGS|METH_KEYWORDS, 0},
++ {"report_swap", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap, METH_NOARGS, 0},
++ {"free", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free, METH_NOARGS, 0},
++ {"close", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close, METH_NOARGS, 0},
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderContext = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.RenderContext", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ 0, /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_RenderContext, /*tp_methods*/
++ 0, /*tp_members*/
++ 0, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeObject *t, PyObject *a, PyObject *k) {
++ PyObject *o = __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(t, a, k);
++ if (unlikely(!o)) return 0;
++ return o;
+ }
+
+-/* "(tree fragment)":11
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- enum mpv_event_id __pyx_t_3;
+- int __pyx_t_4;
+- Py_ssize_t __pyx_t_5;
+- int __pyx_t_6;
+- int __pyx_t_7;
+- PyObject *__pyx_t_8 = NULL;
+- PyObject *__pyx_t_9 = NULL;
+- PyObject *__pyx_t_10 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Event__set_state", 0);
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.OpenGLRenderContext", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ 0, /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_methods*/
++ 0, /*tp_members*/
++ 0, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
+
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3] # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->data);
+- __Pyx_DECREF(__pyx_v___pyx_result->data);
+- __pyx_v___pyx_result->data = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v___pyx_result->error = __pyx_t_2;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v___pyx_result->id = __pyx_t_3;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->reply_userdata);
+- __Pyx_DECREF(__pyx_v___pyx_result->reply_userdata);
+- __pyx_v___pyx_result->reply_userdata = __pyx_t_1;
+- __pyx_t_1 = 0;
++static struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[8];
++static int __pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = 0;
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 13, __pyx_L1_error)
+- }
+- __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_6 = ((__pyx_t_5 > 4) != 0);
+- if (__pyx_t_6) {
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ PyObject *o;
++ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
++ o = (PyObject*)__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[--__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors];
++ memset(o, 0, sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors));
++ (void) PyObject_INIT(o, t);
++ PyObject_GC_Track(o);
+ } else {
+- __pyx_t_4 = __pyx_t_6;
+- goto __pyx_L4_bool_binop_done;
++ o = (*t->tp_alloc)(t, 0);
++ if (unlikely(!o)) return 0;
+ }
+- __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_7 = (__pyx_t_6 != 0);
+- __pyx_t_4 = __pyx_t_7;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_4) {
+-
+- /* "(tree fragment)":14
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_8);
+- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_9);
+- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 14, __pyx_L1_error)
+- }
+- __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_8);
+- __pyx_t_10 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
+- if (likely(__pyx_t_10)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+- __Pyx_INCREF(__pyx_t_10);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_9, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
+- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ return o;
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
++ PyObject_GC_UnTrack(o);
++ Py_CLEAR(p->__pyx_v_fn);
++ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
++ __pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors++] = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o);
++ } else {
++ (*Py_TYPE(o)->tp_free)(o);
+ }
++}
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- */
+-
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_XDECREF(__pyx_t_9);
+- __Pyx_XDECREF(__pyx_t_10);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
++ if (p->__pyx_v_fn) {
++ e = (*v)(p->__pyx_v_fn, a); if (e) return e;
++ }
++ return 0;
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo = {"__pyx_unpickle_RenderFrameInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RenderFrameInfo") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_16__pyx_unpickle_RenderFrameInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
++ tmp = ((PyObject*)p->__pyx_v_fn);
++ p->__pyx_v_fn = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo", 0);
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
+- if (__pyx_t_1) {
+-
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xd41d8cd:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.__pyx_scope_struct___errors", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ 0, /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ 0, /*tp_methods*/
++ 0, /*tp_members*/
++ 0, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
+
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0xd41d8cd:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
++static PyMethodDef __pyx_methods[] = {
++ {0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- */
+- }
++#if PY_MAJOR_VERSION >= 3
++#if CYTHON_PEP489_MULTI_PHASE_INIT
++static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
++static int __pyx_pymod_exec_mpv(PyObject* module); /*proto*/
++static PyModuleDef_Slot __pyx_moduledef_slots[] = {
++ {Py_mod_create, (void*)__pyx_pymod_create},
++ {Py_mod_exec, (void*)__pyx_pymod_exec_mpv},
++ {0, NULL}
++};
++#endif
+
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
+-
+- /* "(tree fragment)":9
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- }
+-
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":11
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[0])
+- */
+-
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- Py_ssize_t __pyx_t_2;
+- int __pyx_t_3;
+- int __pyx_t_4;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo__set_state", 0);
+-
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[0])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
+- __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
+- if (__pyx_t_3) {
+- } else {
+- __pyx_t_1 = __pyx_t_3;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
+- __pyx_t_4 = (__pyx_t_3 != 0);
+- __pyx_t_1 = __pyx_t_4;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_1) {
+-
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 13, __pyx_L1_error)
+- }
+- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+-
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[0])
+- */
+- }
+-
+- /* "(tree fragment)":11
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[0])
+- */
+-
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
+- p->reason = Py_None; Py_INCREF(Py_None);
+- p->error = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
++static struct PyModuleDef __pyx_moduledef = {
++ PyModuleDef_HEAD_INIT,
++ "mpv",
++ __pyx_k_pympv_Python_wrapper_for_libmpv, /* m_doc */
++ #if CYTHON_PEP489_MULTI_PHASE_INIT
++ 0, /* m_size */
++ #else
++ -1, /* m_size */
+ #endif
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->reason);
+- Py_CLEAR(p->error);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
++ __pyx_methods /* m_methods */,
++ #if CYTHON_PEP489_MULTI_PHASE_INIT
++ __pyx_moduledef_slots, /* m_slots */
++ #else
++ NULL, /* m_reload */
++ #endif
++ NULL, /* m_traverse */
++ NULL, /* m_clear */
++ NULL /* m_free */
++};
++#endif
++#ifndef CYTHON_SMALL_CODE
++#if defined(__clang__)
++ #define CYTHON_SMALL_CODE
++#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
++ #define CYTHON_SMALL_CODE __attribute__((cold))
++#else
++ #define CYTHON_SMALL_CODE
++#endif
++#endif
+
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
+- if (p->reason) {
+- e = (*v)(p->reason, a); if (e) return e;
+- }
+- if (p->error) {
+- e = (*v)(p->error, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
+- tmp = ((PyObject*)p->reason);
+- p->reason = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->error);
+- p->error = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_5__del__(o);
+- }
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
+- {(char *)"reason", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, (char *)0, 0},
+- {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, (char *)0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.EndOfFileReached", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Data field for MPV_EVENT_END_FILE events\n\n Wraps: mpv_event_end_file\n ", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch __pyx_vtable_9vidcutter_4libs_3mpv_InputDispatch;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_InputDispatch(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch;
+- p->arg0 = Py_None; Py_INCREF(Py_None);
+- p->type = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_InputDispatch(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->arg0);
+- Py_CLEAR(p->type);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_InputDispatch(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o;
+- if (p->arg0) {
+- e = (*v)(p->arg0, a); if (e) return e;
+- }
+- if (p->type) {
+- e = (*v)(p->type, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_InputDispatch(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o;
+- tmp = ((PyObject*)p->arg0);
+- p->arg0 = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->type);
+- p->type = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_type(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_5__del__(o);
+- }
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_InputDispatch[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_InputDispatch[] = {
+- {(char *)"arg0", __pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0, __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0, (char *)0, 0},
+- {(char *)"type", __pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_type, __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_type, (char *)0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_InputDispatch = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.InputDispatch", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_InputDispatch, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.\n\n Wraps: mpv_event_script_input_dispatch\n ", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_InputDispatch, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_InputDispatch, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_InputDispatch, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_InputDispatch, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_InputDispatch, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage;
+- p->prefix = Py_None; Py_INCREF(Py_None);
+- p->level = Py_None; Py_INCREF(Py_None);
+- p->text = Py_None; Py_INCREF(Py_None);
+- p->log_level = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->prefix);
+- Py_CLEAR(p->level);
+- Py_CLEAR(p->text);
+- Py_CLEAR(p->log_level);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
+- if (p->prefix) {
+- e = (*v)(p->prefix, a); if (e) return e;
+- }
+- if (p->level) {
+- e = (*v)(p->level, a); if (e) return e;
+- }
+- if (p->text) {
+- e = (*v)(p->text, a); if (e) return e;
+- }
+- if (p->log_level) {
+- e = (*v)(p->log_level, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
+- tmp = ((PyObject*)p->prefix);
+- p->prefix = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->level);
+- p->level = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->text);
+- p->text = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->log_level);
+- p->log_level = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(o);
+- }
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_LogMessage[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage[] = {
+- {(char *)"prefix", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, (char *)0, 0},
+- {(char *)"level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level, (char *)0, 0},
+- {(char *)"text", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text, (char *)0, 0},
+- {(char *)"log_level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, (char *)0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_LogMessage = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.LogMessage", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Data field for MPV_EVENT_LOG_MESSAGE events.\n\n Wraps: mpv_event_log_message\n ", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_LogMessage, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property __pyx_vtable_9vidcutter_4libs_3mpv_Property;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Property(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Property;
+- p->name = Py_None; Py_INCREF(Py_None);
+- p->data = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->name);
+- Py_CLEAR(p->data);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
+- if (p->name) {
+- e = (*v)(p->name, a); if (e) return e;
+- }
+- if (p->data) {
+- e = (*v)(p->data, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Property(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
+- tmp = ((PyObject*)p->name);
+- p->name = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->data);
+- p->data = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(o);
+- }
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Property[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Property[] = {
+- {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_name, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name, (char *)0, 0},
+- {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_data, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data, (char *)0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Property = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.Property", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Property), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Data field for MPV_EVENT_PROPERTY_CHANGE and MPV_EVENT_GET_PROPERTY_REPLY.\n\n Wraps: mpv_event_property\n ", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_Property, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_Property, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_Property, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_Property, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event __pyx_vtable_9vidcutter_4libs_3mpv_Event;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Event(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Event;
+- p->data = Py_None; Py_INCREF(Py_None);
+- p->reply_userdata = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->data);
+- Py_CLEAR(p->reply_userdata);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
+- if (p->data) {
+- e = (*v)(p->data, a); if (e) return e;
+- }
+- if (p->reply_userdata) {
+- e = (*v)(p->reply_userdata, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Event(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
+- tmp = ((PyObject*)p->data);
+- p->data = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->reply_userdata);
+- p->reply_userdata = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(o);
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_name(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(o);
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(o, v);
+- }
+- else {
+- PyErr_SetString(PyExc_NotImplementedError, "__del__");
+- return -1;
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(o, v);
+- }
+- else {
+- PyErr_SetString(PyExc_NotImplementedError, "__del__");
+- return -1;
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(o);
+- }
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Event[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Event[] = {
+- {(char *)"error_str", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str, 0, (char *)"mpv_error_string of the error proeprty", 0},
+- {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_name, 0, (char *)"mpv_event_name of the event id", 0},
+- {(char *)"id", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_id, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id, (char *)0, 0},
+- {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error, (char *)0, 0},
+- {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_data, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data, (char *)0, 0},
+- {(char *)"reply_userdata", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, (char *)0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Event = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.Event", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Event), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Wraps: mpv_event", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_Event, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_Event, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_Event, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_Event, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context __pyx_vtable_9vidcutter_4libs_3mpv_Context;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Context(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Context;
+- p->callback = Py_None; Py_INCREF(Py_None);
+- p->callbackthread = Py_None; Py_INCREF(Py_None);
+- p->reply_userdata = Py_None; Py_INCREF(Py_None);
+- if (unlikely(__pyx_pw_9vidcutter_4libs_3mpv_7Context_37__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
+- return o;
+- bad:
+- Py_DECREF(o); o = 0;
+- return NULL;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- {
+- PyObject *etype, *eval, *etb;
+- PyErr_Fetch(&etype, &eval, &etb);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
+- __pyx_pw_9vidcutter_4libs_3mpv_7Context_47__dealloc__(o);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
+- PyErr_Restore(etype, eval, etb);
+- }
+- Py_CLEAR(p->callback);
+- Py_CLEAR(p->callbackthread);
+- Py_CLEAR(p->reply_userdata);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
+- if (p->callback) {
+- e = (*v)(p->callback, a); if (e) return e;
+- }
+- if (p->callbackthread) {
+- e = (*v)(p->callbackthread, a); if (e) return e;
+- }
+- if (p->reply_userdata) {
+- e = (*v)(p->reply_userdata, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Context(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
+- tmp = ((PyObject*)p->callback);
+- p->callback = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->callbackthread);
+- p->callbackthread = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->reply_userdata);
+- p->reply_userdata = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(o);
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_name(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(o);
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_time(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(o);
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Context[] = {
+- {"suspend", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_1suspend, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_suspend},
+- {"resume", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_3resume, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_2resume},
+- {"request_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_5request_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_4request_event},
+- {"set_log_level", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_7set_log_level, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_6set_log_level},
+- {"load_config", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_9load_config, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_8load_config},
+- {"_format_for", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_11_format_for, METH_O, 0},
+- {"command", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_13command, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_12command},
+- {"get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_14get_property_async},
+- {"try_get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_17try_get_property_async, METH_VARARGS|METH_KEYWORDS, 0},
+- {"try_get_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property, METH_VARARGS|METH_KEYWORDS, 0},
+- {"get_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_21get_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_20get_property},
+- {"set_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_23set_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_22set_property},
+- {"set_option", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_25set_option, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_24set_option},
+- {"initialize", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_27initialize, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_26initialize},
+- {"wait_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_28wait_event},
+- {"wakeup", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_31wakeup, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_30wakeup},
+- {"set_wakeup_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_33set_wakeup_callback, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback},
+- {"get_wakeup_pipe", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_35get_wakeup_pipe, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe},
+- {"observe_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_39observe_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_38observe_property},
+- {"unobserve_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_41unobserve_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_40unobserve_property},
+- {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_43shutdown, METH_NOARGS, 0},
+- {"opengl_cb_api", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_45opengl_cb_api, METH_NOARGS, 0},
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_49__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_51__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Context[] = {
+- {(char *)"api_version", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version, 0, (char *)0, 0},
+- {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_name, 0, (char *)"Unique name for every context created.\n\n Wraps: mpv_client_name\n ", 0},
+- {(char *)"time", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_time, 0, (char *)"Internal mpv client time.\n\n Has an arbitrary start offset, but will never wrap or go backwards.\n\n Wraps: mpv_get_time_us\n ", 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Context = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.Context", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Context), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Base class wrapping a context to interact with mpv.\n\n Assume all calls can raise MPVError.\n\n Wraps: mpv_create, mpv_destroy and all mpv_handle related calls\n ", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_Context, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_Context, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_Context, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_Context, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o);
+- p->update_cb = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_OpenGLContext(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- {
+- PyObject *etype, *eval, *etb;
+- PyErr_Fetch(&etype, &eval, &etb);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
+- __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_13__dealloc__(o);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
+- PyErr_Restore(etype, eval, etb);
+- }
+- Py_CLEAR(p->update_cb);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_OpenGLContext(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o;
+- if (p->update_cb) {
+- e = (*v)(p->update_cb, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_OpenGLContext(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o;
+- tmp = ((PyObject*)p->update_cb);
+- p->update_cb = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_OpenGLContext[] = {
+- {"init_gl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_3init_gl, METH_VARARGS|METH_KEYWORDS, 0},
+- {"set_update_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_5set_update_callback, METH_O, 0},
+- {"draw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_7draw, METH_VARARGS|METH_KEYWORDS, 0},
+- {"report_flip", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_9report_flip, METH_O, 0},
+- {"uninit_gl", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_11uninit_gl, METH_NOARGS, 0},
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_15__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_17__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.OpenGLContext", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- 0, /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_1__init__, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams;
+- p->owned = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- {
+- PyObject *etype, *eval, *etb;
+- PyErr_Fetch(&etype, &eval, &etb);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
+- __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(o);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
+- PyErr_Restore(etype, eval, etb);
+- }
+- Py_CLEAR(p->owned);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
+- if (p->owned) {
+- e = (*v)(p->owned, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
+- tmp = ((PyObject*)p->owned);
+- p->owned = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv__RenderParams[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv__RenderParams = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv._RenderParams", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- 0, /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv__RenderParams, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo;
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo(PyObject *o) {
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.RenderFrameInfo", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+- 0, /*tp_doc*/
+- 0, /*tp_traverse*/
+- 0, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o);
+- p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
+- p->update_cb = Py_None; Py_INCREF(Py_None);
+- p->_x11_display = Py_None; Py_INCREF(Py_None);
+- p->_wl_display = Py_None; Py_INCREF(Py_None);
+- p->_get_proc_address = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- {
+- PyObject *etype, *eval, *etb;
+- PyErr_Fetch(&etype, &eval, &etb);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
+- __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(o);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
+- PyErr_Restore(etype, eval, etb);
+- }
+- Py_CLEAR(p->_mpv);
+- Py_CLEAR(p->update_cb);
+- Py_CLEAR(p->_x11_display);
+- Py_CLEAR(p->_wl_display);
+- Py_CLEAR(p->_get_proc_address);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
+- if (p->_mpv) {
+- e = (*v)(((PyObject *)p->_mpv), a); if (e) return e;
+- }
+- if (p->update_cb) {
+- e = (*v)(p->update_cb, a); if (e) return e;
+- }
+- if (p->_x11_display) {
+- e = (*v)(p->_x11_display, a); if (e) return e;
+- }
+- if (p->_wl_display) {
+- e = (*v)(p->_wl_display, a); if (e) return e;
+- }
+- if (p->_get_proc_address) {
+- e = (*v)(p->_get_proc_address, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
+- tmp = ((PyObject*)p->_mpv);
+- p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->update_cb);
+- p->update_cb = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->_x11_display);
+- p->_x11_display = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->_wl_display);
+- p->_wl_display = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->_get_proc_address);
+- p->_get_proc_address = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderContext[] = {
+- {"set_icc_profile", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile, METH_O, 0},
+- {"set_ambient_light", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light, METH_O, 0},
+- {"get_next_frame_info", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info, METH_NOARGS, 0},
+- {"set_update_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback, METH_O, 0},
+- {"update", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update, METH_NOARGS, 0},
+- {"render", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render, METH_VARARGS|METH_KEYWORDS, 0},
+- {"report_swap", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap, METH_NOARGS, 0},
+- {"free", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free, METH_NOARGS, 0},
+- {"close", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close, METH_NOARGS, 0},
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderContext = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.RenderContext", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- 0, /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_RenderContext, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeObject *t, PyObject *a, PyObject *k) {
+- PyObject *o = __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(t, a, k);
+- if (unlikely(!o)) return 0;
+- return o;
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.OpenGLRenderContext", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- 0, /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-
+-static struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[8];
+-static int __pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = 0;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- PyObject *o;
+- if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
+- o = (PyObject*)__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[--__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors];
+- memset(o, 0, sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors));
+- (void) PyObject_INIT(o, t);
+- PyObject_GC_Track(o);
+- } else {
+- o = (*t->tp_alloc)(t, 0);
+- if (unlikely(!o)) return 0;
+- }
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->__pyx_v_fn);
+- if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
+- __pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors++] = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o);
+- } else {
+- (*Py_TYPE(o)->tp_free)(o);
+- }
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
+- if (p->__pyx_v_fn) {
+- e = (*v)(p->__pyx_v_fn, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
+- tmp = ((PyObject*)p->__pyx_v_fn);
+- p->__pyx_v_fn = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.__pyx_scope_struct___errors", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- 0, /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- 0, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-
+-static PyMethodDef __pyx_methods[] = {
+- {0, 0, 0, 0}
+-};
+-
+-#if PY_MAJOR_VERSION >= 3
+-#if CYTHON_PEP489_MULTI_PHASE_INIT
+-static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
+-static int __pyx_pymod_exec_mpv(PyObject* module); /*proto*/
+-static PyModuleDef_Slot __pyx_moduledef_slots[] = {
+- {Py_mod_create, (void*)__pyx_pymod_create},
+- {Py_mod_exec, (void*)__pyx_pymod_exec_mpv},
+- {0, NULL}
+-};
+-#endif
+-
+-static struct PyModuleDef __pyx_moduledef = {
+- PyModuleDef_HEAD_INIT,
+- "mpv",
+- __pyx_k_pympv_Python_wrapper_for_libmpv, /* m_doc */
+- #if CYTHON_PEP489_MULTI_PHASE_INIT
+- 0, /* m_size */
+- #else
+- -1, /* m_size */
+- #endif
+- __pyx_methods /* m_methods */,
+- #if CYTHON_PEP489_MULTI_PHASE_INIT
+- __pyx_moduledef_slots, /* m_slots */
+- #else
+- NULL, /* m_reload */
+- #endif
+- NULL, /* m_traverse */
+- NULL, /* m_clear */
+- NULL /* m_free */
+-};
+-#endif
+-#ifndef CYTHON_SMALL_CODE
+-#if defined(__clang__)
+- #define CYTHON_SMALL_CODE
+-#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+- #define CYTHON_SMALL_CODE __attribute__((cold))
+-#else
+- #define CYTHON_SMALL_CODE
+-#endif
+-#endif
+-
+-static __Pyx_StringTabEntry __pyx_string_tab[] = {
+- {&__pyx_kp_s_0_3_0, __pyx_k_0_3_0, sizeof(__pyx_k_0_3_0), 0, 0, 1, 0},
+- {&__pyx_n_s_API_OPENGL, __pyx_k_API_OPENGL, sizeof(__pyx_k_API_OPENGL), 0, 0, 1, 1},
+- {&__pyx_kp_s_Andre_D, __pyx_k_Andre_D, sizeof(__pyx_k_Andre_D), 0, 0, 1, 0},
+- {&__pyx_n_s_CAPI_MAJOR, __pyx_k_CAPI_MAJOR, sizeof(__pyx_k_CAPI_MAJOR), 0, 0, 1, 1},
+- {&__pyx_n_s_CAPI_MINOR, __pyx_k_CAPI_MINOR, sizeof(__pyx_k_CAPI_MINOR), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread, __pyx_k_CallbackThread, sizeof(__pyx_k_CallbackThread), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread___init, __pyx_k_CallbackThread___init, sizeof(__pyx_k_CallbackThread___init), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread_call, __pyx_k_CallbackThread_call, sizeof(__pyx_k_CallbackThread_call), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread_mpv_callback, __pyx_k_CallbackThread_mpv_callback, sizeof(__pyx_k_CallbackThread_mpv_callback), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread_run, __pyx_k_CallbackThread_run, sizeof(__pyx_k_CallbackThread_run), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread_set, __pyx_k_CallbackThread_set, sizeof(__pyx_k_CallbackThread_set), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread_shutdown, __pyx_k_CallbackThread_shutdown, sizeof(__pyx_k_CallbackThread_shutdown), 0, 0, 1, 1},
+- {&__pyx_n_s_Context, __pyx_k_Context, sizeof(__pyx_k_Context), 0, 0, 1, 1},
+- {&__pyx_kp_s_Context_creation_error, __pyx_k_Context_creation_error, sizeof(__pyx_k_Context_creation_error), 0, 0, 1, 0},
+- {&__pyx_n_s_DeprecationWarning, __pyx_k_DeprecationWarning, sizeof(__pyx_k_DeprecationWarning), 0, 0, 1, 1},
+- {&__pyx_n_s_EOFReasons, __pyx_k_EOFReasons, sizeof(__pyx_k_EOFReasons), 0, 0, 1, 1},
+- {&__pyx_n_s_EndOfFileReached, __pyx_k_EndOfFileReached, sizeof(__pyx_k_EndOfFileReached), 0, 0, 1, 1},
+- {&__pyx_n_s_Errors, __pyx_k_Errors, sizeof(__pyx_k_Errors), 0, 0, 1, 1},
+- {&__pyx_n_s_Event, __pyx_k_Event, sizeof(__pyx_k_Event), 0, 0, 1, 1},
+- {&__pyx_n_s_Events, __pyx_k_Events, sizeof(__pyx_k_Events), 0, 0, 1, 1},
+- {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_k_Incompatible_checksums_s_vs_0x05, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x05), 0, 0, 1, 0},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_k_Incompatible_checksums_s_vs_0x56, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x56), 0, 0, 1, 0},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_k_Incompatible_checksums_s_vs_0x87, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x87), 0, 0, 1, 0},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0xbf, __pyx_k_Incompatible_checksums_s_vs_0xbf, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xbf), 0, 0, 1, 0},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_k_Incompatible_checksums_s_vs_0xda, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xda), 0, 0, 1, 0},
+- {&__pyx_n_s_InputDispatch, __pyx_k_InputDispatch, sizeof(__pyx_k_InputDispatch), 0, 0, 1, 1},
+- {&__pyx_kp_s_Known_possible_values_for_EndOfF, __pyx_k_Known_possible_values_for_EndOfF, sizeof(__pyx_k_Known_possible_values_for_EndOfF), 0, 0, 1, 0},
+- {&__pyx_n_s_LogLevels, __pyx_k_LogLevels, sizeof(__pyx_k_LogLevels), 0, 0, 1, 1},
+- {&__pyx_n_s_LogMessage, __pyx_k_LogMessage, sizeof(__pyx_k_LogMessage), 0, 0, 1, 1},
+- {&__pyx_n_s_MIN_CAPI_MINOR, __pyx_k_MIN_CAPI_MINOR, sizeof(__pyx_k_MIN_CAPI_MINOR), 0, 0, 1, 1},
+- {&__pyx_n_s_MPVError, __pyx_k_MPVError, sizeof(__pyx_k_MPVError), 0, 0, 1, 1},
+- {&__pyx_n_s_MPVError___init, __pyx_k_MPVError___init, sizeof(__pyx_k_MPVError___init), 0, 0, 1, 1},
+- {&__pyx_n_s_OpenGLContext, __pyx_k_OpenGLContext, sizeof(__pyx_k_OpenGLContext), 0, 0, 1, 1},
+- {&__pyx_kp_s_OpenGLContext_is_deprecated_plea, __pyx_k_OpenGLContext_is_deprecated_plea, sizeof(__pyx_k_OpenGLContext_is_deprecated_plea), 0, 0, 1, 0},
+- {&__pyx_n_s_OpenGLRenderContext, __pyx_k_OpenGLRenderContext, sizeof(__pyx_k_OpenGLRenderContext), 0, 0, 1, 1},
+- {&__pyx_kp_s_OpenGL_API_not_available, __pyx_k_OpenGL_API_not_available, sizeof(__pyx_k_OpenGL_API_not_available), 0, 0, 1, 0},
+- {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
+- {&__pyx_n_s_Property, __pyx_k_Property, sizeof(__pyx_k_Property), 0, 0, 1, 1},
+- {&__pyx_n_s_PyMPVError, __pyx_k_PyMPVError, sizeof(__pyx_k_PyMPVError), 0, 0, 1, 1},
+- {&__pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_k_REQUIRED_CAPI_MAJOR, sizeof(__pyx_k_REQUIRED_CAPI_MAJOR), 0, 0, 1, 1},
+- {&__pyx_n_s_RenderContext, __pyx_k_RenderContext, sizeof(__pyx_k_RenderContext), 0, 0, 1, 1},
+- {&__pyx_n_s_RenderParams, __pyx_k_RenderParams, sizeof(__pyx_k_RenderParams), 0, 0, 1, 1},
+- {&__pyx_kp_s_RenderParams_overflow, __pyx_k_RenderParams_overflow, sizeof(__pyx_k_RenderParams_overflow), 0, 0, 1, 0},
+- {&__pyx_n_s_ReplyUserData, __pyx_k_ReplyUserData, sizeof(__pyx_k_ReplyUserData), 0, 0, 1, 1},
+- {&__pyx_n_s_ReplyUserData___init, __pyx_k_ReplyUserData___init, sizeof(__pyx_k_ReplyUserData___init), 0, 0, 1, 1},
+- {&__pyx_n_s_ReplyUserData_add, __pyx_k_ReplyUserData_add, sizeof(__pyx_k_ReplyUserData_add), 0, 0, 1, 1},
+- {&__pyx_n_s_ReplyUserData_remove, __pyx_k_ReplyUserData_remove, sizeof(__pyx_k_ReplyUserData_remove), 0, 0, 1, 1},
+- {&__pyx_n_s_Semaphore, __pyx_k_Semaphore, sizeof(__pyx_k_Semaphore), 0, 0, 1, 1},
+- {&__pyx_kp_s_Set_of_known_error_codes_from_Mp, __pyx_k_Set_of_known_error_codes_from_Mp, sizeof(__pyx_k_Set_of_known_error_codes_from_Mp), 0, 0, 1, 0},
+- {&__pyx_kp_s_Set_of_known_values_for_Event_id, __pyx_k_Set_of_known_values_for_Event_id, sizeof(__pyx_k_Set_of_known_values_for_Event_id), 0, 0, 1, 0},
+- {&__pyx_n_s_Thread, __pyx_k_Thread, sizeof(__pyx_k_Thread), 0, 0, 1, 1},
+- {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+- {&__pyx_n_s_UPDATE_FRAME, __pyx_k_UPDATE_FRAME, sizeof(__pyx_k_UPDATE_FRAME), 0, 0, 1, 1},
+- {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1},
+- {&__pyx_n_s_UnicodeEncodeError, __pyx_k_UnicodeEncodeError, sizeof(__pyx_k_UnicodeEncodeError), 0, 0, 1, 1},
+- {&__pyx_kp_s_Unknown_api_type_r, __pyx_k_Unknown_api_type_r, sizeof(__pyx_k_Unknown_api_type_r), 0, 0, 1, 0},
+- {&__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_k_Unknown_or_invalid_pointer_objec, sizeof(__pyx_k_Unknown_or_invalid_pointer_objec), 0, 0, 1, 0},
+- {&__pyx_n_s_aborted, __pyx_k_aborted, sizeof(__pyx_k_aborted), 0, 0, 1, 1},
+- {&__pyx_n_s_acquire, __pyx_k_acquire, sizeof(__pyx_k_acquire), 0, 0, 1, 1},
+- {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
+- {&__pyx_n_s_advanced_control, __pyx_k_advanced_control, sizeof(__pyx_k_advanced_control), 0, 0, 1, 1},
+- {&__pyx_n_s_ao_init_failed, __pyx_k_ao_init_failed, sizeof(__pyx_k_ao_init_failed), 0, 0, 1, 1},
+- {&__pyx_n_s_api_type, __pyx_k_api_type, sizeof(__pyx_k_api_type), 0, 0, 1, 1},
+- {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
+- {&__pyx_n_s_asynchronous, __pyx_k_asynchronous, sizeof(__pyx_k_asynchronous), 0, 0, 1, 1},
+- {&__pyx_n_s_atomic_request_ptr, __pyx_k_atomic_request_ptr, sizeof(__pyx_k_atomic_request_ptr), 0, 0, 1, 1},
+- {&__pyx_n_s_audio_reconfig, __pyx_k_audio_reconfig, sizeof(__pyx_k_audio_reconfig), 0, 0, 1, 1},
+- {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1},
+- {&__pyx_n_s_block_for_target_time, __pyx_k_block_for_target_time, sizeof(__pyx_k_block_for_target_time), 0, 0, 1, 1},
+- {&__pyx_n_s_block_vsync, __pyx_k_block_vsync, sizeof(__pyx_k_block_vsync), 0, 0, 1, 1},
+- {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
+- {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
+- {&__pyx_n_s_chapter_change, __pyx_k_chapter_change, sizeof(__pyx_k_chapter_change), 0, 0, 1, 1},
+- {&__pyx_n_s_client_message, __pyx_k_client_message, sizeof(__pyx_k_client_message), 0, 0, 1, 1},
+- {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
+- {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
+- {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
+- {&__pyx_n_s_command_error, __pyx_k_command_error, sizeof(__pyx_k_command_error), 0, 0, 1, 1},
+- {&__pyx_n_s_command_reply, __pyx_k_command_reply, sizeof(__pyx_k_command_reply), 0, 0, 1, 1},
+- {&__pyx_n_s_connector_id, __pyx_k_connector_id, sizeof(__pyx_k_connector_id), 0, 0, 1, 1},
+- {&__pyx_n_s_counter, __pyx_k_counter, sizeof(__pyx_k_counter), 0, 0, 1, 1},
+- {&__pyx_n_s_crtc_id, __pyx_k_crtc_id, sizeof(__pyx_k_crtc_id), 0, 0, 1, 1},
+- {&__pyx_n_s_daemon, __pyx_k_daemon, sizeof(__pyx_k_daemon), 0, 0, 1, 1},
+- {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
+- {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
+- {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
+- {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
+- {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1},
+- {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
+- {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
+- {&__pyx_kp_s_drmModeAtomicReq, __pyx_k_drmModeAtomicReq, sizeof(__pyx_k_drmModeAtomicReq), 0, 0, 1, 0},
+- {&__pyx_n_s_drm_display, __pyx_k_drm_display, sizeof(__pyx_k_drm_display), 0, 0, 1, 1},
+- {&__pyx_n_s_drm_osd_size, __pyx_k_drm_osd_size, sizeof(__pyx_k_drm_osd_size), 0, 0, 1, 1},
+- {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
+- {&__pyx_n_s_e_i, __pyx_k_e_i, sizeof(__pyx_k_e_i), 0, 0, 1, 1},
+- {&__pyx_n_s_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 0, 1, 1},
+- {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
+- {&__pyx_n_s_end_file, __pyx_k_end_file, sizeof(__pyx_k_end_file), 0, 0, 1, 1},
+- {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
+- {&__pyx_n_s_eof, __pyx_k_eof, sizeof(__pyx_k_eof), 0, 0, 1, 1},
+- {&__pyx_n_s_err_c, __pyx_k_err_c, sizeof(__pyx_k_err_c), 0, 0, 1, 1},
+- {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
+- {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
+- {&__pyx_n_s_errors_locals_wrapped, __pyx_k_errors_locals_wrapped, sizeof(__pyx_k_errors_locals_wrapped), 0, 0, 1, 1},
+- {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1},
+- {&__pyx_n_s_exts, __pyx_k_exts, sizeof(__pyx_k_exts), 0, 0, 1, 1},
+- {&__pyx_n_s_fatal, __pyx_k_fatal, sizeof(__pyx_k_fatal), 0, 0, 1, 1},
+- {&__pyx_n_s_fbo, __pyx_k_fbo, sizeof(__pyx_k_fbo), 0, 0, 1, 1},
+- {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
+- {&__pyx_n_s_file_loaded, __pyx_k_file_loaded, sizeof(__pyx_k_file_loaded), 0, 0, 1, 1},
+- {&__pyx_n_s_flip_y, __pyx_k_flip_y, sizeof(__pyx_k_flip_y), 0, 0, 1, 1},
+- {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
+- {&__pyx_n_s_format_for, __pyx_k_format_for, sizeof(__pyx_k_format_for), 0, 0, 1, 1},
+- {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
+- {&__pyx_n_s_get_proc_address, __pyx_k_get_proc_address, sizeof(__pyx_k_get_proc_address), 0, 0, 1, 1},
+- {&__pyx_n_s_get_property, __pyx_k_get_property, sizeof(__pyx_k_get_property), 0, 0, 1, 1},
+- {&__pyx_n_s_get_property_async, __pyx_k_get_property_async, sizeof(__pyx_k_get_property_async), 0, 0, 1, 1},
+- {&__pyx_n_s_get_property_reply, __pyx_k_get_property_reply, sizeof(__pyx_k_get_property_reply), 0, 0, 1, 1},
+- {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
+- {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
+- {&__pyx_kp_s_icc_blob_should_be_a_bytes_insta, __pyx_k_icc_blob_should_be_a_bytes_insta, sizeof(__pyx_k_icc_blob_should_be_a_bytes_insta), 0, 0, 1, 0},
+- {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
+- {&__pyx_n_s_idle, __pyx_k_idle, sizeof(__pyx_k_idle), 0, 0, 1, 1},
+- {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+- {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
+- {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
+- {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1},
+- {&__pyx_n_s_internal_format, __pyx_k_internal_format, sizeof(__pyx_k_internal_format), 0, 0, 1, 1},
+- {&__pyx_n_s_invalid_parameter, __pyx_k_invalid_parameter, sizeof(__pyx_k_invalid_parameter), 0, 0, 1, 1},
+- {&__pyx_n_s_is_py3, __pyx_k_is_py3, sizeof(__pyx_k_is_py3), 0, 0, 1, 1},
+- {&__pyx_n_s_isshutdown, __pyx_k_isshutdown, sizeof(__pyx_k_isshutdown), 0, 0, 1, 1},
+- {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
+- {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
+- {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
+- {&__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_k_libmpv_version_is_incorrect_Requ, sizeof(__pyx_k_libmpv_version_is_incorrect_Requ), 0, 0, 1, 0},
+- {&__pyx_n_s_load_config, __pyx_k_load_config, sizeof(__pyx_k_load_config), 0, 0, 1, 1},
+- {&__pyx_n_s_loading_failed, __pyx_k_loading_failed, sizeof(__pyx_k_loading_failed), 0, 0, 1, 1},
+- {&__pyx_n_s_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 0, 1, 1},
+- {&__pyx_n_s_log_message, __pyx_k_log_message, sizeof(__pyx_k_log_message), 0, 0, 1, 1},
+- {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+- {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
+- {&__pyx_n_s_metadata_update, __pyx_k_metadata_update, sizeof(__pyx_k_metadata_update), 0, 0, 1, 1},
+- {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
+- {&__pyx_n_s_mpv, __pyx_k_mpv, sizeof(__pyx_k_mpv), 0, 0, 1, 1},
+- {&__pyx_n_s_mpv_callback, __pyx_k_mpv_callback, sizeof(__pyx_k_mpv_callback), 0, 0, 1, 1},
+- {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
+- {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
+- {&__pyx_n_s_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 0, 1, 1},
+- {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
+- {&__pyx_n_s_nomem, __pyx_k_nomem, sizeof(__pyx_k_nomem), 0, 0, 1, 1},
+- {&__pyx_n_s_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 0, 1, 1},
+- {&__pyx_n_s_not_found, __pyx_k_not_found, sizeof(__pyx_k_not_found), 0, 0, 1, 1},
+- {&__pyx_n_s_not_implemented, __pyx_k_not_implemented, sizeof(__pyx_k_not_implemented), 0, 0, 1, 1},
+- {&__pyx_n_s_nothing_to_play, __pyx_k_nothing_to_play, sizeof(__pyx_k_nothing_to_play), 0, 0, 1, 1},
+- {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
+- {&__pyx_n_s_observe_property, __pyx_k_observe_property, sizeof(__pyx_k_observe_property), 0, 0, 1, 1},
+- {&__pyx_n_s_observed, __pyx_k_observed, sizeof(__pyx_k_observed), 0, 0, 1, 1},
+- {&__pyx_n_s_opengl, __pyx_k_opengl, sizeof(__pyx_k_opengl), 0, 0, 1, 1},
+- {&__pyx_n_s_opengl_fbo, __pyx_k_opengl_fbo, sizeof(__pyx_k_opengl_fbo), 0, 0, 1, 1},
+- {&__pyx_n_s_opengl_init_params, __pyx_k_opengl_init_params, sizeof(__pyx_k_opengl_init_params), 0, 0, 1, 1},
+- {&__pyx_n_s_option_error, __pyx_k_option_error, sizeof(__pyx_k_option_error), 0, 0, 1, 1},
+- {&__pyx_n_s_option_format, __pyx_k_option_format, sizeof(__pyx_k_option_format), 0, 0, 1, 1},
+- {&__pyx_n_s_pause, __pyx_k_pause, sizeof(__pyx_k_pause), 0, 0, 1, 1},
+- {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
+- {&__pyx_n_s_playback_restart, __pyx_k_playback_restart, sizeof(__pyx_k_playback_restart), 0, 0, 1, 1},
+- {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
+- {&__pyx_n_s_present, __pyx_k_present, sizeof(__pyx_k_present), 0, 0, 1, 1},
+- {&__pyx_n_s_prop, __pyx_k_prop, sizeof(__pyx_k_prop), 0, 0, 1, 1},
+- {&__pyx_n_s_property_change, __pyx_k_property_change, sizeof(__pyx_k_property_change), 0, 0, 1, 1},
+- {&__pyx_n_s_property_error, __pyx_k_property_error, sizeof(__pyx_k_property_error), 0, 0, 1, 1},
+- {&__pyx_n_s_property_format, __pyx_k_property_format, sizeof(__pyx_k_property_format), 0, 0, 1, 1},
+- {&__pyx_n_s_property_unavailable, __pyx_k_property_unavailable, sizeof(__pyx_k_property_unavailable), 0, 0, 1, 1},
+- {&__pyx_kp_s_pympv_error_during_callback_s, __pyx_k_pympv_error_during_callback_s, sizeof(__pyx_k_pympv_error_during_callback_s), 0, 0, 1, 0},
+- {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_k_pyx_unpickle_EndOfFileReached, sizeof(__pyx_k_pyx_unpickle_EndOfFileReached), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_Event, __pyx_k_pyx_unpickle_Event, sizeof(__pyx_k_pyx_unpickle_Event), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_InputDispatch, __pyx_k_pyx_unpickle_InputDispatch, sizeof(__pyx_k_pyx_unpickle_InputDispatch), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_LogMessage, __pyx_k_pyx_unpickle_LogMessage, sizeof(__pyx_k_pyx_unpickle_LogMessage), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_Property, __pyx_k_pyx_unpickle_Property, sizeof(__pyx_k_pyx_unpickle_Property), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_k_pyx_unpickle_RenderFrameInfo, sizeof(__pyx_k_pyx_unpickle_RenderFrameInfo), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
+- {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
+- {&__pyx_n_s_queue_full, __pyx_k_queue_full, sizeof(__pyx_k_queue_full), 0, 0, 1, 1},
+- {&__pyx_n_s_quit, __pyx_k_quit, sizeof(__pyx_k_quit), 0, 0, 1, 1},
+- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
+- {&__pyx_n_s_redraw, __pyx_k_redraw, sizeof(__pyx_k_redraw), 0, 0, 1, 1},
+- {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
+- {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
+- {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
+- {&__pyx_n_s_release, __pyx_k_release, sizeof(__pyx_k_release), 0, 0, 1, 1},
+- {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
+- {&__pyx_n_s_render, __pyx_k_render, sizeof(__pyx_k_render), 0, 0, 1, 1},
+- {&__pyx_n_s_render_fd, __pyx_k_render_fd, sizeof(__pyx_k_render_fd), 0, 0, 1, 1},
+- {&__pyx_n_s_repeat, __pyx_k_repeat, sizeof(__pyx_k_repeat), 0, 0, 1, 1},
+- {&__pyx_n_s_request_event, __pyx_k_request_event, sizeof(__pyx_k_request_event), 0, 0, 1, 1},
+- {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1},
+- {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
+- {&__pyx_n_s_script_input_dispatch, __pyx_k_script_input_dispatch, sizeof(__pyx_k_script_input_dispatch), 0, 0, 1, 1},
+- {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
+- {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
+- {&__pyx_kp_s_self__ctx_cannot_be_converted_to, __pyx_k_self__ctx_cannot_be_converted_to, sizeof(__pyx_k_self__ctx_cannot_be_converted_to), 0, 0, 1, 0},
+- {&__pyx_kp_s_self_params_cannot_be_converted, __pyx_k_self_params_cannot_be_converted, sizeof(__pyx_k_self_params_cannot_be_converted), 0, 0, 1, 0},
+- {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
+- {&__pyx_n_s_set_ambient_light, __pyx_k_set_ambient_light, sizeof(__pyx_k_set_ambient_light), 0, 0, 1, 1},
+- {&__pyx_n_s_set_icc_profile, __pyx_k_set_icc_profile, sizeof(__pyx_k_set_icc_profile), 0, 0, 1, 1},
+- {&__pyx_n_s_set_log_level, __pyx_k_set_log_level, sizeof(__pyx_k_set_log_level), 0, 0, 1, 1},
+- {&__pyx_n_s_set_option, __pyx_k_set_option, sizeof(__pyx_k_set_option), 0, 0, 1, 1},
+- {&__pyx_n_s_set_property, __pyx_k_set_property, sizeof(__pyx_k_set_property), 0, 0, 1, 1},
+- {&__pyx_n_s_set_property_reply, __pyx_k_set_property_reply, sizeof(__pyx_k_set_property_reply), 0, 0, 1, 1},
+- {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
+- {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
+- {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1},
+- {&__pyx_n_s_skip_rendering, __pyx_k_skip_rendering, sizeof(__pyx_k_skip_rendering), 0, 0, 1, 1},
+- {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
+- {&__pyx_n_s_start_file, __pyx_k_start_file, sizeof(__pyx_k_start_file), 0, 0, 1, 1},
+- {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
+- {&__pyx_n_s_strdec, __pyx_k_strdec, sizeof(__pyx_k_strdec), 0, 0, 1, 1},
+- {&__pyx_n_s_strdec_err, __pyx_k_strdec_err, sizeof(__pyx_k_strdec_err), 0, 0, 1, 1},
+- {&__pyx_n_s_strenc, __pyx_k_strenc, sizeof(__pyx_k_strenc), 0, 0, 1, 1},
+- {&__pyx_n_s_strict, __pyx_k_strict, sizeof(__pyx_k_strict), 0, 0, 1, 1},
+- {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
+- {&__pyx_n_s_success, __pyx_k_success, sizeof(__pyx_k_success), 0, 0, 1, 1},
+- {&__pyx_n_s_surrogateescape, __pyx_k_surrogateescape, sizeof(__pyx_k_surrogateescape), 0, 0, 1, 1},
+- {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+- {&__pyx_n_s_target_time, __pyx_k_target_time, sizeof(__pyx_k_target_time), 0, 0, 1, 1},
+- {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+- {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
+- {&__pyx_n_s_tick, __pyx_k_tick, sizeof(__pyx_k_tick), 0, 0, 1, 1},
+- {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
+- {&__pyx_n_s_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 0, 1, 1},
+- {&__pyx_n_s_tracks_changed, __pyx_k_tracks_changed, sizeof(__pyx_k_tracks_changed), 0, 0, 1, 1},
+- {&__pyx_n_s_tracks_switched, __pyx_k_tracks_switched, sizeof(__pyx_k_tracks_switched), 0, 0, 1, 1},
+- {&__pyx_n_s_uninit_gl, __pyx_k_uninit_gl, sizeof(__pyx_k_uninit_gl), 0, 0, 1, 1},
+- {&__pyx_n_s_uninitialized, __pyx_k_uninitialized, sizeof(__pyx_k_uninitialized), 0, 0, 1, 1},
+- {&__pyx_n_s_unknown_format, __pyx_k_unknown_format, sizeof(__pyx_k_unknown_format), 0, 0, 1, 1},
+- {&__pyx_n_s_unobserve_property, __pyx_k_unobserve_property, sizeof(__pyx_k_unobserve_property), 0, 0, 1, 1},
+- {&__pyx_n_s_unpause, __pyx_k_unpause, sizeof(__pyx_k_unpause), 0, 0, 1, 1},
+- {&__pyx_n_s_unsupported, __pyx_k_unsupported, sizeof(__pyx_k_unsupported), 0, 0, 1, 1},
+- {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
+- {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
+- {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
+- {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
+- {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
+- {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
+- {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
+- {&__pyx_n_s_vidcutter_libs_mpv, __pyx_k_vidcutter_libs_mpv, sizeof(__pyx_k_vidcutter_libs_mpv), 0, 0, 1, 1},
+- {&__pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_k_vidcutter_libs_pympv_mpv_pyx, sizeof(__pyx_k_vidcutter_libs_pympv_mpv_pyx), 0, 0, 1, 0},
+- {&__pyx_n_s_video_reconfig, __pyx_k_video_reconfig, sizeof(__pyx_k_video_reconfig), 0, 0, 1, 1},
+- {&__pyx_n_s_vo_init_failed, __pyx_k_vo_init_failed, sizeof(__pyx_k_vo_init_failed), 0, 0, 1, 1},
+- {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
+- {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
+- {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
+- {&__pyx_n_s_wl_display, __pyx_k_wl_display, sizeof(__pyx_k_wl_display), 0, 0, 1, 1},
+- {&__pyx_n_s_wrapped, __pyx_k_wrapped, sizeof(__pyx_k_wrapped), 0, 0, 1, 1},
+- {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
+- {&__pyx_n_s_x11_display, __pyx_k_x11_display, sizeof(__pyx_k_x11_display), 0, 0, 1, 1},
+- {0, 0, 0, 0, 0, 0, 0}
+-};
+-static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
+- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 44, __pyx_L1_error)
+- __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 346, __pyx_L1_error)
+- __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 58, __pyx_L1_error)
+- __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 66, __pyx_L1_error)
+- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 222, __pyx_L1_error)
+- __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 303, __pyx_L1_error)
+- __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 475, __pyx_L1_error)
+- __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
+- __pyx_builtin_DeprecationWarning = __Pyx_GetBuiltinName(__pyx_n_s_DeprecationWarning); if (!__pyx_builtin_DeprecationWarning) __PYX_ERR(0, 830, __pyx_L1_error)
+- return 0;
+- __pyx_L1_error:;
+- return -1;
+-}
+-
+-static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":319
+- *
+- * def _errors(fn):
+- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+- * v = fn(*k, **kw)
+- * if v < 0:
+- */
+- __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 319, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple_);
+- __Pyx_GIVEREF(__pyx_tuple_);
+- __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 319, __pyx_L1_error)
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+- */
+- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__3);
+- __Pyx_GIVEREF(__pyx_tuple__3);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+- */
+- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__4);
+- __Pyx_GIVEREF(__pyx_tuple__4);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":830
+- * def __init__(self):
+- * self.inited = False
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning) # <<<<<<<<<<<<<<
+- *
+- * def init_gl(self, exts, get_proc_address):
+- */
+- __pyx_tuple__5 = PyTuple_Pack(2, __pyx_kp_s_OpenGLContext_is_deprecated_plea, __pyx_builtin_DeprecationWarning); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 830, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__5);
+- __Pyx_GIVEREF(__pyx_tuple__5);
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- */
+- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__6);
+- __Pyx_GIVEREF(__pyx_tuple__6);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- */
+- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__7);
+- __Pyx_GIVEREF(__pyx_tuple__7);
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- */
+- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__8);
+- __Pyx_GIVEREF(__pyx_tuple__8);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- */
+- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__9);
+- __Pyx_GIVEREF(__pyx_tuple__9);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":992
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- * if drm_display:
+- * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- */
+- __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 992, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__10);
+- __Pyx_GIVEREF(__pyx_tuple__10);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":993
+- * if drm_display:
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None)
+- */
+- __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 993, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__11);
+- __Pyx_GIVEREF(__pyx_tuple__11);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":994
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
+- * arp = drm_display.get("atomic_request_ptr", None)
+- * if arp is not None:
+- */
+- __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 994, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__12);
+- __Pyx_GIVEREF(__pyx_tuple__12);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":995
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
+- * if arp is not None:
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- */
+- __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 995, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__13);
+- __Pyx_GIVEREF(__pyx_tuple__13);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":998
+- * if arp is not None:
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- * if drm_osd_size:
+- */
+- __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 998, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__14);
+- __Pyx_GIVEREF(__pyx_tuple__14);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1083
+- * if opengl_fbo:
+- * memset(&fbo, 0, sizeof(fbo))
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
+- * fbo.w = opengl_fbo["w"]
+- * fbo.h = opengl_fbo["h"]
+- */
+- __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1083, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__15);
+- __Pyx_GIVEREF(__pyx_tuple__15);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1086
+- * fbo.w = opengl_fbo["w"]
+- * fbo.h = opengl_fbo["h"]
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- * if flip_y:
+- */
+- __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1086, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__16);
+- __Pyx_GIVEREF(__pyx_tuple__16);
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- */
+- __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__17);
+- __Pyx_GIVEREF(__pyx_tuple__17);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- */
+- __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__18);
+- __Pyx_GIVEREF(__pyx_tuple__18);
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- */
+- __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__19);
+- __Pyx_GIVEREF(__pyx_tuple__19);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- */
+- __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__20);
+- __Pyx_GIVEREF(__pyx_tuple__20);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":52
+- * void PyEval_InitThreads()
+- *
+- * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
+- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+- * # mpv -> Python
+- */
+- __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 52, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__21);
+- __Pyx_GIVEREF(__pyx_tuple__21);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":55
+- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+- * # mpv -> Python
+- * def _strdec(s): # <<<<<<<<<<<<<<
+- * try:
+- * return s.decode("utf-8", _strdec_err)
+- */
+- __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 55, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__22);
+- __Pyx_GIVEREF(__pyx_tuple__22);
+- __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 55, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":63
+- *
+- * # Python -> mpv
+- * def _strenc(s): # <<<<<<<<<<<<<<
+- * try:
+- * return s.encode("utf-8", _strdec_err)
+- */
+- __pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 63, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__24);
+- __Pyx_GIVEREF(__pyx_tuple__24);
+- __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 63, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":318
+- *
+- *
+- * def _errors(fn): # <<<<<<<<<<<<<<
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
+- */
+- __pyx_tuple__26 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 318, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__26);
+- __Pyx_GIVEREF(__pyx_tuple__26);
+- __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 318, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":329
+- * code = None
+- *
+- * def __init__(self, e): # <<<<<<<<<<<<<<
+- * self.code = e
+- * cdef const char* err_c
+- */
+- __pyx_tuple__28 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 329, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__28);
+- __Pyx_GIVEREF(__pyx_tuple__28);
+- __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 329, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":346
+- * cdef _reply_userdatas = dict()
+- *
+- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+- * def __init__(self, data):
+- * self.counter = 0
+- */
+- __pyx_tuple__30 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 346, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__30);
+- __Pyx_GIVEREF(__pyx_tuple__30);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":347
+- *
+- * class _ReplyUserData(object):
+- * def __init__(self, data): # <<<<<<<<<<<<<<
+- * self.counter = 0
+- * self.data = data
+- */
+- __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 347, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__31);
+- __Pyx_GIVEREF(__pyx_tuple__31);
+- __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 347, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":352
+- * self.observed = False
+- *
+- * def add(self): # <<<<<<<<<<<<<<
+- * self.counter += 1
+- *
+- */
+- __pyx_tuple__33 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 352, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__33);
+- __Pyx_GIVEREF(__pyx_tuple__33);
+- __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 352, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":355
+- * self.counter += 1
+- *
+- * def remove(self): # <<<<<<<<<<<<<<
+- * self.counter -= 1
+- *
+- */
+- __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 355, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__35);
+- __Pyx_GIVEREF(__pyx_tuple__35);
+- __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 355, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
+- *
+- * class CallbackThread(Thread):
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * Thread.__init__(self)
+- * self.daemon = True
+- */
+- __pyx_tuple__37 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 1133, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__37);
+- __Pyx_GIVEREF(__pyx_tuple__37);
+- __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 1133, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
+- * self.isshutdown = False
+- *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * self.isshutdown = True
+- * self.callback = None
+- */
+- __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 1141, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__39);
+- __Pyx_GIVEREF(__pyx_tuple__39);
+- __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 1141, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
+- * self.lock.release()
+- *
+- * def call(self): # <<<<<<<<<<<<<<
+- * self.lock.release()
+- *
+- */
+- __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1146, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__41);
+- __Pyx_GIVEREF(__pyx_tuple__41);
+- __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 1146, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
+- * self.lock.release()
+- *
+- * def set(self, callback): # <<<<<<<<<<<<<<
+- * self.callback = callback
+- *
+- */
+- __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1149, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__43);
+- __Pyx_GIVEREF(__pyx_tuple__43);
+- __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 1149, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
+- * self.callback = callback
+- *
+- * def run(self): # <<<<<<<<<<<<<<
+- * while not self.isshutdown:
+- * self.lock.acquire(True)
+- */
+- __pyx_tuple__45 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1152, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__45);
+- __Pyx_GIVEREF(__pyx_tuple__45);
+- __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 1152, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
+- * self.mpv_callback(self.callback) if self.callback else None
+- *
+- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+- * try:
+- * callback()
+- */
+- __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1157, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__47);
+- __Pyx_GIVEREF(__pyx_tuple__47);
+- __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 1157, __pyx_L1_error)
+-
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+- __pyx_tuple__49 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__49);
+- __Pyx_GIVEREF(__pyx_tuple__49);
+- __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_EndOfFileReached, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __pyx_tuple__51 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__51);
+- __Pyx_GIVEREF(__pyx_tuple__51);
+- __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_InputDispatch, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __pyx_tuple__53 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__53);
+- __Pyx_GIVEREF(__pyx_tuple__53);
+- __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_LogMessage, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __pyx_tuple__55 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__55);
+- __Pyx_GIVEREF(__pyx_tuple__55);
+- __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Property, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __pyx_tuple__57 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__57);
+- __Pyx_GIVEREF(__pyx_tuple__57);
+- __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Event, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __pyx_tuple__59 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__59);
+- __Pyx_GIVEREF(__pyx_tuple__59);
+- __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RenderFrameInfo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_RefNannyFinishContext();
+- return 0;
+- __pyx_L1_error:;
+- __Pyx_RefNannyFinishContext();
+- return -1;
+-}
+-
+-static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
+- if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+- __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_5713169 = PyInt_FromLong(5713169L); if (unlikely(!__pyx_int_5713169)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_90958262 = PyInt_FromLong(90958262L); if (unlikely(!__pyx_int_90958262)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_142036910 = PyInt_FromLong(142036910L); if (unlikely(!__pyx_int_142036910)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_200688041 = PyInt_FromLong(200688041L); if (unlikely(!__pyx_int_200688041)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_228822053 = PyInt_FromLong(228822053L); if (unlikely(!__pyx_int_228822053)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+- return 0;
+- __pyx_L1_error:;
+- return -1;
+-}
+-
+-static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
+-
+-static int __Pyx_modinit_global_init_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
+- /*--- Global init code ---*/
+- __pyx_v_9vidcutter_4libs_3mpv__callbacks = Py_None; Py_INCREF(Py_None);
+- __pyx_v_9vidcutter_4libs_3mpv__reply_userdatas = Py_None; Py_INCREF(Py_None);
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-static int __Pyx_modinit_variable_export_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
+- /*--- Variable export code ---*/
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-static int __Pyx_modinit_function_export_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
+- /*--- Function export code ---*/
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-static int __Pyx_modinit_type_init_code(void) {
+- __Pyx_RefNannyDeclarations
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
+- /*--- Type init code ---*/
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
+- __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, struct mpv_event_end_file *))__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch = &__pyx_vtable_9vidcutter_4libs_3mpv_InputDispatch;
+- __pyx_vtable_9vidcutter_4libs_3mpv_InputDispatch._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *, struct mpv_event_script_input_dispatch *))__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_InputDispatch, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch = &__pyx_type_9vidcutter_4libs_3mpv_InputDispatch;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage = &__pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
+- __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, struct mpv_event_log_message *))__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = &__pyx_type_9vidcutter_4libs_3mpv_LogMessage;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_Property = &__pyx_vtable_9vidcutter_4libs_3mpv_Property;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Property._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, struct mpv_event_property *))__pyx_f_9vidcutter_4libs_3mpv_8Property__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_Property.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_Property = &__pyx_type_9vidcutter_4libs_3mpv_Property;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_Event = &__pyx_vtable_9vidcutter_4libs_3mpv_Event;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Event._data = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *))__pyx_f_9vidcutter_4libs_3mpv_5Event__data;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Event._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_5Event__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_Event.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_Event = &__pyx_type_9vidcutter_4libs_3mpv_Event;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_Context = &__pyx_vtable_9vidcutter_4libs_3mpv_Context;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_list = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_map = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_native_value = (struct mpv_node (*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Context._free_native_value = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, struct mpv_node))__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_Context.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_Context = &__pyx_type_9vidcutter_4libs_3mpv_Context;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams = &__pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
+- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_voidp = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, void *, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
+- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_int = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, int))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int;
+- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_string = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, char *))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = &__pyx_type_9vidcutter_4libs_3mpv__RenderParams;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
+- __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo._from_struct = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *, struct mpv_render_frame_info *))__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = &__pyx_type_9vidcutter_4libs_3mpv_RenderContext;
+- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_base = __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLRenderContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
+- }
+- __pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = &__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors;
+- __Pyx_RefNannyFinishContext();
+- return 0;
+- __pyx_L1_error:;
+- __Pyx_RefNannyFinishContext();
+- return -1;
+-}
+-
+-static int __Pyx_modinit_type_import_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
+- /*--- Type import code ---*/
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-static int __Pyx_modinit_variable_import_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
+- /*--- Variable import code ---*/
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-static int __Pyx_modinit_function_import_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
+- /*--- Function import code ---*/
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-
+-#ifndef CYTHON_NO_PYINIT_EXPORT
+-#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
+-#elif PY_MAJOR_VERSION < 3
+-#ifdef __cplusplus
+-#define __Pyx_PyMODINIT_FUNC extern "C" void
+-#else
+-#define __Pyx_PyMODINIT_FUNC void
+-#endif
+-#else
+-#ifdef __cplusplus
+-#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
+-#else
+-#define __Pyx_PyMODINIT_FUNC PyObject *
+-#endif
+-#endif
+-
+-
+-#if PY_MAJOR_VERSION < 3
+-__Pyx_PyMODINIT_FUNC initmpv(void) CYTHON_SMALL_CODE; /*proto*/
+-__Pyx_PyMODINIT_FUNC initmpv(void)
+-#else
+-__Pyx_PyMODINIT_FUNC PyInit_mpv(void) CYTHON_SMALL_CODE; /*proto*/
+-__Pyx_PyMODINIT_FUNC PyInit_mpv(void)
+-#if CYTHON_PEP489_MULTI_PHASE_INIT
+-{
+- return PyModuleDef_Init(&__pyx_moduledef);
+-}
+-static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
+- #if PY_VERSION_HEX >= 0x030700A1
+- static PY_INT64_T main_interpreter_id = -1;
+- PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
+- if (main_interpreter_id == -1) {
+- main_interpreter_id = current_id;
+- return (unlikely(current_id == -1)) ? -1 : 0;
+- } else if (unlikely(main_interpreter_id != current_id))
+- #else
+- static PyInterpreterState *main_interpreter = NULL;
+- PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
+- if (!main_interpreter) {
+- main_interpreter = current_interpreter;
+- } else if (unlikely(main_interpreter != current_interpreter))
+- #endif
+- {
+- PyErr_SetString(
+- PyExc_ImportError,
+- "Interpreter change detected - this module can only be loaded into one interpreter per process.");
+- return -1;
+- }
+- return 0;
+-}
+-static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
+- PyObject *value = PyObject_GetAttrString(spec, from_name);
+- int result = 0;
+- if (likely(value)) {
+- if (allow_none || value != Py_None) {
+- result = PyDict_SetItemString(moddict, to_name, value);
+- }
+- Py_DECREF(value);
+- } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+- PyErr_Clear();
+- } else {
+- result = -1;
+- }
+- return result;
+-}
+-static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
+- PyObject *module = NULL, *moddict, *modname;
+- if (__Pyx_check_single_interpreter())
+- return NULL;
+- if (__pyx_m)
+- return __Pyx_NewRef(__pyx_m);
+- modname = PyObject_GetAttrString(spec, "name");
+- if (unlikely(!modname)) goto bad;
+- module = PyModule_NewObject(modname);
+- Py_DECREF(modname);
+- if (unlikely(!module)) goto bad;
+- moddict = PyModule_GetDict(module);
+- if (unlikely(!moddict)) goto bad;
+- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
+- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
+- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
+- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
+- return module;
+-bad:
+- Py_XDECREF(module);
+- return NULL;
+-}
+-
+-
+-static CYTHON_SMALL_CODE int __pyx_pymod_exec_mpv(PyObject *__pyx_pyinit_module)
+-#endif
+-#endif
+-{
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannyDeclarations
+- #if CYTHON_PEP489_MULTI_PHASE_INIT
+- if (__pyx_m) {
+- if (__pyx_m == __pyx_pyinit_module) return 0;
+- PyErr_SetString(PyExc_RuntimeError, "Module 'mpv' has already been imported. Re-initialisation is not supported.");
+- return -1;
+- }
+- #elif PY_MAJOR_VERSION >= 3
+- if (__pyx_m) return __Pyx_NewRef(__pyx_m);
+- #endif
+- #if CYTHON_REFNANNY
+-__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+-if (!__Pyx_RefNanny) {
+- PyErr_Clear();
+- __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+- if (!__Pyx_RefNanny)
+- Py_FatalError("failed to import 'refnanny' module");
+-}
+-#endif
+- __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_mpv(void)", 0);
+- if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #ifdef __Pxy_PyFrame_Initialize_Offsets
+- __Pxy_PyFrame_Initialize_Offsets();
+- #endif
+- __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
+- #ifdef __Pyx_CyFunction_USED
+- if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- #ifdef __Pyx_FusedFunction_USED
+- if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- #ifdef __Pyx_Coroutine_USED
+- if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- #ifdef __Pyx_Generator_USED
+- if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- #ifdef __Pyx_AsyncGen_USED
+- if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- #ifdef __Pyx_StopAsyncIteration_USED
+- if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- /*--- Library function declarations ---*/
+- /*--- Threads initialization code ---*/
+- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+- #ifdef WITH_THREAD /* Python build with threading support? */
+- PyEval_InitThreads();
+- #endif
+- #endif
+- /*--- Module creation code ---*/
+- #if CYTHON_PEP489_MULTI_PHASE_INIT
+- __pyx_m = __pyx_pyinit_module;
+- Py_INCREF(__pyx_m);
+- #else
+- #if PY_MAJOR_VERSION < 3
+- __pyx_m = Py_InitModule4("mpv", __pyx_methods, __pyx_k_pympv_Python_wrapper_for_libmpv, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+- #else
+- __pyx_m = PyModule_Create(&__pyx_moduledef);
+- #endif
+- if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
+- Py_INCREF(__pyx_d);
+- __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
+- Py_INCREF(__pyx_b);
+- __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
+- Py_INCREF(__pyx_cython_runtime);
+- if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+- /*--- Initialize various global constants etc. ---*/
+- if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+- if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- if (__pyx_module_is_main_vidcutter__libs__mpv) {
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- }
+- #if PY_MAJOR_VERSION >= 3
+- {
+- PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
+- if (!PyDict_GetItemString(modules, "vidcutter.libs.mpv")) {
+- if (unlikely(PyDict_SetItemString(modules, "vidcutter.libs.mpv", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
+- }
+- }
+- #endif
+- /*--- Builtin init code ---*/
+- if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- /*--- Constants init code ---*/
+- if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- /*--- Global type/function init code ---*/
+- (void)__Pyx_modinit_global_init_code();
+- (void)__Pyx_modinit_variable_export_code();
+- (void)__Pyx_modinit_function_export_code();
+- if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
+- (void)__Pyx_modinit_type_import_code();
+- (void)__Pyx_modinit_variable_import_code();
+- (void)__Pyx_modinit_function_import_code();
+- /*--- Execution code ---*/
+- #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+- if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
++static __Pyx_StringTabEntry __pyx_string_tab[] = {
++ {&__pyx_kp_s_0_3_0, __pyx_k_0_3_0, sizeof(__pyx_k_0_3_0), 0, 0, 1, 0},
++ {&__pyx_n_s_API_OPENGL, __pyx_k_API_OPENGL, sizeof(__pyx_k_API_OPENGL), 0, 0, 1, 1},
++ {&__pyx_kp_s_Andre_D, __pyx_k_Andre_D, sizeof(__pyx_k_Andre_D), 0, 0, 1, 0},
++ {&__pyx_n_s_CAPI_MAJOR, __pyx_k_CAPI_MAJOR, sizeof(__pyx_k_CAPI_MAJOR), 0, 0, 1, 1},
++ {&__pyx_n_s_CAPI_MINOR, __pyx_k_CAPI_MINOR, sizeof(__pyx_k_CAPI_MINOR), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread, __pyx_k_CallbackThread, sizeof(__pyx_k_CallbackThread), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread___init, __pyx_k_CallbackThread___init, sizeof(__pyx_k_CallbackThread___init), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread_call, __pyx_k_CallbackThread_call, sizeof(__pyx_k_CallbackThread_call), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread_mpv_callback, __pyx_k_CallbackThread_mpv_callback, sizeof(__pyx_k_CallbackThread_mpv_callback), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread_run, __pyx_k_CallbackThread_run, sizeof(__pyx_k_CallbackThread_run), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread_set, __pyx_k_CallbackThread_set, sizeof(__pyx_k_CallbackThread_set), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread_shutdown, __pyx_k_CallbackThread_shutdown, sizeof(__pyx_k_CallbackThread_shutdown), 0, 0, 1, 1},
++ {&__pyx_n_s_Context, __pyx_k_Context, sizeof(__pyx_k_Context), 0, 0, 1, 1},
++ {&__pyx_kp_s_Context_creation_error, __pyx_k_Context_creation_error, sizeof(__pyx_k_Context_creation_error), 0, 0, 1, 0},
++ {&__pyx_n_s_EOFReasons, __pyx_k_EOFReasons, sizeof(__pyx_k_EOFReasons), 0, 0, 1, 1},
++ {&__pyx_n_s_EndOfFileReached, __pyx_k_EndOfFileReached, sizeof(__pyx_k_EndOfFileReached), 0, 0, 1, 1},
++ {&__pyx_n_s_Errors, __pyx_k_Errors, sizeof(__pyx_k_Errors), 0, 0, 1, 1},
++ {&__pyx_n_s_Event, __pyx_k_Event, sizeof(__pyx_k_Event), 0, 0, 1, 1},
++ {&__pyx_n_s_Events, __pyx_k_Events, sizeof(__pyx_k_Events), 0, 0, 1, 1},
++ {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
++ {&__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_k_Incompatible_checksums_s_vs_0x05, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x05), 0, 0, 1, 0},
++ {&__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_k_Incompatible_checksums_s_vs_0x56, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x56), 0, 0, 1, 0},
++ {&__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_k_Incompatible_checksums_s_vs_0x87, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x87), 0, 0, 1, 0},
++ {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0},
++ {&__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_k_Incompatible_checksums_s_vs_0xda, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xda), 0, 0, 1, 0},
++ {&__pyx_kp_s_Known_possible_values_for_EndOfF, __pyx_k_Known_possible_values_for_EndOfF, sizeof(__pyx_k_Known_possible_values_for_EndOfF), 0, 0, 1, 0},
++ {&__pyx_n_s_LogLevels, __pyx_k_LogLevels, sizeof(__pyx_k_LogLevels), 0, 0, 1, 1},
++ {&__pyx_n_s_LogMessage, __pyx_k_LogMessage, sizeof(__pyx_k_LogMessage), 0, 0, 1, 1},
++ {&__pyx_n_s_MIN_CAPI_MINOR, __pyx_k_MIN_CAPI_MINOR, sizeof(__pyx_k_MIN_CAPI_MINOR), 0, 0, 1, 1},
++ {&__pyx_n_s_MPVError, __pyx_k_MPVError, sizeof(__pyx_k_MPVError), 0, 0, 1, 1},
++ {&__pyx_n_s_MPVError___init, __pyx_k_MPVError___init, sizeof(__pyx_k_MPVError___init), 0, 0, 1, 1},
++ {&__pyx_n_s_OpenGLRenderContext, __pyx_k_OpenGLRenderContext, sizeof(__pyx_k_OpenGLRenderContext), 0, 0, 1, 1},
++ {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
++ {&__pyx_n_s_Property, __pyx_k_Property, sizeof(__pyx_k_Property), 0, 0, 1, 1},
++ {&__pyx_n_s_PyMPVError, __pyx_k_PyMPVError, sizeof(__pyx_k_PyMPVError), 0, 0, 1, 1},
++ {&__pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_k_REQUIRED_CAPI_MAJOR, sizeof(__pyx_k_REQUIRED_CAPI_MAJOR), 0, 0, 1, 1},
++ {&__pyx_n_s_RenderContext, __pyx_k_RenderContext, sizeof(__pyx_k_RenderContext), 0, 0, 1, 1},
++ {&__pyx_n_s_RenderParams, __pyx_k_RenderParams, sizeof(__pyx_k_RenderParams), 0, 0, 1, 1},
++ {&__pyx_kp_s_RenderParams_overflow, __pyx_k_RenderParams_overflow, sizeof(__pyx_k_RenderParams_overflow), 0, 0, 1, 0},
++ {&__pyx_n_s_ReplyUserData, __pyx_k_ReplyUserData, sizeof(__pyx_k_ReplyUserData), 0, 0, 1, 1},
++ {&__pyx_n_s_ReplyUserData___init, __pyx_k_ReplyUserData___init, sizeof(__pyx_k_ReplyUserData___init), 0, 0, 1, 1},
++ {&__pyx_n_s_ReplyUserData_add, __pyx_k_ReplyUserData_add, sizeof(__pyx_k_ReplyUserData_add), 0, 0, 1, 1},
++ {&__pyx_n_s_ReplyUserData_remove, __pyx_k_ReplyUserData_remove, sizeof(__pyx_k_ReplyUserData_remove), 0, 0, 1, 1},
++ {&__pyx_n_s_Semaphore, __pyx_k_Semaphore, sizeof(__pyx_k_Semaphore), 0, 0, 1, 1},
++ {&__pyx_kp_s_Set_of_known_error_codes_from_Mp, __pyx_k_Set_of_known_error_codes_from_Mp, sizeof(__pyx_k_Set_of_known_error_codes_from_Mp), 0, 0, 1, 0},
++ {&__pyx_kp_s_Set_of_known_values_for_Event_id, __pyx_k_Set_of_known_values_for_Event_id, sizeof(__pyx_k_Set_of_known_values_for_Event_id), 0, 0, 1, 0},
++ {&__pyx_n_s_Thread, __pyx_k_Thread, sizeof(__pyx_k_Thread), 0, 0, 1, 1},
++ {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
++ {&__pyx_n_s_UPDATE_FRAME, __pyx_k_UPDATE_FRAME, sizeof(__pyx_k_UPDATE_FRAME), 0, 0, 1, 1},
++ {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1},
++ {&__pyx_n_s_UnicodeEncodeError, __pyx_k_UnicodeEncodeError, sizeof(__pyx_k_UnicodeEncodeError), 0, 0, 1, 1},
++ {&__pyx_kp_s_Unknown_api_type_r, __pyx_k_Unknown_api_type_r, sizeof(__pyx_k_Unknown_api_type_r), 0, 0, 1, 0},
++ {&__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_k_Unknown_or_invalid_pointer_objec, sizeof(__pyx_k_Unknown_or_invalid_pointer_objec), 0, 0, 1, 0},
++ {&__pyx_n_s_aborted, __pyx_k_aborted, sizeof(__pyx_k_aborted), 0, 0, 1, 1},
++ {&__pyx_n_s_acquire, __pyx_k_acquire, sizeof(__pyx_k_acquire), 0, 0, 1, 1},
++ {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
++ {&__pyx_n_s_advanced_control, __pyx_k_advanced_control, sizeof(__pyx_k_advanced_control), 0, 0, 1, 1},
++ {&__pyx_n_s_ao_init_failed, __pyx_k_ao_init_failed, sizeof(__pyx_k_ao_init_failed), 0, 0, 1, 1},
++ {&__pyx_n_s_api_type, __pyx_k_api_type, sizeof(__pyx_k_api_type), 0, 0, 1, 1},
++ {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
++ {&__pyx_n_s_asynchronous, __pyx_k_asynchronous, sizeof(__pyx_k_asynchronous), 0, 0, 1, 1},
++ {&__pyx_n_s_atomic_request_ptr, __pyx_k_atomic_request_ptr, sizeof(__pyx_k_atomic_request_ptr), 0, 0, 1, 1},
++ {&__pyx_n_s_audio_reconfig, __pyx_k_audio_reconfig, sizeof(__pyx_k_audio_reconfig), 0, 0, 1, 1},
++ {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1},
++ {&__pyx_n_s_block_for_target_time, __pyx_k_block_for_target_time, sizeof(__pyx_k_block_for_target_time), 0, 0, 1, 1},
++ {&__pyx_n_s_block_vsync, __pyx_k_block_vsync, sizeof(__pyx_k_block_vsync), 0, 0, 1, 1},
++ {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
++ {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
++ {&__pyx_n_s_client_message, __pyx_k_client_message, sizeof(__pyx_k_client_message), 0, 0, 1, 1},
++ {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
++ {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
++ {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
++ {&__pyx_n_s_command_error, __pyx_k_command_error, sizeof(__pyx_k_command_error), 0, 0, 1, 1},
++ {&__pyx_n_s_command_reply, __pyx_k_command_reply, sizeof(__pyx_k_command_reply), 0, 0, 1, 1},
++ {&__pyx_n_s_connector_id, __pyx_k_connector_id, sizeof(__pyx_k_connector_id), 0, 0, 1, 1},
++ {&__pyx_n_s_counter, __pyx_k_counter, sizeof(__pyx_k_counter), 0, 0, 1, 1},
++ {&__pyx_n_s_crtc_id, __pyx_k_crtc_id, sizeof(__pyx_k_crtc_id), 0, 0, 1, 1},
++ {&__pyx_n_s_daemon, __pyx_k_daemon, sizeof(__pyx_k_daemon), 0, 0, 1, 1},
++ {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
++ {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
++ {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
++ {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
++ {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1},
++ {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
++ {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
++ {&__pyx_kp_s_drmModeAtomicReq, __pyx_k_drmModeAtomicReq, sizeof(__pyx_k_drmModeAtomicReq), 0, 0, 1, 0},
++ {&__pyx_n_s_drm_display, __pyx_k_drm_display, sizeof(__pyx_k_drm_display), 0, 0, 1, 1},
++ {&__pyx_n_s_drm_osd_size, __pyx_k_drm_osd_size, sizeof(__pyx_k_drm_osd_size), 0, 0, 1, 1},
++ {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
++ {&__pyx_n_s_e_i, __pyx_k_e_i, sizeof(__pyx_k_e_i), 0, 0, 1, 1},
++ {&__pyx_n_s_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 0, 1, 1},
++ {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
++ {&__pyx_n_s_end_file, __pyx_k_end_file, sizeof(__pyx_k_end_file), 0, 0, 1, 1},
++ {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
++ {&__pyx_n_s_eof, __pyx_k_eof, sizeof(__pyx_k_eof), 0, 0, 1, 1},
++ {&__pyx_n_s_err_c, __pyx_k_err_c, sizeof(__pyx_k_err_c), 0, 0, 1, 1},
++ {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
++ {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
++ {&__pyx_n_s_errors_locals_wrapped, __pyx_k_errors_locals_wrapped, sizeof(__pyx_k_errors_locals_wrapped), 0, 0, 1, 1},
++ {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1},
++ {&__pyx_n_s_fatal, __pyx_k_fatal, sizeof(__pyx_k_fatal), 0, 0, 1, 1},
++ {&__pyx_n_s_fbo, __pyx_k_fbo, sizeof(__pyx_k_fbo), 0, 0, 1, 1},
++ {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
++ {&__pyx_n_s_file_loaded, __pyx_k_file_loaded, sizeof(__pyx_k_file_loaded), 0, 0, 1, 1},
++ {&__pyx_n_s_flip_y, __pyx_k_flip_y, sizeof(__pyx_k_flip_y), 0, 0, 1, 1},
++ {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
++ {&__pyx_n_s_format_for, __pyx_k_format_for, sizeof(__pyx_k_format_for), 0, 0, 1, 1},
++ {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
++ {&__pyx_n_s_get_proc_address, __pyx_k_get_proc_address, sizeof(__pyx_k_get_proc_address), 0, 0, 1, 1},
++ {&__pyx_n_s_get_property, __pyx_k_get_property, sizeof(__pyx_k_get_property), 0, 0, 1, 1},
++ {&__pyx_n_s_get_property_async, __pyx_k_get_property_async, sizeof(__pyx_k_get_property_async), 0, 0, 1, 1},
++ {&__pyx_n_s_get_property_reply, __pyx_k_get_property_reply, sizeof(__pyx_k_get_property_reply), 0, 0, 1, 1},
++ {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
++ {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
++ {&__pyx_kp_s_icc_blob_should_be_a_bytes_insta, __pyx_k_icc_blob_should_be_a_bytes_insta, sizeof(__pyx_k_icc_blob_should_be_a_bytes_insta), 0, 0, 1, 0},
++ {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
++ {&__pyx_n_s_idle, __pyx_k_idle, sizeof(__pyx_k_idle), 0, 0, 1, 1},
++ {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
++ {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
++ {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
++ {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1},
++ {&__pyx_n_s_internal_format, __pyx_k_internal_format, sizeof(__pyx_k_internal_format), 0, 0, 1, 1},
++ {&__pyx_n_s_invalid_parameter, __pyx_k_invalid_parameter, sizeof(__pyx_k_invalid_parameter), 0, 0, 1, 1},
++ {&__pyx_n_s_is_py3, __pyx_k_is_py3, sizeof(__pyx_k_is_py3), 0, 0, 1, 1},
++ {&__pyx_n_s_isshutdown, __pyx_k_isshutdown, sizeof(__pyx_k_isshutdown), 0, 0, 1, 1},
++ {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
++ {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
++ {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
++ {&__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_k_libmpv_version_is_incorrect_Requ, sizeof(__pyx_k_libmpv_version_is_incorrect_Requ), 0, 0, 1, 0},
++ {&__pyx_n_s_load_config, __pyx_k_load_config, sizeof(__pyx_k_load_config), 0, 0, 1, 1},
++ {&__pyx_n_s_loading_failed, __pyx_k_loading_failed, sizeof(__pyx_k_loading_failed), 0, 0, 1, 1},
++ {&__pyx_n_s_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 0, 1, 1},
++ {&__pyx_n_s_log_message, __pyx_k_log_message, sizeof(__pyx_k_log_message), 0, 0, 1, 1},
++ {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
++ {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
++ {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
++ {&__pyx_n_s_mpv, __pyx_k_mpv, sizeof(__pyx_k_mpv), 0, 0, 1, 1},
++ {&__pyx_n_s_mpv_callback, __pyx_k_mpv_callback, sizeof(__pyx_k_mpv_callback), 0, 0, 1, 1},
++ {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
++ {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
++ {&__pyx_n_s_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 0, 1, 1},
++ {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
++ {&__pyx_n_s_nomem, __pyx_k_nomem, sizeof(__pyx_k_nomem), 0, 0, 1, 1},
++ {&__pyx_n_s_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 0, 1, 1},
++ {&__pyx_n_s_not_found, __pyx_k_not_found, sizeof(__pyx_k_not_found), 0, 0, 1, 1},
++ {&__pyx_n_s_not_implemented, __pyx_k_not_implemented, sizeof(__pyx_k_not_implemented), 0, 0, 1, 1},
++ {&__pyx_n_s_nothing_to_play, __pyx_k_nothing_to_play, sizeof(__pyx_k_nothing_to_play), 0, 0, 1, 1},
++ {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
++ {&__pyx_n_s_observe_property, __pyx_k_observe_property, sizeof(__pyx_k_observe_property), 0, 0, 1, 1},
++ {&__pyx_n_s_observed, __pyx_k_observed, sizeof(__pyx_k_observed), 0, 0, 1, 1},
++ {&__pyx_n_s_opengl, __pyx_k_opengl, sizeof(__pyx_k_opengl), 0, 0, 1, 1},
++ {&__pyx_n_s_opengl_fbo, __pyx_k_opengl_fbo, sizeof(__pyx_k_opengl_fbo), 0, 0, 1, 1},
++ {&__pyx_n_s_opengl_init_params, __pyx_k_opengl_init_params, sizeof(__pyx_k_opengl_init_params), 0, 0, 1, 1},
++ {&__pyx_n_s_option_error, __pyx_k_option_error, sizeof(__pyx_k_option_error), 0, 0, 1, 1},
++ {&__pyx_n_s_option_format, __pyx_k_option_format, sizeof(__pyx_k_option_format), 0, 0, 1, 1},
++ {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
++ {&__pyx_n_s_playback_restart, __pyx_k_playback_restart, sizeof(__pyx_k_playback_restart), 0, 0, 1, 1},
++ {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
++ {&__pyx_n_s_present, __pyx_k_present, sizeof(__pyx_k_present), 0, 0, 1, 1},
++ {&__pyx_n_s_prop, __pyx_k_prop, sizeof(__pyx_k_prop), 0, 0, 1, 1},
++ {&__pyx_n_s_property_change, __pyx_k_property_change, sizeof(__pyx_k_property_change), 0, 0, 1, 1},
++ {&__pyx_n_s_property_error, __pyx_k_property_error, sizeof(__pyx_k_property_error), 0, 0, 1, 1},
++ {&__pyx_n_s_property_format, __pyx_k_property_format, sizeof(__pyx_k_property_format), 0, 0, 1, 1},
++ {&__pyx_n_s_property_unavailable, __pyx_k_property_unavailable, sizeof(__pyx_k_property_unavailable), 0, 0, 1, 1},
++ {&__pyx_kp_s_pympv_error_during_callback_s, __pyx_k_pympv_error_during_callback_s, sizeof(__pyx_k_pympv_error_during_callback_s), 0, 0, 1, 0},
++ {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_k_pyx_unpickle_EndOfFileReached, sizeof(__pyx_k_pyx_unpickle_EndOfFileReached), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_unpickle_Event, __pyx_k_pyx_unpickle_Event, sizeof(__pyx_k_pyx_unpickle_Event), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_unpickle_LogMessage, __pyx_k_pyx_unpickle_LogMessage, sizeof(__pyx_k_pyx_unpickle_LogMessage), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_unpickle_Property, __pyx_k_pyx_unpickle_Property, sizeof(__pyx_k_pyx_unpickle_Property), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_k_pyx_unpickle_RenderFrameInfo, sizeof(__pyx_k_pyx_unpickle_RenderFrameInfo), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
++ {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
++ {&__pyx_n_s_queue_full, __pyx_k_queue_full, sizeof(__pyx_k_queue_full), 0, 0, 1, 1},
++ {&__pyx_n_s_quit, __pyx_k_quit, sizeof(__pyx_k_quit), 0, 0, 1, 1},
++ {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
++ {&__pyx_n_s_redraw, __pyx_k_redraw, sizeof(__pyx_k_redraw), 0, 0, 1, 1},
++ {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
++ {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
++ {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
++ {&__pyx_n_s_release, __pyx_k_release, sizeof(__pyx_k_release), 0, 0, 1, 1},
++ {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
++ {&__pyx_n_s_render, __pyx_k_render, sizeof(__pyx_k_render), 0, 0, 1, 1},
++ {&__pyx_n_s_render_fd, __pyx_k_render_fd, sizeof(__pyx_k_render_fd), 0, 0, 1, 1},
++ {&__pyx_n_s_repeat, __pyx_k_repeat, sizeof(__pyx_k_repeat), 0, 0, 1, 1},
++ {&__pyx_n_s_request_event, __pyx_k_request_event, sizeof(__pyx_k_request_event), 0, 0, 1, 1},
++ {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1},
++ {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
++ {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
++ {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
++ {&__pyx_kp_s_self__ctx_cannot_be_converted_to, __pyx_k_self__ctx_cannot_be_converted_to, sizeof(__pyx_k_self__ctx_cannot_be_converted_to), 0, 0, 1, 0},
++ {&__pyx_kp_s_self_params_cannot_be_converted, __pyx_k_self_params_cannot_be_converted, sizeof(__pyx_k_self_params_cannot_be_converted), 0, 0, 1, 0},
++ {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
++ {&__pyx_n_s_set_ambient_light, __pyx_k_set_ambient_light, sizeof(__pyx_k_set_ambient_light), 0, 0, 1, 1},
++ {&__pyx_n_s_set_icc_profile, __pyx_k_set_icc_profile, sizeof(__pyx_k_set_icc_profile), 0, 0, 1, 1},
++ {&__pyx_n_s_set_log_level, __pyx_k_set_log_level, sizeof(__pyx_k_set_log_level), 0, 0, 1, 1},
++ {&__pyx_n_s_set_option, __pyx_k_set_option, sizeof(__pyx_k_set_option), 0, 0, 1, 1},
++ {&__pyx_n_s_set_property, __pyx_k_set_property, sizeof(__pyx_k_set_property), 0, 0, 1, 1},
++ {&__pyx_n_s_set_property_reply, __pyx_k_set_property_reply, sizeof(__pyx_k_set_property_reply), 0, 0, 1, 1},
++ {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
++ {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
++ {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1},
++ {&__pyx_n_s_skip_rendering, __pyx_k_skip_rendering, sizeof(__pyx_k_skip_rendering), 0, 0, 1, 1},
++ {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
++ {&__pyx_n_s_start_file, __pyx_k_start_file, sizeof(__pyx_k_start_file), 0, 0, 1, 1},
++ {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
++ {&__pyx_n_s_strdec, __pyx_k_strdec, sizeof(__pyx_k_strdec), 0, 0, 1, 1},
++ {&__pyx_n_s_strdec_err, __pyx_k_strdec_err, sizeof(__pyx_k_strdec_err), 0, 0, 1, 1},
++ {&__pyx_n_s_strenc, __pyx_k_strenc, sizeof(__pyx_k_strenc), 0, 0, 1, 1},
++ {&__pyx_n_s_strict, __pyx_k_strict, sizeof(__pyx_k_strict), 0, 0, 1, 1},
++ {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
++ {&__pyx_n_s_success, __pyx_k_success, sizeof(__pyx_k_success), 0, 0, 1, 1},
++ {&__pyx_n_s_surrogateescape, __pyx_k_surrogateescape, sizeof(__pyx_k_surrogateescape), 0, 0, 1, 1},
++ {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
++ {&__pyx_n_s_target_time, __pyx_k_target_time, sizeof(__pyx_k_target_time), 0, 0, 1, 1},
++ {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
++ {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
++ {&__pyx_n_s_tick, __pyx_k_tick, sizeof(__pyx_k_tick), 0, 0, 1, 1},
++ {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
++ {&__pyx_n_s_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 0, 1, 1},
++ {&__pyx_n_s_uninitialized, __pyx_k_uninitialized, sizeof(__pyx_k_uninitialized), 0, 0, 1, 1},
++ {&__pyx_n_s_unknown_format, __pyx_k_unknown_format, sizeof(__pyx_k_unknown_format), 0, 0, 1, 1},
++ {&__pyx_n_s_unobserve_property, __pyx_k_unobserve_property, sizeof(__pyx_k_unobserve_property), 0, 0, 1, 1},
++ {&__pyx_n_s_unsupported, __pyx_k_unsupported, sizeof(__pyx_k_unsupported), 0, 0, 1, 1},
++ {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
++ {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
++ {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
++ {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
++ {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
++ {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
++ {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
++ {&__pyx_n_s_vidcutter_libs_mpv, __pyx_k_vidcutter_libs_mpv, sizeof(__pyx_k_vidcutter_libs_mpv), 0, 0, 1, 1},
++ {&__pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_k_vidcutter_libs_pympv_mpv_pyx, sizeof(__pyx_k_vidcutter_libs_pympv_mpv_pyx), 0, 0, 1, 0},
++ {&__pyx_n_s_video_reconfig, __pyx_k_video_reconfig, sizeof(__pyx_k_video_reconfig), 0, 0, 1, 1},
++ {&__pyx_n_s_vo_init_failed, __pyx_k_vo_init_failed, sizeof(__pyx_k_vo_init_failed), 0, 0, 1, 1},
++ {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
++ {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
++ {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
++ {&__pyx_n_s_wl_display, __pyx_k_wl_display, sizeof(__pyx_k_wl_display), 0, 0, 1, 1},
++ {&__pyx_n_s_wrapped, __pyx_k_wrapped, sizeof(__pyx_k_wrapped), 0, 0, 1, 1},
++ {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
++ {&__pyx_n_s_x11_display, __pyx_k_x11_display, sizeof(__pyx_k_x11_display), 0, 0, 1, 1},
++ {0, 0, 0, 0, 0, 0, 0}
++};
++static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
++ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 44, __pyx_L1_error)
++ __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 58, __pyx_L1_error)
++ __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 66, __pyx_L1_error)
++ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 222, __pyx_L1_error)
++ __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 303, __pyx_L1_error)
++ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
++ return 0;
++ __pyx_L1_error:;
++ return -1;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":22
++static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":319
+ *
+- * import cython
+- * import sys, warnings # <<<<<<<<<<<<<<
+- * from threading import Thread, Semaphore
+- * from libc.stdlib cimport malloc, free
++ * def _errors(fn):
++ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
++ * v = fn(*k, **kw)
++ * if v < 0:
+ */
+- __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 319, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple_);
++ __Pyx_GIVEREF(__pyx_tuple_);
++ __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 319, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":23
+- * import cython
+- * import sys, warnings
+- * from threading import Thread, Semaphore # <<<<<<<<<<<<<<
+- * from libc.stdlib cimport malloc, free
+- * from libc.string cimport strcpy, strlen, memset
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+- __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_n_s_Thread);
+- __Pyx_GIVEREF(__pyx_n_s_Thread);
+- PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Thread);
+- __Pyx_INCREF(__pyx_n_s_Semaphore);
+- __Pyx_GIVEREF(__pyx_n_s_Semaphore);
+- PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Semaphore);
+- __pyx_t_2 = __Pyx_Import(__pyx_n_s_threading, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Thread, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Semaphore, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__3);
++ __Pyx_GIVEREF(__pyx_tuple__3);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":30
+- * from client cimport *
+- *
+- * __version__ = "0.3.0" # <<<<<<<<<<<<<<
+- * __author__ = "Andre D"
+- *
++ /* "(tree fragment)":4
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_3_0) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
++ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__4);
++ __Pyx_GIVEREF(__pyx_tuple__4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":31
+- *
+- * __version__ = "0.3.0"
+- * __author__ = "Andre D" # <<<<<<<<<<<<<<
+- *
+- * _REQUIRED_CAPI_MAJOR = 1
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_s_Andre_D) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
++ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__5);
++ __Pyx_GIVEREF(__pyx_tuple__5);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":33
+- * __author__ = "Andre D"
+- *
+- * _REQUIRED_CAPI_MAJOR = 1 # <<<<<<<<<<<<<<
+- * _MIN_CAPI_MINOR = 9
+- *
++ /* "(tree fragment)":4
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
++ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__6);
++ __Pyx_GIVEREF(__pyx_tuple__6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":34
+- *
+- * _REQUIRED_CAPI_MAJOR = 1
+- * _MIN_CAPI_MINOR = 9 # <<<<<<<<<<<<<<
+- *
+- * cdef unsigned long _CAPI_VERSION
++ /* "vidcutter/libs/pympv/mpv.pyx":992
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ * if drm_display:
++ * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_9) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
++ __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__7);
++ __Pyx_GIVEREF(__pyx_tuple__7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":37
+- *
+- * cdef unsigned long _CAPI_VERSION
+- * with nogil: # <<<<<<<<<<<<<<
+- * _CAPI_VERSION = mpv_client_api_version()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":993
++ * if drm_display:
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None)
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__8);
++ __Pyx_GIVEREF(__pyx_tuple__8);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":38
+- * cdef unsigned long _CAPI_VERSION
+- * with nogil:
+- * _CAPI_VERSION = mpv_client_api_version() # <<<<<<<<<<<<<<
+- *
+- * _CAPI_MAJOR = _CAPI_VERSION >> 16
++ /* "vidcutter/libs/pympv/mpv.pyx":994
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
++ * arp = drm_display.get("atomic_request_ptr", None)
++ * if arp is not None:
+ */
+- __pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION = mpv_client_api_version();
+- }
++ __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__9);
++ __Pyx_GIVEREF(__pyx_tuple__9);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":37
+- *
+- * cdef unsigned long _CAPI_VERSION
+- * with nogil: # <<<<<<<<<<<<<<
+- * _CAPI_VERSION = mpv_client_api_version()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":995
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
++ * if arp is not None:
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L4;
+- }
+- __pyx_L4:;
+- }
+- }
++ __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__10);
++ __Pyx_GIVEREF(__pyx_tuple__10);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":40
+- * _CAPI_VERSION = mpv_client_api_version()
+- *
+- * _CAPI_MAJOR = _CAPI_VERSION >> 16 # <<<<<<<<<<<<<<
+- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":998
++ * if arp is not None:
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
++ * if drm_osd_size:
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__11);
++ __Pyx_GIVEREF(__pyx_tuple__11);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":41
+- *
+- * _CAPI_MAJOR = _CAPI_VERSION >> 16
+- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF # <<<<<<<<<<<<<<
+- *
+- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
++ /* "vidcutter/libs/pympv/mpv.pyx":1083
++ * if opengl_fbo:
++ * memset(&fbo, 0, sizeof(fbo))
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
++ * fbo.w = opengl_fbo["w"]
++ * fbo.h = opengl_fbo["h"]
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__12);
++ __Pyx_GIVEREF(__pyx_tuple__12);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":43
+- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+- *
+- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
+- * raise ImportError(
+- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (!__pyx_t_5) {
+- } else {
+- __pyx_t_3 = __pyx_t_5;
+- goto __pyx_L6_bool_binop_done;
+- }
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_3 = __pyx_t_5;
+- __pyx_L6_bool_binop_done:;
+- if (unlikely(__pyx_t_3)) {
++ /* "vidcutter/libs/pympv/mpv.pyx":1086
++ * fbo.w = opengl_fbo["w"]
++ * fbo.h = opengl_fbo["h"]
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
++ * if flip_y:
++ */
++ __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__13);
++ __Pyx_GIVEREF(__pyx_tuple__13);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":46
+- * raise ImportError(
+- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR) # <<<<<<<<<<<<<<
+- * )
+- *
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_GIVEREF(__pyx_t_2);
+- PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_6);
+- PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
+- __pyx_t_2 = 0;
+- __pyx_t_1 = 0;
+- __pyx_t_4 = 0;
+- __pyx_t_6 = 0;
++ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__14);
++ __Pyx_GIVEREF(__pyx_tuple__14);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":45
+- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+- * raise ImportError(
+- * "libmpv version is incorrect. Required %d.%d got %d.%d." % # <<<<<<<<<<<<<<
+- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
+- * )
++ /* "(tree fragment)":4
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__15);
++ __Pyx_GIVEREF(__pyx_tuple__15);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":44
+- *
+- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+- * raise ImportError( # <<<<<<<<<<<<<<
+- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __PYX_ERR(0, 44, __pyx_L1_error)
++ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__16);
++ __Pyx_GIVEREF(__pyx_tuple__16);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":43
+- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+- *
+- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
+- * raise ImportError(
+- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
++ /* "(tree fragment)":4
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- }
++ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__17);
++ __Pyx_GIVEREF(__pyx_tuple__17);
+
+ /* "vidcutter/libs/pympv/mpv.pyx":52
+- * void PyEval_InitThreads()
++ * void Py_Initialize()
+ *
+ * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__21, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":53
+- *
+- * _is_py3 = sys.version_info >= (3,)
+- * _strdec_err = "surrogateescape" if _is_py3 else "strict" # <<<<<<<<<<<<<<
+- * # mpv -> Python
+- * def _strdec(s):
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 53, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (__pyx_t_3) {
+- __Pyx_INCREF(__pyx_n_s_surrogateescape);
+- __pyx_t_7 = __pyx_n_s_surrogateescape;
+- } else {
+- __Pyx_INCREF(__pyx_n_s_strict);
+- __pyx_t_7 = __pyx_n_s_strict;
+- }
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__18);
++ __Pyx_GIVEREF(__pyx_tuple__18);
+
+ /* "vidcutter/libs/pympv/mpv.pyx":55
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+@@ -28564,10 +24644,10 @@ if (!__Pyx_RefNanny) {
+ * try:
+ * return s.decode("utf-8", _strdec_err)
+ */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 55, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__19);
++ __Pyx_GIVEREF(__pyx_tuple__19);
++ __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 55, __pyx_L1_error)
+
+ /* "vidcutter/libs/pympv/mpv.pyx":63
+ *
+@@ -28576,5040 +24656,5555 @@ if (!__Pyx_RefNanny) {
+ * try:
+ * return s.encode("utf-8", _strdec_err)
+ */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 63, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__21);
++ __Pyx_GIVEREF(__pyx_tuple__21);
++ __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 63, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":70
+- * return s
++ /* "vidcutter/libs/pympv/mpv.pyx":318
+ *
+- * PyEval_InitThreads() # <<<<<<<<<<<<<<
+ *
+- * class Errors:
++ * def _errors(fn): # <<<<<<<<<<<<<<
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
+ */
+- PyEval_InitThreads();
++ __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 318, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__23);
++ __Pyx_GIVEREF(__pyx_tuple__23);
++ __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 318, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":72
+- * PyEval_InitThreads()
++ /* "vidcutter/libs/pympv/mpv.pyx":329
++ * code = None
+ *
+- * class Errors: # <<<<<<<<<<<<<<
+- * """Set of known error codes from MpvError and Event responses.
++ * def __init__(self, e): # <<<<<<<<<<<<<<
++ * self.code = e
++ * cdef const char* err_c
++ */
++ __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 329, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__25);
++ __Pyx_GIVEREF(__pyx_tuple__25);
++ __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 329, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":346
++ * cdef _reply_userdatas = dict()
+ *
++ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
++ * def __init__(self, data):
++ * self.counter = 0
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 72, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__27);
++ __Pyx_GIVEREF(__pyx_tuple__27);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":79
+- * You should handle the possibility that error codes may not be any of these values.
+- * """
+- * success = MPV_ERROR_SUCCESS # <<<<<<<<<<<<<<
+- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+- * nomem = MPV_ERROR_NOMEM
++ /* "vidcutter/libs/pympv/mpv.pyx":347
++ *
++ * class _ReplyUserData(object):
++ * def __init__(self, data): # <<<<<<<<<<<<<<
++ * self.counter = 0
++ * self.data = data
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 347, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__28);
++ __Pyx_GIVEREF(__pyx_tuple__28);
++ __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 347, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":80
+- * """
+- * success = MPV_ERROR_SUCCESS
+- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL # <<<<<<<<<<<<<<
+- * nomem = MPV_ERROR_NOMEM
+- * uninitialized = MPV_ERROR_UNINITIALIZED
++ /* "vidcutter/libs/pympv/mpv.pyx":352
++ * self.observed = False
++ *
++ * def add(self): # <<<<<<<<<<<<<<
++ * self.counter += 1
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 352, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__30);
++ __Pyx_GIVEREF(__pyx_tuple__30);
++ __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 352, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":81
+- * success = MPV_ERROR_SUCCESS
+- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+- * nomem = MPV_ERROR_NOMEM # <<<<<<<<<<<<<<
+- * uninitialized = MPV_ERROR_UNINITIALIZED
+- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
++ /* "vidcutter/libs/pympv/mpv.pyx":355
++ * self.counter += 1
++ *
++ * def remove(self): # <<<<<<<<<<<<<<
++ * self.counter -= 1
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 355, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__32);
++ __Pyx_GIVEREF(__pyx_tuple__32);
++ __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 355, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":82
+- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+- * nomem = MPV_ERROR_NOMEM
+- * uninitialized = MPV_ERROR_UNINITIALIZED # <<<<<<<<<<<<<<
+- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+- * not_found = MPV_ERROR_OPTION_NOT_FOUND
++ /* "vidcutter/libs/pympv/mpv.pyx":1133
++ *
++ * class CallbackThread(Thread):
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * Thread.__init__(self)
++ * self.daemon = True
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__34);
++ __Pyx_GIVEREF(__pyx_tuple__34);
++ __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1133, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":83
+- * nomem = MPV_ERROR_NOMEM
+- * uninitialized = MPV_ERROR_UNINITIALIZED
+- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER # <<<<<<<<<<<<<<
+- * not_found = MPV_ERROR_OPTION_NOT_FOUND
+- * option_format = MPV_ERROR_OPTION_FORMAT
++ /* "vidcutter/libs/pympv/mpv.pyx":1141
++ * self.isshutdown = False
++ *
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * self.isshutdown = True
++ * self.callback = None
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__36);
++ __Pyx_GIVEREF(__pyx_tuple__36);
++ __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1141, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":84
+- * uninitialized = MPV_ERROR_UNINITIALIZED
+- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+- * not_found = MPV_ERROR_OPTION_NOT_FOUND # <<<<<<<<<<<<<<
+- * option_format = MPV_ERROR_OPTION_FORMAT
+- * option_error = MPV_ERROR_OPTION_ERROR
++ /* "vidcutter/libs/pympv/mpv.pyx":1146
++ * self.lock.release()
++ *
++ * def call(self): # <<<<<<<<<<<<<<
++ * self.lock.release()
++ *
++ */
++ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__38);
++ __Pyx_GIVEREF(__pyx_tuple__38);
++ __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1146, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1149
++ * self.lock.release()
++ *
++ * def set(self, callback): # <<<<<<<<<<<<<<
++ * self.callback = callback
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__40);
++ __Pyx_GIVEREF(__pyx_tuple__40);
++ __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1149, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":85
+- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+- * not_found = MPV_ERROR_OPTION_NOT_FOUND
+- * option_format = MPV_ERROR_OPTION_FORMAT # <<<<<<<<<<<<<<
+- * option_error = MPV_ERROR_OPTION_ERROR
+- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
++ /* "vidcutter/libs/pympv/mpv.pyx":1152
++ * self.callback = callback
++ *
++ * def run(self): # <<<<<<<<<<<<<<
++ * while not self.isshutdown:
++ * self.lock.acquire(True)
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__42);
++ __Pyx_GIVEREF(__pyx_tuple__42);
++ __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 1152, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":86
+- * not_found = MPV_ERROR_OPTION_NOT_FOUND
+- * option_format = MPV_ERROR_OPTION_FORMAT
+- * option_error = MPV_ERROR_OPTION_ERROR # <<<<<<<<<<<<<<
+- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+- * property_format = MPV_ERROR_PROPERTY_FORMAT
++ /* "vidcutter/libs/pympv/mpv.pyx":1157
++ * self.mpv_callback(self.callback) if self.callback else None
++ *
++ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
++ * try:
++ * callback()
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__44);
++ __Pyx_GIVEREF(__pyx_tuple__44);
++ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1157, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":87
+- * option_format = MPV_ERROR_OPTION_FORMAT
+- * option_error = MPV_ERROR_OPTION_ERROR
+- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND # <<<<<<<<<<<<<<
+- * property_format = MPV_ERROR_PROPERTY_FORMAT
+- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__46 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__46);
++ __Pyx_GIVEREF(__pyx_tuple__46);
++ __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_EndOfFileReached, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __pyx_tuple__48 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__48);
++ __Pyx_GIVEREF(__pyx_tuple__48);
++ __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_LogMessage, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __pyx_tuple__50 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__50);
++ __Pyx_GIVEREF(__pyx_tuple__50);
++ __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Property, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __pyx_tuple__52 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__52);
++ __Pyx_GIVEREF(__pyx_tuple__52);
++ __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Event, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __pyx_tuple__54 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__54);
++ __Pyx_GIVEREF(__pyx_tuple__54);
++ __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RenderFrameInfo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_RefNannyFinishContext();
++ return 0;
++ __pyx_L1_error:;
++ __Pyx_RefNannyFinishContext();
++ return -1;
++}
++
++static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
++ if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
++ __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_5713169 = PyInt_FromLong(5713169L); if (unlikely(!__pyx_int_5713169)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_90958262 = PyInt_FromLong(90958262L); if (unlikely(!__pyx_int_90958262)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_142036910 = PyInt_FromLong(142036910L); if (unlikely(!__pyx_int_142036910)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_228822053 = PyInt_FromLong(228822053L); if (unlikely(!__pyx_int_228822053)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
++ return 0;
++ __pyx_L1_error:;
++ return -1;
++}
++
++static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
++
++static int __Pyx_modinit_global_init_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
++ /*--- Global init code ---*/
++ __pyx_v_9vidcutter_4libs_3mpv__callbacks = Py_None; Py_INCREF(Py_None);
++ __pyx_v_9vidcutter_4libs_3mpv__reply_userdatas = Py_None; Py_INCREF(Py_None);
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
++
++static int __Pyx_modinit_variable_export_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
++ /*--- Variable export code ---*/
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
++
++static int __Pyx_modinit_function_export_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
++ /*--- Function export code ---*/
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
++
++static int __Pyx_modinit_type_init_code(void) {
++ __Pyx_RefNannyDeclarations
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
++ /*--- Type init code ---*/
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
++ __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, struct mpv_event_end_file *))__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage = &__pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
++ __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, struct mpv_event_log_message *))__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = &__pyx_type_9vidcutter_4libs_3mpv_LogMessage;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_Property = &__pyx_vtable_9vidcutter_4libs_3mpv_Property;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Property._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, struct mpv_event_property *))__pyx_f_9vidcutter_4libs_3mpv_8Property__init;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_Property.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_Property = &__pyx_type_9vidcutter_4libs_3mpv_Property;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_Event = &__pyx_vtable_9vidcutter_4libs_3mpv_Event;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Event._data = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *))__pyx_f_9vidcutter_4libs_3mpv_5Event__data;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Event._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_5Event__init;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_Event.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_Event = &__pyx_type_9vidcutter_4libs_3mpv_Event;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_Context = &__pyx_vtable_9vidcutter_4libs_3mpv_Context;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_list = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_map = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_native_value = (struct mpv_node (*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Context._free_native_value = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, struct mpv_node))__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_Context.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_Context = &__pyx_type_9vidcutter_4libs_3mpv_Context;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams = &__pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
++ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_voidp = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, void *, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
++ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_int = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, int))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int;
++ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_string = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, char *))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = &__pyx_type_9vidcutter_4libs_3mpv__RenderParams;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
++ __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo._from_struct = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *, struct mpv_render_frame_info *))__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = &__pyx_type_9vidcutter_4libs_3mpv_RenderContext;
++ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_base = __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLRenderContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
++ }
++ __pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = &__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors;
++ __Pyx_RefNannyFinishContext();
++ return 0;
++ __pyx_L1_error:;
++ __Pyx_RefNannyFinishContext();
++ return -1;
++}
++
++static int __Pyx_modinit_type_import_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
++ /*--- Type import code ---*/
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":88
+- * option_error = MPV_ERROR_OPTION_ERROR
+- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+- * property_format = MPV_ERROR_PROPERTY_FORMAT # <<<<<<<<<<<<<<
+- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+- * property_error = MPV_ERROR_PROPERTY_ERROR
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++static int __Pyx_modinit_variable_import_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
++ /*--- Variable import code ---*/
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":89
+- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+- * property_format = MPV_ERROR_PROPERTY_FORMAT
+- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE # <<<<<<<<<<<<<<
+- * property_error = MPV_ERROR_PROPERTY_ERROR
+- * command_error = MPV_ERROR_COMMAND
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++static int __Pyx_modinit_function_import_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
++ /*--- Function import code ---*/
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":90
+- * property_format = MPV_ERROR_PROPERTY_FORMAT
+- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+- * property_error = MPV_ERROR_PROPERTY_ERROR # <<<<<<<<<<<<<<
+- * command_error = MPV_ERROR_COMMAND
+- * loading_failed = MPV_ERROR_LOADING_FAILED
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":91
+- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+- * property_error = MPV_ERROR_PROPERTY_ERROR
+- * command_error = MPV_ERROR_COMMAND # <<<<<<<<<<<<<<
+- * loading_failed = MPV_ERROR_LOADING_FAILED
+- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++#ifndef CYTHON_NO_PYINIT_EXPORT
++#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
++#elif PY_MAJOR_VERSION < 3
++#ifdef __cplusplus
++#define __Pyx_PyMODINIT_FUNC extern "C" void
++#else
++#define __Pyx_PyMODINIT_FUNC void
++#endif
++#else
++#ifdef __cplusplus
++#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
++#else
++#define __Pyx_PyMODINIT_FUNC PyObject *
++#endif
++#endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":92
+- * property_error = MPV_ERROR_PROPERTY_ERROR
+- * command_error = MPV_ERROR_COMMAND
+- * loading_failed = MPV_ERROR_LOADING_FAILED # <<<<<<<<<<<<<<
+- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":93
+- * command_error = MPV_ERROR_COMMAND
+- * loading_failed = MPV_ERROR_LOADING_FAILED
+- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED # <<<<<<<<<<<<<<
+- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++#if PY_MAJOR_VERSION < 3
++__Pyx_PyMODINIT_FUNC initmpv(void) CYTHON_SMALL_CODE; /*proto*/
++__Pyx_PyMODINIT_FUNC initmpv(void)
++#else
++__Pyx_PyMODINIT_FUNC PyInit_mpv(void) CYTHON_SMALL_CODE; /*proto*/
++__Pyx_PyMODINIT_FUNC PyInit_mpv(void)
++#if CYTHON_PEP489_MULTI_PHASE_INIT
++{
++ return PyModuleDef_Init(&__pyx_moduledef);
++}
++static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
++ #if PY_VERSION_HEX >= 0x030700A1
++ static PY_INT64_T main_interpreter_id = -1;
++ PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
++ if (main_interpreter_id == -1) {
++ main_interpreter_id = current_id;
++ return (unlikely(current_id == -1)) ? -1 : 0;
++ } else if (unlikely(main_interpreter_id != current_id))
++ #else
++ static PyInterpreterState *main_interpreter = NULL;
++ PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
++ if (!main_interpreter) {
++ main_interpreter = current_interpreter;
++ } else if (unlikely(main_interpreter != current_interpreter))
++ #endif
++ {
++ PyErr_SetString(
++ PyExc_ImportError,
++ "Interpreter change detected - this module can only be loaded into one interpreter per process.");
++ return -1;
++ }
++ return 0;
++}
++static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
++ PyObject *value = PyObject_GetAttrString(spec, from_name);
++ int result = 0;
++ if (likely(value)) {
++ if (allow_none || value != Py_None) {
++ result = PyDict_SetItemString(moddict, to_name, value);
++ }
++ Py_DECREF(value);
++ } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
++ PyErr_Clear();
++ } else {
++ result = -1;
++ }
++ return result;
++}
++static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
++ PyObject *module = NULL, *moddict, *modname;
++ if (__Pyx_check_single_interpreter())
++ return NULL;
++ if (__pyx_m)
++ return __Pyx_NewRef(__pyx_m);
++ modname = PyObject_GetAttrString(spec, "name");
++ if (unlikely(!modname)) goto bad;
++ module = PyModule_NewObject(modname);
++ Py_DECREF(modname);
++ if (unlikely(!module)) goto bad;
++ moddict = PyModule_GetDict(module);
++ if (unlikely(!moddict)) goto bad;
++ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
++ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
++ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
++ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
++ return module;
++bad:
++ Py_XDECREF(module);
++ return NULL;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":94
+- * loading_failed = MPV_ERROR_LOADING_FAILED
+- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED # <<<<<<<<<<<<<<
+- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":95
+- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY # <<<<<<<<<<<<<<
+- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+- * unsupported = MPV_ERROR_UNSUPPORTED
++static CYTHON_SMALL_CODE int __pyx_pymod_exec_mpv(PyObject *__pyx_pyinit_module)
++#endif
++#endif
++{
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannyDeclarations
++ #if CYTHON_PEP489_MULTI_PHASE_INIT
++ if (__pyx_m) {
++ if (__pyx_m == __pyx_pyinit_module) return 0;
++ PyErr_SetString(PyExc_RuntimeError, "Module 'mpv' has already been imported. Re-initialisation is not supported.");
++ return -1;
++ }
++ #elif PY_MAJOR_VERSION >= 3
++ if (__pyx_m) return __Pyx_NewRef(__pyx_m);
++ #endif
++ #if CYTHON_REFNANNY
++__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
++if (!__Pyx_RefNanny) {
++ PyErr_Clear();
++ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
++ if (!__Pyx_RefNanny)
++ Py_FatalError("failed to import 'refnanny' module");
++}
++#endif
++ __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_mpv(void)", 0);
++ if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #ifdef __Pxy_PyFrame_Initialize_Offsets
++ __Pxy_PyFrame_Initialize_Offsets();
++ #endif
++ __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
++ #ifdef __Pyx_CyFunction_USED
++ if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ #ifdef __Pyx_FusedFunction_USED
++ if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ #ifdef __Pyx_Coroutine_USED
++ if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ #ifdef __Pyx_Generator_USED
++ if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ #ifdef __Pyx_AsyncGen_USED
++ if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ #ifdef __Pyx_StopAsyncIteration_USED
++ if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ /*--- Library function declarations ---*/
++ /*--- Threads initialization code ---*/
++ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
++ PyEval_InitThreads();
++ #endif
++ /*--- Module creation code ---*/
++ #if CYTHON_PEP489_MULTI_PHASE_INIT
++ __pyx_m = __pyx_pyinit_module;
++ Py_INCREF(__pyx_m);
++ #else
++ #if PY_MAJOR_VERSION < 3
++ __pyx_m = Py_InitModule4("mpv", __pyx_methods, __pyx_k_pympv_Python_wrapper_for_libmpv, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
++ #else
++ __pyx_m = PyModule_Create(&__pyx_moduledef);
++ #endif
++ if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
++ Py_INCREF(__pyx_d);
++ __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
++ Py_INCREF(__pyx_b);
++ __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
++ Py_INCREF(__pyx_cython_runtime);
++ if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
++ /*--- Initialize various global constants etc. ---*/
++ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
++ if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ if (__pyx_module_is_main_vidcutter__libs__mpv) {
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ }
++ #if PY_MAJOR_VERSION >= 3
++ {
++ PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
++ if (!PyDict_GetItemString(modules, "vidcutter.libs.mpv")) {
++ if (unlikely(PyDict_SetItemString(modules, "vidcutter.libs.mpv", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
++ }
++ }
++ #endif
++ /*--- Builtin init code ---*/
++ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ /*--- Constants init code ---*/
++ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ /*--- Global type/function init code ---*/
++ (void)__Pyx_modinit_global_init_code();
++ (void)__Pyx_modinit_variable_export_code();
++ (void)__Pyx_modinit_function_export_code();
++ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
++ (void)__Pyx_modinit_type_import_code();
++ (void)__Pyx_modinit_variable_import_code();
++ (void)__Pyx_modinit_function_import_code();
++ /*--- Execution code ---*/
++ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
++ if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++
++ /* "vidcutter/libs/pympv/mpv.pyx":22
++ *
++ * import cython
++ * import sys, warnings # <<<<<<<<<<<<<<
++ * from threading import Thread, Semaphore
++ * from libc.stdlib cimport malloc, free
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":96
+- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT # <<<<<<<<<<<<<<
+- * unsupported = MPV_ERROR_UNSUPPORTED
+- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
++ /* "vidcutter/libs/pympv/mpv.pyx":23
++ * import cython
++ * import sys, warnings
++ * from threading import Thread, Semaphore # <<<<<<<<<<<<<<
++ * from libc.stdlib cimport malloc, free
++ * from libc.string cimport strcpy, strlen, memset
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_INCREF(__pyx_n_s_Thread);
++ __Pyx_GIVEREF(__pyx_n_s_Thread);
++ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Thread);
++ __Pyx_INCREF(__pyx_n_s_Semaphore);
++ __Pyx_GIVEREF(__pyx_n_s_Semaphore);
++ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Semaphore);
++ __pyx_t_2 = __Pyx_Import(__pyx_n_s_threading, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Thread, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Semaphore, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":97
+- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+- * unsupported = MPV_ERROR_UNSUPPORTED # <<<<<<<<<<<<<<
+- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
++ /* "vidcutter/libs/pympv/mpv.pyx":30
++ * from client cimport *
++ *
++ * __version__ = "0.3.0" # <<<<<<<<<<<<<<
++ * __author__ = "Andre D"
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_3_0) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":98
+- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+- * unsupported = MPV_ERROR_UNSUPPORTED
+- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":31
+ *
++ * __version__ = "0.3.0"
++ * __author__ = "Andre D" # <<<<<<<<<<<<<<
+ *
++ * _REQUIRED_CAPI_MAJOR = 2
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_s_Andre_D) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":72
+- * PyEval_InitThreads()
++ /* "vidcutter/libs/pympv/mpv.pyx":33
++ * __author__ = "Andre D"
+ *
+- * class Errors: # <<<<<<<<<<<<<<
+- * """Set of known error codes from MpvError and Event responses.
++ * _REQUIRED_CAPI_MAJOR = 2 # <<<<<<<<<<<<<<
++ * _MIN_CAPI_MINOR = 0
+ *
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":101
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":34
+ *
+- * class Events: # <<<<<<<<<<<<<<
+- * """Set of known values for Event ids.
++ * _REQUIRED_CAPI_MAJOR = 2
++ * _MIN_CAPI_MINOR = 0 # <<<<<<<<<<<<<<
+ *
++ * cdef unsigned long _CAPI_VERSION
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":108
+- * You should handle the possibility that event ids may not be any of these values.
+- * """
+- * none = MPV_EVENT_NONE # <<<<<<<<<<<<<<
+- * shutdown = MPV_EVENT_SHUTDOWN
+- * log_message = MPV_EVENT_LOG_MESSAGE
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":109
+- * """
+- * none = MPV_EVENT_NONE
+- * shutdown = MPV_EVENT_SHUTDOWN # <<<<<<<<<<<<<<
+- * log_message = MPV_EVENT_LOG_MESSAGE
+- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 109, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":110
+- * none = MPV_EVENT_NONE
+- * shutdown = MPV_EVENT_SHUTDOWN
+- * log_message = MPV_EVENT_LOG_MESSAGE # <<<<<<<<<<<<<<
+- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":111
+- * shutdown = MPV_EVENT_SHUTDOWN
+- * log_message = MPV_EVENT_LOG_MESSAGE
+- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY # <<<<<<<<<<<<<<
+- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+- * command_reply = MPV_EVENT_COMMAND_REPLY
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_0) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":112
+- * log_message = MPV_EVENT_LOG_MESSAGE
+- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY # <<<<<<<<<<<<<<
+- * command_reply = MPV_EVENT_COMMAND_REPLY
+- * start_file = MPV_EVENT_START_FILE
++ /* "vidcutter/libs/pympv/mpv.pyx":37
++ *
++ * cdef unsigned long _CAPI_VERSION
++ * with nogil: # <<<<<<<<<<<<<<
++ * _CAPI_VERSION = mpv_client_api_version()
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":113
+- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+- * command_reply = MPV_EVENT_COMMAND_REPLY # <<<<<<<<<<<<<<
+- * start_file = MPV_EVENT_START_FILE
+- * end_file = MPV_EVENT_END_FILE
++ /* "vidcutter/libs/pympv/mpv.pyx":38
++ * cdef unsigned long _CAPI_VERSION
++ * with nogil:
++ * _CAPI_VERSION = mpv_client_api_version() # <<<<<<<<<<<<<<
++ *
++ * _CAPI_MAJOR = _CAPI_VERSION >> 16
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION = mpv_client_api_version();
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":114
+- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+- * command_reply = MPV_EVENT_COMMAND_REPLY
+- * start_file = MPV_EVENT_START_FILE # <<<<<<<<<<<<<<
+- * end_file = MPV_EVENT_END_FILE
+- * file_loaded = MPV_EVENT_FILE_LOADED
++ /* "vidcutter/libs/pympv/mpv.pyx":37
++ *
++ * cdef unsigned long _CAPI_VERSION
++ * with nogil: # <<<<<<<<<<<<<<
++ * _CAPI_VERSION = mpv_client_api_version()
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L4;
++ }
++ __pyx_L4:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":115
+- * command_reply = MPV_EVENT_COMMAND_REPLY
+- * start_file = MPV_EVENT_START_FILE
+- * end_file = MPV_EVENT_END_FILE # <<<<<<<<<<<<<<
+- * file_loaded = MPV_EVENT_FILE_LOADED
+- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
++ /* "vidcutter/libs/pympv/mpv.pyx":40
++ * _CAPI_VERSION = mpv_client_api_version()
++ *
++ * _CAPI_MAJOR = _CAPI_VERSION >> 16 # <<<<<<<<<<<<<<
++ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":116
+- * start_file = MPV_EVENT_START_FILE
+- * end_file = MPV_EVENT_END_FILE
+- * file_loaded = MPV_EVENT_FILE_LOADED # <<<<<<<<<<<<<<
+- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
+- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
++ /* "vidcutter/libs/pympv/mpv.pyx":41
++ *
++ * _CAPI_MAJOR = _CAPI_VERSION >> 16
++ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF # <<<<<<<<<<<<<<
++ *
++ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":117
+- * end_file = MPV_EVENT_END_FILE
+- * file_loaded = MPV_EVENT_FILE_LOADED
+- * tracks_changed = MPV_EVENT_TRACKS_CHANGED # <<<<<<<<<<<<<<
+- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
+- * idle = MPV_EVENT_IDLE
++ /* "vidcutter/libs/pympv/mpv.pyx":43
++ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
++ *
++ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
++ * raise ImportError(
++ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TRACKS_CHANGED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tracks_changed, __pyx_t_6) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (!__pyx_t_5) {
++ } else {
++ __pyx_t_3 = __pyx_t_5;
++ goto __pyx_L6_bool_binop_done;
++ }
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_3 = __pyx_t_5;
++ __pyx_L6_bool_binop_done:;
++ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":118
+- * file_loaded = MPV_EVENT_FILE_LOADED
+- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
+- * tracks_switched = MPV_EVENT_TRACK_SWITCHED # <<<<<<<<<<<<<<
+- * idle = MPV_EVENT_IDLE
+- * pause = MPV_EVENT_PAUSE
++ /* "vidcutter/libs/pympv/mpv.pyx":46
++ * raise ImportError(
++ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
++ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR) # <<<<<<<<<<<<<<
++ * )
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TRACK_SWITCHED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 118, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tracks_switched, __pyx_t_6) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_GIVEREF(__pyx_t_2);
++ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_6);
++ PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
++ __pyx_t_2 = 0;
++ __pyx_t_1 = 0;
++ __pyx_t_4 = 0;
++ __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":119
+- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
+- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
+- * idle = MPV_EVENT_IDLE # <<<<<<<<<<<<<<
+- * pause = MPV_EVENT_PAUSE
+- * unpause = MPV_EVENT_UNPAUSE
++ /* "vidcutter/libs/pympv/mpv.pyx":45
++ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
++ * raise ImportError(
++ * "libmpv version is incorrect. Required %d.%d got %d.%d." % # <<<<<<<<<<<<<<
++ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
++ * )
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":120
+- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
+- * idle = MPV_EVENT_IDLE
+- * pause = MPV_EVENT_PAUSE # <<<<<<<<<<<<<<
+- * unpause = MPV_EVENT_UNPAUSE
+- * tick = MPV_EVENT_TICK
++ /* "vidcutter/libs/pympv/mpv.pyx":44
++ *
++ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
++ * raise ImportError( # <<<<<<<<<<<<<<
++ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
++ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PAUSE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_pause, __pyx_t_6) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_Raise(__pyx_t_7, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __PYX_ERR(0, 44, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":121
+- * idle = MPV_EVENT_IDLE
+- * pause = MPV_EVENT_PAUSE
+- * unpause = MPV_EVENT_UNPAUSE # <<<<<<<<<<<<<<
+- * tick = MPV_EVENT_TICK
+- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ /* "vidcutter/libs/pympv/mpv.pyx":43
++ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
++ *
++ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
++ * raise ImportError(
++ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_UNPAUSE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 121, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unpause, __pyx_t_6) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":122
+- * pause = MPV_EVENT_PAUSE
+- * unpause = MPV_EVENT_UNPAUSE
+- * tick = MPV_EVENT_TICK # <<<<<<<<<<<<<<
+- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+- * client_message = MPV_EVENT_CLIENT_MESSAGE
++ /* "vidcutter/libs/pympv/mpv.pyx":52
++ * void Py_Initialize()
++ *
++ * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
++ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
++ * # mpv -> Python
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__18, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":123
+- * unpause = MPV_EVENT_UNPAUSE
+- * tick = MPV_EVENT_TICK
+- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH # <<<<<<<<<<<<<<
+- * client_message = MPV_EVENT_CLIENT_MESSAGE
+- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
++ /* "vidcutter/libs/pympv/mpv.pyx":53
++ *
++ * _is_py3 = sys.version_info >= (3,)
++ * _strdec_err = "surrogateescape" if _is_py3 else "strict" # <<<<<<<<<<<<<<
++ * # mpv -> Python
++ * def _strdec(s):
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SCRIPT_INPUT_DISPATCH); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 123, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_script_input_dispatch, __pyx_t_6) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 53, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (__pyx_t_3) {
++ __Pyx_INCREF(__pyx_n_s_surrogateescape);
++ __pyx_t_7 = __pyx_n_s_surrogateescape;
++ } else {
++ __Pyx_INCREF(__pyx_n_s_strict);
++ __pyx_t_7 = __pyx_n_s_strict;
++ }
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":124
+- * tick = MPV_EVENT_TICK
+- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+- * client_message = MPV_EVENT_CLIENT_MESSAGE # <<<<<<<<<<<<<<
+- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
++ /* "vidcutter/libs/pympv/mpv.pyx":55
++ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
++ * # mpv -> Python
++ * def _strdec(s): # <<<<<<<<<<<<<<
++ * try:
++ * return s.decode("utf-8", _strdec_err)
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":125
+- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+- * client_message = MPV_EVENT_CLIENT_MESSAGE
+- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG # <<<<<<<<<<<<<<
+- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+- * metadata_update = MPV_EVENT_METADATA_UPDATE
++ /* "vidcutter/libs/pympv/mpv.pyx":63
++ *
++ * # Python -> mpv
++ * def _strenc(s): # <<<<<<<<<<<<<<
++ * try:
++ * return s.encode("utf-8", _strdec_err)
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":126
+- * client_message = MPV_EVENT_CLIENT_MESSAGE
+- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG # <<<<<<<<<<<<<<
+- * metadata_update = MPV_EVENT_METADATA_UPDATE
+- * seek = MPV_EVENT_SEEK
++ /* "vidcutter/libs/pympv/mpv.pyx":70
++ * return s
++ *
++ * Py_Initialize() # <<<<<<<<<<<<<<
++ *
++ * class Errors:
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ Py_Initialize();
+
+- /* "vidcutter/libs/pympv/mpv.pyx":127
+- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+- * metadata_update = MPV_EVENT_METADATA_UPDATE # <<<<<<<<<<<<<<
+- * seek = MPV_EVENT_SEEK
+- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
++ /* "vidcutter/libs/pympv/mpv.pyx":72
++ * Py_Initialize()
++ *
++ * class Errors: # <<<<<<<<<<<<<<
++ * """Set of known error codes from MpvError and Event responses.
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_METADATA_UPDATE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 127, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_metadata_update, __pyx_t_6) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 72, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":128
+- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+- * metadata_update = MPV_EVENT_METADATA_UPDATE
+- * seek = MPV_EVENT_SEEK # <<<<<<<<<<<<<<
+- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
+- * property_change = MPV_EVENT_PROPERTY_CHANGE
++ /* "vidcutter/libs/pympv/mpv.pyx":79
++ * You should handle the possibility that error codes may not be any of these values.
++ * """
++ * success = MPV_ERROR_SUCCESS # <<<<<<<<<<<<<<
++ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
++ * nomem = MPV_ERROR_NOMEM
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":129
+- * metadata_update = MPV_EVENT_METADATA_UPDATE
+- * seek = MPV_EVENT_SEEK
+- * playback_restart = MPV_EVENT_PLAYBACK_RESTART # <<<<<<<<<<<<<<
+- * property_change = MPV_EVENT_PROPERTY_CHANGE
+- * chapter_change = MPV_EVENT_CHAPTER_CHANGE
++ /* "vidcutter/libs/pympv/mpv.pyx":80
++ * """
++ * success = MPV_ERROR_SUCCESS
++ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL # <<<<<<<<<<<<<<
++ * nomem = MPV_ERROR_NOMEM
++ * uninitialized = MPV_ERROR_UNINITIALIZED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":130
+- * seek = MPV_EVENT_SEEK
+- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
+- * property_change = MPV_EVENT_PROPERTY_CHANGE # <<<<<<<<<<<<<<
+- * chapter_change = MPV_EVENT_CHAPTER_CHANGE
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":81
++ * success = MPV_ERROR_SUCCESS
++ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
++ * nomem = MPV_ERROR_NOMEM # <<<<<<<<<<<<<<
++ * uninitialized = MPV_ERROR_UNINITIALIZED
++ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":131
+- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
+- * property_change = MPV_EVENT_PROPERTY_CHANGE
+- * chapter_change = MPV_EVENT_CHAPTER_CHANGE # <<<<<<<<<<<<<<
+- *
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":82
++ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
++ * nomem = MPV_ERROR_NOMEM
++ * uninitialized = MPV_ERROR_UNINITIALIZED # <<<<<<<<<<<<<<
++ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
++ * not_found = MPV_ERROR_OPTION_NOT_FOUND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CHAPTER_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_chapter_change, __pyx_t_6) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":101
+- *
+- *
+- * class Events: # <<<<<<<<<<<<<<
+- * """Set of known values for Event ids.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":83
++ * nomem = MPV_ERROR_NOMEM
++ * uninitialized = MPV_ERROR_UNINITIALIZED
++ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER # <<<<<<<<<<<<<<
++ * not_found = MPV_ERROR_OPTION_NOT_FOUND
++ * option_format = MPV_ERROR_OPTION_FORMAT
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":134
+- *
+- *
+- * class LogLevels: # <<<<<<<<<<<<<<
+- * no = MPV_LOG_LEVEL_NONE
+- * fatal = MPV_LOG_LEVEL_FATAL
++ /* "vidcutter/libs/pympv/mpv.pyx":84
++ * uninitialized = MPV_ERROR_UNINITIALIZED
++ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
++ * not_found = MPV_ERROR_OPTION_NOT_FOUND # <<<<<<<<<<<<<<
++ * option_format = MPV_ERROR_OPTION_FORMAT
++ * option_error = MPV_ERROR_OPTION_ERROR
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":135
+- *
+- * class LogLevels:
+- * no = MPV_LOG_LEVEL_NONE # <<<<<<<<<<<<<<
+- * fatal = MPV_LOG_LEVEL_FATAL
+- * error = MPV_LOG_LEVEL_ERROR
++ /* "vidcutter/libs/pympv/mpv.pyx":85
++ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
++ * not_found = MPV_ERROR_OPTION_NOT_FOUND
++ * option_format = MPV_ERROR_OPTION_FORMAT # <<<<<<<<<<<<<<
++ * option_error = MPV_ERROR_OPTION_ERROR
++ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":136
+- * class LogLevels:
+- * no = MPV_LOG_LEVEL_NONE
+- * fatal = MPV_LOG_LEVEL_FATAL # <<<<<<<<<<<<<<
+- * error = MPV_LOG_LEVEL_ERROR
+- * warn = MPV_LOG_LEVEL_WARN
++ /* "vidcutter/libs/pympv/mpv.pyx":86
++ * not_found = MPV_ERROR_OPTION_NOT_FOUND
++ * option_format = MPV_ERROR_OPTION_FORMAT
++ * option_error = MPV_ERROR_OPTION_ERROR # <<<<<<<<<<<<<<
++ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
++ * property_format = MPV_ERROR_PROPERTY_FORMAT
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":137
+- * no = MPV_LOG_LEVEL_NONE
+- * fatal = MPV_LOG_LEVEL_FATAL
+- * error = MPV_LOG_LEVEL_ERROR # <<<<<<<<<<<<<<
+- * warn = MPV_LOG_LEVEL_WARN
+- * info = MPV_LOG_LEVEL_INFO
++ /* "vidcutter/libs/pympv/mpv.pyx":87
++ * option_format = MPV_ERROR_OPTION_FORMAT
++ * option_error = MPV_ERROR_OPTION_ERROR
++ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND # <<<<<<<<<<<<<<
++ * property_format = MPV_ERROR_PROPERTY_FORMAT
++ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":138
+- * fatal = MPV_LOG_LEVEL_FATAL
+- * error = MPV_LOG_LEVEL_ERROR
+- * warn = MPV_LOG_LEVEL_WARN # <<<<<<<<<<<<<<
+- * info = MPV_LOG_LEVEL_INFO
+- * v = MPV_LOG_LEVEL_V
++ /* "vidcutter/libs/pympv/mpv.pyx":88
++ * option_error = MPV_ERROR_OPTION_ERROR
++ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
++ * property_format = MPV_ERROR_PROPERTY_FORMAT # <<<<<<<<<<<<<<
++ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
++ * property_error = MPV_ERROR_PROPERTY_ERROR
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":139
+- * error = MPV_LOG_LEVEL_ERROR
+- * warn = MPV_LOG_LEVEL_WARN
+- * info = MPV_LOG_LEVEL_INFO # <<<<<<<<<<<<<<
+- * v = MPV_LOG_LEVEL_V
+- * debug = MPV_LOG_LEVEL_DEBUG
++ /* "vidcutter/libs/pympv/mpv.pyx":89
++ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
++ * property_format = MPV_ERROR_PROPERTY_FORMAT
++ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE # <<<<<<<<<<<<<<
++ * property_error = MPV_ERROR_PROPERTY_ERROR
++ * command_error = MPV_ERROR_COMMAND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":140
+- * warn = MPV_LOG_LEVEL_WARN
+- * info = MPV_LOG_LEVEL_INFO
+- * v = MPV_LOG_LEVEL_V # <<<<<<<<<<<<<<
+- * debug = MPV_LOG_LEVEL_DEBUG
+- * trace = MPV_LOG_LEVEL_TRACE
++ /* "vidcutter/libs/pympv/mpv.pyx":90
++ * property_format = MPV_ERROR_PROPERTY_FORMAT
++ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
++ * property_error = MPV_ERROR_PROPERTY_ERROR # <<<<<<<<<<<<<<
++ * command_error = MPV_ERROR_COMMAND
++ * loading_failed = MPV_ERROR_LOADING_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":141
+- * info = MPV_LOG_LEVEL_INFO
+- * v = MPV_LOG_LEVEL_V
+- * debug = MPV_LOG_LEVEL_DEBUG # <<<<<<<<<<<<<<
+- * trace = MPV_LOG_LEVEL_TRACE
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":91
++ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
++ * property_error = MPV_ERROR_PROPERTY_ERROR
++ * command_error = MPV_ERROR_COMMAND # <<<<<<<<<<<<<<
++ * loading_failed = MPV_ERROR_LOADING_FAILED
++ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":142
+- * v = MPV_LOG_LEVEL_V
+- * debug = MPV_LOG_LEVEL_DEBUG
+- * trace = MPV_LOG_LEVEL_TRACE # <<<<<<<<<<<<<<
+- *
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":92
++ * property_error = MPV_ERROR_PROPERTY_ERROR
++ * command_error = MPV_ERROR_COMMAND
++ * loading_failed = MPV_ERROR_LOADING_FAILED # <<<<<<<<<<<<<<
++ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
++ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":134
+- *
+- *
+- * class LogLevels: # <<<<<<<<<<<<<<
+- * no = MPV_LOG_LEVEL_NONE
+- * fatal = MPV_LOG_LEVEL_FATAL
++ /* "vidcutter/libs/pympv/mpv.pyx":93
++ * command_error = MPV_ERROR_COMMAND
++ * loading_failed = MPV_ERROR_LOADING_FAILED
++ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED # <<<<<<<<<<<<<<
++ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
++ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":145
+- *
+- *
+- * class EOFReasons: # <<<<<<<<<<<<<<
+- * """Known possible values for EndOfFileReached reason.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":94
++ * loading_failed = MPV_ERROR_LOADING_FAILED
++ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
++ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED # <<<<<<<<<<<<<<
++ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
++ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":150
+- * You should handle the possibility that the reason may not be any of these values.
+- * """
+- * eof = MPV_END_FILE_REASON_EOF # <<<<<<<<<<<<<<
+- * aborted = MPV_END_FILE_REASON_STOP
+- * quit = MPV_END_FILE_REASON_QUIT
++ /* "vidcutter/libs/pympv/mpv.pyx":95
++ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
++ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
++ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY # <<<<<<<<<<<<<<
++ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
++ * unsupported = MPV_ERROR_UNSUPPORTED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":151
+- * """
+- * eof = MPV_END_FILE_REASON_EOF
+- * aborted = MPV_END_FILE_REASON_STOP # <<<<<<<<<<<<<<
+- * quit = MPV_END_FILE_REASON_QUIT
+- * error = MPV_END_FILE_REASON_ERROR
++ /* "vidcutter/libs/pympv/mpv.pyx":96
++ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
++ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
++ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT # <<<<<<<<<<<<<<
++ * unsupported = MPV_ERROR_UNSUPPORTED
++ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":152
+- * eof = MPV_END_FILE_REASON_EOF
+- * aborted = MPV_END_FILE_REASON_STOP
+- * quit = MPV_END_FILE_REASON_QUIT # <<<<<<<<<<<<<<
+- * error = MPV_END_FILE_REASON_ERROR
++ /* "vidcutter/libs/pympv/mpv.pyx":97
++ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
++ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
++ * unsupported = MPV_ERROR_UNSUPPORTED # <<<<<<<<<<<<<<
++ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":153
+- * aborted = MPV_END_FILE_REASON_STOP
+- * quit = MPV_END_FILE_REASON_QUIT
+- * error = MPV_END_FILE_REASON_ERROR # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":98
++ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
++ * unsupported = MPV_ERROR_UNSUPPORTED
++ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED # <<<<<<<<<<<<<<
+ *
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":145
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":72
++ * Py_Initialize()
+ *
+- * class EOFReasons: # <<<<<<<<<<<<<<
+- * """Known possible values for EndOfFileReached reason.
++ * class Errors: # <<<<<<<<<<<<<<
++ * """Set of known error codes from MpvError and Event responses.
+ *
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":318
+- *
+- *
+- * def _errors(fn): # <<<<<<<<<<<<<<
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
+- */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":326
++ /* "vidcutter/libs/pympv/mpv.pyx":101
+ *
+ *
+- * class MPVError(Exception): # <<<<<<<<<<<<<<
+- * code = None
++ * class Events: # <<<<<<<<<<<<<<
++ * """Set of known values for Event ids.
+ *
+ */
+- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":327
+- *
+- * class MPVError(Exception):
+- * code = None # <<<<<<<<<<<<<<
+- *
+- * def __init__(self, e):
+- */
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":329
+- * code = None
+- *
+- * def __init__(self, e): # <<<<<<<<<<<<<<
+- * self.code = e
+- * cdef const char* err_c
++ /* "vidcutter/libs/pympv/mpv.pyx":108
++ * You should handle the possibility that event ids may not be any of these values.
++ * """
++ * none = MPV_EVENT_NONE # <<<<<<<<<<<<<<
++ * shutdown = MPV_EVENT_SHUTDOWN
++ * log_message = MPV_EVENT_LOG_MESSAGE
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":326
+- *
+- *
+- * class MPVError(Exception): # <<<<<<<<<<<<<<
+- * code = None
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":109
++ * """
++ * none = MPV_EVENT_NONE
++ * shutdown = MPV_EVENT_SHUTDOWN # <<<<<<<<<<<<<<
++ * log_message = MPV_EVENT_LOG_MESSAGE
++ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+ */
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 109, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":340
+- * Exception.__init__(self, e)
+- *
+- * class PyMPVError(Exception): # <<<<<<<<<<<<<<
+- * pass
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":110
++ * none = MPV_EVENT_NONE
++ * shutdown = MPV_EVENT_SHUTDOWN
++ * log_message = MPV_EVENT_LOG_MESSAGE # <<<<<<<<<<<<<<
++ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
++ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+ */
+- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 340, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":343
+- * pass
+- *
+- * cdef _callbacks = dict() # <<<<<<<<<<<<<<
+- * cdef _reply_userdatas = dict()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":111
++ * shutdown = MPV_EVENT_SHUTDOWN
++ * log_message = MPV_EVENT_LOG_MESSAGE
++ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY # <<<<<<<<<<<<<<
++ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
++ * command_reply = MPV_EVENT_COMMAND_REPLY
+ */
+- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__callbacks);
+- __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_t_7);
+- __Pyx_GIVEREF(__pyx_t_7);
+- __pyx_t_7 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":344
+- *
+- * cdef _callbacks = dict()
+- * cdef _reply_userdatas = dict() # <<<<<<<<<<<<<<
+- *
+- * class _ReplyUserData(object):
++ /* "vidcutter/libs/pympv/mpv.pyx":112
++ * log_message = MPV_EVENT_LOG_MESSAGE
++ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
++ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY # <<<<<<<<<<<<<<
++ * command_reply = MPV_EVENT_COMMAND_REPLY
++ * start_file = MPV_EVENT_START_FILE
+ */
+- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas);
+- __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_t_7);
+- __Pyx_GIVEREF(__pyx_t_7);
+- __pyx_t_7 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":346
+- * cdef _reply_userdatas = dict()
+- *
+- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+- * def __init__(self, data):
+- * self.counter = 0
++ /* "vidcutter/libs/pympv/mpv.pyx":113
++ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
++ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
++ * command_reply = MPV_EVENT_COMMAND_REPLY # <<<<<<<<<<<<<<
++ * start_file = MPV_EVENT_START_FILE
++ * end_file = MPV_EVENT_END_FILE
+ */
+- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__30); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__30, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":347
+- *
+- * class _ReplyUserData(object):
+- * def __init__(self, data): # <<<<<<<<<<<<<<
+- * self.counter = 0
+- * self.data = data
++ /* "vidcutter/libs/pympv/mpv.pyx":114
++ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
++ * command_reply = MPV_EVENT_COMMAND_REPLY
++ * start_file = MPV_EVENT_START_FILE # <<<<<<<<<<<<<<
++ * end_file = MPV_EVENT_END_FILE
++ * file_loaded = MPV_EVENT_FILE_LOADED
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":352
+- * self.observed = False
+- *
+- * def add(self): # <<<<<<<<<<<<<<
+- * self.counter += 1
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":115
++ * command_reply = MPV_EVENT_COMMAND_REPLY
++ * start_file = MPV_EVENT_START_FILE
++ * end_file = MPV_EVENT_END_FILE # <<<<<<<<<<<<<<
++ * file_loaded = MPV_EVENT_FILE_LOADED
++ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":355
+- * self.counter += 1
+- *
+- * def remove(self): # <<<<<<<<<<<<<<
+- * self.counter -= 1
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":116
++ * start_file = MPV_EVENT_START_FILE
++ * end_file = MPV_EVENT_END_FILE
++ * file_loaded = MPV_EVENT_FILE_LOADED # <<<<<<<<<<<<<<
++ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
++ * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":346
+- * cdef _reply_userdatas = dict()
+- *
+- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+- * def __init__(self, data):
+- * self.counter = 0
++ /* "vidcutter/libs/pympv/mpv.pyx":119
++ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
++ * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
++ * idle = MPV_EVENT_IDLE # <<<<<<<<<<<<<<
++ * # pause = MPV_EVENT_PAUSE
++ * # unpause = MPV_EVENT_UNPAUSE
+ */
+- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__30, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":411
+- * mpv_resume(self._ctx)
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def request_event(self, event, enable):
+- * """Enable or disable a given event.
++ /* "vidcutter/libs/pympv/mpv.pyx":122
++ * # pause = MPV_EVENT_PAUSE
++ * # unpause = MPV_EVENT_UNPAUSE
++ * tick = MPV_EVENT_TICK # <<<<<<<<<<<<<<
++ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ * client_message = MPV_EVENT_CLIENT_MESSAGE
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":412
+- *
+- * @_errors
+- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+- * """Enable or disable a given event.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":124
++ * tick = MPV_EVENT_TICK
++ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ * client_message = MPV_EVENT_CLIENT_MESSAGE # <<<<<<<<<<<<<<
++ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
++ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":429
+- * return err
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def set_log_level(self, loglevel):
+- * """Wraps: mpv_request_log_messages"""
++ /* "vidcutter/libs/pympv/mpv.pyx":125
++ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ * client_message = MPV_EVENT_CLIENT_MESSAGE
++ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG # <<<<<<<<<<<<<<
++ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
++ * # metadata_update = MPV_EVENT_METADATA_UPDATE
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":430
+- *
+- * @_errors
+- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_request_log_messages"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":126
++ * client_message = MPV_EVENT_CLIENT_MESSAGE
++ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
++ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG # <<<<<<<<<<<<<<
++ * # metadata_update = MPV_EVENT_METADATA_UPDATE
++ * seek = MPV_EVENT_SEEK
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":440
+- * return err
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def load_config(self, filename):
+- * """Wraps: mpv_load_config_file"""
++ /* "vidcutter/libs/pympv/mpv.pyx":128
++ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
++ * # metadata_update = MPV_EVENT_METADATA_UPDATE
++ * seek = MPV_EVENT_SEEK # <<<<<<<<<<<<<<
++ * playback_restart = MPV_EVENT_PLAYBACK_RESTART
++ * property_change = MPV_EVENT_PROPERTY_CHANGE
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":441
+- *
+- * @_errors
+- * def load_config(self, filename): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_load_config_file"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":129
++ * # metadata_update = MPV_EVENT_METADATA_UPDATE
++ * seek = MPV_EVENT_SEEK
++ * playback_restart = MPV_EVENT_PLAYBACK_RESTART # <<<<<<<<<<<<<<
++ * property_change = MPV_EVENT_PROPERTY_CHANGE
++ * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":573
+- * return result
++ /* "vidcutter/libs/pympv/mpv.pyx":130
++ * seek = MPV_EVENT_SEEK
++ * playback_restart = MPV_EVENT_PLAYBACK_RESTART
++ * property_change = MPV_EVENT_PROPERTY_CHANGE # <<<<<<<<<<<<<<
++ * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def get_property_async(self, prop, data=None):
+- * """Gets the value of a property asynchronously.
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":574
++ /* "vidcutter/libs/pympv/mpv.pyx":101
+ *
+- * @_errors
+- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Gets the value of a property asynchronously.
++ *
++ * class Events: # <<<<<<<<<<<<<<
++ * """Set of known values for Event ids.
+ *
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":635
+- * return v
++ /* "vidcutter/libs/pympv/mpv.pyx":134
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def set_property(self, prop, value=True, asynchronous=False, data=None):
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":636
+ *
+- * @_errors
+- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
+- * assert self._ctx
++ * class LogLevels: # <<<<<<<<<<<<<<
++ * no = MPV_LOG_LEVEL_NONE
++ * fatal = MPV_LOG_LEVEL_FATAL
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":673
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":135
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def set_option(self, prop, value=True):
+- * """Wraps: mpv_set_option"""
++ * class LogLevels:
++ * no = MPV_LOG_LEVEL_NONE # <<<<<<<<<<<<<<
++ * fatal = MPV_LOG_LEVEL_FATAL
++ * error = MPV_LOG_LEVEL_ERROR
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":674
+- *
+- * @_errors
+- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_option"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":136
++ * class LogLevels:
++ * no = MPV_LOG_LEVEL_NONE
++ * fatal = MPV_LOG_LEVEL_FATAL # <<<<<<<<<<<<<<
++ * error = MPV_LOG_LEVEL_ERROR
++ * warn = MPV_LOG_LEVEL_WARN
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 674, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":695
+- * return err
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def initialize(self):
+- * """Wraps: mpv_initialize"""
++ /* "vidcutter/libs/pympv/mpv.pyx":137
++ * no = MPV_LOG_LEVEL_NONE
++ * fatal = MPV_LOG_LEVEL_FATAL
++ * error = MPV_LOG_LEVEL_ERROR # <<<<<<<<<<<<<<
++ * warn = MPV_LOG_LEVEL_WARN
++ * info = MPV_LOG_LEVEL_INFO
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":696
+- *
+- * @_errors
+- * def initialize(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_initialize"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":138
++ * fatal = MPV_LOG_LEVEL_FATAL
++ * error = MPV_LOG_LEVEL_ERROR
++ * warn = MPV_LOG_LEVEL_WARN # <<<<<<<<<<<<<<
++ * info = MPV_LOG_LEVEL_INFO
++ * v = MPV_LOG_LEVEL_V
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":748
+- * self.callbackthread.start()
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def observe_property(self, prop, data=None):
+- * """Wraps: mpv_observe_property"""
++ /* "vidcutter/libs/pympv/mpv.pyx":139
++ * error = MPV_LOG_LEVEL_ERROR
++ * warn = MPV_LOG_LEVEL_WARN
++ * info = MPV_LOG_LEVEL_INFO # <<<<<<<<<<<<<<
++ * v = MPV_LOG_LEVEL_V
++ * debug = MPV_LOG_LEVEL_DEBUG
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":749
+- *
+- * @_errors
+- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_observe_property"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":140
++ * warn = MPV_LOG_LEVEL_WARN
++ * info = MPV_LOG_LEVEL_INFO
++ * v = MPV_LOG_LEVEL_V # <<<<<<<<<<<<<<
++ * debug = MPV_LOG_LEVEL_DEBUG
++ * trace = MPV_LOG_LEVEL_TRACE
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":770
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":141
++ * info = MPV_LOG_LEVEL_INFO
++ * v = MPV_LOG_LEVEL_V
++ * debug = MPV_LOG_LEVEL_DEBUG # <<<<<<<<<<<<<<
++ * trace = MPV_LOG_LEVEL_TRACE
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def unobserve_property(self, data):
+- * """Wraps: mpv_unobserve_property"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":771
++ /* "vidcutter/libs/pympv/mpv.pyx":142
++ * v = MPV_LOG_LEVEL_V
++ * debug = MPV_LOG_LEVEL_DEBUG
++ * trace = MPV_LOG_LEVEL_TRACE # <<<<<<<<<<<<<<
++ *
+ *
+- * @_errors
+- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_unobserve_property"""
+- * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":938
++ /* "vidcutter/libs/pympv/mpv.pyx":134
+ *
+- * cdef class RenderContext(object):
+- * API_OPENGL = "opengl" # <<<<<<<<<<<<<<
+- * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME
+ *
++ * class LogLevels: # <<<<<<<<<<<<<<
++ * no = MPV_LOG_LEVEL_NONE
++ * fatal = MPV_LOG_LEVEL_FATAL
+ */
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":939
+- * cdef class RenderContext(object):
+- * API_OPENGL = "opengl"
+- * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":145
++ *
++ *
++ * class EOFReasons: # <<<<<<<<<<<<<<
++ * """Known possible values for EndOfFileReached reason.
+ *
+- * cdef:
+ */
+- __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 939, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1009
+- * self.inited = True
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def set_icc_profile(self, icc_blob):
+- * cdef:
++ /* "vidcutter/libs/pympv/mpv.pyx":150
++ * You should handle the possibility that the reason may not be any of these values.
++ * """
++ * eof = MPV_END_FILE_REASON_EOF # <<<<<<<<<<<<<<
++ * aborted = MPV_END_FILE_REASON_STOP
++ * quit = MPV_END_FILE_REASON_QUIT
++ */
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":151
++ * """
++ * eof = MPV_END_FILE_REASON_EOF
++ * aborted = MPV_END_FILE_REASON_STOP # <<<<<<<<<<<<<<
++ * quit = MPV_END_FILE_REASON_QUIT
++ * error = MPV_END_FILE_REASON_ERROR
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1009, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1010
++ /* "vidcutter/libs/pympv/mpv.pyx":152
++ * eof = MPV_END_FILE_REASON_EOF
++ * aborted = MPV_END_FILE_REASON_STOP
++ * quit = MPV_END_FILE_REASON_QUIT # <<<<<<<<<<<<<<
++ * error = MPV_END_FILE_REASON_ERROR
+ *
+- * @_errors
+- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1009, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1028
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":153
++ * aborted = MPV_END_FILE_REASON_STOP
++ * quit = MPV_END_FILE_REASON_QUIT
++ * error = MPV_END_FILE_REASON_ERROR # <<<<<<<<<<<<<<
++ *
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def set_ambient_light(self, lux):
+- * cdef:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1029
++ /* "vidcutter/libs/pympv/mpv.pyx":145
++ *
++ *
++ * class EOFReasons: # <<<<<<<<<<<<<<
++ * """Known possible values for EndOfFileReached reason.
+ *
+- * @_errors
+- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1068
+- * return ret
++ /* "vidcutter/libs/pympv/mpv.pyx":318
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def render(self,
+- * opengl_fbo=None,
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
+ *
+- * @_errors
+- * def render(self, # <<<<<<<<<<<<<<
+- * opengl_fbo=None,
+- * flip_y=False,
++ * def _errors(fn): # <<<<<<<<<<<<<<
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error)
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1132
+- * init_params, *args, **kwargs)
++ /* "vidcutter/libs/pympv/mpv.pyx":326
++ *
++ *
++ * class MPVError(Exception): # <<<<<<<<<<<<<<
++ * code = None
+ *
+- * class CallbackThread(Thread): # <<<<<<<<<<<<<<
+- * def __init__(self):
+- * Thread.__init__(self)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_GIVEREF(__pyx_t_7);
+- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
+- __pyx_t_7 = 0;
+- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
++ /* "vidcutter/libs/pympv/mpv.pyx":327
+ *
+- * class CallbackThread(Thread):
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * Thread.__init__(self)
+- * self.daemon = True
++ * class MPVError(Exception):
++ * code = None # <<<<<<<<<<<<<<
++ *
++ * def __init__(self, e):
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1133, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
+- * self.isshutdown = False
++ /* "vidcutter/libs/pympv/mpv.pyx":329
++ * code = None
+ *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * self.isshutdown = True
+- * self.callback = None
++ * def __init__(self, e): # <<<<<<<<<<<<<<
++ * self.code = e
++ * cdef const char* err_c
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
+- * self.lock.release()
++ /* "vidcutter/libs/pympv/mpv.pyx":326
+ *
+- * def call(self): # <<<<<<<<<<<<<<
+- * self.lock.release()
++ *
++ * class MPVError(Exception): # <<<<<<<<<<<<<<
++ * code = None
+ *
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1146, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
+- * self.lock.release()
++ /* "vidcutter/libs/pympv/mpv.pyx":340
++ * Exception.__init__(self, e)
+ *
+- * def set(self, callback): # <<<<<<<<<<<<<<
+- * self.callback = callback
++ * class PyMPVError(Exception): # <<<<<<<<<<<<<<
++ * pass
+ *
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
+- * self.callback = callback
++ /* "vidcutter/libs/pympv/mpv.pyx":343
++ * pass
+ *
+- * def run(self): # <<<<<<<<<<<<<<
+- * while not self.isshutdown:
+- * self.lock.acquire(True)
++ * cdef _callbacks = dict() # <<<<<<<<<<<<<<
++ * cdef _reply_userdatas = dict()
++ *
++ */
++ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__callbacks);
++ __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_t_7);
++ __Pyx_GIVEREF(__pyx_t_7);
++ __pyx_t_7 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":344
++ *
++ * cdef _callbacks = dict()
++ * cdef _reply_userdatas = dict() # <<<<<<<<<<<<<<
++ *
++ * class _ReplyUserData(object):
++ */
++ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas);
++ __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_t_7);
++ __Pyx_GIVEREF(__pyx_t_7);
++ __pyx_t_7 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":346
++ * cdef _reply_userdatas = dict()
++ *
++ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
++ * def __init__(self, data):
++ * self.counter = 0
++ */
++ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__27); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__27, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":347
++ *
++ * class _ReplyUserData(object):
++ * def __init__(self, data): # <<<<<<<<<<<<<<
++ * self.counter = 0
++ * self.data = data
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
+- * self.mpv_callback(self.callback) if self.callback else None
++ /* "vidcutter/libs/pympv/mpv.pyx":352
++ * self.observed = False
++ *
++ * def add(self): # <<<<<<<<<<<<<<
++ * self.counter += 1
+ *
+- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+- * try:
+- * callback()
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1157, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1132
+- * init_params, *args, **kwargs)
++ /* "vidcutter/libs/pympv/mpv.pyx":355
++ * self.counter += 1
++ *
++ * def remove(self): # <<<<<<<<<<<<<<
++ * self.counter -= 1
+ *
+- * class CallbackThread(Thread): # <<<<<<<<<<<<<<
+- * def __init__(self):
+- * Thread.__init__(self)
+ */
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1132, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
++ /* "vidcutter/libs/pympv/mpv.pyx":346
++ * cdef _reply_userdatas = dict()
++ *
++ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
++ * def __init__(self, data):
++ * self.counter = 0
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__27, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ /* "vidcutter/libs/pympv/mpv.pyx":411
++ * # mpv_resume(self._ctx)
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def request_event(self, event, enable):
++ * """Enable or disable a given event.
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_InputDispatch, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
++ /* "vidcutter/libs/pympv/mpv.pyx":412
++ *
++ * @_errors
++ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
++ * """Enable or disable a given event.
++ *
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_LogMessage, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
++ }
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ /* "vidcutter/libs/pympv/mpv.pyx":429
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def set_log_level(self, loglevel):
++ * """Wraps: mpv_request_log_messages"""
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Property, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
++ /* "vidcutter/libs/pympv/mpv.pyx":430
++ *
++ * @_errors
++ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_request_log_messages"""
++ * assert self._ctx
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Event, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
++ }
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ /* "vidcutter/libs/pympv/mpv.pyx":440
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def load_config(self, filename):
++ * """Wraps: mpv_load_config_file"""
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1
+- * # This program is free software: you can redistribute it and/or modify # <<<<<<<<<<<<<<
+- * # it under the terms of the GNU General Public License as published by
+- * # the Free Software Foundation, either version 3 of the License, or
++ /* "vidcutter/libs/pympv/mpv.pyx":441
++ *
++ * @_errors
++ * def load_config(self, filename): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_load_config_file"""
++ * assert self._ctx
+ */
+- __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /*--- Wrapped vars code ---*/
+-
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- if (__pyx_m) {
+- if (__pyx_d) {
+- __Pyx_AddTraceback("init vidcutter.libs.mpv", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- }
+- Py_CLEAR(__pyx_m);
+- } else if (!PyErr_Occurred()) {
+- PyErr_SetString(PyExc_ImportError, "init vidcutter.libs.mpv");
+- }
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+- #if CYTHON_PEP489_MULTI_PHASE_INIT
+- return (__pyx_m != NULL) ? 0 : -1;
+- #elif PY_MAJOR_VERSION >= 3
+- return __pyx_m;
+- #else
+- return;
+- #endif
+-}
+-
+-/* --- Runtime support code --- */
+-/* Refnanny */
+-#if CYTHON_REFNANNY
+-static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+- PyObject *m = NULL, *p = NULL;
+- void *r = NULL;
+- m = PyImport_ImportModule(modname);
+- if (!m) goto end;
+- p = PyObject_GetAttrString(m, "RefNannyAPI");
+- if (!p) goto end;
+- r = PyLong_AsVoidPtr(p);
+-end:
+- Py_XDECREF(p);
+- Py_XDECREF(m);
+- return (__Pyx_RefNannyAPIStruct *)r;
+-}
+-#endif
+-
+-/* PyObjectGetAttrStr */
+-#if CYTHON_USE_TYPE_SLOTS
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+- PyTypeObject* tp = Py_TYPE(obj);
+- if (likely(tp->tp_getattro))
+- return tp->tp_getattro(obj, attr_name);
+-#if PY_MAJOR_VERSION < 3
+- if (likely(tp->tp_getattr))
+- return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+-#endif
+- return PyObject_GetAttr(obj, attr_name);
+-}
+-#endif
+-
+-/* GetBuiltinName */
+-static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+- PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+- if (unlikely(!result)) {
+- PyErr_Format(PyExc_NameError,
+-#if PY_MAJOR_VERSION >= 3
+- "name '%U' is not defined", name);
+-#else
+- "name '%.200s' is not defined", PyString_AS_STRING(name));
+-#endif
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- return result;
+-}
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+-/* PyDictVersioning */
+-#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
+-static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
+- PyObject *dict = Py_TYPE(obj)->tp_dict;
+- return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
+-}
+-static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
+- PyObject **dictptr = NULL;
+- Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
+- if (offset) {
+-#if CYTHON_COMPILING_IN_CPYTHON
+- dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
+-#else
+- dictptr = _PyObject_GetDictPtr(obj);
+-#endif
+- }
+- return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
+-}
+-static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
+- PyObject *dict = Py_TYPE(obj)->tp_dict;
+- if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
+- return 0;
+- return obj_dict_version == __Pyx_get_object_dict_version(obj);
+-}
+-#endif
++ /* "vidcutter/libs/pympv/mpv.pyx":573
++ * return result
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def get_property_async(self, prop, data=None):
++ * """Gets the value of a property asynchronously.
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
+
+-/* GetModuleGlobalName */
+-#if CYTHON_USE_DICT_VERSIONS
+-static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
+-#else
+-static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
+-#endif
+-{
+- PyObject *result;
+-#if !CYTHON_AVOID_BORROWED_REFS
+-#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
+- result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
+- __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
+- if (likely(result)) {
+- return __Pyx_NewRef(result);
+- } else if (unlikely(PyErr_Occurred())) {
+- return NULL;
+- }
+-#else
+- result = PyDict_GetItem(__pyx_d, name);
+- __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
+- if (likely(result)) {
+- return __Pyx_NewRef(result);
+- }
+-#endif
+-#else
+- result = PyObject_GetItem(__pyx_d, name);
+- __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
+- if (likely(result)) {
+- return __Pyx_NewRef(result);
++ /* "vidcutter/libs/pympv/mpv.pyx":574
++ *
++ * @_errors
++ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Gets the value of a property asynchronously.
++ *
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- PyErr_Clear();
+-#endif
+- return __Pyx_GetBuiltinName(name);
+-}
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+-/* PyFunctionFastCall */
+-#if CYTHON_FAST_PYCALL
+-static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
+- PyObject *globals) {
+- PyFrameObject *f;
+- PyThreadState *tstate = __Pyx_PyThreadState_Current;
+- PyObject **fastlocals;
+- Py_ssize_t i;
+- PyObject *result;
+- assert(globals != NULL);
+- /* XXX Perhaps we should create a specialized
+- PyFrame_New() that doesn't take locals, but does
+- take builtins without sanity checking them.
+- */
+- assert(tstate != NULL);
+- f = PyFrame_New(tstate, co, globals, NULL);
+- if (f == NULL) {
+- return NULL;
+- }
+- fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
+- for (i = 0; i < na; i++) {
+- Py_INCREF(*args);
+- fastlocals[i] = *args++;
+- }
+- result = PyEval_EvalFrameEx(f,0);
+- ++tstate->recursion_depth;
+- Py_DECREF(f);
+- --tstate->recursion_depth;
+- return result;
+-}
+-#if 1 || PY_VERSION_HEX < 0x030600B1
+-static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
+- PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
+- PyObject *globals = PyFunction_GET_GLOBALS(func);
+- PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
+- PyObject *closure;
+-#if PY_MAJOR_VERSION >= 3
+- PyObject *kwdefs;
+-#endif
+- PyObject *kwtuple, **k;
+- PyObject **d;
+- Py_ssize_t nd;
+- Py_ssize_t nk;
+- PyObject *result;
+- assert(kwargs == NULL || PyDict_Check(kwargs));
+- nk = kwargs ? PyDict_Size(kwargs) : 0;
+- if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
+- return NULL;
+- }
+- if (
+-#if PY_MAJOR_VERSION >= 3
+- co->co_kwonlyargcount == 0 &&
+-#endif
+- likely(kwargs == NULL || nk == 0) &&
+- co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
+- if (argdefs == NULL && co->co_argcount == nargs) {
+- result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
+- goto done;
+- }
+- else if (nargs == 0 && argdefs != NULL
+- && co->co_argcount == Py_SIZE(argdefs)) {
+- /* function called with no arguments, but all parameters have
+- a default value: use default values as arguments .*/
+- args = &PyTuple_GET_ITEM(argdefs, 0);
+- result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
+- goto done;
+- }
++ /* "vidcutter/libs/pympv/mpv.pyx":635
++ * return v
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def set_property(self, prop, value=True, asynchronous=False, data=None):
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":636
++ *
++ * @_errors
++ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
++ * assert self._ctx
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- if (kwargs != NULL) {
+- Py_ssize_t pos, i;
+- kwtuple = PyTuple_New(2 * nk);
+- if (kwtuple == NULL) {
+- result = NULL;
+- goto done;
+- }
+- k = &PyTuple_GET_ITEM(kwtuple, 0);
+- pos = i = 0;
+- while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
+- Py_INCREF(k[i]);
+- Py_INCREF(k[i+1]);
+- i += 2;
+- }
+- nk = i / 2;
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":673
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def set_option(self, prop, value=True):
++ * """Wraps: mpv_set_option"""
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":674
++ *
++ * @_errors
++ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_option"""
++ * assert self._ctx
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 674, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- else {
+- kwtuple = NULL;
+- k = NULL;
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":695
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def initialize(self):
++ * """Wraps: mpv_initialize"""
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":696
++ *
++ * @_errors
++ * def initialize(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_initialize"""
++ * assert self._ctx
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- closure = PyFunction_GET_CLOSURE(func);
+-#if PY_MAJOR_VERSION >= 3
+- kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+-#endif
+- if (argdefs != NULL) {
+- d = &PyTuple_GET_ITEM(argdefs, 0);
+- nd = Py_SIZE(argdefs);
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":748
++ * self.callbackthread.start()
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def observe_property(self, prop, data=None):
++ * """Wraps: mpv_observe_property"""
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":749
++ *
++ * @_errors
++ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_observe_property"""
++ * assert self._ctx
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- else {
+- d = NULL;
+- nd = 0;
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":770
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def unobserve_property(self, data):
++ * """Wraps: mpv_unobserve_property"""
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":771
++ *
++ * @_errors
++ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_unobserve_property"""
++ * assert self._ctx
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+-#if PY_MAJOR_VERSION >= 3
+- result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
+- args, (int)nargs,
+- k, (int)nk,
+- d, (int)nd, kwdefs, closure);
+-#else
+- result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
+- args, (int)nargs,
+- k, (int)nk,
+- d, (int)nd, closure);
+-#endif
+- Py_XDECREF(kwtuple);
+-done:
+- Py_LeaveRecursiveCall();
+- return result;
+-}
+-#endif
+-#endif
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+-/* PyCFunctionFastCall */
+-#if CYTHON_FAST_PYCCALL
+-static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
+- PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
+- PyCFunction meth = PyCFunction_GET_FUNCTION(func);
+- PyObject *self = PyCFunction_GET_SELF(func);
+- int flags = PyCFunction_GET_FLAGS(func);
+- assert(PyCFunction_Check(func));
+- assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
+- assert(nargs >= 0);
+- assert(nargs == 0 || args != NULL);
+- /* _PyCFunction_FastCallDict() must not be called with an exception set,
+- because it may clear it (directly or indirectly) and so the
+- caller loses its exception */
+- assert(!PyErr_Occurred());
+- if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
+- return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
+- } else {
+- return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
++ /* "vidcutter/libs/pympv/mpv.pyx":938
++ *
++ * cdef class RenderContext(object):
++ * API_OPENGL = "opengl" # <<<<<<<<<<<<<<
++ * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME
++ *
++ */
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":939
++ * cdef class RenderContext(object):
++ * API_OPENGL = "opengl"
++ * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME # <<<<<<<<<<<<<<
++ *
++ * cdef:
++ */
++ __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 939, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1009
++ * self.inited = True
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def set_icc_profile(self, icc_blob):
++ * cdef:
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1009, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1010
++ *
++ * @_errors
++ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
++ }
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1009, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1028
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def set_ambient_light(self, lux):
++ * cdef:
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1029
++ *
++ * @_errors
++ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+-}
+-#endif
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+-/* PyObjectCall */
+-#if CYTHON_COMPILING_IN_CPYTHON
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+- PyObject *result;
+- ternaryfunc call = func->ob_type->tp_call;
+- if (unlikely(!call))
+- return PyObject_Call(func, arg, kw);
+- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+- return NULL;
+- result = (*call)(func, arg, kw);
+- Py_LeaveRecursiveCall();
+- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+- PyErr_SetString(
+- PyExc_SystemError,
+- "NULL result without error in PyObject_Call");
+- }
+- return result;
+-}
+-#endif
++ /* "vidcutter/libs/pympv/mpv.pyx":1068
++ * return ret
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def render(self,
++ * opengl_fbo=None,
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
+
+-/* GetTopmostException */
+-#if CYTHON_USE_EXC_INFO_STACK
+-static _PyErr_StackItem *
+-__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
+-{
+- _PyErr_StackItem *exc_info = tstate->exc_info;
+- while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
+- exc_info->previous_item != NULL)
+- {
+- exc_info = exc_info->previous_item;
++ /* "vidcutter/libs/pympv/mpv.pyx":1069
++ *
++ * @_errors
++ * def render(self, # <<<<<<<<<<<<<<
++ * opengl_fbo=None,
++ * flip_y=False,
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- return exc_info;
+-}
+-#endif
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+-/* SaveResetException */
+-#if CYTHON_FAST_THREAD_STATE
+-static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+- #if CYTHON_USE_EXC_INFO_STACK
+- _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
+- *type = exc_info->exc_type;
+- *value = exc_info->exc_value;
+- *tb = exc_info->exc_traceback;
+- #else
+- *type = tstate->exc_type;
+- *value = tstate->exc_value;
+- *tb = tstate->exc_traceback;
+- #endif
+- Py_XINCREF(*type);
+- Py_XINCREF(*value);
+- Py_XINCREF(*tb);
+-}
+-static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- #if CYTHON_USE_EXC_INFO_STACK
+- _PyErr_StackItem *exc_info = tstate->exc_info;
+- tmp_type = exc_info->exc_type;
+- tmp_value = exc_info->exc_value;
+- tmp_tb = exc_info->exc_traceback;
+- exc_info->exc_type = type;
+- exc_info->exc_value = value;
+- exc_info->exc_traceback = tb;
+- #else
+- tmp_type = tstate->exc_type;
+- tmp_value = tstate->exc_value;
+- tmp_tb = tstate->exc_traceback;
+- tstate->exc_type = type;
+- tstate->exc_value = value;
+- tstate->exc_traceback = tb;
+- #endif
+- Py_XDECREF(tmp_type);
+- Py_XDECREF(tmp_value);
+- Py_XDECREF(tmp_tb);
+-}
+-#endif
++ /* "vidcutter/libs/pympv/mpv.pyx":1132
++ * init_params, *args, **kwargs)
++ *
++ * class CallbackThread(Thread): # <<<<<<<<<<<<<<
++ * def __init__(self):
++ * Thread.__init__(self)
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_GIVEREF(__pyx_t_7);
++ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
++ __pyx_t_7 = 0;
++ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
+
+-/* PyErrExceptionMatches */
+-#if CYTHON_FAST_THREAD_STATE
+-static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
+- Py_ssize_t i, n;
+- n = PyTuple_GET_SIZE(tuple);
+-#if PY_MAJOR_VERSION >= 3
+- for (i=0; i<n; i++) {
+- if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
+- }
+-#endif
+- for (i=0; i<n; i++) {
+- if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
+- }
+- return 0;
+-}
+-static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
+- PyObject *exc_type = tstate->curexc_type;
+- if (exc_type == err) return 1;
+- if (unlikely(!exc_type)) return 0;
+- if (unlikely(PyTuple_Check(err)))
+- return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
+- return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
+-}
+-#endif
++ /* "vidcutter/libs/pympv/mpv.pyx":1133
++ *
++ * class CallbackThread(Thread):
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * Thread.__init__(self)
++ * self.daemon = True
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1141
++ * self.isshutdown = False
++ *
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * self.isshutdown = True
++ * self.callback = None
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1146
++ * self.lock.release()
++ *
++ * def call(self): # <<<<<<<<<<<<<<
++ * self.lock.release()
++ *
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1149
++ * self.lock.release()
++ *
++ * def set(self, callback): # <<<<<<<<<<<<<<
++ * self.callback = callback
++ *
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1152
++ * self.callback = callback
++ *
++ * def run(self): # <<<<<<<<<<<<<<
++ * while not self.isshutdown:
++ * self.lock.acquire(True)
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1157
++ * self.mpv_callback(self.callback) if self.callback else None
++ *
++ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
++ * try:
++ * callback()
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1132
++ * init_params, *args, **kwargs)
++ *
++ * class CallbackThread(Thread): # <<<<<<<<<<<<<<
++ * def __init__(self):
++ * Thread.__init__(self)
++ */
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* GetException */
+-#if CYTHON_FAST_THREAD_STATE
+-static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
+-#else
+-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
+-#endif
+-{
+- PyObject *local_type, *local_value, *local_tb;
+-#if CYTHON_FAST_THREAD_STATE
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- local_type = tstate->curexc_type;
+- local_value = tstate->curexc_value;
+- local_tb = tstate->curexc_traceback;
+- tstate->curexc_type = 0;
+- tstate->curexc_value = 0;
+- tstate->curexc_traceback = 0;
+-#else
+- PyErr_Fetch(&local_type, &local_value, &local_tb);
+-#endif
+- PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+-#if CYTHON_FAST_THREAD_STATE
+- if (unlikely(tstate->curexc_type))
+-#else
+- if (unlikely(PyErr_Occurred()))
+-#endif
+- goto bad;
+- #if PY_MAJOR_VERSION >= 3
+- if (local_tb) {
+- if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+- goto bad;
+- }
+- #endif
+- Py_XINCREF(local_tb);
+- Py_XINCREF(local_type);
+- Py_XINCREF(local_value);
+- *type = local_type;
+- *value = local_value;
+- *tb = local_tb;
+-#if CYTHON_FAST_THREAD_STATE
+- #if CYTHON_USE_EXC_INFO_STACK
+- {
+- _PyErr_StackItem *exc_info = tstate->exc_info;
+- tmp_type = exc_info->exc_type;
+- tmp_value = exc_info->exc_value;
+- tmp_tb = exc_info->exc_traceback;
+- exc_info->exc_type = local_type;
+- exc_info->exc_value = local_value;
+- exc_info->exc_traceback = local_tb;
+- }
+- #else
+- tmp_type = tstate->exc_type;
+- tmp_value = tstate->exc_value;
+- tmp_tb = tstate->exc_traceback;
+- tstate->exc_type = local_type;
+- tstate->exc_value = local_value;
+- tstate->exc_traceback = local_tb;
+- #endif
+- Py_XDECREF(tmp_type);
+- Py_XDECREF(tmp_value);
+- Py_XDECREF(tmp_tb);
+-#else
+- PyErr_SetExcInfo(local_type, local_value, local_tb);
+-#endif
+- return 0;
+-bad:
+- *type = 0;
+- *value = 0;
+- *tb = 0;
+- Py_XDECREF(local_type);
+- Py_XDECREF(local_value);
+- Py_XDECREF(local_tb);
+- return -1;
+-}
++ /* "(tree fragment)":11
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ */
++ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_LogMessage, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* PyObjectCallMethO */
+-#if CYTHON_COMPILING_IN_CPYTHON
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
+- PyObject *self, *result;
+- PyCFunction cfunc;
+- cfunc = PyCFunction_GET_FUNCTION(func);
+- self = PyCFunction_GET_SELF(func);
+- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+- return NULL;
+- result = cfunc(self, arg);
+- Py_LeaveRecursiveCall();
+- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+- PyErr_SetString(
+- PyExc_SystemError,
+- "NULL result without error in PyObject_Call");
+- }
+- return result;
+-}
+-#endif
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Property, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* PyObjectCallOneArg */
+-#if CYTHON_COMPILING_IN_CPYTHON
+-static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+- PyObject *result;
+- PyObject *args = PyTuple_New(1);
+- if (unlikely(!args)) return NULL;
+- Py_INCREF(arg);
+- PyTuple_SET_ITEM(args, 0, arg);
+- result = __Pyx_PyObject_Call(func, args, NULL);
+- Py_DECREF(args);
+- return result;
+-}
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+-#if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(func)) {
+- return __Pyx_PyFunction_FastCall(func, &arg, 1);
+- }
+-#endif
+- if (likely(PyCFunction_Check(func))) {
+- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
+- return __Pyx_PyObject_CallMethO(func, arg);
+-#if CYTHON_FAST_PYCCALL
+- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
+- return __Pyx_PyCFunction_FastCall(func, &arg, 1);
+-#endif
+- }
+- }
+- return __Pyx__PyObject_CallOneArg(func, arg);
+-}
+-#else
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+- PyObject *result;
+- PyObject *args = PyTuple_Pack(1, arg);
+- if (unlikely(!args)) return NULL;
+- result = __Pyx_PyObject_Call(func, args, NULL);
+- Py_DECREF(args);
+- return result;
+-}
+-#endif
++ /* "(tree fragment)":11
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ */
++ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Event, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* PyErrFetchRestore */
+-#if CYTHON_FAST_THREAD_STATE
+-static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- tmp_type = tstate->curexc_type;
+- tmp_value = tstate->curexc_value;
+- tmp_tb = tstate->curexc_traceback;
+- tstate->curexc_type = type;
+- tstate->curexc_value = value;
+- tstate->curexc_traceback = tb;
+- Py_XDECREF(tmp_type);
+- Py_XDECREF(tmp_value);
+- Py_XDECREF(tmp_tb);
+-}
+-static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+- *type = tstate->curexc_type;
+- *value = tstate->curexc_value;
+- *tb = tstate->curexc_traceback;
+- tstate->curexc_type = 0;
+- tstate->curexc_value = 0;
+- tstate->curexc_traceback = 0;
+-}
+-#endif
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* GetAttr */
+-static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
+-#if CYTHON_USE_TYPE_SLOTS
+-#if PY_MAJOR_VERSION >= 3
+- if (likely(PyUnicode_Check(n)))
+-#else
+- if (likely(PyString_Check(n)))
+-#endif
+- return __Pyx_PyObject_GetAttrStr(o, n);
+-#endif
+- return PyObject_GetAttr(o, n);
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":1
++ * # This program is free software: you can redistribute it and/or modify # <<<<<<<<<<<<<<
++ * # it under the terms of the GNU General Public License as published by
++ * # the Free Software Foundation, either version 3 of the License, or
++ */
++ __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* GetAttr3 */
+-static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
+- return NULL;
+- __Pyx_PyErr_Clear();
+- Py_INCREF(d);
+- return d;
++ /*--- Wrapped vars code ---*/
++
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ if (__pyx_m) {
++ if (__pyx_d) {
++ __Pyx_AddTraceback("init vidcutter.libs.mpv", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ }
++ Py_CLEAR(__pyx_m);
++ } else if (!PyErr_Occurred()) {
++ PyErr_SetString(PyExc_ImportError, "init vidcutter.libs.mpv");
++ }
++ __pyx_L0:;
++ __Pyx_RefNannyFinishContext();
++ #if CYTHON_PEP489_MULTI_PHASE_INIT
++ return (__pyx_m != NULL) ? 0 : -1;
++ #elif PY_MAJOR_VERSION >= 3
++ return __pyx_m;
++ #else
++ return;
++ #endif
+ }
+-static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
+- PyObject *r = __Pyx_GetAttr(o, n);
+- return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
++
++/* --- Runtime support code --- */
++/* Refnanny */
++#if CYTHON_REFNANNY
++static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
++ PyObject *m = NULL, *p = NULL;
++ void *r = NULL;
++ m = PyImport_ImportModule(modname);
++ if (!m) goto end;
++ p = PyObject_GetAttrString(m, "RefNannyAPI");
++ if (!p) goto end;
++ r = PyLong_AsVoidPtr(p);
++end:
++ Py_XDECREF(p);
++ Py_XDECREF(m);
++ return (__Pyx_RefNannyAPIStruct *)r;
+ }
++#endif
+
+-/* PyObjectCall2Args */
+-static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
+- PyObject *args, *result = NULL;
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(function)) {
+- PyObject *args[2] = {arg1, arg2};
+- return __Pyx_PyFunction_FastCall(function, args, 2);
+- }
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(function)) {
+- PyObject *args[2] = {arg1, arg2};
+- return __Pyx_PyCFunction_FastCall(function, args, 2);
+- }
+- #endif
+- args = PyTuple_New(2);
+- if (unlikely(!args)) goto done;
+- Py_INCREF(arg1);
+- PyTuple_SET_ITEM(args, 0, arg1);
+- Py_INCREF(arg2);
+- PyTuple_SET_ITEM(args, 1, arg2);
+- Py_INCREF(function);
+- result = __Pyx_PyObject_Call(function, args, NULL);
+- Py_DECREF(args);
+- Py_DECREF(function);
+-done:
+- return result;
++/* PyObjectGetAttrStr */
++#if CYTHON_USE_TYPE_SLOTS
++static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
++ PyTypeObject* tp = Py_TYPE(obj);
++ if (likely(tp->tp_getattro))
++ return tp->tp_getattro(obj, attr_name);
++#if PY_MAJOR_VERSION < 3
++ if (likely(tp->tp_getattr))
++ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
++#endif
++ return PyObject_GetAttr(obj, attr_name);
+ }
+-
+-/* PyObjectGetMethod */
+-static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
+- PyObject *attr;
+-#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
+- PyTypeObject *tp = Py_TYPE(obj);
+- PyObject *descr;
+- descrgetfunc f = NULL;
+- PyObject **dictptr, *dict;
+- int meth_found = 0;
+- assert (*method == NULL);
+- if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
+- attr = __Pyx_PyObject_GetAttrStr(obj, name);
+- goto try_unpack;
+- }
+- if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
+- return 0;
+- }
+- descr = _PyType_Lookup(tp, name);
+- if (likely(descr != NULL)) {
+- Py_INCREF(descr);
+-#if PY_MAJOR_VERSION >= 3
+- #ifdef __Pyx_CyFunction_USED
+- if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
+- #else
+- if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
+- #endif
+-#else
+- #ifdef __Pyx_CyFunction_USED
+- if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
+- #else
+- if (likely(PyFunction_Check(descr)))
+- #endif
+ #endif
+- {
+- meth_found = 1;
+- } else {
+- f = Py_TYPE(descr)->tp_descr_get;
+- if (f != NULL && PyDescr_IsData(descr)) {
+- attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
+- Py_DECREF(descr);
+- goto try_unpack;
+- }
+- }
+- }
+- dictptr = _PyObject_GetDictPtr(obj);
+- if (dictptr != NULL && (dict = *dictptr) != NULL) {
+- Py_INCREF(dict);
+- attr = __Pyx_PyDict_GetItemStr(dict, name);
+- if (attr != NULL) {
+- Py_INCREF(attr);
+- Py_DECREF(dict);
+- Py_XDECREF(descr);
+- goto try_unpack;
+- }
+- Py_DECREF(dict);
+- }
+- if (meth_found) {
+- *method = descr;
+- return 1;
+- }
+- if (f != NULL) {
+- attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
+- Py_DECREF(descr);
+- goto try_unpack;
+- }
+- if (descr != NULL) {
+- *method = descr;
+- return 0;
+- }
+- PyErr_Format(PyExc_AttributeError,
++
++/* GetBuiltinName */
++static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
++ PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
++ if (unlikely(!result)) {
++ PyErr_Format(PyExc_NameError,
+ #if PY_MAJOR_VERSION >= 3
+- "'%.50s' object has no attribute '%U'",
+- tp->tp_name, name);
+-#else
+- "'%.50s' object has no attribute '%.400s'",
+- tp->tp_name, PyString_AS_STRING(name));
+-#endif
+- return 0;
++ "name '%U' is not defined", name);
+ #else
+- attr = __Pyx_PyObject_GetAttrStr(obj, name);
+- goto try_unpack;
++ "name '%.200s' is not defined", PyString_AS_STRING(name));
+ #endif
+-try_unpack:
+-#if CYTHON_UNPACK_METHODS
+- if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
+- PyObject *function = PyMethod_GET_FUNCTION(attr);
+- Py_INCREF(function);
+- Py_DECREF(attr);
+- *method = function;
+- return 1;
+ }
+-#endif
+- *method = attr;
+- return 0;
+-}
+-
+-/* PyObjectCallMethod1 */
+-static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
+- PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
+- Py_DECREF(method);
+ return result;
+ }
+-static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
+- PyObject *method = NULL, *result;
+- int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
+- if (likely(is_method)) {
+- result = __Pyx_PyObject_Call2Args(method, obj, arg);
+- Py_DECREF(method);
+- return result;
+- }
+- if (unlikely(!method)) return NULL;
+- return __Pyx__PyObject_CallMethod1(method, arg);
+-}
+
+-/* append */
+-static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+- if (likely(PyList_CheckExact(L))) {
+- if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
+- } else {
+- PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
+- if (unlikely(!retval))
+- return -1;
+- Py_DECREF(retval);
+- }
+- return 0;
++/* PyDictVersioning */
++#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
++static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
++ PyObject *dict = Py_TYPE(obj)->tp_dict;
++ return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
+ }
+-
+-/* PyObjectCallNoArg */
++static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
++ PyObject **dictptr = NULL;
++ Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
++ if (offset) {
+ #if CYTHON_COMPILING_IN_CPYTHON
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
+-#if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(func)) {
+- return __Pyx_PyFunction_FastCall(func, NULL, 0);
+- }
+-#endif
+-#ifdef __Pyx_CyFunction_USED
+- if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
++ dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
+ #else
+- if (likely(PyCFunction_Check(func)))
++ dictptr = _PyObject_GetDictPtr(obj);
+ #endif
+- {
+- if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
+- return __Pyx_PyObject_CallMethO(func, NULL);
+- }
+ }
+- return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
++ return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
++}
++static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
++ PyObject *dict = Py_TYPE(obj)->tp_dict;
++ if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
++ return 0;
++ return obj_dict_version == __Pyx_get_object_dict_version(obj);
+ }
+ #endif
+
+-/* GetItemInt */
+-static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+- PyObject *r;
+- if (!j) return NULL;
+- r = PyObject_GetItem(o, j);
+- Py_DECREF(j);
+- return r;
+-}
+-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+- CYTHON_NCP_UNUSED int wraparound,
+- CYTHON_NCP_UNUSED int boundscheck) {
+-#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- Py_ssize_t wrapped_i = i;
+- if (wraparound & unlikely(i < 0)) {
+- wrapped_i += PyList_GET_SIZE(o);
++/* GetModuleGlobalName */
++#if CYTHON_USE_DICT_VERSIONS
++static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
++#else
++static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
++#endif
++{
++ PyObject *result;
++#if !CYTHON_AVOID_BORROWED_REFS
++#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
++ result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
++ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
++ if (likely(result)) {
++ return __Pyx_NewRef(result);
++ } else if (unlikely(PyErr_Occurred())) {
++ return NULL;
+ }
+- if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
+- PyObject *r = PyList_GET_ITEM(o, wrapped_i);
+- Py_INCREF(r);
+- return r;
++#else
++ result = PyDict_GetItem(__pyx_d, name);
++ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
++ if (likely(result)) {
++ return __Pyx_NewRef(result);
++ }
++#endif
++#else
++ result = PyObject_GetItem(__pyx_d, name);
++ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
++ if (likely(result)) {
++ return __Pyx_NewRef(result);
+ }
+- return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+-#else
+- return PySequence_GetItem(o, i);
++ PyErr_Clear();
+ #endif
++ return __Pyx_GetBuiltinName(name);
+ }
+-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+- CYTHON_NCP_UNUSED int wraparound,
+- CYTHON_NCP_UNUSED int boundscheck) {
+-#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- Py_ssize_t wrapped_i = i;
+- if (wraparound & unlikely(i < 0)) {
+- wrapped_i += PyTuple_GET_SIZE(o);
++
++/* PyFunctionFastCall */
++#if CYTHON_FAST_PYCALL
++static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
++ PyObject *globals) {
++ PyFrameObject *f;
++ PyThreadState *tstate = __Pyx_PyThreadState_Current;
++ PyObject **fastlocals;
++ Py_ssize_t i;
++ PyObject *result;
++ assert(globals != NULL);
++ /* XXX Perhaps we should create a specialized
++ PyFrame_New() that doesn't take locals, but does
++ take builtins without sanity checking them.
++ */
++ assert(tstate != NULL);
++ f = PyFrame_New(tstate, co, globals, NULL);
++ if (f == NULL) {
++ return NULL;
+ }
+- if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
+- PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
+- Py_INCREF(r);
+- return r;
++ fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
++ for (i = 0; i < na; i++) {
++ Py_INCREF(*args);
++ fastlocals[i] = *args++;
+ }
+- return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+-#else
+- return PySequence_GetItem(o, i);
+-#endif
++ result = PyEval_EvalFrameEx(f,0);
++ ++tstate->recursion_depth;
++ Py_DECREF(f);
++ --tstate->recursion_depth;
++ return result;
+ }
+-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
+- CYTHON_NCP_UNUSED int wraparound,
+- CYTHON_NCP_UNUSED int boundscheck) {
+-#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
+- if (is_list || PyList_CheckExact(o)) {
+- Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+- if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
+- PyObject *r = PyList_GET_ITEM(o, n);
+- Py_INCREF(r);
+- return r;
++#if 1 || PY_VERSION_HEX < 0x030600B1
++static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
++ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
++ PyObject *globals = PyFunction_GET_GLOBALS(func);
++ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
++ PyObject *closure;
++#if PY_MAJOR_VERSION >= 3
++ PyObject *kwdefs;
++#endif
++ PyObject *kwtuple, **k;
++ PyObject **d;
++ Py_ssize_t nd;
++ Py_ssize_t nk;
++ PyObject *result;
++ assert(kwargs == NULL || PyDict_Check(kwargs));
++ nk = kwargs ? PyDict_Size(kwargs) : 0;
++ if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
++ return NULL;
++ }
++ if (
++#if PY_MAJOR_VERSION >= 3
++ co->co_kwonlyargcount == 0 &&
++#endif
++ likely(kwargs == NULL || nk == 0) &&
++ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
++ if (argdefs == NULL && co->co_argcount == nargs) {
++ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
++ goto done;
++ }
++ else if (nargs == 0 && argdefs != NULL
++ && co->co_argcount == Py_SIZE(argdefs)) {
++ /* function called with no arguments, but all parameters have
++ a default value: use default values as arguments .*/
++ args = &PyTuple_GET_ITEM(argdefs, 0);
++ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
++ goto done;
+ }
+ }
+- else if (PyTuple_CheckExact(o)) {
+- Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+- if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
+- PyObject *r = PyTuple_GET_ITEM(o, n);
+- Py_INCREF(r);
+- return r;
++ if (kwargs != NULL) {
++ Py_ssize_t pos, i;
++ kwtuple = PyTuple_New(2 * nk);
++ if (kwtuple == NULL) {
++ result = NULL;
++ goto done;
+ }
+- } else {
+- PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+- if (likely(m && m->sq_item)) {
+- if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+- Py_ssize_t l = m->sq_length(o);
+- if (likely(l >= 0)) {
+- i += l;
+- } else {
+- if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+- return NULL;
+- PyErr_Clear();
+- }
+- }
+- return m->sq_item(o, i);
++ k = &PyTuple_GET_ITEM(kwtuple, 0);
++ pos = i = 0;
++ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
++ Py_INCREF(k[i]);
++ Py_INCREF(k[i+1]);
++ i += 2;
+ }
++ nk = i / 2;
+ }
+-#else
+- if (is_list || PySequence_Check(o)) {
+- return PySequence_GetItem(o, i);
++ else {
++ kwtuple = NULL;
++ k = NULL;
+ }
++ closure = PyFunction_GET_CLOSURE(func);
++#if PY_MAJOR_VERSION >= 3
++ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+ #endif
+- return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+-}
+-
+-/* DelItemInt */
+-static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
+- int r;
+- if (!j) return -1;
+- r = PyObject_DelItem(o, j);
+- Py_DECREF(j);
+- return r;
+-}
+-static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
+- CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) {
+-#if !CYTHON_USE_TYPE_SLOTS
+- if (is_list || PySequence_Check(o)) {
+- return PySequence_DelItem(o, i);
++ if (argdefs != NULL) {
++ d = &PyTuple_GET_ITEM(argdefs, 0);
++ nd = Py_SIZE(argdefs);
++ }
++ else {
++ d = NULL;
++ nd = 0;
+ }
++#if PY_MAJOR_VERSION >= 3
++ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
++ args, (int)nargs,
++ k, (int)nk,
++ d, (int)nd, kwdefs, closure);
+ #else
+- PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+- if (likely(m && m->sq_ass_item)) {
+- if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+- Py_ssize_t l = m->sq_length(o);
+- if (likely(l >= 0)) {
+- i += l;
+- } else {
+- if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+- return -1;
+- PyErr_Clear();
+- }
+- }
+- return m->sq_ass_item(o, i, (PyObject *)NULL);
++ result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
++ args, (int)nargs,
++ k, (int)nk,
++ d, (int)nd, closure);
++#endif
++ Py_XDECREF(kwtuple);
++done:
++ Py_LeaveRecursiveCall();
++ return result;
++}
++#endif
++#endif
++
++/* PyCFunctionFastCall */
++#if CYTHON_FAST_PYCCALL
++static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
++ PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
++ PyCFunction meth = PyCFunction_GET_FUNCTION(func);
++ PyObject *self = PyCFunction_GET_SELF(func);
++ int flags = PyCFunction_GET_FLAGS(func);
++ assert(PyCFunction_Check(func));
++ assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
++ assert(nargs >= 0);
++ assert(nargs == 0 || args != NULL);
++ /* _PyCFunction_FastCallDict() must not be called with an exception set,
++ because it may clear it (directly or indirectly) and so the
++ caller loses its exception */
++ assert(!PyErr_Occurred());
++ if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
++ return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
++ } else {
++ return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
+ }
++}
+ #endif
+- return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
++
++/* PyObjectCall */
++#if CYTHON_COMPILING_IN_CPYTHON
++static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
++ PyObject *result;
++ ternaryfunc call = Py_TYPE(func)->tp_call;
++ if (unlikely(!call))
++ return PyObject_Call(func, arg, kw);
++ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
++ return NULL;
++ result = (*call)(func, arg, kw);
++ Py_LeaveRecursiveCall();
++ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
++ PyErr_SetString(
++ PyExc_SystemError,
++ "NULL result without error in PyObject_Call");
++ }
++ return result;
+ }
++#endif
+
+-/* KeywordStringCheck */
+-static int __Pyx_CheckKeywordStrings(
+- PyObject *kwdict,
+- const char* function_name,
+- int kw_allowed)
++/* GetTopmostException */
++#if CYTHON_USE_EXC_INFO_STACK
++static _PyErr_StackItem *
++__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
+ {
+- PyObject* key = 0;
+- Py_ssize_t pos = 0;
+-#if CYTHON_COMPILING_IN_PYPY
+- if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
+- goto invalid_keyword;
+- return 1;
+-#else
+- while (PyDict_Next(kwdict, &pos, &key, 0)) {
+- #if PY_MAJOR_VERSION < 3
+- if (unlikely(!PyString_Check(key)))
+- #endif
+- if (unlikely(!PyUnicode_Check(key)))
+- goto invalid_keyword_type;
++ _PyErr_StackItem *exc_info = tstate->exc_info;
++ while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
++ exc_info->previous_item != NULL)
++ {
++ exc_info = exc_info->previous_item;
+ }
+- if ((!kw_allowed) && unlikely(key))
+- goto invalid_keyword;
+- return 1;
+-invalid_keyword_type:
+- PyErr_Format(PyExc_TypeError,
+- "%.200s() keywords must be strings", function_name);
+- return 0;
++ return exc_info;
++}
+ #endif
+-invalid_keyword:
+- PyErr_Format(PyExc_TypeError,
+- #if PY_MAJOR_VERSION < 3
+- "%.200s() got an unexpected keyword argument '%.200s'",
+- function_name, PyString_AsString(key));
++
++/* SaveResetException */
++#if CYTHON_FAST_THREAD_STATE
++static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
++ #if CYTHON_USE_EXC_INFO_STACK
++ _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
++ *type = exc_info->exc_type;
++ *value = exc_info->exc_value;
++ *tb = exc_info->exc_traceback;
+ #else
+- "%s() got an unexpected keyword argument '%U'",
+- function_name, key);
++ *type = tstate->exc_type;
++ *value = tstate->exc_value;
++ *tb = tstate->exc_traceback;
+ #endif
+- return 0;
++ Py_XINCREF(*type);
++ Py_XINCREF(*value);
++ Py_XINCREF(*tb);
+ }
+-
+-/* None */
+-static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
+- PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
++static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ #if CYTHON_USE_EXC_INFO_STACK
++ _PyErr_StackItem *exc_info = tstate->exc_info;
++ tmp_type = exc_info->exc_type;
++ tmp_value = exc_info->exc_value;
++ tmp_tb = exc_info->exc_traceback;
++ exc_info->exc_type = type;
++ exc_info->exc_value = value;
++ exc_info->exc_traceback = tb;
++ #else
++ tmp_type = tstate->exc_type;
++ tmp_value = tstate->exc_value;
++ tmp_tb = tstate->exc_traceback;
++ tstate->exc_type = type;
++ tstate->exc_value = value;
++ tstate->exc_traceback = tb;
++ #endif
++ Py_XDECREF(tmp_type);
++ Py_XDECREF(tmp_value);
++ Py_XDECREF(tmp_tb);
+ }
++#endif
+
+-/* RaiseException */
+-#if PY_MAJOR_VERSION < 3
+-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+- CYTHON_UNUSED PyObject *cause) {
+- __Pyx_PyThreadState_declare
+- Py_XINCREF(type);
+- if (!value || value == Py_None)
+- value = NULL;
+- else
+- Py_INCREF(value);
+- if (!tb || tb == Py_None)
+- tb = NULL;
+- else {
+- Py_INCREF(tb);
+- if (!PyTraceBack_Check(tb)) {
+- PyErr_SetString(PyExc_TypeError,
+- "raise: arg 3 must be a traceback or None");
+- goto raise_error;
+- }
++/* PyErrExceptionMatches */
++#if CYTHON_FAST_THREAD_STATE
++static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
++ Py_ssize_t i, n;
++ n = PyTuple_GET_SIZE(tuple);
++#if PY_MAJOR_VERSION >= 3
++ for (i=0; i<n; i++) {
++ if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
+ }
+- if (PyType_Check(type)) {
+-#if CYTHON_COMPILING_IN_PYPY
+- if (!value) {
+- Py_INCREF(Py_None);
+- value = Py_None;
+- }
+ #endif
+- PyErr_NormalizeException(&type, &value, &tb);
+- } else {
+- if (value) {
+- PyErr_SetString(PyExc_TypeError,
+- "instance exception may not have a separate value");
+- goto raise_error;
+- }
+- value = type;
+- type = (PyObject*) Py_TYPE(type);
+- Py_INCREF(type);
+- if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+- PyErr_SetString(PyExc_TypeError,
+- "raise: exception class must be a subclass of BaseException");
+- goto raise_error;
+- }
++ for (i=0; i<n; i++) {
++ if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
+ }
+- __Pyx_PyThreadState_assign
+- __Pyx_ErrRestore(type, value, tb);
+- return;
+-raise_error:
+- Py_XDECREF(value);
+- Py_XDECREF(type);
+- Py_XDECREF(tb);
+- return;
++ return 0;
++}
++static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
++ PyObject *exc_type = tstate->curexc_type;
++ if (exc_type == err) return 1;
++ if (unlikely(!exc_type)) return 0;
++ if (unlikely(PyTuple_Check(err)))
++ return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
++ return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
+ }
++#endif
++
++/* GetException */
++#if CYTHON_FAST_THREAD_STATE
++static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
+ #else
+-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+- PyObject* owned_instance = NULL;
+- if (tb == Py_None) {
+- tb = 0;
+- } else if (tb && !PyTraceBack_Check(tb)) {
+- PyErr_SetString(PyExc_TypeError,
+- "raise: arg 3 must be a traceback or None");
++static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
++#endif
++{
++ PyObject *local_type, *local_value, *local_tb;
++#if CYTHON_FAST_THREAD_STATE
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ local_type = tstate->curexc_type;
++ local_value = tstate->curexc_value;
++ local_tb = tstate->curexc_traceback;
++ tstate->curexc_type = 0;
++ tstate->curexc_value = 0;
++ tstate->curexc_traceback = 0;
++#else
++ PyErr_Fetch(&local_type, &local_value, &local_tb);
++#endif
++ PyErr_NormalizeException(&local_type, &local_value, &local_tb);
++#if CYTHON_FAST_THREAD_STATE
++ if (unlikely(tstate->curexc_type))
++#else
++ if (unlikely(PyErr_Occurred()))
++#endif
+ goto bad;
+- }
+- if (value == Py_None)
+- value = 0;
+- if (PyExceptionInstance_Check(type)) {
+- if (value) {
+- PyErr_SetString(PyExc_TypeError,
+- "instance exception may not have a separate value");
++ #if PY_MAJOR_VERSION >= 3
++ if (local_tb) {
++ if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+ goto bad;
+- }
+- value = type;
+- type = (PyObject*) Py_TYPE(value);
+- } else if (PyExceptionClass_Check(type)) {
+- PyObject *instance_class = NULL;
+- if (value && PyExceptionInstance_Check(value)) {
+- instance_class = (PyObject*) Py_TYPE(value);
+- if (instance_class != type) {
+- int is_subclass = PyObject_IsSubclass(instance_class, type);
+- if (!is_subclass) {
+- instance_class = NULL;
+- } else if (unlikely(is_subclass == -1)) {
+- goto bad;
+- } else {
+- type = instance_class;
+- }
+- }
+- }
+- if (!instance_class) {
+- PyObject *args;
+- if (!value)
+- args = PyTuple_New(0);
+- else if (PyTuple_Check(value)) {
+- Py_INCREF(value);
+- args = value;
+- } else
+- args = PyTuple_Pack(1, value);
+- if (!args)
+- goto bad;
+- owned_instance = PyObject_Call(type, args, NULL);
+- Py_DECREF(args);
+- if (!owned_instance)
+- goto bad;
+- value = owned_instance;
+- if (!PyExceptionInstance_Check(value)) {
+- PyErr_Format(PyExc_TypeError,
+- "calling %R should have returned an instance of "
+- "BaseException, not %R",
+- type, Py_TYPE(value));
+- goto bad;
+- }
+- }
+- } else {
+- PyErr_SetString(PyExc_TypeError,
+- "raise: exception class must be a subclass of BaseException");
+- goto bad;
+ }
+- if (cause) {
+- PyObject *fixed_cause;
+- if (cause == Py_None) {
+- fixed_cause = NULL;
+- } else if (PyExceptionClass_Check(cause)) {
+- fixed_cause = PyObject_CallObject(cause, NULL);
+- if (fixed_cause == NULL)
+- goto bad;
+- } else if (PyExceptionInstance_Check(cause)) {
+- fixed_cause = cause;
+- Py_INCREF(fixed_cause);
+- } else {
+- PyErr_SetString(PyExc_TypeError,
+- "exception causes must derive from "
+- "BaseException");
+- goto bad;
++ #endif
++ Py_XINCREF(local_tb);
++ Py_XINCREF(local_type);
++ Py_XINCREF(local_value);
++ *type = local_type;
++ *value = local_value;
++ *tb = local_tb;
++#if CYTHON_FAST_THREAD_STATE
++ #if CYTHON_USE_EXC_INFO_STACK
++ {
++ _PyErr_StackItem *exc_info = tstate->exc_info;
++ tmp_type = exc_info->exc_type;
++ tmp_value = exc_info->exc_value;
++ tmp_tb = exc_info->exc_traceback;
++ exc_info->exc_type = local_type;
++ exc_info->exc_value = local_value;
++ exc_info->exc_traceback = local_tb;
++ }
++ #else
++ tmp_type = tstate->exc_type;
++ tmp_value = tstate->exc_value;
++ tmp_tb = tstate->exc_traceback;
++ tstate->exc_type = local_type;
++ tstate->exc_value = local_value;
++ tstate->exc_traceback = local_tb;
++ #endif
++ Py_XDECREF(tmp_type);
++ Py_XDECREF(tmp_value);
++ Py_XDECREF(tmp_tb);
++#else
++ PyErr_SetExcInfo(local_type, local_value, local_tb);
++#endif
++ return 0;
++bad:
++ *type = 0;
++ *value = 0;
++ *tb = 0;
++ Py_XDECREF(local_type);
++ Py_XDECREF(local_value);
++ Py_XDECREF(local_tb);
++ return -1;
++}
++
++/* PyObjectCallMethO */
++#if CYTHON_COMPILING_IN_CPYTHON
++static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
++ PyObject *self, *result;
++ PyCFunction cfunc;
++ cfunc = PyCFunction_GET_FUNCTION(func);
++ self = PyCFunction_GET_SELF(func);
++ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
++ return NULL;
++ result = cfunc(self, arg);
++ Py_LeaveRecursiveCall();
++ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
++ PyErr_SetString(
++ PyExc_SystemError,
++ "NULL result without error in PyObject_Call");
++ }
++ return result;
++}
++#endif
++
++/* PyObjectCallOneArg */
++#if CYTHON_COMPILING_IN_CPYTHON
++static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
++ PyObject *result;
++ PyObject *args = PyTuple_New(1);
++ if (unlikely(!args)) return NULL;
++ Py_INCREF(arg);
++ PyTuple_SET_ITEM(args, 0, arg);
++ result = __Pyx_PyObject_Call(func, args, NULL);
++ Py_DECREF(args);
++ return result;
++}
++static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
++#if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(func)) {
++ return __Pyx_PyFunction_FastCall(func, &arg, 1);
++ }
++#endif
++ if (likely(PyCFunction_Check(func))) {
++ if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
++ return __Pyx_PyObject_CallMethO(func, arg);
++#if CYTHON_FAST_PYCCALL
++ } else if (__Pyx_PyFastCFunction_Check(func)) {
++ return __Pyx_PyCFunction_FastCall(func, &arg, 1);
++#endif
+ }
+- PyException_SetCause(value, fixed_cause);
+ }
+- PyErr_SetObject(type, value);
+- if (tb) {
+-#if CYTHON_COMPILING_IN_PYPY
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
+- Py_INCREF(tb);
+- PyErr_Restore(tmp_type, tmp_value, tb);
+- Py_XDECREF(tmp_tb);
++ return __Pyx__PyObject_CallOneArg(func, arg);
++}
+ #else
+- PyThreadState *tstate = __Pyx_PyThreadState_Current;
+- PyObject* tmp_tb = tstate->curexc_traceback;
+- if (tb != tmp_tb) {
+- Py_INCREF(tb);
+- tstate->curexc_traceback = tb;
+- Py_XDECREF(tmp_tb);
+- }
++static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
++ PyObject *result;
++ PyObject *args = PyTuple_Pack(1, arg);
++ if (unlikely(!args)) return NULL;
++ result = __Pyx_PyObject_Call(func, args, NULL);
++ Py_DECREF(args);
++ return result;
++}
+ #endif
+- }
+-bad:
+- Py_XDECREF(owned_instance);
+- return;
++
++/* PyErrFetchRestore */
++#if CYTHON_FAST_THREAD_STATE
++static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ tmp_type = tstate->curexc_type;
++ tmp_value = tstate->curexc_value;
++ tmp_tb = tstate->curexc_traceback;
++ tstate->curexc_type = type;
++ tstate->curexc_value = value;
++ tstate->curexc_traceback = tb;
++ Py_XDECREF(tmp_type);
++ Py_XDECREF(tmp_value);
++ Py_XDECREF(tmp_tb);
++}
++static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
++ *type = tstate->curexc_type;
++ *value = tstate->curexc_value;
++ *tb = tstate->curexc_traceback;
++ tstate->curexc_type = 0;
++ tstate->curexc_value = 0;
++ tstate->curexc_traceback = 0;
+ }
+ #endif
+
+-/* FetchCommonType */
+-static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+- PyObject* fake_module;
+- PyTypeObject* cached_type = NULL;
+- fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+- if (!fake_module) return NULL;
+- Py_INCREF(fake_module);
+- cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+- if (cached_type) {
+- if (!PyType_Check((PyObject*)cached_type)) {
+- PyErr_Format(PyExc_TypeError,
+- "Shared Cython type %.200s is not a type object",
+- type->tp_name);
+- goto bad;
+- }
+- if (cached_type->tp_basicsize != type->tp_basicsize) {
+- PyErr_Format(PyExc_TypeError,
+- "Shared Cython type %.200s has the wrong size, try recompiling",
+- type->tp_name);
+- goto bad;
+- }
+- } else {
+- if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+- PyErr_Clear();
+- if (PyType_Ready(type) < 0) goto bad;
+- if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+- goto bad;
+- Py_INCREF(type);
+- cached_type = type;
++/* GetAttr */
++static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
++#if CYTHON_USE_TYPE_SLOTS
++#if PY_MAJOR_VERSION >= 3
++ if (likely(PyUnicode_Check(n)))
++#else
++ if (likely(PyString_Check(n)))
++#endif
++ return __Pyx_PyObject_GetAttrStr(o, n);
++#endif
++ return PyObject_GetAttr(o, n);
++}
++
++/* GetAttr3 */
++static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
++ return NULL;
++ __Pyx_PyErr_Clear();
++ Py_INCREF(d);
++ return d;
++}
++static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
++ PyObject *r = __Pyx_GetAttr(o, n);
++ return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
++}
++
++/* PyObjectCall2Args */
++static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
++ PyObject *args, *result = NULL;
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(function)) {
++ PyObject *args[2] = {arg1, arg2};
++ return __Pyx_PyFunction_FastCall(function, args, 2);
++ }
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(function)) {
++ PyObject *args[2] = {arg1, arg2};
++ return __Pyx_PyCFunction_FastCall(function, args, 2);
+ }
++ #endif
++ args = PyTuple_New(2);
++ if (unlikely(!args)) goto done;
++ Py_INCREF(arg1);
++ PyTuple_SET_ITEM(args, 0, arg1);
++ Py_INCREF(arg2);
++ PyTuple_SET_ITEM(args, 1, arg2);
++ Py_INCREF(function);
++ result = __Pyx_PyObject_Call(function, args, NULL);
++ Py_DECREF(args);
++ Py_DECREF(function);
+ done:
+- Py_DECREF(fake_module);
+- return cached_type;
+-bad:
+- Py_XDECREF(cached_type);
+- cached_type = NULL;
+- goto done;
++ return result;
+ }
+
+-/* CythonFunctionShared */
+-#include <structmember.h>
+-static PyObject *
+-__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
+-{
+- if (unlikely(op->func_doc == NULL)) {
+- if (op->func.m_ml->ml_doc) {
++/* PyObjectGetMethod */
++static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
++ PyObject *attr;
++#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
++ PyTypeObject *tp = Py_TYPE(obj);
++ PyObject *descr;
++ descrgetfunc f = NULL;
++ PyObject **dictptr, *dict;
++ int meth_found = 0;
++ assert (*method == NULL);
++ if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
++ attr = __Pyx_PyObject_GetAttrStr(obj, name);
++ goto try_unpack;
++ }
++ if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
++ return 0;
++ }
++ descr = _PyType_Lookup(tp, name);
++ if (likely(descr != NULL)) {
++ Py_INCREF(descr);
+ #if PY_MAJOR_VERSION >= 3
+- op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
++ #ifdef __Pyx_CyFunction_USED
++ if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
++ #else
++ if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
++ #endif
+ #else
+- op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
++ #ifdef __Pyx_CyFunction_USED
++ if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
++ #else
++ if (likely(PyFunction_Check(descr)))
++ #endif
+ #endif
+- if (unlikely(op->func_doc == NULL))
+- return NULL;
++ {
++ meth_found = 1;
+ } else {
+- Py_INCREF(Py_None);
+- return Py_None;
++ f = Py_TYPE(descr)->tp_descr_get;
++ if (f != NULL && PyDescr_IsData(descr)) {
++ attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
++ Py_DECREF(descr);
++ goto try_unpack;
++ }
++ }
++ }
++ dictptr = _PyObject_GetDictPtr(obj);
++ if (dictptr != NULL && (dict = *dictptr) != NULL) {
++ Py_INCREF(dict);
++ attr = __Pyx_PyDict_GetItemStr(dict, name);
++ if (attr != NULL) {
++ Py_INCREF(attr);
++ Py_DECREF(dict);
++ Py_XDECREF(descr);
++ goto try_unpack;
+ }
++ Py_DECREF(dict);
+ }
+- Py_INCREF(op->func_doc);
+- return op->func_doc;
+-}
+-static int
+-__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
+-{
+- PyObject *tmp = op->func_doc;
+- if (value == NULL) {
+- value = Py_None;
++ if (meth_found) {
++ *method = descr;
++ return 1;
+ }
+- Py_INCREF(value);
+- op->func_doc = value;
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- if (unlikely(op->func_name == NULL)) {
+-#if PY_MAJOR_VERSION >= 3
+- op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
+-#else
+- op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
+-#endif
+- if (unlikely(op->func_name == NULL))
+- return NULL;
++ if (f != NULL) {
++ attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
++ Py_DECREF(descr);
++ goto try_unpack;
+ }
+- Py_INCREF(op->func_name);
+- return op->func_name;
+-}
+-static int
+-__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
+-{
+- PyObject *tmp;
++ if (descr != NULL) {
++ *method = descr;
++ return 0;
++ }
++ PyErr_Format(PyExc_AttributeError,
+ #if PY_MAJOR_VERSION >= 3
+- if (unlikely(value == NULL || !PyUnicode_Check(value)))
++ "'%.50s' object has no attribute '%U'",
++ tp->tp_name, name);
+ #else
+- if (unlikely(value == NULL || !PyString_Check(value)))
++ "'%.50s' object has no attribute '%.400s'",
++ tp->tp_name, PyString_AS_STRING(name));
+ #endif
+- {
+- PyErr_SetString(PyExc_TypeError,
+- "__name__ must be set to a string object");
+- return -1;
+- }
+- tmp = op->func_name;
+- Py_INCREF(value);
+- op->func_name = value;
+- Py_XDECREF(tmp);
+ return 0;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- Py_INCREF(op->func_qualname);
+- return op->func_qualname;
+-}
+-static int
+-__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
+-{
+- PyObject *tmp;
+-#if PY_MAJOR_VERSION >= 3
+- if (unlikely(value == NULL || !PyUnicode_Check(value)))
+ #else
+- if (unlikely(value == NULL || !PyString_Check(value)))
++ attr = __Pyx_PyObject_GetAttrStr(obj, name);
++ goto try_unpack;
+ #endif
+- {
+- PyErr_SetString(PyExc_TypeError,
+- "__qualname__ must be set to a string object");
+- return -1;
+- }
+- tmp = op->func_qualname;
+- Py_INCREF(value);
+- op->func_qualname = value;
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
+-{
+- PyObject *self;
+- self = m->func_closure;
+- if (self == NULL)
+- self = Py_None;
+- Py_INCREF(self);
+- return self;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- if (unlikely(op->func_dict == NULL)) {
+- op->func_dict = PyDict_New();
+- if (unlikely(op->func_dict == NULL))
+- return NULL;
+- }
+- Py_INCREF(op->func_dict);
+- return op->func_dict;
+-}
+-static int
+-__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
+-{
+- PyObject *tmp;
+- if (unlikely(value == NULL)) {
+- PyErr_SetString(PyExc_TypeError,
+- "function's dictionary may not be deleted");
+- return -1;
+- }
+- if (unlikely(!PyDict_Check(value))) {
+- PyErr_SetString(PyExc_TypeError,
+- "setting function's dictionary to a non-dict");
+- return -1;
++try_unpack:
++#if CYTHON_UNPACK_METHODS
++ if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
++ PyObject *function = PyMethod_GET_FUNCTION(attr);
++ Py_INCREF(function);
++ Py_DECREF(attr);
++ *method = function;
++ return 1;
+ }
+- tmp = op->func_dict;
+- Py_INCREF(value);
+- op->func_dict = value;
+- Py_XDECREF(tmp);
++#endif
++ *method = attr;
+ return 0;
+ }
+-static PyObject *
+-__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- Py_INCREF(op->func_globals);
+- return op->func_globals;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- Py_INCREF(Py_None);
+- return Py_None;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- PyObject* result = (op->func_code) ? op->func_code : Py_None;
+- Py_INCREF(result);
+- return result;
+-}
+-static int
+-__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
+- int result = 0;
+- PyObject *res = op->defaults_getter((PyObject *) op);
+- if (unlikely(!res))
+- return -1;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
+- Py_INCREF(op->defaults_tuple);
+- op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
+- Py_INCREF(op->defaults_kwdict);
+- #else
+- op->defaults_tuple = PySequence_ITEM(res, 0);
+- if (unlikely(!op->defaults_tuple)) result = -1;
+- else {
+- op->defaults_kwdict = PySequence_ITEM(res, 1);
+- if (unlikely(!op->defaults_kwdict)) result = -1;
+- }
+- #endif
+- Py_DECREF(res);
++
++/* PyObjectCallMethod1 */
++static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
++ PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
++ Py_DECREF(method);
+ return result;
+ }
+-static int
+-__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
+- PyObject* tmp;
+- if (!value) {
+- value = Py_None;
+- } else if (value != Py_None && !PyTuple_Check(value)) {
+- PyErr_SetString(PyExc_TypeError,
+- "__defaults__ must be set to a tuple object");
+- return -1;
+- }
+- Py_INCREF(value);
+- tmp = op->defaults_tuple;
+- op->defaults_tuple = value;
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
+- PyObject* result = op->defaults_tuple;
+- if (unlikely(!result)) {
+- if (op->defaults_getter) {
+- if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+- result = op->defaults_tuple;
+- } else {
+- result = Py_None;
+- }
++static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
++ PyObject *method = NULL, *result;
++ int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
++ if (likely(is_method)) {
++ result = __Pyx_PyObject_Call2Args(method, obj, arg);
++ Py_DECREF(method);
++ return result;
+ }
+- Py_INCREF(result);
+- return result;
++ if (unlikely(!method)) return NULL;
++ return __Pyx__PyObject_CallMethod1(method, arg);
+ }
+-static int
+-__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
+- PyObject* tmp;
+- if (!value) {
+- value = Py_None;
+- } else if (value != Py_None && !PyDict_Check(value)) {
+- PyErr_SetString(PyExc_TypeError,
+- "__kwdefaults__ must be set to a dict object");
+- return -1;
++
++/* append */
++static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
++ if (likely(PyList_CheckExact(L))) {
++ if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
++ } else {
++ PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
++ if (unlikely(!retval))
++ return -1;
++ Py_DECREF(retval);
+ }
+- Py_INCREF(value);
+- tmp = op->defaults_kwdict;
+- op->defaults_kwdict = value;
+- Py_XDECREF(tmp);
+ return 0;
+ }
+-static PyObject *
+-__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
+- PyObject* result = op->defaults_kwdict;
+- if (unlikely(!result)) {
+- if (op->defaults_getter) {
+- if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+- result = op->defaults_kwdict;
+- } else {
+- result = Py_None;
++
++/* PyObjectCallNoArg */
++#if CYTHON_COMPILING_IN_CPYTHON
++static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
++#if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(func)) {
++ return __Pyx_PyFunction_FastCall(func, NULL, 0);
++ }
++#endif
++#ifdef __Pyx_CyFunction_USED
++ if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
++#else
++ if (likely(PyCFunction_Check(func)))
++#endif
++ {
++ if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
++ return __Pyx_PyObject_CallMethO(func, NULL);
+ }
+ }
+- Py_INCREF(result);
+- return result;
++ return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
+ }
+-static int
+-__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
+- PyObject* tmp;
+- if (!value || value == Py_None) {
+- value = NULL;
+- } else if (!PyDict_Check(value)) {
+- PyErr_SetString(PyExc_TypeError,
+- "__annotations__ must be set to a dict object");
+- return -1;
++#endif
++
++/* GetItemInt */
++static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
++ PyObject *r;
++ if (!j) return NULL;
++ r = PyObject_GetItem(o, j);
++ Py_DECREF(j);
++ return r;
++}
++static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
++ CYTHON_NCP_UNUSED int wraparound,
++ CYTHON_NCP_UNUSED int boundscheck) {
++#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ Py_ssize_t wrapped_i = i;
++ if (wraparound & unlikely(i < 0)) {
++ wrapped_i += PyList_GET_SIZE(o);
+ }
+- Py_XINCREF(value);
+- tmp = op->func_annotations;
+- op->func_annotations = value;
+- Py_XDECREF(tmp);
+- return 0;
++ if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
++ PyObject *r = PyList_GET_ITEM(o, wrapped_i);
++ Py_INCREF(r);
++ return r;
++ }
++ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
++#else
++ return PySequence_GetItem(o, i);
++#endif
+ }
+-static PyObject *
+-__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
+- PyObject* result = op->func_annotations;
+- if (unlikely(!result)) {
+- result = PyDict_New();
+- if (unlikely(!result)) return NULL;
+- op->func_annotations = result;
++static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
++ CYTHON_NCP_UNUSED int wraparound,
++ CYTHON_NCP_UNUSED int boundscheck) {
++#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ Py_ssize_t wrapped_i = i;
++ if (wraparound & unlikely(i < 0)) {
++ wrapped_i += PyTuple_GET_SIZE(o);
+ }
+- Py_INCREF(result);
+- return result;
++ if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
++ PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
++ Py_INCREF(r);
++ return r;
++ }
++ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
++#else
++ return PySequence_GetItem(o, i);
++#endif
+ }
+-static PyGetSetDef __pyx_CyFunction_getsets[] = {
+- {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+- {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+- {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+- {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+- {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
+- {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
+- {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+- {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+- {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+- {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+- {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+- {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+- {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+- {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+- {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+- {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+- {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
+- {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-static PyMemberDef __pyx_CyFunction_members[] = {
+- {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
+- {0, 0, 0, 0, 0}
+-};
+-static PyObject *
+-__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
+-{
+-#if PY_MAJOR_VERSION >= 3
+- return PyUnicode_FromString(m->func.m_ml->ml_name);
++static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
++ CYTHON_NCP_UNUSED int wraparound,
++ CYTHON_NCP_UNUSED int boundscheck) {
++#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
++ if (is_list || PyList_CheckExact(o)) {
++ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
++ if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
++ PyObject *r = PyList_GET_ITEM(o, n);
++ Py_INCREF(r);
++ return r;
++ }
++ }
++ else if (PyTuple_CheckExact(o)) {
++ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
++ if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
++ PyObject *r = PyTuple_GET_ITEM(o, n);
++ Py_INCREF(r);
++ return r;
++ }
++ } else {
++ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
++ if (likely(m && m->sq_item)) {
++ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
++ Py_ssize_t l = m->sq_length(o);
++ if (likely(l >= 0)) {
++ i += l;
++ } else {
++ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
++ return NULL;
++ PyErr_Clear();
++ }
++ }
++ return m->sq_item(o, i);
++ }
++ }
+ #else
+- return PyString_FromString(m->func.m_ml->ml_name);
++ if (is_list || PySequence_Check(o)) {
++ return PySequence_GetItem(o, i);
++ }
+ #endif
++ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+ }
+-static PyMethodDef __pyx_CyFunction_methods[] = {
+- {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
+- {0, 0, 0, 0}
+-};
+-#if PY_VERSION_HEX < 0x030500A0
+-#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
++
++/* DelItemInt */
++static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
++ int r;
++ if (!j) return -1;
++ r = PyObject_DelItem(o, j);
++ Py_DECREF(j);
++ return r;
++}
++static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
++ CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) {
++#if !CYTHON_USE_TYPE_SLOTS
++ if (is_list || PySequence_Check(o)) {
++ return PySequence_DelItem(o, i);
++ }
+ #else
+-#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
++ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
++ if (likely(m && m->sq_ass_item)) {
++ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
++ Py_ssize_t l = m->sq_length(o);
++ if (likely(l >= 0)) {
++ i += l;
++ } else {
++ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
++ return -1;
++ PyErr_Clear();
++ }
++ }
++ return m->sq_ass_item(o, i, (PyObject *)NULL);
++ }
+ #endif
+-static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
+- PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
+- if (unlikely(op == NULL))
+- return NULL;
+- op->flags = flags;
+- __Pyx_CyFunction_weakreflist(op) = NULL;
+- op->func.m_ml = ml;
+- op->func.m_self = (PyObject *) op;
+- Py_XINCREF(closure);
+- op->func_closure = closure;
+- Py_XINCREF(module);
+- op->func.m_module = module;
+- op->func_dict = NULL;
+- op->func_name = NULL;
+- Py_INCREF(qualname);
+- op->func_qualname = qualname;
+- op->func_doc = NULL;
+- op->func_classobj = NULL;
+- op->func_globals = globals;
+- Py_INCREF(op->func_globals);
+- Py_XINCREF(code);
+- op->func_code = code;
+- op->defaults_pyobjects = 0;
+- op->defaults_size = 0;
+- op->defaults = NULL;
+- op->defaults_tuple = NULL;
+- op->defaults_kwdict = NULL;
+- op->defaults_getter = NULL;
+- op->func_annotations = NULL;
+- return (PyObject *) op;
++ return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
+ }
+-static int
+-__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
++
++/* KeywordStringCheck */
++static int __Pyx_CheckKeywordStrings(
++ PyObject *kwdict,
++ const char* function_name,
++ int kw_allowed)
+ {
+- Py_CLEAR(m->func_closure);
+- Py_CLEAR(m->func.m_module);
+- Py_CLEAR(m->func_dict);
+- Py_CLEAR(m->func_name);
+- Py_CLEAR(m->func_qualname);
+- Py_CLEAR(m->func_doc);
+- Py_CLEAR(m->func_globals);
+- Py_CLEAR(m->func_code);
+- Py_CLEAR(m->func_classobj);
+- Py_CLEAR(m->defaults_tuple);
+- Py_CLEAR(m->defaults_kwdict);
+- Py_CLEAR(m->func_annotations);
+- if (m->defaults) {
+- PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+- int i;
+- for (i = 0; i < m->defaults_pyobjects; i++)
+- Py_XDECREF(pydefaults[i]);
+- PyObject_Free(m->defaults);
+- m->defaults = NULL;
++ PyObject* key = 0;
++ Py_ssize_t pos = 0;
++#if CYTHON_COMPILING_IN_PYPY
++ if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
++ goto invalid_keyword;
++ return 1;
++#else
++ while (PyDict_Next(kwdict, &pos, &key, 0)) {
++ #if PY_MAJOR_VERSION < 3
++ if (unlikely(!PyString_Check(key)))
++ #endif
++ if (unlikely(!PyUnicode_Check(key)))
++ goto invalid_keyword_type;
+ }
++ if ((!kw_allowed) && unlikely(key))
++ goto invalid_keyword;
++ return 1;
++invalid_keyword_type:
++ PyErr_Format(PyExc_TypeError,
++ "%.200s() keywords must be strings", function_name);
++ return 0;
++#endif
++invalid_keyword:
++ PyErr_Format(PyExc_TypeError,
++ #if PY_MAJOR_VERSION < 3
++ "%.200s() got an unexpected keyword argument '%.200s'",
++ function_name, PyString_AsString(key));
++ #else
++ "%s() got an unexpected keyword argument '%U'",
++ function_name, key);
++ #endif
+ return 0;
+ }
+-static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
+-{
+- if (__Pyx_CyFunction_weakreflist(m) != NULL)
+- PyObject_ClearWeakRefs((PyObject *) m);
+- __Pyx_CyFunction_clear(m);
+- PyObject_GC_Del(m);
+-}
+-static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
+-{
+- PyObject_GC_UnTrack(m);
+- __Pyx__CyFunction_dealloc(m);
++
++/* None */
++static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
++ PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
+ }
+-static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
+-{
+- Py_VISIT(m->func_closure);
+- Py_VISIT(m->func.m_module);
+- Py_VISIT(m->func_dict);
+- Py_VISIT(m->func_name);
+- Py_VISIT(m->func_qualname);
+- Py_VISIT(m->func_doc);
+- Py_VISIT(m->func_globals);
+- Py_VISIT(m->func_code);
+- Py_VISIT(m->func_classobj);
+- Py_VISIT(m->defaults_tuple);
+- Py_VISIT(m->defaults_kwdict);
+- if (m->defaults) {
+- PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+- int i;
+- for (i = 0; i < m->defaults_pyobjects; i++)
+- Py_VISIT(pydefaults[i]);
++
++/* RaiseException */
++#if PY_MAJOR_VERSION < 3
++static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
++ CYTHON_UNUSED PyObject *cause) {
++ __Pyx_PyThreadState_declare
++ Py_XINCREF(type);
++ if (!value || value == Py_None)
++ value = NULL;
++ else
++ Py_INCREF(value);
++ if (!tb || tb == Py_None)
++ tb = NULL;
++ else {
++ Py_INCREF(tb);
++ if (!PyTraceBack_Check(tb)) {
++ PyErr_SetString(PyExc_TypeError,
++ "raise: arg 3 must be a traceback or None");
++ goto raise_error;
++ }
+ }
+- return 0;
++ if (PyType_Check(type)) {
++#if CYTHON_COMPILING_IN_PYPY
++ if (!value) {
++ Py_INCREF(Py_None);
++ value = Py_None;
++ }
++#endif
++ PyErr_NormalizeException(&type, &value, &tb);
++ } else {
++ if (value) {
++ PyErr_SetString(PyExc_TypeError,
++ "instance exception may not have a separate value");
++ goto raise_error;
++ }
++ value = type;
++ type = (PyObject*) Py_TYPE(type);
++ Py_INCREF(type);
++ if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
++ PyErr_SetString(PyExc_TypeError,
++ "raise: exception class must be a subclass of BaseException");
++ goto raise_error;
++ }
++ }
++ __Pyx_PyThreadState_assign
++ __Pyx_ErrRestore(type, value, tb);
++ return;
++raise_error:
++ Py_XDECREF(value);
++ Py_XDECREF(type);
++ Py_XDECREF(tb);
++ return;
+ }
+-static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
+-{
+-#if PY_MAJOR_VERSION < 3
+- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+- if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
+- Py_INCREF(func);
+- return func;
++#else
++static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
++ PyObject* owned_instance = NULL;
++ if (tb == Py_None) {
++ tb = 0;
++ } else if (tb && !PyTraceBack_Check(tb)) {
++ PyErr_SetString(PyExc_TypeError,
++ "raise: arg 3 must be a traceback or None");
++ goto bad;
+ }
+- if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
+- if (type == NULL)
+- type = (PyObject *)(Py_TYPE(obj));
+- return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
++ if (value == Py_None)
++ value = 0;
++ if (PyExceptionInstance_Check(type)) {
++ if (value) {
++ PyErr_SetString(PyExc_TypeError,
++ "instance exception may not have a separate value");
++ goto bad;
++ }
++ value = type;
++ type = (PyObject*) Py_TYPE(value);
++ } else if (PyExceptionClass_Check(type)) {
++ PyObject *instance_class = NULL;
++ if (value && PyExceptionInstance_Check(value)) {
++ instance_class = (PyObject*) Py_TYPE(value);
++ if (instance_class != type) {
++ int is_subclass = PyObject_IsSubclass(instance_class, type);
++ if (!is_subclass) {
++ instance_class = NULL;
++ } else if (unlikely(is_subclass == -1)) {
++ goto bad;
++ } else {
++ type = instance_class;
++ }
++ }
++ }
++ if (!instance_class) {
++ PyObject *args;
++ if (!value)
++ args = PyTuple_New(0);
++ else if (PyTuple_Check(value)) {
++ Py_INCREF(value);
++ args = value;
++ } else
++ args = PyTuple_Pack(1, value);
++ if (!args)
++ goto bad;
++ owned_instance = PyObject_Call(type, args, NULL);
++ Py_DECREF(args);
++ if (!owned_instance)
++ goto bad;
++ value = owned_instance;
++ if (!PyExceptionInstance_Check(value)) {
++ PyErr_Format(PyExc_TypeError,
++ "calling %R should have returned an instance of "
++ "BaseException, not %R",
++ type, Py_TYPE(value));
++ goto bad;
++ }
++ }
++ } else {
++ PyErr_SetString(PyExc_TypeError,
++ "raise: exception class must be a subclass of BaseException");
++ goto bad;
+ }
+- if (obj == Py_None)
+- obj = NULL;
++ if (cause) {
++ PyObject *fixed_cause;
++ if (cause == Py_None) {
++ fixed_cause = NULL;
++ } else if (PyExceptionClass_Check(cause)) {
++ fixed_cause = PyObject_CallObject(cause, NULL);
++ if (fixed_cause == NULL)
++ goto bad;
++ } else if (PyExceptionInstance_Check(cause)) {
++ fixed_cause = cause;
++ Py_INCREF(fixed_cause);
++ } else {
++ PyErr_SetString(PyExc_TypeError,
++ "exception causes must derive from "
++ "BaseException");
++ goto bad;
++ }
++ PyException_SetCause(value, fixed_cause);
++ }
++ PyErr_SetObject(type, value);
++ if (tb) {
++#if CYTHON_COMPILING_IN_PYPY
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
++ Py_INCREF(tb);
++ PyErr_Restore(tmp_type, tmp_value, tb);
++ Py_XDECREF(tmp_tb);
++#else
++ PyThreadState *tstate = __Pyx_PyThreadState_Current;
++ PyObject* tmp_tb = tstate->curexc_traceback;
++ if (tb != tmp_tb) {
++ Py_INCREF(tb);
++ tstate->curexc_traceback = tb;
++ Py_XDECREF(tmp_tb);
++ }
+ #endif
+- return __Pyx_PyMethod_New(func, obj, type);
++ }
++bad:
++ Py_XDECREF(owned_instance);
++ return;
++}
++#endif
++
++/* FetchCommonType */
++static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
++ PyObject* fake_module;
++ PyTypeObject* cached_type = NULL;
++ fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
++ if (!fake_module) return NULL;
++ Py_INCREF(fake_module);
++ cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
++ if (cached_type) {
++ if (!PyType_Check((PyObject*)cached_type)) {
++ PyErr_Format(PyExc_TypeError,
++ "Shared Cython type %.200s is not a type object",
++ type->tp_name);
++ goto bad;
++ }
++ if (cached_type->tp_basicsize != type->tp_basicsize) {
++ PyErr_Format(PyExc_TypeError,
++ "Shared Cython type %.200s has the wrong size, try recompiling",
++ type->tp_name);
++ goto bad;
++ }
++ } else {
++ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
++ PyErr_Clear();
++ if (PyType_Ready(type) < 0) goto bad;
++ if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
++ goto bad;
++ Py_INCREF(type);
++ cached_type = type;
++ }
++done:
++ Py_DECREF(fake_module);
++ return cached_type;
++bad:
++ Py_XDECREF(cached_type);
++ cached_type = NULL;
++ goto done;
+ }
+-static PyObject*
+-__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
++
++/* CythonFunctionShared */
++#include <structmember.h>
++static PyObject *
++__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
+ {
++ if (unlikely(op->func_doc == NULL)) {
++ if (op->func.m_ml->ml_doc) {
+ #if PY_MAJOR_VERSION >= 3
+- return PyUnicode_FromFormat("<cyfunction %U at %p>",
+- op->func_qualname, (void *)op);
++ op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
+ #else
+- return PyString_FromFormat("<cyfunction %s at %p>",
+- PyString_AsString(op->func_qualname), (void *)op);
++ op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
+ #endif
+-}
+-static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
+- PyCFunctionObject* f = (PyCFunctionObject*)func;
+- PyCFunction meth = f->m_ml->ml_meth;
+- Py_ssize_t size;
+- switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
+- case METH_VARARGS:
+- if (likely(kw == NULL || PyDict_Size(kw) == 0))
+- return (*meth)(self, arg);
+- break;
+- case METH_VARARGS | METH_KEYWORDS:
+- return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
+- case METH_NOARGS:
+- if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+- size = PyTuple_GET_SIZE(arg);
+- if (likely(size == 0))
+- return (*meth)(self, NULL);
+- PyErr_Format(PyExc_TypeError,
+- "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
+- f->m_ml->ml_name, size);
+- return NULL;
+- }
+- break;
+- case METH_O:
+- if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+- size = PyTuple_GET_SIZE(arg);
+- if (likely(size == 1)) {
+- PyObject *result, *arg0;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- arg0 = PyTuple_GET_ITEM(arg, 0);
+- #else
+- arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
+- #endif
+- result = (*meth)(self, arg0);
+- #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
+- Py_DECREF(arg0);
+- #endif
+- return result;
+- }
+- PyErr_Format(PyExc_TypeError,
+- "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
+- f->m_ml->ml_name, size);
+- return NULL;
++ if (unlikely(op->func_doc == NULL))
++ return NULL;
++ } else {
++ Py_INCREF(Py_None);
++ return Py_None;
+ }
+- break;
+- default:
+- PyErr_SetString(PyExc_SystemError, "Bad call flags in "
+- "__Pyx_CyFunction_Call. METH_OLDARGS is no "
+- "longer supported!");
+- return NULL;
+ }
+- PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
+- f->m_ml->ml_name);
+- return NULL;
+-}
+-static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+- return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
++ Py_INCREF(op->func_doc);
++ return op->func_doc;
+ }
+-static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
+- PyObject *result;
+- __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
+- if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
+- Py_ssize_t argc;
+- PyObject *new_args;
+- PyObject *self;
+- argc = PyTuple_GET_SIZE(args);
+- new_args = PyTuple_GetSlice(args, 1, argc);
+- if (unlikely(!new_args))
+- return NULL;
+- self = PyTuple_GetItem(args, 0);
+- if (unlikely(!self)) {
+- Py_DECREF(new_args);
+- return NULL;
+- }
+- result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
+- Py_DECREF(new_args);
+- } else {
+- result = __Pyx_CyFunction_Call(func, args, kw);
++static int
++__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
++{
++ PyObject *tmp = op->func_doc;
++ if (value == NULL) {
++ value = Py_None;
+ }
+- return result;
++ Py_INCREF(value);
++ op->func_doc = value;
++ Py_XDECREF(tmp);
++ return 0;
+ }
+-static PyTypeObject __pyx_CyFunctionType_type = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "cython_function_or_method",
+- sizeof(__pyx_CyFunctionObject),
+- 0,
+- (destructor) __Pyx_CyFunction_dealloc,
+- 0,
+- 0,
+- 0,
+-#if PY_MAJOR_VERSION < 3
+- 0,
++static PyObject *
++__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
++{
++ if (unlikely(op->func_name == NULL)) {
++#if PY_MAJOR_VERSION >= 3
++ op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
+ #else
+- 0,
++ op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
+ #endif
+- (reprfunc) __Pyx_CyFunction_repr,
+- 0,
+- 0,
+- 0,
+- 0,
+- __Pyx_CyFunction_CallAsMethod,
+- 0,
+- 0,
+- 0,
+- 0,
+- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+- 0,
+- (traverseproc) __Pyx_CyFunction_traverse,
+- (inquiry) __Pyx_CyFunction_clear,
+- 0,
+-#if PY_VERSION_HEX < 0x030500A0
+- offsetof(__pyx_CyFunctionObject, func_weakreflist),
++ if (unlikely(op->func_name == NULL))
++ return NULL;
++ }
++ Py_INCREF(op->func_name);
++ return op->func_name;
++}
++static int
++__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
++{
++ PyObject *tmp;
++#if PY_MAJOR_VERSION >= 3
++ if (unlikely(value == NULL || !PyUnicode_Check(value)))
+ #else
+- offsetof(PyCFunctionObject, m_weakreflist),
+-#endif
+- 0,
+- 0,
+- __pyx_CyFunction_methods,
+- __pyx_CyFunction_members,
+- __pyx_CyFunction_getsets,
+- 0,
+- 0,
+- __Pyx_CyFunction_descr_get,
+- 0,
+- offsetof(__pyx_CyFunctionObject, func_dict),
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+-#if PY_VERSION_HEX >= 0x030400a1
+- 0,
+-#endif
+-#if PY_VERSION_HEX >= 0x030800b1
+- 0,
+-#endif
+-#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0,
++ if (unlikely(value == NULL || !PyString_Check(value)))
+ #endif
+-};
+-static int __pyx_CyFunction_init(void) {
+- __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
+- if (unlikely(__pyx_CyFunctionType == NULL)) {
++ {
++ PyErr_SetString(PyExc_TypeError,
++ "__name__ must be set to a string object");
+ return -1;
+ }
++ tmp = op->func_name;
++ Py_INCREF(value);
++ op->func_name = value;
++ Py_XDECREF(tmp);
+ return 0;
+ }
+-static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
+- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+- m->defaults = PyObject_Malloc(size);
+- if (unlikely(!m->defaults))
+- return PyErr_NoMemory();
+- memset(m->defaults, 0, size);
+- m->defaults_pyobjects = pyobjects;
+- m->defaults_size = size;
+- return m->defaults;
+-}
+-static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
+- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+- m->defaults_tuple = tuple;
+- Py_INCREF(tuple);
++static PyObject *
++__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
++{
++ Py_INCREF(op->func_qualname);
++ return op->func_qualname;
+ }
+-static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
+- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+- m->defaults_kwdict = dict;
+- Py_INCREF(dict);
++static int
++__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
++{
++ PyObject *tmp;
++#if PY_MAJOR_VERSION >= 3
++ if (unlikely(value == NULL || !PyUnicode_Check(value)))
++#else
++ if (unlikely(value == NULL || !PyString_Check(value)))
++#endif
++ {
++ PyErr_SetString(PyExc_TypeError,
++ "__qualname__ must be set to a string object");
++ return -1;
++ }
++ tmp = op->func_qualname;
++ Py_INCREF(value);
++ op->func_qualname = value;
++ Py_XDECREF(tmp);
++ return 0;
+ }
+-static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
+- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+- m->func_annotations = dict;
+- Py_INCREF(dict);
++static PyObject *
++__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
++{
++ PyObject *self;
++ self = m->func_closure;
++ if (self == NULL)
++ self = Py_None;
++ Py_INCREF(self);
++ return self;
+ }
+-
+-/* CythonFunction */
+-static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
+- PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
+- PyObject *op = __Pyx_CyFunction_Init(
+- PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
+- ml, flags, qualname, closure, module, globals, code
+- );
+- if (likely(op)) {
+- PyObject_GC_Track(op);
++static PyObject *
++__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
++{
++ if (unlikely(op->func_dict == NULL)) {
++ op->func_dict = PyDict_New();
++ if (unlikely(op->func_dict == NULL))
++ return NULL;
+ }
+- return op;
++ Py_INCREF(op->func_dict);
++ return op->func_dict;
+ }
+-
+-/* RaiseArgTupleInvalid */
+-static void __Pyx_RaiseArgtupleInvalid(
+- const char* func_name,
+- int exact,
+- Py_ssize_t num_min,
+- Py_ssize_t num_max,
+- Py_ssize_t num_found)
++static int
++__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
+ {
+- Py_ssize_t num_expected;
+- const char *more_or_less;
+- if (num_found < num_min) {
+- num_expected = num_min;
+- more_or_less = "at least";
+- } else {
+- num_expected = num_max;
+- more_or_less = "at most";
++ PyObject *tmp;
++ if (unlikely(value == NULL)) {
++ PyErr_SetString(PyExc_TypeError,
++ "function's dictionary may not be deleted");
++ return -1;
+ }
+- if (exact) {
+- more_or_less = "exactly";
++ if (unlikely(!PyDict_Check(value))) {
++ PyErr_SetString(PyExc_TypeError,
++ "setting function's dictionary to a non-dict");
++ return -1;
+ }
+- PyErr_Format(PyExc_TypeError,
+- "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+- func_name, more_or_less, num_expected,
+- (num_expected == 1) ? "" : "s", num_found);
++ tmp = op->func_dict;
++ Py_INCREF(value);
++ op->func_dict = value;
++ Py_XDECREF(tmp);
++ return 0;
+ }
+-
+-/* RaiseDoubleKeywords */
+-static void __Pyx_RaiseDoubleKeywordsError(
+- const char* func_name,
+- PyObject* kw_name)
++static PyObject *
++__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+ {
+- PyErr_Format(PyExc_TypeError,
+- #if PY_MAJOR_VERSION >= 3
+- "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+- #else
+- "%s() got multiple values for keyword argument '%s'", func_name,
+- PyString_AsString(kw_name));
+- #endif
++ Py_INCREF(op->func_globals);
++ return op->func_globals;
+ }
+-
+-/* ParseKeywords */
+-static int __Pyx_ParseOptionalKeywords(
+- PyObject *kwds,
+- PyObject **argnames[],
+- PyObject *kwds2,
+- PyObject *values[],
+- Py_ssize_t num_pos_args,
+- const char* function_name)
++static PyObject *
++__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+ {
+- PyObject *key = 0, *value = 0;
+- Py_ssize_t pos = 0;
+- PyObject*** name;
+- PyObject*** first_kw_arg = argnames + num_pos_args;
+- while (PyDict_Next(kwds, &pos, &key, &value)) {
+- name = first_kw_arg;
+- while (*name && (**name != key)) name++;
+- if (*name) {
+- values[name-argnames] = value;
+- continue;
+- }
+- name = first_kw_arg;
+- #if PY_MAJOR_VERSION < 3
+- if (likely(PyString_Check(key))) {
+- while (*name) {
+- if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+- && _PyString_Eq(**name, key)) {
+- values[name-argnames] = value;
+- break;
+- }
+- name++;
+- }
+- if (*name) continue;
+- else {
+- PyObject*** argname = argnames;
+- while (argname != first_kw_arg) {
+- if ((**argname == key) || (
+- (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+- && _PyString_Eq(**argname, key))) {
+- goto arg_passed_twice;
+- }
+- argname++;
+- }
+- }
+- } else
+- #endif
+- if (likely(PyUnicode_Check(key))) {
+- while (*name) {
+- int cmp = (**name == key) ? 0 :
+- #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+- (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
+- #endif
+- PyUnicode_Compare(**name, key);
+- if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+- if (cmp == 0) {
+- values[name-argnames] = value;
+- break;
+- }
+- name++;
+- }
+- if (*name) continue;
+- else {
+- PyObject*** argname = argnames;
+- while (argname != first_kw_arg) {
+- int cmp = (**argname == key) ? 0 :
+- #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+- (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
+- #endif
+- PyUnicode_Compare(**argname, key);
+- if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+- if (cmp == 0) goto arg_passed_twice;
+- argname++;
+- }
+- }
+- } else
+- goto invalid_keyword_type;
+- if (kwds2) {
+- if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+- } else {
+- goto invalid_keyword;
+- }
+- }
+- return 0;
+-arg_passed_twice:
+- __Pyx_RaiseDoubleKeywordsError(function_name, key);
+- goto bad;
+-invalid_keyword_type:
+- PyErr_Format(PyExc_TypeError,
+- "%.200s() keywords must be strings", function_name);
+- goto bad;
+-invalid_keyword:
+- PyErr_Format(PyExc_TypeError,
+- #if PY_MAJOR_VERSION < 3
+- "%.200s() got an unexpected keyword argument '%.200s'",
+- function_name, PyString_AsString(key));
++ Py_INCREF(Py_None);
++ return Py_None;
++}
++static PyObject *
++__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
++{
++ PyObject* result = (op->func_code) ? op->func_code : Py_None;
++ Py_INCREF(result);
++ return result;
++}
++static int
++__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
++ int result = 0;
++ PyObject *res = op->defaults_getter((PyObject *) op);
++ if (unlikely(!res))
++ return -1;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
++ Py_INCREF(op->defaults_tuple);
++ op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
++ Py_INCREF(op->defaults_kwdict);
+ #else
+- "%s() got an unexpected keyword argument '%U'",
+- function_name, key);
++ op->defaults_tuple = PySequence_ITEM(res, 0);
++ if (unlikely(!op->defaults_tuple)) result = -1;
++ else {
++ op->defaults_kwdict = PySequence_ITEM(res, 1);
++ if (unlikely(!op->defaults_kwdict)) result = -1;
++ }
+ #endif
+-bad:
+- return -1;
++ Py_DECREF(res);
++ return result;
+ }
+-
+-/* PyObjectSetAttrStr */
+-#if CYTHON_USE_TYPE_SLOTS
+-static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+- PyTypeObject* tp = Py_TYPE(obj);
+- if (likely(tp->tp_setattro))
+- return tp->tp_setattro(obj, attr_name, value);
+-#if PY_MAJOR_VERSION < 3
+- if (likely(tp->tp_setattr))
+- return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+-#endif
+- return PyObject_SetAttr(obj, attr_name, value);
++static int
++__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
++ PyObject* tmp;
++ if (!value) {
++ value = Py_None;
++ } else if (value != Py_None && !PyTuple_Check(value)) {
++ PyErr_SetString(PyExc_TypeError,
++ "__defaults__ must be set to a tuple object");
++ return -1;
++ }
++ Py_INCREF(value);
++ tmp = op->defaults_tuple;
++ op->defaults_tuple = value;
++ Py_XDECREF(tmp);
++ return 0;
+ }
+-#endif
+-
+-/* PyIntBinop */
+-#if !CYTHON_COMPILING_IN_PYPY
+-static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
+- (void)inplace;
+- (void)zerodivision_check;
+- #if PY_MAJOR_VERSION < 3
+- if (likely(PyInt_CheckExact(op1))) {
+- const long b = intval;
+- long x;
+- long a = PyInt_AS_LONG(op1);
+- x = (long)((unsigned long)a + b);
+- if (likely((x^a) >= 0 || (x^b) >= 0))
+- return PyInt_FromLong(x);
+- return PyLong_Type.tp_as_number->nb_add(op1, op2);
++static PyObject *
++__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
++ PyObject* result = op->defaults_tuple;
++ if (unlikely(!result)) {
++ if (op->defaults_getter) {
++ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
++ result = op->defaults_tuple;
++ } else {
++ result = Py_None;
++ }
+ }
+- #endif
+- #if CYTHON_USE_PYLONG_INTERNALS
+- if (likely(PyLong_CheckExact(op1))) {
+- const long b = intval;
+- long a, x;
+-#ifdef HAVE_LONG_LONG
+- const PY_LONG_LONG llb = intval;
+- PY_LONG_LONG lla, llx;
+-#endif
+- const digit* digits = ((PyLongObject*)op1)->ob_digit;
+- const Py_ssize_t size = Py_SIZE(op1);
+- if (likely(__Pyx_sst_abs(size) <= 1)) {
+- a = likely(size) ? digits[0] : 0;
+- if (size == -1) a = -a;
++ Py_INCREF(result);
++ return result;
++}
++static int
++__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
++ PyObject* tmp;
++ if (!value) {
++ value = Py_None;
++ } else if (value != Py_None && !PyDict_Check(value)) {
++ PyErr_SetString(PyExc_TypeError,
++ "__kwdefaults__ must be set to a dict object");
++ return -1;
++ }
++ Py_INCREF(value);
++ tmp = op->defaults_kwdict;
++ op->defaults_kwdict = value;
++ Py_XDECREF(tmp);
++ return 0;
++}
++static PyObject *
++__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
++ PyObject* result = op->defaults_kwdict;
++ if (unlikely(!result)) {
++ if (op->defaults_getter) {
++ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
++ result = op->defaults_kwdict;
+ } else {
+- switch (size) {
+- case -2:
+- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+- a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+- a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case -3:
+- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+- a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 3:
+- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+- a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case -4:
+- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+- a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 4:
+- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+- a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
+- }
++ result = Py_None;
+ }
+- x = a + b;
+- return PyLong_FromLong(x);
+-#ifdef HAVE_LONG_LONG
+- long_long:
+- llx = lla + llb;
+- return PyLong_FromLongLong(llx);
+-#endif
+-
+-
+ }
+- #endif
+- if (PyFloat_CheckExact(op1)) {
+- const long b = intval;
+- double a = PyFloat_AS_DOUBLE(op1);
+- double result;
+- PyFPE_START_PROTECT("add", return NULL)
+- result = ((double)a) + (double)b;
+- PyFPE_END_PROTECT(result)
+- return PyFloat_FromDouble(result);
++ Py_INCREF(result);
++ return result;
++}
++static int
++__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
++ PyObject* tmp;
++ if (!value || value == Py_None) {
++ value = NULL;
++ } else if (!PyDict_Check(value)) {
++ PyErr_SetString(PyExc_TypeError,
++ "__annotations__ must be set to a dict object");
++ return -1;
+ }
+- return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
++ Py_XINCREF(value);
++ tmp = op->func_annotations;
++ op->func_annotations = value;
++ Py_XDECREF(tmp);
++ return 0;
+ }
+-#endif
+-
+-/* PyIntBinop */
+-#if !CYTHON_COMPILING_IN_PYPY
+-static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
+- (void)inplace;
+- (void)zerodivision_check;
+- #if PY_MAJOR_VERSION < 3
+- if (likely(PyInt_CheckExact(op1))) {
+- const long b = intval;
+- long x;
+- long a = PyInt_AS_LONG(op1);
+- x = (long)((unsigned long)a - b);
+- if (likely((x^a) >= 0 || (x^~b) >= 0))
+- return PyInt_FromLong(x);
+- return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
++static PyObject *
++__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
++ PyObject* result = op->func_annotations;
++ if (unlikely(!result)) {
++ result = PyDict_New();
++ if (unlikely(!result)) return NULL;
++ op->func_annotations = result;
+ }
+- #endif
+- #if CYTHON_USE_PYLONG_INTERNALS
+- if (likely(PyLong_CheckExact(op1))) {
+- const long b = intval;
+- long a, x;
+-#ifdef HAVE_LONG_LONG
+- const PY_LONG_LONG llb = intval;
+- PY_LONG_LONG lla, llx;
+-#endif
+- const digit* digits = ((PyLongObject*)op1)->ob_digit;
+- const Py_ssize_t size = Py_SIZE(op1);
+- if (likely(__Pyx_sst_abs(size) <= 1)) {
+- a = likely(size) ? digits[0] : 0;
+- if (size == -1) a = -a;
+- } else {
+- switch (size) {
+- case -2:
+- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+- a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+- a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case -3:
+- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+- a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 3:
+- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+- a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case -4:
+- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+- a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 4:
+- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+- a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
++ Py_INCREF(result);
++ return result;
++}
++static PyGetSetDef __pyx_CyFunction_getsets[] = {
++ {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
++ {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
++ {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
++ {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
++ {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
++ {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
++ {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
++ {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
++ {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
++ {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
++ {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
++ {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
++ {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
++ {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
++ {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
++ {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
++ {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
++ {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
++ {0, 0, 0, 0, 0}
++};
++static PyMemberDef __pyx_CyFunction_members[] = {
++ {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
++ {0, 0, 0, 0, 0}
++};
++static PyObject *
++__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
++{
++#if PY_MAJOR_VERSION >= 3
++ Py_INCREF(m->func_qualname);
++ return m->func_qualname;
++#else
++ return PyString_FromString(m->func.m_ml->ml_name);
+ #endif
+- }
+- CYTHON_FALLTHROUGH;
+- default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
+- }
+- }
+- x = a - b;
+- return PyLong_FromLong(x);
+-#ifdef HAVE_LONG_LONG
+- long_long:
+- llx = lla - llb;
+- return PyLong_FromLongLong(llx);
++}
++static PyMethodDef __pyx_CyFunction_methods[] = {
++ {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
++ {0, 0, 0, 0}
++};
++#if PY_VERSION_HEX < 0x030500A0
++#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
++#else
++#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
+ #endif
+-
+-
++static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
++ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
++ if (unlikely(op == NULL))
++ return NULL;
++ op->flags = flags;
++ __Pyx_CyFunction_weakreflist(op) = NULL;
++ op->func.m_ml = ml;
++ op->func.m_self = (PyObject *) op;
++ Py_XINCREF(closure);
++ op->func_closure = closure;
++ Py_XINCREF(module);
++ op->func.m_module = module;
++ op->func_dict = NULL;
++ op->func_name = NULL;
++ Py_INCREF(qualname);
++ op->func_qualname = qualname;
++ op->func_doc = NULL;
++ op->func_classobj = NULL;
++ op->func_globals = globals;
++ Py_INCREF(op->func_globals);
++ Py_XINCREF(code);
++ op->func_code = code;
++ op->defaults_pyobjects = 0;
++ op->defaults_size = 0;
++ op->defaults = NULL;
++ op->defaults_tuple = NULL;
++ op->defaults_kwdict = NULL;
++ op->defaults_getter = NULL;
++ op->func_annotations = NULL;
++ return (PyObject *) op;
++}
++static int
++__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
++{
++ Py_CLEAR(m->func_closure);
++ Py_CLEAR(m->func.m_module);
++ Py_CLEAR(m->func_dict);
++ Py_CLEAR(m->func_name);
++ Py_CLEAR(m->func_qualname);
++ Py_CLEAR(m->func_doc);
++ Py_CLEAR(m->func_globals);
++ Py_CLEAR(m->func_code);
++ Py_CLEAR(m->func_classobj);
++ Py_CLEAR(m->defaults_tuple);
++ Py_CLEAR(m->defaults_kwdict);
++ Py_CLEAR(m->func_annotations);
++ if (m->defaults) {
++ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
++ int i;
++ for (i = 0; i < m->defaults_pyobjects; i++)
++ Py_XDECREF(pydefaults[i]);
++ PyObject_Free(m->defaults);
++ m->defaults = NULL;
+ }
+- #endif
+- if (PyFloat_CheckExact(op1)) {
+- const long b = intval;
+- double a = PyFloat_AS_DOUBLE(op1);
+- double result;
+- PyFPE_START_PROTECT("subtract", return NULL)
+- result = ((double)a) - (double)b;
+- PyFPE_END_PROTECT(result)
+- return PyFloat_FromDouble(result);
++ return 0;
++}
++static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
++{
++ if (__Pyx_CyFunction_weakreflist(m) != NULL)
++ PyObject_ClearWeakRefs((PyObject *) m);
++ __Pyx_CyFunction_clear(m);
++ PyObject_GC_Del(m);
++}
++static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
++{
++ PyObject_GC_UnTrack(m);
++ __Pyx__CyFunction_dealloc(m);
++}
++static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
++{
++ Py_VISIT(m->func_closure);
++ Py_VISIT(m->func.m_module);
++ Py_VISIT(m->func_dict);
++ Py_VISIT(m->func_name);
++ Py_VISIT(m->func_qualname);
++ Py_VISIT(m->func_doc);
++ Py_VISIT(m->func_globals);
++ Py_VISIT(m->func_code);
++ Py_VISIT(m->func_classobj);
++ Py_VISIT(m->defaults_tuple);
++ Py_VISIT(m->defaults_kwdict);
++ if (m->defaults) {
++ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
++ int i;
++ for (i = 0; i < m->defaults_pyobjects; i++)
++ Py_VISIT(pydefaults[i]);
+ }
+- return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
++ return 0;
+ }
++static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
++{
++#if PY_MAJOR_VERSION < 3
++ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
++ if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
++ Py_INCREF(func);
++ return func;
++ }
++ if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
++ if (type == NULL)
++ type = (PyObject *)(Py_TYPE(obj));
++ return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
++ }
++ if (obj == Py_None)
++ obj = NULL;
+ #endif
+-
+-/* WriteUnraisableException */
+-static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
+- CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
+- int full_traceback, CYTHON_UNUSED int nogil) {
+- PyObject *old_exc, *old_val, *old_tb;
+- PyObject *ctx;
+- __Pyx_PyThreadState_declare
+-#ifdef WITH_THREAD
+- PyGILState_STATE state;
+- if (nogil)
+- state = PyGILState_Ensure();
+-#ifdef _MSC_VER
+- else state = (PyGILState_STATE)-1;
+-#endif
++ return __Pyx_PyMethod_New(func, obj, type);
++}
++static PyObject*
++__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
++{
++#if PY_MAJOR_VERSION >= 3
++ return PyUnicode_FromFormat("<cyfunction %U at %p>",
++ op->func_qualname, (void *)op);
++#else
++ return PyString_FromFormat("<cyfunction %s at %p>",
++ PyString_AsString(op->func_qualname), (void *)op);
+ #endif
+- __Pyx_PyThreadState_assign
+- __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
+- if (full_traceback) {
+- Py_XINCREF(old_exc);
+- Py_XINCREF(old_val);
+- Py_XINCREF(old_tb);
+- __Pyx_ErrRestore(old_exc, old_val, old_tb);
+- PyErr_PrintEx(1);
+- }
+- #if PY_MAJOR_VERSION < 3
+- ctx = PyString_FromString(name);
+- #else
+- ctx = PyUnicode_FromString(name);
+- #endif
+- __Pyx_ErrRestore(old_exc, old_val, old_tb);
+- if (!ctx) {
+- PyErr_WriteUnraisable(Py_None);
+- } else {
+- PyErr_WriteUnraisable(ctx);
+- Py_DECREF(ctx);
++}
++static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
++ PyCFunctionObject* f = (PyCFunctionObject*)func;
++ PyCFunction meth = f->m_ml->ml_meth;
++ Py_ssize_t size;
++ switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
++ case METH_VARARGS:
++ if (likely(kw == NULL || PyDict_Size(kw) == 0))
++ return (*meth)(self, arg);
++ break;
++ case METH_VARARGS | METH_KEYWORDS:
++ return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
++ case METH_NOARGS:
++ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
++ size = PyTuple_GET_SIZE(arg);
++ if (likely(size == 0))
++ return (*meth)(self, NULL);
++ PyErr_Format(PyExc_TypeError,
++ "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
++ f->m_ml->ml_name, size);
++ return NULL;
++ }
++ break;
++ case METH_O:
++ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
++ size = PyTuple_GET_SIZE(arg);
++ if (likely(size == 1)) {
++ PyObject *result, *arg0;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ arg0 = PyTuple_GET_ITEM(arg, 0);
++ #else
++ arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
++ #endif
++ result = (*meth)(self, arg0);
++ #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
++ Py_DECREF(arg0);
++ #endif
++ return result;
++ }
++ PyErr_Format(PyExc_TypeError,
++ "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
++ f->m_ml->ml_name, size);
++ return NULL;
++ }
++ break;
++ default:
++ PyErr_SetString(PyExc_SystemError, "Bad call flags in "
++ "__Pyx_CyFunction_Call. METH_OLDARGS is no "
++ "longer supported!");
++ return NULL;
+ }
+-#ifdef WITH_THREAD
+- if (nogil)
+- PyGILState_Release(state);
+-#endif
+-}
+-
+-/* SwapException */
+-#if CYTHON_FAST_THREAD_STATE
+-static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- #if CYTHON_USE_EXC_INFO_STACK
+- _PyErr_StackItem *exc_info = tstate->exc_info;
+- tmp_type = exc_info->exc_type;
+- tmp_value = exc_info->exc_value;
+- tmp_tb = exc_info->exc_traceback;
+- exc_info->exc_type = *type;
+- exc_info->exc_value = *value;
+- exc_info->exc_traceback = *tb;
+- #else
+- tmp_type = tstate->exc_type;
+- tmp_value = tstate->exc_value;
+- tmp_tb = tstate->exc_traceback;
+- tstate->exc_type = *type;
+- tstate->exc_value = *value;
+- tstate->exc_traceback = *tb;
+- #endif
+- *type = tmp_type;
+- *value = tmp_value;
+- *tb = tmp_tb;
+-}
+-#else
+-static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
+- PyErr_SetExcInfo(*type, *value, *tb);
+- *type = tmp_type;
+- *value = tmp_value;
+- *tb = tmp_tb;
++ PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
++ f->m_ml->ml_name);
++ return NULL;
+ }
+-#endif
+-
+-/* SetItemInt */
+-static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
+- int r;
+- if (!j) return -1;
+- r = PyObject_SetItem(o, j, v);
+- Py_DECREF(j);
+- return r;
++static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
++ return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
+ }
+-static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
+- CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
+-#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
+- if (is_list || PyList_CheckExact(o)) {
+- Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
+- if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
+- PyObject* old = PyList_GET_ITEM(o, n);
+- Py_INCREF(v);
+- PyList_SET_ITEM(o, n, v);
+- Py_DECREF(old);
+- return 1;
++static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
++ PyObject *result;
++ __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
++ if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
++ Py_ssize_t argc;
++ PyObject *new_args;
++ PyObject *self;
++ argc = PyTuple_GET_SIZE(args);
++ new_args = PyTuple_GetSlice(args, 1, argc);
++ if (unlikely(!new_args))
++ return NULL;
++ self = PyTuple_GetItem(args, 0);
++ if (unlikely(!self)) {
++ Py_DECREF(new_args);
++ return NULL;
+ }
++ result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
++ Py_DECREF(new_args);
+ } else {
+- PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+- if (likely(m && m->sq_ass_item)) {
+- if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+- Py_ssize_t l = m->sq_length(o);
+- if (likely(l >= 0)) {
+- i += l;
+- } else {
+- if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+- return -1;
+- PyErr_Clear();
+- }
+- }
+- return m->sq_ass_item(o, i, v);
+- }
++ result = __Pyx_CyFunction_Call(func, args, kw);
+ }
++ return result;
++}
++static PyTypeObject __pyx_CyFunctionType_type = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "cython_function_or_method",
++ sizeof(__pyx_CyFunctionObject),
++ 0,
++ (destructor) __Pyx_CyFunction_dealloc,
++ 0,
++ 0,
++ 0,
++#if PY_MAJOR_VERSION < 3
++ 0,
+ #else
+-#if CYTHON_COMPILING_IN_PYPY
+- if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
++ 0,
++#endif
++ (reprfunc) __Pyx_CyFunction_repr,
++ 0,
++ 0,
++ 0,
++ 0,
++ __Pyx_CyFunction_CallAsMethod,
++ 0,
++ 0,
++ 0,
++ 0,
++ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
++ 0,
++ (traverseproc) __Pyx_CyFunction_traverse,
++ (inquiry) __Pyx_CyFunction_clear,
++ 0,
++#if PY_VERSION_HEX < 0x030500A0
++ offsetof(__pyx_CyFunctionObject, func_weakreflist),
+ #else
+- if (is_list || PySequence_Check(o))
++ offsetof(PyCFunctionObject, m_weakreflist),
+ #endif
+- {
+- return PySequence_SetItem(o, i, v);
+- }
++ 0,
++ 0,
++ __pyx_CyFunction_methods,
++ __pyx_CyFunction_members,
++ __pyx_CyFunction_getsets,
++ 0,
++ 0,
++ __Pyx_CyFunction_descr_get,
++ 0,
++ offsetof(__pyx_CyFunctionObject, func_dict),
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++#if PY_VERSION_HEX >= 0x030400a1
++ 0,
+ #endif
+- return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
+-}
+-
+-/* FastTypeChecks */
+-#if CYTHON_COMPILING_IN_CPYTHON
+-static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
+- while (a) {
+- a = a->tp_base;
+- if (a == b)
+- return 1;
++#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0,
++#endif
++#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0,
++#endif
++#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0,
++#endif
++};
++static int __pyx_CyFunction_init(void) {
++ __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
++ if (unlikely(__pyx_CyFunctionType == NULL)) {
++ return -1;
+ }
+- return b == &PyBaseObject_Type;
++ return 0;
+ }
+-static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
+- PyObject *mro;
+- if (a == b) return 1;
+- mro = a->tp_mro;
+- if (likely(mro)) {
+- Py_ssize_t i, n;
+- n = PyTuple_GET_SIZE(mro);
+- for (i = 0; i < n; i++) {
+- if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
+- return 1;
+- }
+- return 0;
++static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
++ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
++ m->defaults = PyObject_Malloc(size);
++ if (unlikely(!m->defaults))
++ return PyErr_NoMemory();
++ memset(m->defaults, 0, size);
++ m->defaults_pyobjects = pyobjects;
++ m->defaults_size = size;
++ return m->defaults;
++}
++static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
++ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
++ m->defaults_tuple = tuple;
++ Py_INCREF(tuple);
++}
++static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
++ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
++ m->defaults_kwdict = dict;
++ Py_INCREF(dict);
++}
++static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
++ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
++ m->func_annotations = dict;
++ Py_INCREF(dict);
++}
++
++/* CythonFunction */
++static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
++ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
++ PyObject *op = __Pyx_CyFunction_Init(
++ PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
++ ml, flags, qualname, closure, module, globals, code
++ );
++ if (likely(op)) {
++ PyObject_GC_Track(op);
+ }
+- return __Pyx_InBases(a, b);
++ return op;
+ }
+-#if PY_MAJOR_VERSION == 2
+-static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
+- PyObject *exception, *value, *tb;
+- int res;
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __Pyx_ErrFetch(&exception, &value, &tb);
+- res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
+- if (unlikely(res == -1)) {
+- PyErr_WriteUnraisable(err);
+- res = 0;
++
++/* RaiseArgTupleInvalid */
++static void __Pyx_RaiseArgtupleInvalid(
++ const char* func_name,
++ int exact,
++ Py_ssize_t num_min,
++ Py_ssize_t num_max,
++ Py_ssize_t num_found)
++{
++ Py_ssize_t num_expected;
++ const char *more_or_less;
++ if (num_found < num_min) {
++ num_expected = num_min;
++ more_or_less = "at least";
++ } else {
++ num_expected = num_max;
++ more_or_less = "at most";
+ }
+- if (!res) {
+- res = PyObject_IsSubclass(err, exc_type2);
+- if (unlikely(res == -1)) {
+- PyErr_WriteUnraisable(err);
+- res = 0;
+- }
++ if (exact) {
++ more_or_less = "exactly";
+ }
+- __Pyx_ErrRestore(exception, value, tb);
+- return res;
++ PyErr_Format(PyExc_TypeError,
++ "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
++ func_name, more_or_less, num_expected,
++ (num_expected == 1) ? "" : "s", num_found);
+ }
+-#else
+-static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
+- int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
+- if (!res) {
+- res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
+- }
+- return res;
++
++/* RaiseDoubleKeywords */
++static void __Pyx_RaiseDoubleKeywordsError(
++ const char* func_name,
++ PyObject* kw_name)
++{
++ PyErr_Format(PyExc_TypeError,
++ #if PY_MAJOR_VERSION >= 3
++ "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
++ #else
++ "%s() got multiple values for keyword argument '%s'", func_name,
++ PyString_AsString(kw_name));
++ #endif
+ }
+-#endif
+-static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
+- Py_ssize_t i, n;
+- assert(PyExceptionClass_Check(exc_type));
+- n = PyTuple_GET_SIZE(tuple);
+-#if PY_MAJOR_VERSION >= 3
+- for (i=0; i<n; i++) {
+- if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
+- }
+-#endif
+- for (i=0; i<n; i++) {
+- PyObject *t = PyTuple_GET_ITEM(tuple, i);
++
++/* ParseKeywords */
++static int __Pyx_ParseOptionalKeywords(
++ PyObject *kwds,
++ PyObject **argnames[],
++ PyObject *kwds2,
++ PyObject *values[],
++ Py_ssize_t num_pos_args,
++ const char* function_name)
++{
++ PyObject *key = 0, *value = 0;
++ Py_ssize_t pos = 0;
++ PyObject*** name;
++ PyObject*** first_kw_arg = argnames + num_pos_args;
++ while (PyDict_Next(kwds, &pos, &key, &value)) {
++ name = first_kw_arg;
++ while (*name && (**name != key)) name++;
++ if (*name) {
++ values[name-argnames] = value;
++ continue;
++ }
++ name = first_kw_arg;
+ #if PY_MAJOR_VERSION < 3
+- if (likely(exc_type == t)) return 1;
++ if (likely(PyString_Check(key))) {
++ while (*name) {
++ if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
++ && _PyString_Eq(**name, key)) {
++ values[name-argnames] = value;
++ break;
++ }
++ name++;
++ }
++ if (*name) continue;
++ else {
++ PyObject*** argname = argnames;
++ while (argname != first_kw_arg) {
++ if ((**argname == key) || (
++ (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
++ && _PyString_Eq(**argname, key))) {
++ goto arg_passed_twice;
++ }
++ argname++;
++ }
++ }
++ } else
+ #endif
+- if (likely(PyExceptionClass_Check(t))) {
+- if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
++ if (likely(PyUnicode_Check(key))) {
++ while (*name) {
++ int cmp = (**name == key) ? 0 :
++ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
++ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
++ #endif
++ PyUnicode_Compare(**name, key);
++ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
++ if (cmp == 0) {
++ values[name-argnames] = value;
++ break;
++ }
++ name++;
++ }
++ if (*name) continue;
++ else {
++ PyObject*** argname = argnames;
++ while (argname != first_kw_arg) {
++ int cmp = (**argname == key) ? 0 :
++ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
++ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
++ #endif
++ PyUnicode_Compare(**argname, key);
++ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
++ if (cmp == 0) goto arg_passed_twice;
++ argname++;
++ }
++ }
++ } else
++ goto invalid_keyword_type;
++ if (kwds2) {
++ if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+ } else {
++ goto invalid_keyword;
+ }
+ }
+ return 0;
++arg_passed_twice:
++ __Pyx_RaiseDoubleKeywordsError(function_name, key);
++ goto bad;
++invalid_keyword_type:
++ PyErr_Format(PyExc_TypeError,
++ "%.200s() keywords must be strings", function_name);
++ goto bad;
++invalid_keyword:
++ PyErr_Format(PyExc_TypeError,
++ #if PY_MAJOR_VERSION < 3
++ "%.200s() got an unexpected keyword argument '%.200s'",
++ function_name, PyString_AsString(key));
++ #else
++ "%s() got an unexpected keyword argument '%U'",
++ function_name, key);
++ #endif
++bad:
++ return -1;
+ }
+-static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
+- if (likely(err == exc_type)) return 1;
+- if (likely(PyExceptionClass_Check(err))) {
+- if (likely(PyExceptionClass_Check(exc_type))) {
+- return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
+- } else if (likely(PyTuple_Check(exc_type))) {
+- return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
+- } else {
+- }
+- }
+- return PyErr_GivenExceptionMatches(err, exc_type);
++
++/* PyObjectSetAttrStr */
++#if CYTHON_USE_TYPE_SLOTS
++static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
++ PyTypeObject* tp = Py_TYPE(obj);
++ if (likely(tp->tp_setattro))
++ return tp->tp_setattro(obj, attr_name, value);
++#if PY_MAJOR_VERSION < 3
++ if (likely(tp->tp_setattr))
++ return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
++#endif
++ return PyObject_SetAttr(obj, attr_name, value);
+ }
+-static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
+- assert(PyExceptionClass_Check(exc_type1));
+- assert(PyExceptionClass_Check(exc_type2));
+- if (likely(err == exc_type1 || err == exc_type2)) return 1;
+- if (likely(PyExceptionClass_Check(err))) {
+- return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
++#endif
++
++/* PyIntBinop */
++#if !CYTHON_COMPILING_IN_PYPY
++static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
++ (void)inplace;
++ (void)zerodivision_check;
++ #if PY_MAJOR_VERSION < 3
++ if (likely(PyInt_CheckExact(op1))) {
++ const long b = intval;
++ long x;
++ long a = PyInt_AS_LONG(op1);
++ x = (long)((unsigned long)a + b);
++ if (likely((x^a) >= 0 || (x^b) >= 0))
++ return PyInt_FromLong(x);
++ return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+- return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
+-}
++ #endif
++ #if CYTHON_USE_PYLONG_INTERNALS
++ if (likely(PyLong_CheckExact(op1))) {
++ const long b = intval;
++ long a, x;
++#ifdef HAVE_LONG_LONG
++ const PY_LONG_LONG llb = intval;
++ PY_LONG_LONG lla, llx;
++#endif
++ const digit* digits = ((PyLongObject*)op1)->ob_digit;
++ const Py_ssize_t size = Py_SIZE(op1);
++ if (likely(__Pyx_sst_abs(size) <= 1)) {
++ a = likely(size) ? digits[0] : 0;
++ if (size == -1) a = -a;
++ } else {
++ switch (size) {
++ case -2:
++ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
++ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
++ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case -3:
++ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
++ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case 3:
++ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
++ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case -4:
++ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
++ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
+ #endif
+-
+-/* ExtTypeTest */
+-static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+- if (unlikely(!type)) {
+- PyErr_SetString(PyExc_SystemError, "Missing type object");
+- return 0;
+- }
+- if (likely(__Pyx_TypeCheck(obj, type)))
+- return 1;
+- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
+- Py_TYPE(obj)->tp_name, type->tp_name);
+- return 0;
+-}
+-
+-/* DictGetItem */
+-#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
+-static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
+- PyObject *value;
+- value = PyDict_GetItemWithError(d, key);
+- if (unlikely(!value)) {
+- if (!PyErr_Occurred()) {
+- if (unlikely(PyTuple_Check(key))) {
+- PyObject* args = PyTuple_Pack(1, key);
+- if (likely(args)) {
+- PyErr_SetObject(PyExc_KeyError, args);
+- Py_DECREF(args);
+- }
+- } else {
+- PyErr_SetObject(PyExc_KeyError, key);
++ }
++ CYTHON_FALLTHROUGH;
++ case 4:
++ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
++ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ }
+- return NULL;
+- }
+- Py_INCREF(value);
+- return value;
+-}
++ x = a + b;
++ return PyLong_FromLong(x);
++#ifdef HAVE_LONG_LONG
++ long_long:
++ llx = lla + llb;
++ return PyLong_FromLongLong(llx);
+ #endif
+-
+-/* RaiseTooManyValuesToUnpack */
+-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+- PyErr_Format(PyExc_ValueError,
+- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+-}
+-
+-/* RaiseNeedMoreValuesToUnpack */
+-static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+- PyErr_Format(PyExc_ValueError,
+- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
+- index, (index == 1) ? "" : "s");
+-}
+-
+-/* IterFinish */
+-static CYTHON_INLINE int __Pyx_IterFinish(void) {
+-#if CYTHON_FAST_THREAD_STATE
+- PyThreadState *tstate = __Pyx_PyThreadState_Current;
+- PyObject* exc_type = tstate->curexc_type;
+- if (unlikely(exc_type)) {
+- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
+- PyObject *exc_value, *exc_tb;
+- exc_value = tstate->curexc_value;
+- exc_tb = tstate->curexc_traceback;
+- tstate->curexc_type = 0;
+- tstate->curexc_value = 0;
+- tstate->curexc_traceback = 0;
+- Py_DECREF(exc_type);
+- Py_XDECREF(exc_value);
+- Py_XDECREF(exc_tb);
+- return 0;
+- } else {
+- return -1;
+- }
+- }
+- return 0;
+-#else
+- if (unlikely(PyErr_Occurred())) {
+- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+- PyErr_Clear();
+- return 0;
+- } else {
+- return -1;
+- }
++
++
+ }
+- return 0;
+-#endif
+-}
+-
+-/* UnpackItemEndCheck */
+-static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+- if (unlikely(retval)) {
+- Py_DECREF(retval);
+- __Pyx_RaiseTooManyValuesError(expected);
+- return -1;
+- } else {
+- return __Pyx_IterFinish();
++ #endif
++ if (PyFloat_CheckExact(op1)) {
++ const long b = intval;
++ double a = PyFloat_AS_DOUBLE(op1);
++ double result;
++ PyFPE_START_PROTECT("add", return NULL)
++ result = ((double)a) + (double)b;
++ PyFPE_END_PROTECT(result)
++ return PyFloat_FromDouble(result);
+ }
+- return 0;
++ return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
+ }
++#endif
+
+-/* Import */
+-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+- PyObject *empty_list = 0;
+- PyObject *module = 0;
+- PyObject *global_dict = 0;
+- PyObject *empty_dict = 0;
+- PyObject *list;
++/* PyIntBinop */
++#if !CYTHON_COMPILING_IN_PYPY
++static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
++ (void)inplace;
++ (void)zerodivision_check;
+ #if PY_MAJOR_VERSION < 3
+- PyObject *py_import;
+- py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+- if (!py_import)
+- goto bad;
+- #endif
+- if (from_list)
+- list = from_list;
+- else {
+- empty_list = PyList_New(0);
+- if (!empty_list)
+- goto bad;
+- list = empty_list;
++ if (likely(PyInt_CheckExact(op1))) {
++ const long b = intval;
++ long x;
++ long a = PyInt_AS_LONG(op1);
++ x = (long)((unsigned long)a - b);
++ if (likely((x^a) >= 0 || (x^~b) >= 0))
++ return PyInt_FromLong(x);
++ return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
+ }
+- global_dict = PyModule_GetDict(__pyx_m);
+- if (!global_dict)
+- goto bad;
+- empty_dict = PyDict_New();
+- if (!empty_dict)
+- goto bad;
+- {
+- #if PY_MAJOR_VERSION >= 3
+- if (level == -1) {
+- if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
+- module = PyImport_ImportModuleLevelObject(
+- name, global_dict, empty_dict, list, 1);
+- if (!module) {
+- if (!PyErr_ExceptionMatches(PyExc_ImportError))
+- goto bad;
+- PyErr_Clear();
+- }
++ #endif
++ #if CYTHON_USE_PYLONG_INTERNALS
++ if (likely(PyLong_CheckExact(op1))) {
++ const long b = intval;
++ long a, x;
++#ifdef HAVE_LONG_LONG
++ const PY_LONG_LONG llb = intval;
++ PY_LONG_LONG lla, llx;
++#endif
++ const digit* digits = ((PyLongObject*)op1)->ob_digit;
++ const Py_ssize_t size = Py_SIZE(op1);
++ if (likely(__Pyx_sst_abs(size) <= 1)) {
++ a = likely(size) ? digits[0] : 0;
++ if (size == -1) a = -a;
++ } else {
++ switch (size) {
++ case -2:
++ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
++ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
++ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case -3:
++ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
++ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case 3:
++ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
++ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case -4:
++ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
++ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case 4:
++ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
++ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
+ }
+- level = 0;
+- }
+- #endif
+- if (!module) {
+- #if PY_MAJOR_VERSION < 3
+- PyObject *py_level = PyInt_FromLong(level);
+- if (!py_level)
+- goto bad;
+- module = PyObject_CallFunctionObjArgs(py_import,
+- name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
+- Py_DECREF(py_level);
+- #else
+- module = PyImport_ImportModuleLevelObject(
+- name, global_dict, empty_dict, list, level);
+- #endif
+ }
+- }
+-bad:
+- #if PY_MAJOR_VERSION < 3
+- Py_XDECREF(py_import);
+- #endif
+- Py_XDECREF(empty_list);
+- Py_XDECREF(empty_dict);
+- return module;
+-}
+-
+-/* ImportFrom */
+-static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
+- PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
+- if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+- PyErr_Format(PyExc_ImportError,
+- #if PY_MAJOR_VERSION < 3
+- "cannot import name %.230s", PyString_AS_STRING(name));
+- #else
+- "cannot import name %S", name);
+- #endif
+- }
+- return value;
+-}
+-
+-/* HasAttr */
+-static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
+- PyObject *r;
+- if (unlikely(!__Pyx_PyBaseString_Check(n))) {
+- PyErr_SetString(PyExc_TypeError,
+- "hasattr(): attribute name must be string");
+- return -1;
+- }
+- r = __Pyx_GetAttr(o, n);
+- if (unlikely(!r)) {
+- PyErr_Clear();
+- return 0;
+- } else {
+- Py_DECREF(r);
+- return 1;
+- }
+-}
+-
+-/* PyObject_GenericGetAttrNoDict */
+-#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+-static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
+- PyErr_Format(PyExc_AttributeError,
+-#if PY_MAJOR_VERSION >= 3
+- "'%.50s' object has no attribute '%U'",
+- tp->tp_name, attr_name);
+-#else
+- "'%.50s' object has no attribute '%.400s'",
+- tp->tp_name, PyString_AS_STRING(attr_name));
++ x = a - b;
++ return PyLong_FromLong(x);
++#ifdef HAVE_LONG_LONG
++ long_long:
++ llx = lla - llb;
++ return PyLong_FromLongLong(llx);
+ #endif
+- return NULL;
+-}
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
+- PyObject *descr;
+- PyTypeObject *tp = Py_TYPE(obj);
+- if (unlikely(!PyString_Check(attr_name))) {
+- return PyObject_GenericGetAttr(obj, attr_name);
+- }
+- assert(!tp->tp_dictoffset);
+- descr = _PyType_Lookup(tp, attr_name);
+- if (unlikely(!descr)) {
+- return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
++
++
+ }
+- Py_INCREF(descr);
+- #if PY_MAJOR_VERSION < 3
+- if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
+ #endif
+- {
+- descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
+- if (unlikely(f)) {
+- PyObject *res = f(descr, obj, (PyObject *)tp);
+- Py_DECREF(descr);
+- return res;
+- }
++ if (PyFloat_CheckExact(op1)) {
++ const long b = intval;
++ double a = PyFloat_AS_DOUBLE(op1);
++ double result;
++ PyFPE_START_PROTECT("subtract", return NULL)
++ result = ((double)a) - (double)b;
++ PyFPE_END_PROTECT(result)
++ return PyFloat_FromDouble(result);
+ }
+- return descr;
++ return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
+ }
+ #endif
+
+-/* PyObject_GenericGetAttr */
+-#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+-static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
+- if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
+- return PyObject_GenericGetAttr(obj, attr_name);
+- }
+- return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
+-}
++/* WriteUnraisableException */
++static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
++ CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
++ int full_traceback, CYTHON_UNUSED int nogil) {
++ PyObject *old_exc, *old_val, *old_tb;
++ PyObject *ctx;
++ __Pyx_PyThreadState_declare
++#ifdef WITH_THREAD
++ PyGILState_STATE state;
++ if (nogil)
++ state = PyGILState_Ensure();
++#ifdef _MSC_VER
++ else state = (PyGILState_STATE)-1;
+ #endif
+-
+-/* SetVTable */
+-static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+-#if PY_VERSION_HEX >= 0x02070000
+- PyObject *ob = PyCapsule_New(vtable, 0, 0);
+-#else
+- PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
+ #endif
+- if (!ob)
+- goto bad;
+- if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
+- goto bad;
+- Py_DECREF(ob);
+- return 0;
+-bad:
+- Py_XDECREF(ob);
+- return -1;
+-}
+-
+-/* PyObjectGetAttrStrNoError */
+-static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
+- __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+- if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
+- __Pyx_PyErr_Clear();
+-}
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
+- PyObject *result;
+-#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
+- PyTypeObject* tp = Py_TYPE(obj);
+- if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
+- return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
++ __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
++ if (full_traceback) {
++ Py_XINCREF(old_exc);
++ Py_XINCREF(old_val);
++ Py_XINCREF(old_tb);
++ __Pyx_ErrRestore(old_exc, old_val, old_tb);
++ PyErr_PrintEx(1);
+ }
+-#endif
+- result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
+- if (unlikely(!result)) {
+- __Pyx_PyObject_GetAttrStr_ClearAttributeError();
++ #if PY_MAJOR_VERSION < 3
++ ctx = PyString_FromString(name);
++ #else
++ ctx = PyUnicode_FromString(name);
++ #endif
++ __Pyx_ErrRestore(old_exc, old_val, old_tb);
++ if (!ctx) {
++ PyErr_WriteUnraisable(Py_None);
++ } else {
++ PyErr_WriteUnraisable(ctx);
++ Py_DECREF(ctx);
+ }
+- return result;
++#ifdef WITH_THREAD
++ if (nogil)
++ PyGILState_Release(state);
++#endif
+ }
+
+-/* SetupReduce */
+-static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
+- int ret;
+- PyObject *name_attr;
+- name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
+- if (likely(name_attr)) {
+- ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
+- } else {
+- ret = -1;
+- }
+- if (unlikely(ret < 0)) {
+- PyErr_Clear();
+- ret = 0;
+- }
+- Py_XDECREF(name_attr);
+- return ret;
++/* SwapException */
++#if CYTHON_FAST_THREAD_STATE
++static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ #if CYTHON_USE_EXC_INFO_STACK
++ _PyErr_StackItem *exc_info = tstate->exc_info;
++ tmp_type = exc_info->exc_type;
++ tmp_value = exc_info->exc_value;
++ tmp_tb = exc_info->exc_traceback;
++ exc_info->exc_type = *type;
++ exc_info->exc_value = *value;
++ exc_info->exc_traceback = *tb;
++ #else
++ tmp_type = tstate->exc_type;
++ tmp_value = tstate->exc_value;
++ tmp_tb = tstate->exc_traceback;
++ tstate->exc_type = *type;
++ tstate->exc_value = *value;
++ tstate->exc_traceback = *tb;
++ #endif
++ *type = tmp_type;
++ *value = tmp_value;
++ *tb = tmp_tb;
+ }
+-static int __Pyx_setup_reduce(PyObject* type_obj) {
+- int ret = 0;
+- PyObject *object_reduce = NULL;
+- PyObject *object_reduce_ex = NULL;
+- PyObject *reduce = NULL;
+- PyObject *reduce_ex = NULL;
+- PyObject *reduce_cython = NULL;
+- PyObject *setstate = NULL;
+- PyObject *setstate_cython = NULL;
+-#if CYTHON_USE_PYTYPE_LOOKUP
+- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
+-#else
+- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
+-#endif
+-#if CYTHON_USE_PYTYPE_LOOKUP
+- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
+-#else
+- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
+-#endif
+- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
+- if (reduce_ex == object_reduce_ex) {
+-#if CYTHON_USE_PYTYPE_LOOKUP
+- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
+ #else
+- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
++static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
++ PyErr_SetExcInfo(*type, *value, *tb);
++ *type = tmp_type;
++ *value = tmp_value;
++ *tb = tmp_tb;
++}
+ #endif
+- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
+- if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
+- reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
+- if (likely(reduce_cython)) {
+- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
+- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
+- } else if (reduce == object_reduce || PyErr_Occurred()) {
+- goto __PYX_BAD;
+- }
+- setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
+- if (!setstate) PyErr_Clear();
+- if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
+- setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
+- if (likely(setstate_cython)) {
+- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
+- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
+- } else if (!setstate || PyErr_Occurred()) {
+- goto __PYX_BAD;
++
++/* SetItemInt */
++static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
++ int r;
++ if (!j) return -1;
++ r = PyObject_SetItem(o, j, v);
++ Py_DECREF(j);
++ return r;
++}
++static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
++ CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
++#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
++ if (is_list || PyList_CheckExact(o)) {
++ Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
++ if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
++ PyObject* old = PyList_GET_ITEM(o, n);
++ Py_INCREF(v);
++ PyList_SET_ITEM(o, n, v);
++ Py_DECREF(old);
++ return 1;
++ }
++ } else {
++ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
++ if (likely(m && m->sq_ass_item)) {
++ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
++ Py_ssize_t l = m->sq_length(o);
++ if (likely(l >= 0)) {
++ i += l;
++ } else {
++ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
++ return -1;
++ PyErr_Clear();
+ }
+ }
+- PyType_Modified((PyTypeObject*)type_obj);
++ return m->sq_ass_item(o, i, v);
+ }
+ }
+- goto __PYX_GOOD;
+-__PYX_BAD:
+- if (!PyErr_Occurred())
+- PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
+- ret = -1;
+-__PYX_GOOD:
+-#if !CYTHON_USE_PYTYPE_LOOKUP
+- Py_XDECREF(object_reduce);
+- Py_XDECREF(object_reduce_ex);
++#else
++#if CYTHON_COMPILING_IN_PYPY
++ if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
++#else
++ if (is_list || PySequence_Check(o))
+ #endif
+- Py_XDECREF(reduce);
+- Py_XDECREF(reduce_ex);
+- Py_XDECREF(reduce_cython);
+- Py_XDECREF(setstate);
+- Py_XDECREF(setstate_cython);
+- return ret;
++ {
++ return PySequence_SetItem(o, i, v);
++ }
++#endif
++ return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
+ }
+
+-/* CalculateMetaclass */
+-static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
+- Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
+- for (i=0; i < nbases; i++) {
+- PyTypeObject *tmptype;
+- PyObject *tmp = PyTuple_GET_ITEM(bases, i);
+- tmptype = Py_TYPE(tmp);
+-#if PY_MAJOR_VERSION < 3
+- if (tmptype == &PyClass_Type)
+- continue;
+-#endif
+- if (!metaclass) {
+- metaclass = tmptype;
+- continue;
++/* FastTypeChecks */
++#if CYTHON_COMPILING_IN_CPYTHON
++static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
++ while (a) {
++ a = a->tp_base;
++ if (a == b)
++ return 1;
++ }
++ return b == &PyBaseObject_Type;
++}
++static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
++ PyObject *mro;
++ if (a == b) return 1;
++ mro = a->tp_mro;
++ if (likely(mro)) {
++ Py_ssize_t i, n;
++ n = PyTuple_GET_SIZE(mro);
++ for (i = 0; i < n; i++) {
++ if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
++ return 1;
+ }
+- if (PyType_IsSubtype(metaclass, tmptype))
+- continue;
+- if (PyType_IsSubtype(tmptype, metaclass)) {
+- metaclass = tmptype;
+- continue;
++ return 0;
++ }
++ return __Pyx_InBases(a, b);
++}
++#if PY_MAJOR_VERSION == 2
++static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
++ PyObject *exception, *value, *tb;
++ int res;
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __Pyx_ErrFetch(&exception, &value, &tb);
++ res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
++ if (unlikely(res == -1)) {
++ PyErr_WriteUnraisable(err);
++ res = 0;
++ }
++ if (!res) {
++ res = PyObject_IsSubclass(err, exc_type2);
++ if (unlikely(res == -1)) {
++ PyErr_WriteUnraisable(err);
++ res = 0;
+ }
+- PyErr_SetString(PyExc_TypeError,
+- "metaclass conflict: "
+- "the metaclass of a derived class "
+- "must be a (non-strict) subclass "
+- "of the metaclasses of all its bases");
+- return NULL;
+ }
+- if (!metaclass) {
+-#if PY_MAJOR_VERSION < 3
+- metaclass = &PyClass_Type;
++ __Pyx_ErrRestore(exception, value, tb);
++ return res;
++}
+ #else
+- metaclass = &PyType_Type;
+-#endif
++static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
++ int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
++ if (!res) {
++ res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
+ }
+- Py_INCREF((PyObject*) metaclass);
+- return (PyObject*) metaclass;
++ return res;
+ }
+-
+-/* Py3ClassCreate */
+-static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
+- PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
+- PyObject *ns;
+- if (metaclass) {
+- PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
+- if (prep) {
+- PyObject *pargs = PyTuple_Pack(2, name, bases);
+- if (unlikely(!pargs)) {
+- Py_DECREF(prep);
+- return NULL;
+- }
+- ns = PyObject_Call(prep, pargs, mkw);
+- Py_DECREF(prep);
+- Py_DECREF(pargs);
++#endif
++static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
++ Py_ssize_t i, n;
++ assert(PyExceptionClass_Check(exc_type));
++ n = PyTuple_GET_SIZE(tuple);
++#if PY_MAJOR_VERSION >= 3
++ for (i=0; i<n; i++) {
++ if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
++ }
++#endif
++ for (i=0; i<n; i++) {
++ PyObject *t = PyTuple_GET_ITEM(tuple, i);
++ #if PY_MAJOR_VERSION < 3
++ if (likely(exc_type == t)) return 1;
++ #endif
++ if (likely(PyExceptionClass_Check(t))) {
++ if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
+ } else {
+- if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
+- return NULL;
+- PyErr_Clear();
+- ns = PyDict_New();
+ }
+- } else {
+- ns = PyDict_New();
+ }
+- if (unlikely(!ns))
+- return NULL;
+- if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
+- if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
+- if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
+- return ns;
+-bad:
+- Py_DECREF(ns);
+- return NULL;
++ return 0;
+ }
+-static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
+- PyObject *dict, PyObject *mkw,
+- int calculate_metaclass, int allow_py2_metaclass) {
+- PyObject *result, *margs;
+- PyObject *owned_metaclass = NULL;
+- if (allow_py2_metaclass) {
+- owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
+- if (owned_metaclass) {
+- metaclass = owned_metaclass;
+- } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
+- PyErr_Clear();
++static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
++ if (likely(err == exc_type)) return 1;
++ if (likely(PyExceptionClass_Check(err))) {
++ if (likely(PyExceptionClass_Check(exc_type))) {
++ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
++ } else if (likely(PyTuple_Check(exc_type))) {
++ return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
+ } else {
+- return NULL;
+ }
+ }
+- if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
+- metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
+- Py_XDECREF(owned_metaclass);
+- if (unlikely(!metaclass))
+- return NULL;
+- owned_metaclass = metaclass;
+- }
+- margs = PyTuple_Pack(3, name, bases, dict);
+- if (unlikely(!margs)) {
+- result = NULL;
+- } else {
+- result = PyObject_Call(metaclass, margs, mkw);
+- Py_DECREF(margs);
++ return PyErr_GivenExceptionMatches(err, exc_type);
++}
++static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
++ assert(PyExceptionClass_Check(exc_type1));
++ assert(PyExceptionClass_Check(exc_type2));
++ if (likely(err == exc_type1 || err == exc_type2)) return 1;
++ if (likely(PyExceptionClass_Check(err))) {
++ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
+ }
+- Py_XDECREF(owned_metaclass);
+- return result;
++ return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
+ }
++#endif
+
+-/* GetNameInClass */
+-static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
+- PyObject *result;
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
+- return NULL;
+- __Pyx_PyErr_Clear();
+- __Pyx_GetModuleGlobalNameUncached(result, name);
+- return result;
+-}
+-static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
+- PyObject *result;
+- result = __Pyx_PyObject_GetAttrStr(nmspace, name);
+- if (!result) {
+- result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
++/* ExtTypeTest */
++static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
++ if (unlikely(!type)) {
++ PyErr_SetString(PyExc_SystemError, "Missing type object");
++ return 0;
+ }
+- return result;
++ if (likely(__Pyx_TypeCheck(obj, type)))
++ return 1;
++ PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
++ Py_TYPE(obj)->tp_name, type->tp_name);
++ return 0;
+ }
+
+-/* CLineInTraceback */
+-#ifndef CYTHON_CLINE_IN_TRACEBACK
+-static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
+- PyObject *use_cline;
+- PyObject *ptype, *pvalue, *ptraceback;
+-#if CYTHON_COMPILING_IN_CPYTHON
+- PyObject **cython_runtime_dict;
+-#endif
+- if (unlikely(!__pyx_cython_runtime)) {
+- return c_line;
+- }
+- __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
+-#if CYTHON_COMPILING_IN_CPYTHON
+- cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
+- if (likely(cython_runtime_dict)) {
+- __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
+- use_cline, *cython_runtime_dict,
+- __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
+- } else
+-#endif
+- {
+- PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
+- if (use_cline_obj) {
+- use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
+- Py_DECREF(use_cline_obj);
+- } else {
+- PyErr_Clear();
+- use_cline = NULL;
+- }
+- }
+- if (!use_cline) {
+- c_line = 0;
+- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
+- }
+- else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
+- c_line = 0;
++/* DictGetItem */
++#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
++static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
++ PyObject *value;
++ value = PyDict_GetItemWithError(d, key);
++ if (unlikely(!value)) {
++ if (!PyErr_Occurred()) {
++ if (unlikely(PyTuple_Check(key))) {
++ PyObject* args = PyTuple_Pack(1, key);
++ if (likely(args)) {
++ PyErr_SetObject(PyExc_KeyError, args);
++ Py_DECREF(args);
++ }
++ } else {
++ PyErr_SetObject(PyExc_KeyError, key);
++ }
++ }
++ return NULL;
+ }
+- __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
+- return c_line;
++ Py_INCREF(value);
++ return value;
+ }
+ #endif
+
+-/* CodeObjectCache */
+-static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+- int start = 0, mid = 0, end = count - 1;
+- if (end >= 0 && code_line > entries[end].code_line) {
+- return count;
+- }
+- while (start < end) {
+- mid = start + (end - start) / 2;
+- if (code_line < entries[mid].code_line) {
+- end = mid;
+- } else if (code_line > entries[mid].code_line) {
+- start = mid + 1;
++/* RaiseTooManyValuesToUnpack */
++static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
++ PyErr_Format(PyExc_ValueError,
++ "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
++}
++
++/* RaiseNeedMoreValuesToUnpack */
++static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
++ PyErr_Format(PyExc_ValueError,
++ "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
++ index, (index == 1) ? "" : "s");
++}
++
++/* IterFinish */
++static CYTHON_INLINE int __Pyx_IterFinish(void) {
++#if CYTHON_FAST_THREAD_STATE
++ PyThreadState *tstate = __Pyx_PyThreadState_Current;
++ PyObject* exc_type = tstate->curexc_type;
++ if (unlikely(exc_type)) {
++ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
++ PyObject *exc_value, *exc_tb;
++ exc_value = tstate->curexc_value;
++ exc_tb = tstate->curexc_traceback;
++ tstate->curexc_type = 0;
++ tstate->curexc_value = 0;
++ tstate->curexc_traceback = 0;
++ Py_DECREF(exc_type);
++ Py_XDECREF(exc_value);
++ Py_XDECREF(exc_tb);
++ return 0;
+ } else {
+- return mid;
++ return -1;
+ }
+ }
+- if (code_line <= entries[mid].code_line) {
+- return mid;
+- } else {
+- return mid + 1;
++ return 0;
++#else
++ if (unlikely(PyErr_Occurred())) {
++ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
++ PyErr_Clear();
++ return 0;
++ } else {
++ return -1;
++ }
+ }
++ return 0;
++#endif
+ }
+-static PyCodeObject *__pyx_find_code_object(int code_line) {
+- PyCodeObject* code_object;
+- int pos;
+- if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+- return NULL;
+- }
+- pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+- if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+- return NULL;
++
++/* UnpackItemEndCheck */
++static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
++ if (unlikely(retval)) {
++ Py_DECREF(retval);
++ __Pyx_RaiseTooManyValuesError(expected);
++ return -1;
++ } else {
++ return __Pyx_IterFinish();
+ }
+- code_object = __pyx_code_cache.entries[pos].code_object;
+- Py_INCREF(code_object);
+- return code_object;
++ return 0;
+ }
+-static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+- int pos, i;
+- __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+- if (unlikely(!code_line)) {
+- return;
++
++/* Import */
++static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
++ PyObject *empty_list = 0;
++ PyObject *module = 0;
++ PyObject *global_dict = 0;
++ PyObject *empty_dict = 0;
++ PyObject *list;
++ #if PY_MAJOR_VERSION < 3
++ PyObject *py_import;
++ py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
++ if (!py_import)
++ goto bad;
++ #endif
++ if (from_list)
++ list = from_list;
++ else {
++ empty_list = PyList_New(0);
++ if (!empty_list)
++ goto bad;
++ list = empty_list;
+ }
+- if (unlikely(!entries)) {
+- entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+- if (likely(entries)) {
+- __pyx_code_cache.entries = entries;
+- __pyx_code_cache.max_count = 64;
+- __pyx_code_cache.count = 1;
+- entries[0].code_line = code_line;
+- entries[0].code_object = code_object;
+- Py_INCREF(code_object);
++ global_dict = PyModule_GetDict(__pyx_m);
++ if (!global_dict)
++ goto bad;
++ empty_dict = PyDict_New();
++ if (!empty_dict)
++ goto bad;
++ {
++ #if PY_MAJOR_VERSION >= 3
++ if (level == -1) {
++ if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
++ module = PyImport_ImportModuleLevelObject(
++ name, global_dict, empty_dict, list, 1);
++ if (!module) {
++ if (!PyErr_ExceptionMatches(PyExc_ImportError))
++ goto bad;
++ PyErr_Clear();
++ }
++ }
++ level = 0;
+ }
+- return;
+- }
+- pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+- if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+- PyCodeObject* tmp = entries[pos].code_object;
+- entries[pos].code_object = code_object;
+- Py_DECREF(tmp);
+- return;
+- }
+- if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+- int new_max = __pyx_code_cache.max_count + 64;
+- entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+- __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
+- if (unlikely(!entries)) {
+- return;
++ #endif
++ if (!module) {
++ #if PY_MAJOR_VERSION < 3
++ PyObject *py_level = PyInt_FromLong(level);
++ if (!py_level)
++ goto bad;
++ module = PyObject_CallFunctionObjArgs(py_import,
++ name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
++ Py_DECREF(py_level);
++ #else
++ module = PyImport_ImportModuleLevelObject(
++ name, global_dict, empty_dict, list, level);
++ #endif
+ }
+- __pyx_code_cache.entries = entries;
+- __pyx_code_cache.max_count = new_max;
+- }
+- for (i=__pyx_code_cache.count; i>pos; i--) {
+- entries[i] = entries[i-1];
+ }
+- entries[pos].code_line = code_line;
+- entries[pos].code_object = code_object;
+- __pyx_code_cache.count++;
+- Py_INCREF(code_object);
+-}
+-
+-/* AddTraceback */
+-#include "compile.h"
+-#include "frameobject.h"
+-#include "traceback.h"
+-static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+- const char *funcname, int c_line,
+- int py_line, const char *filename) {
+- PyCodeObject *py_code = 0;
+- PyObject *py_srcfile = 0;
+- PyObject *py_funcname = 0;
++bad:
+ #if PY_MAJOR_VERSION < 3
+- py_srcfile = PyString_FromString(filename);
+- #else
+- py_srcfile = PyUnicode_FromString(filename);
++ Py_XDECREF(py_import);
+ #endif
+- if (!py_srcfile) goto bad;
+- if (c_line) {
+- #if PY_MAJOR_VERSION < 3
+- py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+- #else
+- py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+- #endif
+- }
+- else {
++ Py_XDECREF(empty_list);
++ Py_XDECREF(empty_dict);
++ return module;
++}
++
++/* ImportFrom */
++static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
++ PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
++ if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
++ PyErr_Format(PyExc_ImportError,
+ #if PY_MAJOR_VERSION < 3
+- py_funcname = PyString_FromString(funcname);
++ "cannot import name %.230s", PyString_AS_STRING(name));
+ #else
+- py_funcname = PyUnicode_FromString(funcname);
++ "cannot import name %S", name);
+ #endif
+ }
+- if (!py_funcname) goto bad;
+- py_code = __Pyx_PyCode_New(
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- __pyx_empty_bytes, /*PyObject *code,*/
+- __pyx_empty_tuple, /*PyObject *consts,*/
+- __pyx_empty_tuple, /*PyObject *names,*/
+- __pyx_empty_tuple, /*PyObject *varnames,*/
+- __pyx_empty_tuple, /*PyObject *freevars,*/
+- __pyx_empty_tuple, /*PyObject *cellvars,*/
+- py_srcfile, /*PyObject *filename,*/
+- py_funcname, /*PyObject *name,*/
+- py_line,
+- __pyx_empty_bytes /*PyObject *lnotab*/
+- );
+- Py_DECREF(py_srcfile);
+- Py_DECREF(py_funcname);
+- return py_code;
+-bad:
+- Py_XDECREF(py_srcfile);
+- Py_XDECREF(py_funcname);
+- return NULL;
++ return value;
+ }
+-static void __Pyx_AddTraceback(const char *funcname, int c_line,
+- int py_line, const char *filename) {
+- PyCodeObject *py_code = 0;
+- PyFrameObject *py_frame = 0;
+- PyThreadState *tstate = __Pyx_PyThreadState_Current;
+- if (c_line) {
+- c_line = __Pyx_CLineForTraceback(tstate, c_line);
++
++/* HasAttr */
++static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
++ PyObject *r;
++ if (unlikely(!__Pyx_PyBaseString_Check(n))) {
++ PyErr_SetString(PyExc_TypeError,
++ "hasattr(): attribute name must be string");
++ return -1;
+ }
+- py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
+- if (!py_code) {
+- py_code = __Pyx_CreateCodeObjectForTraceback(
+- funcname, c_line, py_line, filename);
+- if (!py_code) goto bad;
+- __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
++ r = __Pyx_GetAttr(o, n);
++ if (unlikely(!r)) {
++ PyErr_Clear();
++ return 0;
++ } else {
++ Py_DECREF(r);
++ return 1;
+ }
+- py_frame = PyFrame_New(
+- tstate, /*PyThreadState *tstate,*/
+- py_code, /*PyCodeObject *code,*/
+- __pyx_d, /*PyObject *globals,*/
+- 0 /*PyObject *locals*/
+- );
+- if (!py_frame) goto bad;
+- __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
+- PyTraceBack_Here(py_frame);
+-bad:
+- Py_XDECREF(py_code);
+- Py_XDECREF(py_frame);
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(int) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(int) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
+- }
+- } else {
+- if (sizeof(int) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
++/* PyObject_GenericGetAttrNoDict */
++#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
++static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
++ PyErr_Format(PyExc_AttributeError,
++#if PY_MAJOR_VERSION >= 3
++ "'%.50s' object has no attribute '%U'",
++ tp->tp_name, attr_name);
++#else
++ "'%.50s' object has no attribute '%.400s'",
++ tp->tp_name, PyString_AS_STRING(attr_name));
+ #endif
+- }
++ return NULL;
++}
++static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
++ PyObject *descr;
++ PyTypeObject *tp = Py_TYPE(obj);
++ if (unlikely(!PyString_Check(attr_name))) {
++ return PyObject_GenericGetAttr(obj, attr_name);
++ }
++ assert(!tp->tp_dictoffset);
++ descr = _PyType_Lookup(tp, attr_name);
++ if (unlikely(!descr)) {
++ return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
+ }
++ Py_INCREF(descr);
++ #if PY_MAJOR_VERSION < 3
++ if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
++ #endif
+ {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(int),
+- little, !is_unsigned);
++ descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
++ if (unlikely(f)) {
++ PyObject *res = f(descr, obj, (PyObject *)tp);
++ Py_DECREF(descr);
++ return res;
++ }
+ }
++ return descr;
+ }
++#endif
+
+-/* CIntFromPyVerify */
+-#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
+- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
+-#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
+- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
+-#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
+- {\
+- func_type value = func_value;\
+- if (sizeof(target_type) < sizeof(func_type)) {\
+- if (unlikely(value != (func_type) (target_type) value)) {\
+- func_type zero = 0;\
+- if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
+- return (target_type) -1;\
+- if (is_unsigned && unlikely(value < zero))\
+- goto raise_neg_overflow;\
+- else\
+- goto raise_overflow;\
+- }\
+- }\
+- return (target_type) value;\
++/* PyObject_GenericGetAttr */
++#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
++static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
++ if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
++ return PyObject_GenericGetAttr(obj, attr_name);
+ }
++ return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
++}
++#endif
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_event_id(enum mpv_event_id value) {
+- const enum mpv_event_id neg_one = (enum mpv_event_id) ((enum mpv_event_id) 0 - (enum mpv_event_id) 1), const_zero = (enum mpv_event_id) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_event_id) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++/* SetVTable */
++static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
++#if PY_VERSION_HEX >= 0x02070000
++ PyObject *ob = PyCapsule_New(vtable, 0, 0);
++#else
++ PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
++#endif
++ if (!ob)
++ goto bad;
++ if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
++ goto bad;
++ Py_DECREF(ob);
++ return 0;
++bad:
++ Py_XDECREF(ob);
++ return -1;
++}
++
++/* PyObjectGetAttrStrNoError */
++static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
++ __Pyx_PyErr_Clear();
++}
++static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
++ PyObject *result;
++#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
++ PyTypeObject* tp = Py_TYPE(obj);
++ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
++ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
++ }
++#endif
++ result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
++ if (unlikely(!result)) {
++ __Pyx_PyObject_GetAttrStr_ClearAttributeError();
++ }
++ return result;
++}
++
++/* SetupReduce */
++static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
++ int ret;
++ PyObject *name_attr;
++ name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
++ if (likely(name_attr)) {
++ ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
++ } else {
++ ret = -1;
++ }
++ if (unlikely(ret < 0)) {
++ PyErr_Clear();
++ ret = 0;
++ }
++ Py_XDECREF(name_attr);
++ return ret;
++}
++static int __Pyx_setup_reduce(PyObject* type_obj) {
++ int ret = 0;
++ PyObject *object_reduce = NULL;
++ PyObject *object_reduce_ex = NULL;
++ PyObject *reduce = NULL;
++ PyObject *reduce_ex = NULL;
++ PyObject *reduce_cython = NULL;
++ PyObject *setstate = NULL;
++ PyObject *setstate_cython = NULL;
++#if CYTHON_USE_PYTYPE_LOOKUP
++ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
++#else
++ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
+ #endif
+- }
+- } else {
+- if (sizeof(enum mpv_event_id) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
++#if CYTHON_USE_PYTYPE_LOOKUP
++ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
++#else
++ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
++#endif
++ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
++ if (reduce_ex == object_reduce_ex) {
++#if CYTHON_USE_PYTYPE_LOOKUP
++ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
++#else
++ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
+ #endif
++ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
++ if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
++ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
++ if (likely(reduce_cython)) {
++ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
++ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
++ } else if (reduce == object_reduce || PyErr_Occurred()) {
++ goto __PYX_BAD;
++ }
++ setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
++ if (!setstate) PyErr_Clear();
++ if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
++ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
++ if (likely(setstate_cython)) {
++ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
++ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
++ } else if (!setstate || PyErr_Occurred()) {
++ goto __PYX_BAD;
++ }
++ }
++ PyType_Modified((PyTypeObject*)type_obj);
+ }
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_event_id),
+- little, !is_unsigned);
+- }
++ goto __PYX_GOOD;
++__PYX_BAD:
++ if (!PyErr_Occurred())
++ PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
++ ret = -1;
++__PYX_GOOD:
++#if !CYTHON_USE_PYTYPE_LOOKUP
++ Py_XDECREF(object_reduce);
++ Py_XDECREF(object_reduce_ex);
++#endif
++ Py_XDECREF(reduce);
++ Py_XDECREF(reduce_ex);
++ Py_XDECREF(reduce_cython);
++ Py_XDECREF(setstate);
++ Py_XDECREF(setstate_cython);
++ return ret;
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
+- const unsigned long neg_one = (unsigned long) ((unsigned long) 0 - (unsigned long) 1), const_zero = (unsigned long) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(unsigned long) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++/* CalculateMetaclass */
++static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
++ Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
++ for (i=0; i < nbases; i++) {
++ PyTypeObject *tmptype;
++ PyObject *tmp = PyTuple_GET_ITEM(bases, i);
++ tmptype = Py_TYPE(tmp);
++#if PY_MAJOR_VERSION < 3
++ if (tmptype == &PyClass_Type)
++ continue;
+ #endif
++ if (!metaclass) {
++ metaclass = tmptype;
++ continue;
+ }
+- } else {
+- if (sizeof(unsigned long) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
++ if (PyType_IsSubtype(metaclass, tmptype))
++ continue;
++ if (PyType_IsSubtype(tmptype, metaclass)) {
++ metaclass = tmptype;
++ continue;
+ }
++ PyErr_SetString(PyExc_TypeError,
++ "metaclass conflict: "
++ "the metaclass of a derived class "
++ "must be a (non-strict) subclass "
++ "of the metaclasses of all its bases");
++ return NULL;
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
+- little, !is_unsigned);
++ if (!metaclass) {
++#if PY_MAJOR_VERSION < 3
++ metaclass = &PyClass_Type;
++#else
++ metaclass = &PyType_Type;
++#endif
+ }
++ Py_INCREF((PyObject*) metaclass);
++ return (PyObject*) metaclass;
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_error(enum mpv_error value) {
+- const enum mpv_error neg_one = (enum mpv_error) ((enum mpv_error) 0 - (enum mpv_error) 1), const_zero = (enum mpv_error) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_error) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_error) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_error) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
++/* Py3ClassCreate */
++static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
++ PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
++ PyObject *ns;
++ if (metaclass) {
++ PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
++ if (prep) {
++ PyObject *pargs = PyTuple_Pack(2, name, bases);
++ if (unlikely(!pargs)) {
++ Py_DECREF(prep);
++ return NULL;
++ }
++ ns = PyObject_Call(prep, pargs, mkw);
++ Py_DECREF(prep);
++ Py_DECREF(pargs);
++ } else {
++ if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
++ return NULL;
++ PyErr_Clear();
++ ns = PyDict_New();
+ }
+ } else {
+- if (sizeof(enum mpv_error) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_error) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
+- }
+- }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_error),
+- little, !is_unsigned);
++ ns = PyDict_New();
+ }
++ if (unlikely(!ns))
++ return NULL;
++ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
++ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
++ if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
++ return ns;
++bad:
++ Py_DECREF(ns);
++ return NULL;
+ }
+-
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_log_level(enum mpv_log_level value) {
+- const enum mpv_log_level neg_one = (enum mpv_log_level) ((enum mpv_log_level) 0 - (enum mpv_log_level) 1), const_zero = (enum mpv_log_level) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_log_level) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
++static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
++ PyObject *dict, PyObject *mkw,
++ int calculate_metaclass, int allow_py2_metaclass) {
++ PyObject *result, *margs;
++ PyObject *owned_metaclass = NULL;
++ if (allow_py2_metaclass) {
++ owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
++ if (owned_metaclass) {
++ metaclass = owned_metaclass;
++ } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
++ PyErr_Clear();
++ } else {
++ return NULL;
+ }
++ }
++ if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
++ metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
++ Py_XDECREF(owned_metaclass);
++ if (unlikely(!metaclass))
++ return NULL;
++ owned_metaclass = metaclass;
++ }
++ margs = PyTuple_Pack(3, name, bases, dict);
++ if (unlikely(!margs)) {
++ result = NULL;
+ } else {
+- if (sizeof(enum mpv_log_level) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_log_level) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
+- }
++ result = PyObject_Call(metaclass, margs, mkw);
++ Py_DECREF(margs);
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_log_level),
+- little, !is_unsigned);
++ Py_XDECREF(owned_metaclass);
++ return result;
++}
++
++/* GetNameInClass */
++static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
++ PyObject *result;
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
++ return NULL;
++ __Pyx_PyErr_Clear();
++ __Pyx_GetModuleGlobalNameUncached(result, name);
++ return result;
++}
++static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
++ PyObject *result;
++ result = __Pyx_PyObject_GetAttrStr(nmspace, name);
++ if (!result) {
++ result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
+ }
++ return result;
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_end_file_reason(enum mpv_end_file_reason value) {
+- const enum mpv_end_file_reason neg_one = (enum mpv_end_file_reason) ((enum mpv_end_file_reason) 0 - (enum mpv_end_file_reason) 1), const_zero = (enum mpv_end_file_reason) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_end_file_reason) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
+- }
+- } else {
+- if (sizeof(enum mpv_end_file_reason) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_end_file_reason) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
++/* CLineInTraceback */
++#ifndef CYTHON_CLINE_IN_TRACEBACK
++static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
++ PyObject *use_cline;
++ PyObject *ptype, *pvalue, *ptraceback;
++#if CYTHON_COMPILING_IN_CPYTHON
++ PyObject **cython_runtime_dict;
+ #endif
+- }
++ if (unlikely(!__pyx_cython_runtime)) {
++ return c_line;
+ }
++ __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
++#if CYTHON_COMPILING_IN_CPYTHON
++ cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
++ if (likely(cython_runtime_dict)) {
++ __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
++ use_cline, *cython_runtime_dict,
++ __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
++ } else
++#endif
+ {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_end_file_reason),
+- little, !is_unsigned);
++ PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
++ if (use_cline_obj) {
++ use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
++ Py_DECREF(use_cline_obj);
++ } else {
++ PyErr_Clear();
++ use_cline = NULL;
++ }
++ }
++ if (!use_cline) {
++ c_line = 0;
++ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
++ }
++ else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
++ c_line = 0;
+ }
++ __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
++ return c_line;
+ }
+-
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_render_update_flag(enum mpv_render_update_flag value) {
+- const enum mpv_render_update_flag neg_one = (enum mpv_render_update_flag) ((enum mpv_render_update_flag) 0 - (enum mpv_render_update_flag) 1), const_zero = (enum mpv_render_update_flag) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_render_update_flag) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+ #endif
++
++/* CodeObjectCache */
++static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
++ int start = 0, mid = 0, end = count - 1;
++ if (end >= 0 && code_line > entries[end].code_line) {
++ return count;
++ }
++ while (start < end) {
++ mid = start + (end - start) / 2;
++ if (code_line < entries[mid].code_line) {
++ end = mid;
++ } else if (code_line > entries[mid].code_line) {
++ start = mid + 1;
++ } else {
++ return mid;
+ }
++ }
++ if (code_line <= entries[mid].code_line) {
++ return mid;
+ } else {
+- if (sizeof(enum mpv_render_update_flag) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_render_update_flag) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
+- }
++ return mid + 1;
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_render_update_flag),
+- little, !is_unsigned);
++}
++static PyCodeObject *__pyx_find_code_object(int code_line) {
++ PyCodeObject* code_object;
++ int pos;
++ if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
++ return NULL;
++ }
++ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
++ if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
++ return NULL;
+ }
++ code_object = __pyx_code_cache.entries[pos].code_object;
++ Py_INCREF(code_object);
++ return code_object;
+ }
+-
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
+- const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(int64_t) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
++static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
++ int pos, i;
++ __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
++ if (unlikely(!code_line)) {
++ return;
++ }
++ if (unlikely(!entries)) {
++ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
++ if (likely(entries)) {
++ __pyx_code_cache.entries = entries;
++ __pyx_code_cache.max_count = 64;
++ __pyx_code_cache.count = 1;
++ entries[0].code_line = code_line;
++ entries[0].code_object = code_object;
++ Py_INCREF(code_object);
+ }
+- } else {
+- if (sizeof(int64_t) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
++ return;
++ }
++ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
++ if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
++ PyCodeObject* tmp = entries[pos].code_object;
++ entries[pos].code_object = code_object;
++ Py_DECREF(tmp);
++ return;
++ }
++ if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
++ int new_max = __pyx_code_cache.max_count + 64;
++ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
++ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
++ if (unlikely(!entries)) {
++ return;
+ }
++ __pyx_code_cache.entries = entries;
++ __pyx_code_cache.max_count = new_max;
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(int64_t),
+- little, !is_unsigned);
++ for (i=__pyx_code_cache.count; i>pos; i--) {
++ entries[i] = entries[i-1];
+ }
++ entries[pos].code_line = code_line;
++ entries[pos].code_object = code_object;
++ __pyx_code_cache.count++;
++ Py_INCREF(code_object);
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
+- const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(uint64_t) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
+- }
+- } else {
+- if (sizeof(uint64_t) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
+- }
++/* AddTraceback */
++#include "compile.h"
++#include "frameobject.h"
++#include "traceback.h"
++static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
++ const char *funcname, int c_line,
++ int py_line, const char *filename) {
++ PyCodeObject *py_code = NULL;
++ PyObject *py_funcname = NULL;
++ #if PY_MAJOR_VERSION < 3
++ PyObject *py_srcfile = NULL;
++ py_srcfile = PyString_FromString(filename);
++ if (!py_srcfile) goto bad;
++ #endif
++ if (c_line) {
++ #if PY_MAJOR_VERSION < 3
++ py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
++ if (!py_funcname) goto bad;
++ #else
++ py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
++ if (!py_funcname) goto bad;
++ funcname = PyUnicode_AsUTF8(py_funcname);
++ if (!funcname) goto bad;
++ #endif
++ }
++ else {
++ #if PY_MAJOR_VERSION < 3
++ py_funcname = PyString_FromString(funcname);
++ if (!py_funcname) goto bad;
++ #endif
++ }
++ #if PY_MAJOR_VERSION < 3
++ py_code = __Pyx_PyCode_New(
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ __pyx_empty_bytes, /*PyObject *code,*/
++ __pyx_empty_tuple, /*PyObject *consts,*/
++ __pyx_empty_tuple, /*PyObject *names,*/
++ __pyx_empty_tuple, /*PyObject *varnames,*/
++ __pyx_empty_tuple, /*PyObject *freevars,*/
++ __pyx_empty_tuple, /*PyObject *cellvars,*/
++ py_srcfile, /*PyObject *filename,*/
++ py_funcname, /*PyObject *name,*/
++ py_line,
++ __pyx_empty_bytes /*PyObject *lnotab*/
++ );
++ Py_DECREF(py_srcfile);
++ #else
++ py_code = PyCode_NewEmpty(filename, funcname, py_line);
++ #endif
++ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
++ return py_code;
++bad:
++ Py_XDECREF(py_funcname);
++ #if PY_MAJOR_VERSION < 3
++ Py_XDECREF(py_srcfile);
++ #endif
++ return NULL;
++}
++static void __Pyx_AddTraceback(const char *funcname, int c_line,
++ int py_line, const char *filename) {
++ PyCodeObject *py_code = 0;
++ PyFrameObject *py_frame = 0;
++ PyThreadState *tstate = __Pyx_PyThreadState_Current;
++ if (c_line) {
++ c_line = __Pyx_CLineForTraceback(tstate, c_line);
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
+- little, !is_unsigned);
++ py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
++ if (!py_code) {
++ py_code = __Pyx_CreateCodeObjectForTraceback(
++ funcname, c_line, py_line, filename);
++ if (!py_code) goto bad;
++ __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
+ }
++ py_frame = PyFrame_New(
++ tstate, /*PyThreadState *tstate,*/
++ py_code, /*PyCodeObject *code,*/
++ __pyx_d, /*PyObject *globals,*/
++ 0 /*PyObject *locals*/
++ );
++ if (!py_frame) goto bad;
++ __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
++ PyTraceBack_Here(py_frame);
++bad:
++ Py_XDECREF(py_code);
++ Py_XDECREF(py_frame);
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value) {
+- const enum mpv_format neg_one = (enum mpv_format) ((enum mpv_format) 0 - (enum mpv_format) 1), const_zero = (enum mpv_format) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_format) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_format) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_format) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
+- }
+- } else {
+- if (sizeof(enum mpv_format) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_format) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
+- }
+- }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_format),
+- little, !is_unsigned);
++/* CIntFromPyVerify */
++#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
++ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
++#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
++ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
++#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
++ {\
++ func_type value = func_value;\
++ if (sizeof(target_type) < sizeof(func_type)) {\
++ if (unlikely(value != (func_type) (target_type) value)) {\
++ func_type zero = 0;\
++ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
++ return (target_type) -1;\
++ if (is_unsigned && unlikely(value < zero))\
++ goto raise_neg_overflow;\
++ else\
++ goto raise_overflow;\
++ }\
++ }\
++ return (target_type) value;\
+ }
+-}
+
+ /* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const int neg_one = (int) -1, const_zero = (int) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+- if (sizeof(long) < sizeof(long)) {
++ if (sizeof(int) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+- } else if (sizeof(long) <= sizeof(unsigned long)) {
++ } else if (sizeof(int) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+ #ifdef HAVE_LONG_LONG
+- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
++ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+ #endif
+ }
+ } else {
+- if (sizeof(long) <= sizeof(long)) {
++ if (sizeof(int) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ #ifdef HAVE_LONG_LONG
+- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
++ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+ #endif
+ }
+@@ -33617,14 +30212,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(long),
++ return _PyLong_FromByteArray(bytes, sizeof(int),
+ little, !is_unsigned);
+ }
+ }
+
+ /* CIntFromPy */
+ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const int neg_one = (int) -1, const_zero = (int) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -33811,9 +30413,54 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+ return (int) -1;
+ }
+
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_event_id(enum mpv_event_id value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_event_id neg_one = (enum mpv_event_id) -1, const_zero = (enum mpv_event_id) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_event_id) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(enum mpv_event_id) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_event_id),
++ little, !is_unsigned);
++ }
++}
++
+ /* CIntFromPy */
+ static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObject *x) {
+- const enum mpv_event_id neg_one = (enum mpv_event_id) ((enum mpv_event_id) 0 - (enum mpv_event_id) 1), const_zero = (enum mpv_event_id) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_event_id neg_one = (enum mpv_event_id) -1, const_zero = (enum mpv_event_id) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -33947,62 +30594,259 @@ static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObjec
+ break;
+ }
+ #endif
+- if (sizeof(enum mpv_event_id) <= sizeof(long)) {
+- __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, long, PyLong_AsLong(x))
++ if (sizeof(enum mpv_event_id) <= sizeof(long)) {
++ __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, long, PyLong_AsLong(x))
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
++ __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, PY_LONG_LONG, PyLong_AsLongLong(x))
++#endif
++ }
++ }
++ {
++#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
++ PyErr_SetString(PyExc_RuntimeError,
++ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
++#else
++ enum mpv_event_id val;
++ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
++ #if PY_MAJOR_VERSION < 3
++ if (likely(v) && !PyLong_Check(v)) {
++ PyObject *tmp = v;
++ v = PyNumber_Long(tmp);
++ Py_DECREF(tmp);
++ }
++ #endif
++ if (likely(v)) {
++ int one = 1; int is_little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&val;
++ int ret = _PyLong_AsByteArray((PyLongObject *)v,
++ bytes, sizeof(val),
++ is_little, !is_unsigned);
++ Py_DECREF(v);
++ if (likely(!ret))
++ return val;
++ }
++#endif
++ return (enum mpv_event_id) -1;
++ }
++ } else {
++ enum mpv_event_id val;
++ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
++ if (!tmp) return (enum mpv_event_id) -1;
++ val = __Pyx_PyInt_As_enum__mpv_event_id(tmp);
++ Py_DECREF(tmp);
++ return val;
++ }
++raise_overflow:
++ PyErr_SetString(PyExc_OverflowError,
++ "value too large to convert to enum mpv_event_id");
++ return (enum mpv_event_id) -1;
++raise_neg_overflow:
++ PyErr_SetString(PyExc_OverflowError,
++ "can't convert negative value to enum mpv_event_id");
++ return (enum mpv_event_id) -1;
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(unsigned long) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(unsigned long) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
++ little, !is_unsigned);
++ }
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_error(enum mpv_error value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_error neg_one = (enum mpv_error) -1, const_zero = (enum mpv_error) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_error) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_error) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_error) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(enum mpv_error) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_error) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_error),
++ little, !is_unsigned);
++ }
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_log_level(enum mpv_log_level value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_log_level neg_one = (enum mpv_log_level) -1, const_zero = (enum mpv_log_level) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_log_level) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(enum mpv_log_level) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
+ #ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
+- __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, PY_LONG_LONG, PyLong_AsLongLong(x))
++ } else if (sizeof(enum mpv_log_level) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
+ #endif
+- }
+ }
+- {
+-#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+- PyErr_SetString(PyExc_RuntimeError,
+- "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+-#else
+- enum mpv_event_id val;
+- PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+- #if PY_MAJOR_VERSION < 3
+- if (likely(v) && !PyLong_Check(v)) {
+- PyObject *tmp = v;
+- v = PyNumber_Long(tmp);
+- Py_DECREF(tmp);
+- }
+- #endif
+- if (likely(v)) {
+- int one = 1; int is_little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&val;
+- int ret = _PyLong_AsByteArray((PyLongObject *)v,
+- bytes, sizeof(val),
+- is_little, !is_unsigned);
+- Py_DECREF(v);
+- if (likely(!ret))
+- return val;
+- }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_log_level),
++ little, !is_unsigned);
++ }
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_end_file_reason(enum mpv_end_file_reason value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_end_file_reason neg_one = (enum mpv_end_file_reason) -1, const_zero = (enum mpv_end_file_reason) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_end_file_reason) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+ #endif
+- return (enum mpv_event_id) -1;
+ }
+ } else {
+- enum mpv_event_id val;
+- PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+- if (!tmp) return (enum mpv_event_id) -1;
+- val = __Pyx_PyInt_As_enum__mpv_event_id(tmp);
+- Py_DECREF(tmp);
+- return val;
++ if (sizeof(enum mpv_end_file_reason) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_end_file_reason) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_end_file_reason),
++ little, !is_unsigned);
++ }
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_render_update_flag(enum mpv_render_update_flag value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_render_update_flag neg_one = (enum mpv_render_update_flag) -1, const_zero = (enum mpv_render_update_flag) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_render_update_flag) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(enum mpv_render_update_flag) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_render_update_flag) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_render_update_flag),
++ little, !is_unsigned);
+ }
+-raise_overflow:
+- PyErr_SetString(PyExc_OverflowError,
+- "value too large to convert to enum mpv_event_id");
+- return (enum mpv_event_id) -1;
+-raise_neg_overflow:
+- PyErr_SetString(PyExc_OverflowError,
+- "can't convert negative value to enum mpv_event_id");
+- return (enum mpv_event_id) -1;
+ }
+
+ /* CIntFromPy */
+ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const long neg_one = (long) -1, const_zero = (long) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -34189,9 +31033,92 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+ return (long) -1;
+ }
+
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(int64_t) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(int64_t) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(int64_t),
++ little, !is_unsigned);
++ }
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(uint64_t) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(uint64_t) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
++ little, !is_unsigned);
++ }
++}
++
+ /* CIntFromPy */
+ static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
+- const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -34378,9 +31305,54 @@ static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
+ return (uint64_t) -1;
+ }
+
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_format neg_one = (enum mpv_format) -1, const_zero = (enum mpv_format) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_format) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_format) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_format) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(enum mpv_format) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_format) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_format),
++ little, !is_unsigned);
++ }
++}
++
+ /* CIntFromPy */
+ static CYTHON_INLINE enum mpv_format __Pyx_PyInt_As_enum__mpv_format(PyObject *x) {
+- const enum mpv_format neg_one = (enum mpv_format) ((enum mpv_format) 0 - (enum mpv_format) 1), const_zero = (enum mpv_format) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_format neg_one = (enum mpv_format) -1, const_zero = (enum mpv_format) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -34569,7 +31541,14 @@ static CYTHON_INLINE enum mpv_format __Pyx_PyInt_As_enum__mpv_format(PyObject *x
+
+ /* CIntFromPy */
+ static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
+- const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -34758,7 +31737,14 @@ static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
+
+ /* CIntFromPy */
+ static CYTHON_INLINE intptr_t __Pyx_PyInt_As_intptr_t(PyObject *x) {
+- const intptr_t neg_one = (intptr_t) ((intptr_t) 0 - (intptr_t) 1), const_zero = (intptr_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const intptr_t neg_one = (intptr_t) -1, const_zero = (intptr_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -34945,6 +31931,44 @@ static CYTHON_INLINE intptr_t __Pyx_PyInt_As_intptr_t(PyObject *x) {
+ return (intptr_t) -1;
+ }
+
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const long neg_one = (long) -1, const_zero = (long) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(long) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(long) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(long) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(long),
++ little, !is_unsigned);
++ }
++}
++
+ /* CheckBinaryVersion */
+ static int __Pyx_check_binary_version(void) {
+ char ctversion[4], rtversion[4];
+@@ -35211,7 +32235,7 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+ }
+ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
+- return __Pyx_PyIndex_AsSsize_t(o);
++ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
+ #if PY_MAJOR_VERSION < 3
+ } else if (likely(PyInt_CheckExact(o))) {
+ return PyInt_AS_LONG(o);
+diff --git a/vidcutter/libs/pympv/mpv.pyx b/vidcutter/libs/pympv/mpv.pyx
+index 540ea649..8af2dcc7 100644
+--- a/vidcutter/libs/pympv/mpv.pyx
++++ b/vidcutter/libs/pympv/mpv.pyx
+@@ -30,8 +30,8 @@ from client cimport *
+ __version__ = "0.3.0"
+ __author__ = "Andre D"
+
+-_REQUIRED_CAPI_MAJOR = 1
+-_MIN_CAPI_MINOR = 9
++_REQUIRED_CAPI_MAJOR = 2
++_MIN_CAPI_MINOR = 0
+
+ cdef unsigned long _CAPI_VERSION
+ with nogil:
+@@ -47,7 +47,7 @@ if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+ )
+
+ cdef extern from "Python.h":
+- void PyEval_InitThreads()
++ void Py_Initialize()
+
+ _is_py3 = sys.version_info >= (3,)
+ _strdec_err = "surrogateescape" if _is_py3 else "strict"
+@@ -67,7 +67,7 @@ def _strenc(s):
+ # In python2, assume bytes and walk right through
+ return s
+
+-PyEval_InitThreads()
++Py_Initialize()
+
+ class Errors:
+ """Set of known error codes from MpvError and Event responses.
+@@ -114,21 +114,21 @@ class Events:
+ start_file = MPV_EVENT_START_FILE
+ end_file = MPV_EVENT_END_FILE
+ file_loaded = MPV_EVENT_FILE_LOADED
+- tracks_changed = MPV_EVENT_TRACKS_CHANGED
+- tracks_switched = MPV_EVENT_TRACK_SWITCHED
++ # tracks_changed = MPV_EVENT_TRACKS_CHANGED
++ # tracks_switched = MPV_EVENT_TRACK_SWITCHED
+ idle = MPV_EVENT_IDLE
+- pause = MPV_EVENT_PAUSE
+- unpause = MPV_EVENT_UNPAUSE
++ # pause = MPV_EVENT_PAUSE
++ # unpause = MPV_EVENT_UNPAUSE
+ tick = MPV_EVENT_TICK
+- script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ client_message = MPV_EVENT_CLIENT_MESSAGE
+ video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+ audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+- metadata_update = MPV_EVENT_METADATA_UPDATE
++ # metadata_update = MPV_EVENT_METADATA_UPDATE
+ seek = MPV_EVENT_SEEK
+ playback_restart = MPV_EVENT_PLAYBACK_RESTART
+ property_change = MPV_EVENT_PROPERTY_CHANGE
+- chapter_change = MPV_EVENT_CHAPTER_CHANGE
++ # chapter_change = MPV_EVENT_CHAPTER_CHANGE
+
+
+ class LogLevels:
+@@ -166,17 +166,17 @@ cdef class EndOfFileReached(object):
+ return self
+
+
+-cdef class InputDispatch(object):
+- """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
++# cdef class InputDispatch(object):
++# """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
+
+- Wraps: mpv_event_script_input_dispatch
+- """
+- cdef public object arg0, type
++# Wraps: mpv_event_script_input_dispatch
++# """
++# cdef public object arg0, type
+
+- cdef _init(self, mpv_event_script_input_dispatch* input):
+- self.arg0 = input.arg0
+- self.type = _strdec(input.type)
+- return self
++# cdef _init(self, mpv_event_script_input_dispatch* input):
++# self.arg0 = input.arg0
++# self.type = _strdec(input.type)
++# return self
+
+
+ cdef class LogMessage(object):
+@@ -276,8 +276,8 @@ cdef class Event(object):
+ return Property()._init(<mpv_event_property*>data)
+ elif self.id == MPV_EVENT_LOG_MESSAGE:
+ return LogMessage()._init(<mpv_event_log_message*>data)
+- elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
+- return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
++ # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+ elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+ climsg = <mpv_event_client_message*>data
+ args = []
+@@ -396,17 +396,17 @@ cdef class Context(object):
+ time = mpv_get_time_us(self._ctx)
+ return time
+
+- def suspend(self):
+- """Wraps: mpv_suspend"""
+- assert self._ctx
+- with nogil:
+- mpv_suspend(self._ctx)
++ # def suspend(self):
++ # """Wraps: mpv_suspend"""
++ # assert self._ctx
++ # with nogil:
++ # mpv_suspend(self._ctx)
+
+- def resume(self):
+- """Wraps: mpv_resume"""
+- assert self._ctx
+- with nogil:
+- mpv_resume(self._ctx)
++ # def resume(self):
++ # """Wraps: mpv_resume"""
++ # assert self._ctx
++ # with nogil:
++ # mpv_resume(self._ctx)
+
+ @_errors
+ def request_event(self, event, enable):
+@@ -798,17 +798,17 @@ cdef class Context(object):
+ self.reply_userdata = None
+ self._ctx = NULL
+
+- def opengl_cb_api(self):
+- cdef void *cb
++ # def opengl_cb_api(self):
++ # cdef void *cb
+
+- _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
+- if not _ctx:
+- raise MPVError("OpenGL API not available")
++ # _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
++ # if not _ctx:
++ # raise MPVError("OpenGL API not available")
+
+- ctx = OpenGLContext()
+- ctx._ctx = <mpv_opengl_cb_context*>_ctx
++ # ctx = OpenGLContext()
++ # ctx._ctx = <mpv_opengl_cb_context*>_ctx
+
+- return ctx
++ # return ctx
+
+ def __dealloc__(self):
+ self.shutdown()
+@@ -819,62 +819,62 @@ cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
+ cdef void _c_updatecb(void *ctx) with gil:
+ (<object>ctx)()
+
+-cdef class OpenGLContext(object):
+- cdef:
+- mpv_opengl_cb_context *_ctx
+- bint inited
+- object update_cb
+-
+- def __init__(self):
+- self.inited = False
+- warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
+-
+- def init_gl(self, exts, get_proc_address):
+- exts = _strenc(exts) if exts is not None else None
+- cdef char* extsc = NULL
+- if exts is not None:
+- extsc = exts
+- with nogil:
+- err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
+- <void *>get_proc_address)
+- if err < 0:
+- raise MPVError(err)
+-
+- self.inited = True
+-
+- def set_update_callback(self, cb):
+- self.update_cb = cb
+- with nogil:
+- mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+-
+- def draw(self, fbo, w, h):
+- cdef:
+- int fboc = fbo
+- int wc = w
+- int hc = h
+- with nogil:
+- err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- if err < 0:
+- raise MPVError(err)
+-
+- def report_flip(self, time):
+- cdef int64_t ctime = time
+- with nogil:
+- err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- if err < 0:
+- raise MPVError(err)
+-
+- def uninit_gl(self):
+- if not self.inited:
+- return
+- with nogil:
+- err = mpv_opengl_cb_uninit_gl(self._ctx)
+- if err < 0:
+- raise MPVError(err)
+- self.inited = False
+-
+- def __dealloc__(self):
+- self.uninit_gl()
++# cdef class OpenGLContext(object):
++# cdef:
++# mpv_opengl_cb_context *_ctx
++# bint inited
++# object update_cb
++
++# def __init__(self):
++# self.inited = False
++# warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
++
++# def init_gl(self, exts, get_proc_address):
++# exts = _strenc(exts) if exts is not None else None
++# cdef char* extsc = NULL
++# if exts is not None:
++# extsc = exts
++# with nogil:
++# err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
++# <void *>get_proc_address)
++# if err < 0:
++# raise MPVError(err)
++
++# self.inited = True
++
++# def set_update_callback(self, cb):
++# self.update_cb = cb
++# with nogil:
++# mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++
++# def draw(self, fbo, w, h):
++# cdef:
++# int fboc = fbo
++# int wc = w
++# int hc = h
++# with nogil:
++# err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
++# if err < 0:
++# raise MPVError(err)
++
++# def report_flip(self, time):
++# cdef int64_t ctime = time
++# with nogil:
++# err = mpv_opengl_cb_report_flip(self._ctx, ctime)
++# if err < 0:
++# raise MPVError(err)
++
++# def uninit_gl(self):
++# if not self.inited:
++# return
++# with nogil:
++# err = mpv_opengl_cb_uninit_gl(self._ctx)
++# if err < 0:
++# raise MPVError(err)
++# self.inited = False
++
++# def __dealloc__(self):
++# self.uninit_gl()
+
+ DEF MAX_RENDER_PARAMS = 32
+
diff --git a/srcpkgs/vidcutter/patches/mpv-0.35-2.patch b/srcpkgs/vidcutter/patches/mpv-0.35-2.patch
new file mode 100644
index 000000000000..c982ded8475a
--- /dev/null
+++ b/srcpkgs/vidcutter/patches/mpv-0.35-2.patch
@@ -0,0 +1,24 @@
+https://github.com/ozmartian/vidcutter/commit/8010f5c64efe68d8130a036f976d2d2ff1c868ad.patch
+
+From 8010f5c64efe68d8130a036f976d2d2ff1c868ad Mon Sep 17 00:00:00 2001
+From: Pete Alexandrou <pete@ozmartians.com>
+Date: Tue, 22 Feb 2022 16:08:24 +1100
+Subject: [PATCH] fix libmpv version number format
+
+---
+ vidcutter/libs/mpvwidget.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vidcutter/libs/mpvwidget.py b/vidcutter/libs/mpvwidget.py
+index 239b6c9c..6661ad85 100644
+--- a/vidcutter/libs/mpvwidget.py
++++ b/vidcutter/libs/mpvwidget.py
+@@ -247,7 +247,7 @@ def format(self, stream: str='video') -> str:
+
+ def version(self) -> str:
+ ver = self.mpv.api_version
+- return '{0}.{1}'.format(ver[0], ver[1])
++ return '{0}.{1}'.format(ver[1], ver[0])
+
+ def option(self, option: str, val):
+ if isinstance(val, bool):
diff --git a/srcpkgs/vidcutter/patches/mpv-0.35-3.patch b/srcpkgs/vidcutter/patches/mpv-0.35-3.patch
new file mode 100644
index 000000000000..7a1b2909b4c4
--- /dev/null
+++ b/srcpkgs/vidcutter/patches/mpv-0.35-3.patch
@@ -0,0 +1,13289 @@
+https://github.com/ozmartian/vidcutter/commit/4cf1458d832e6ac7a824d7963c6dc3a0e5c17574.patch
+
+From 4cf1458d832e6ac7a824d7963c6dc3a0e5c17574 Mon Sep 17 00:00:00 2001
+From: Pete Alexandrou <pete@ozmartians.com>
+Date: Sat, 30 Apr 2022 15:49:17 +1000
+Subject: [PATCH] pympv updates
+
+---
+ vidcutter/libs/pympv/mpv.c | 3792 +++++++++++++++++-----------------
+ vidcutter/libs/pympv/mpv.pyx | 6 +-
+ 2 files changed, 1900 insertions(+), 1898 deletions(-)
+
+diff --git a/vidcutter/libs/pympv/mpv.c b/vidcutter/libs/pympv/mpv.c
+index a3522ef5..26838a03 100644
+--- a/vidcutter/libs/pympv/mpv.c
++++ b/vidcutter/libs/pympv/mpv.c
+@@ -944,7 +944,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext;
+ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors;
+ struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":890
++/* "vidcutter/libs/pympv/mpv.pyx":892
+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
+@@ -956,7 +956,7 @@ struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp {
+ int owned;
+ };
+
+-/* "vidcutter/libs/pympv/mpv.pyx":156
++/* "vidcutter/libs/pympv/mpv.pyx":158
+ *
+ *
+ * cdef class EndOfFileReached(object): # <<<<<<<<<<<<<<
+@@ -971,7 +971,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":182
++/* "vidcutter/libs/pympv/mpv.pyx":184
+ *
+ *
+ * cdef class LogMessage(object): # <<<<<<<<<<<<<<
+@@ -988,7 +988,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":243
++/* "vidcutter/libs/pympv/mpv.pyx":245
+ *
+ *
+ * cdef class Property(object): # <<<<<<<<<<<<<<
+@@ -1003,7 +1003,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Property {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":256
++/* "vidcutter/libs/pympv/mpv.pyx":258
+ *
+ *
+ * cdef class Event(object): # <<<<<<<<<<<<<<
+@@ -1020,7 +1020,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Event {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":359
++/* "vidcutter/libs/pympv/mpv.pyx":361
+ *
+ *
+ * cdef class Context(object): # <<<<<<<<<<<<<<
+@@ -1037,7 +1037,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Context {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":881
++/* "vidcutter/libs/pympv/mpv.pyx":883
+ * DEF MAX_RENDER_PARAMS = 32
+ *
+ * cdef class _RenderParams(object): # <<<<<<<<<<<<<<
+@@ -1052,7 +1052,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":928
++/* "vidcutter/libs/pympv/mpv.pyx":930
+ *
+ * @cython.internal
+ * cdef class RenderFrameInfo(object): # <<<<<<<<<<<<<<
+@@ -1065,7 +1065,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":937
++/* "vidcutter/libs/pympv/mpv.pyx":939
+ * return self
+ *
+ * cdef class RenderContext(object): # <<<<<<<<<<<<<<
+@@ -1084,7 +1084,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1122
++/* "vidcutter/libs/pympv/mpv.pyx":1124
+ * self.close()
+ *
+ * cdef class OpenGLRenderContext(RenderContext): # <<<<<<<<<<<<<<
+@@ -1096,7 +1096,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":318
++/* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+@@ -1110,7 +1110,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors {
+
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":156
++/* "vidcutter/libs/pympv/mpv.pyx":158
+ *
+ *
+ * cdef class EndOfFileReached(object): # <<<<<<<<<<<<<<
+@@ -1124,7 +1124,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":182
++/* "vidcutter/libs/pympv/mpv.pyx":184
+ *
+ *
+ * cdef class LogMessage(object): # <<<<<<<<<<<<<<
+@@ -1138,7 +1138,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *__pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":243
++/* "vidcutter/libs/pympv/mpv.pyx":245
+ *
+ *
+ * cdef class Property(object): # <<<<<<<<<<<<<<
+@@ -1152,7 +1152,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *__pyx_vtabptr_9vidcutter_4libs_3mpv_Property;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":256
++/* "vidcutter/libs/pympv/mpv.pyx":258
+ *
+ *
+ * cdef class Event(object): # <<<<<<<<<<<<<<
+@@ -1167,7 +1167,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *__pyx_vtabptr_9vidcutter_4libs_3mpv_Event;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":359
++/* "vidcutter/libs/pympv/mpv.pyx":361
+ *
+ *
+ * cdef class Context(object): # <<<<<<<<<<<<<<
+@@ -1184,7 +1184,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *__pyx_vtabptr_9vidcutter_4libs_3mpv_Context;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":881
++/* "vidcutter/libs/pympv/mpv.pyx":883
+ * DEF MAX_RENDER_PARAMS = 32
+ *
+ * cdef class _RenderParams(object): # <<<<<<<<<<<<<<
+@@ -1200,7 +1200,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *__pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":928
++/* "vidcutter/libs/pympv/mpv.pyx":930
+ *
+ * @cython.internal
+ * cdef class RenderFrameInfo(object): # <<<<<<<<<<<<<<
+@@ -2522,9 +2522,9 @@ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeOb
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_int_0;
+ static PyObject *__pyx_int_1;
+-static PyObject *__pyx_int_2;
+ static PyObject *__pyx_int_3;
+ static PyObject *__pyx_int_32;
++static PyObject *__pyx_int_109;
+ static PyObject *__pyx_int_5713169;
+ static PyObject *__pyx_int_90958262;
+ static PyObject *__pyx_int_142036910;
+@@ -2588,7 +2588,7 @@ static PyObject *__pyx_codeobj__53;
+ static PyObject *__pyx_codeobj__55;
+ /* Late includes */
+
+-/* "vidcutter/libs/pympv/mpv.pyx":55
++/* "vidcutter/libs/pympv/mpv.pyx":57
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ * def _strdec(s): # <<<<<<<<<<<<<<
+@@ -2627,7 +2627,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_strdec", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":56
++ /* "vidcutter/libs/pympv/mpv.pyx":58
+ * # mpv -> Python
+ * def _strdec(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2643,7 +2643,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":57
++ /* "vidcutter/libs/pympv/mpv.pyx":59
+ * def _strdec(s):
+ * try:
+ * return s.decode("utf-8", _strdec_err) # <<<<<<<<<<<<<<
+@@ -2651,9 +2651,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ * # In python2, bail to bytes on failure
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+@@ -2670,7 +2670,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
+- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+@@ -2679,14 +2679,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
+- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+@@ -2697,7 +2697,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
+ __pyx_t_6 = 0;
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+@@ -2706,7 +2706,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ __pyx_t_4 = 0;
+ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":56
++ /* "vidcutter/libs/pympv/mpv.pyx":58
+ * # mpv -> Python
+ * def _strdec(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2721,7 +2721,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":58
++ /* "vidcutter/libs/pympv/mpv.pyx":60
+ * try:
+ * return s.decode("utf-8", _strdec_err)
+ * except UnicodeDecodeError: # <<<<<<<<<<<<<<
+@@ -2731,12 +2731,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("vidcutter.libs.mpv._strdec", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 58, __pyx_L5_except_error)
++ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 60, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_9);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":60
++ /* "vidcutter/libs/pympv/mpv.pyx":62
+ * except UnicodeDecodeError:
+ * # In python2, bail to bytes on failure
+ * return bytes(s) # <<<<<<<<<<<<<<
+@@ -2744,7 +2744,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ * # Python -> mpv
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_s); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __pyx_L5_except_error)
++ __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_s); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+@@ -2756,7 +2756,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":56
++ /* "vidcutter/libs/pympv/mpv.pyx":58
+ * # mpv -> Python
+ * def _strdec(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2782,7 +2782,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ goto __pyx_L0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":55
++ /* "vidcutter/libs/pympv/mpv.pyx":57
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ * def _strdec(s): # <<<<<<<<<<<<<<
+@@ -2805,7 +2805,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":63
++/* "vidcutter/libs/pympv/mpv.pyx":65
+ *
+ * # Python -> mpv
+ * def _strenc(s): # <<<<<<<<<<<<<<
+@@ -2844,7 +2844,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_strenc", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":64
++ /* "vidcutter/libs/pympv/mpv.pyx":66
+ * # Python -> mpv
+ * def _strenc(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2860,7 +2860,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":65
++ /* "vidcutter/libs/pympv/mpv.pyx":67
+ * def _strenc(s):
+ * try:
+ * return s.encode("utf-8", _strdec_err) # <<<<<<<<<<<<<<
+@@ -2868,9 +2868,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ * # In python2, assume bytes and walk right through
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+@@ -2887,7 +2887,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
+- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+@@ -2896,14 +2896,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
+- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+@@ -2914,7 +2914,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
+ __pyx_t_6 = 0;
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+@@ -2923,7 +2923,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ __pyx_t_4 = 0;
+ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":64
++ /* "vidcutter/libs/pympv/mpv.pyx":66
+ * # Python -> mpv
+ * def _strenc(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2938,7 +2938,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":66
++ /* "vidcutter/libs/pympv/mpv.pyx":68
+ * try:
+ * return s.encode("utf-8", _strdec_err)
+ * except UnicodeEncodeError: # <<<<<<<<<<<<<<
+@@ -2948,12 +2948,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeEncodeError);
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("vidcutter.libs.mpv._strenc", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 66, __pyx_L5_except_error)
++ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 68, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_9);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":68
++ /* "vidcutter/libs/pympv/mpv.pyx":70
+ * except UnicodeEncodeError:
+ * # In python2, assume bytes and walk right through
+ * return s # <<<<<<<<<<<<<<
+@@ -2971,7 +2971,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":64
++ /* "vidcutter/libs/pympv/mpv.pyx":66
+ * # Python -> mpv
+ * def _strenc(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2997,7 +2997,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ goto __pyx_L0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":63
++ /* "vidcutter/libs/pympv/mpv.pyx":65
+ *
+ * # Python -> mpv
+ * def _strenc(s): # <<<<<<<<<<<<<<
+@@ -3020,7 +3020,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":163
++/* "vidcutter/libs/pympv/mpv.pyx":165
+ * cdef public object reason, error
+ *
+ * cdef _init(self, mpv_event_end_file* eof): # <<<<<<<<<<<<<<
+@@ -3037,14 +3037,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":164
++ /* "vidcutter/libs/pympv/mpv.pyx":166
+ *
+ * cdef _init(self, mpv_event_end_file* eof):
+ * self.reason = eof.reason # <<<<<<<<<<<<<<
+ * self.error = eof.error
+ * return self
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->reason); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->reason); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->reason);
+@@ -3052,14 +3052,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
+ __pyx_v_self->reason = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":165
++ /* "vidcutter/libs/pympv/mpv.pyx":167
+ * cdef _init(self, mpv_event_end_file* eof):
+ * self.reason = eof.reason
+ * self.error = eof.error # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->error);
+@@ -3067,7 +3067,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
+ __pyx_v_self->error = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":166
++ /* "vidcutter/libs/pympv/mpv.pyx":168
+ * self.reason = eof.reason
+ * self.error = eof.error
+ * return self # <<<<<<<<<<<<<<
+@@ -3079,7 +3079,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":163
++ /* "vidcutter/libs/pympv/mpv.pyx":165
+ * cdef public object reason, error
+ *
+ * cdef _init(self, mpv_event_end_file* eof): # <<<<<<<<<<<<<<
+@@ -3098,7 +3098,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":161
++/* "vidcutter/libs/pympv/mpv.pyx":163
+ * Wraps: mpv_event_end_file
+ * """
+ * cdef public object reason, error # <<<<<<<<<<<<<<
+@@ -3587,7 +3587,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_2__setstate_c
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":189
++/* "vidcutter/libs/pympv/mpv.pyx":191
+ * cdef public object prefix, level, text, log_level
+ *
+ * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
+@@ -3607,16 +3607,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":190
++ /* "vidcutter/libs/pympv/mpv.pyx":192
+ *
+ * cdef _init(self, mpv_event_log_message* msg):
+ * self.level = _strdec(msg.level) # <<<<<<<<<<<<<<
+ * self.prefix = _strdec(msg.prefix)
+ * self.text = _strdec(msg.text)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -3631,7 +3631,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -3640,16 +3640,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_v_self->level = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":191
++ /* "vidcutter/libs/pympv/mpv.pyx":193
+ * cdef _init(self, mpv_event_log_message* msg):
+ * self.level = _strdec(msg.level)
+ * self.prefix = _strdec(msg.prefix) # <<<<<<<<<<<<<<
+ * self.text = _strdec(msg.text)
+ * self.log_level = msg.log_level
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -3664,7 +3664,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -3673,16 +3673,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_v_self->prefix = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":192
++ /* "vidcutter/libs/pympv/mpv.pyx":194
+ * self.level = _strdec(msg.level)
+ * self.prefix = _strdec(msg.prefix)
+ * self.text = _strdec(msg.text) # <<<<<<<<<<<<<<
+ * self.log_level = msg.log_level
+ * return self
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -3697,7 +3697,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -3706,14 +3706,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_v_self->text = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":193
++ /* "vidcutter/libs/pympv/mpv.pyx":195
+ * self.prefix = _strdec(msg.prefix)
+ * self.text = _strdec(msg.text)
+ * self.log_level = msg.log_level # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->log_level);
+@@ -3721,7 +3721,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_v_self->log_level = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":194
++ /* "vidcutter/libs/pympv/mpv.pyx":196
+ * self.text = _strdec(msg.text)
+ * self.log_level = msg.log_level
+ * return self # <<<<<<<<<<<<<<
+@@ -3733,7 +3733,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":189
++ /* "vidcutter/libs/pympv/mpv.pyx":191
+ * cdef public object prefix, level, text, log_level
+ *
+ * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
+@@ -3755,7 +3755,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":187
++/* "vidcutter/libs/pympv/mpv.pyx":189
+ * Wraps: mpv_event_log_message
+ * """
+ * cdef public object prefix, level, text, log_level # <<<<<<<<<<<<<<
+@@ -4438,7 +4438,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":197
++/* "vidcutter/libs/pympv/mpv.pyx":199
+ *
+ *
+ * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
+@@ -4459,7 +4459,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_convert_node_value", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":198
++ /* "vidcutter/libs/pympv/mpv.pyx":200
+ *
+ * cdef _convert_node_value(mpv_node node):
+ * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+@@ -4469,7 +4469,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ switch (__pyx_v_node.format) {
+ case MPV_FORMAT_STRING:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":199
++ /* "vidcutter/libs/pympv/mpv.pyx":201
+ * cdef _convert_node_value(mpv_node node):
+ * if node.format == MPV_FORMAT_STRING:
+ * return _strdec(node.u.string) # <<<<<<<<<<<<<<
+@@ -4477,9 +4477,9 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ * return not not int(node.u.flag)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -4494,14 +4494,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":198
++ /* "vidcutter/libs/pympv/mpv.pyx":200
+ *
+ * cdef _convert_node_value(mpv_node node):
+ * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+@@ -4511,7 +4511,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ break;
+ case MPV_FORMAT_FLAG:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":201
++ /* "vidcutter/libs/pympv/mpv.pyx":203
+ * return _strdec(node.u.string)
+ * elif node.format == MPV_FORMAT_FLAG:
+ * return not not int(node.u.flag) # <<<<<<<<<<<<<<
+@@ -4519,20 +4519,20 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ * return int(node.u.int64)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":200
++ /* "vidcutter/libs/pympv/mpv.pyx":202
+ * if node.format == MPV_FORMAT_STRING:
+ * return _strdec(node.u.string)
+ * elif node.format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+@@ -4542,7 +4542,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ break;
+ case MPV_FORMAT_INT64:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":203
++ /* "vidcutter/libs/pympv/mpv.pyx":205
+ * return not not int(node.u.flag)
+ * elif node.format == MPV_FORMAT_INT64:
+ * return int(node.u.int64) # <<<<<<<<<<<<<<
+@@ -4550,16 +4550,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ * return float(node.u.double_)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":202
++ /* "vidcutter/libs/pympv/mpv.pyx":204
+ * elif node.format == MPV_FORMAT_FLAG:
+ * return not not int(node.u.flag)
+ * elif node.format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+@@ -4569,7 +4569,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ break;
+ case MPV_FORMAT_DOUBLE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":205
++ /* "vidcutter/libs/pympv/mpv.pyx":207
+ * return int(node.u.int64)
+ * elif node.format == MPV_FORMAT_DOUBLE:
+ * return float(node.u.double_) # <<<<<<<<<<<<<<
+@@ -4577,13 +4577,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ * return _convert_value(node.u.list, node.format)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":204
++ /* "vidcutter/libs/pympv/mpv.pyx":206
+ * elif node.format == MPV_FORMAT_INT64:
+ * return int(node.u.int64)
+ * elif node.format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+@@ -4593,7 +4593,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ break;
+ case MPV_FORMAT_NODE_MAP:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":207
++ /* "vidcutter/libs/pympv/mpv.pyx":209
+ * return float(node.u.double_)
+ * elif node.format == MPV_FORMAT_NODE_MAP:
+ * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
+@@ -4601,13 +4601,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ * return _convert_value(node.u.list, node.format)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":206
++ /* "vidcutter/libs/pympv/mpv.pyx":208
+ * elif node.format == MPV_FORMAT_DOUBLE:
+ * return float(node.u.double_)
+ * elif node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+@@ -4617,7 +4617,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ break;
+ case MPV_FORMAT_NODE_ARRAY:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":209
++ /* "vidcutter/libs/pympv/mpv.pyx":211
+ * return _convert_value(node.u.list, node.format)
+ * elif node.format == MPV_FORMAT_NODE_ARRAY:
+ * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
+@@ -4625,13 +4625,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":208
++ /* "vidcutter/libs/pympv/mpv.pyx":210
+ * elif node.format == MPV_FORMAT_NODE_MAP:
+ * return _convert_value(node.u.list, node.format)
+ * elif node.format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+@@ -4642,7 +4642,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ default: break;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":210
++ /* "vidcutter/libs/pympv/mpv.pyx":212
+ * elif node.format == MPV_FORMAT_NODE_ARRAY:
+ * return _convert_value(node.u.list, node.format)
+ * return None # <<<<<<<<<<<<<<
+@@ -4653,7 +4653,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":197
++ /* "vidcutter/libs/pympv/mpv.pyx":199
+ *
+ *
+ * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
+@@ -4675,7 +4675,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":213
++/* "vidcutter/libs/pympv/mpv.pyx":215
+ *
+ *
+ * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
+@@ -4704,7 +4704,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_convert_value", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":216
++ /* "vidcutter/libs/pympv/mpv.pyx":218
+ * cdef mpv_node node
+ * cdef mpv_node_list nodelist
+ * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
+@@ -4714,7 +4714,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ switch (__pyx_v_format) {
+ case MPV_FORMAT_NODE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":217
++ /* "vidcutter/libs/pympv/mpv.pyx":219
+ * cdef mpv_node_list nodelist
+ * if format == MPV_FORMAT_NODE:
+ * node = (<mpv_node*>data)[0] # <<<<<<<<<<<<<<
+@@ -4723,7 +4723,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ */
+ __pyx_v_node = (((struct mpv_node *)__pyx_v_data)[0]);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":218
++ /* "vidcutter/libs/pympv/mpv.pyx":220
+ * if format == MPV_FORMAT_NODE:
+ * node = (<mpv_node*>data)[0]
+ * return _convert_node_value(node) # <<<<<<<<<<<<<<
+@@ -4731,13 +4731,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ * nodelist = (<mpv_node_list*>data)[0]
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":216
++ /* "vidcutter/libs/pympv/mpv.pyx":218
+ * cdef mpv_node node
+ * cdef mpv_node_list nodelist
+ * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
+@@ -4747,7 +4747,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_NODE_ARRAY:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":220
++ /* "vidcutter/libs/pympv/mpv.pyx":222
+ * return _convert_node_value(node)
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
+@@ -4756,19 +4756,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ */
+ __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":221
++ /* "vidcutter/libs/pympv/mpv.pyx":223
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * nodelist = (<mpv_node_list*>data)[0]
+ * values = [] # <<<<<<<<<<<<<<
+ * for i in range(nodelist.num):
+ * values.append(_convert_node_value(nodelist.values[i]))
+ */
+- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_values = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":222
++ /* "vidcutter/libs/pympv/mpv.pyx":224
+ * nodelist = (<mpv_node_list*>data)[0]
+ * values = []
+ * for i in range(nodelist.num): # <<<<<<<<<<<<<<
+@@ -4780,20 +4780,20 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_i = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":223
++ /* "vidcutter/libs/pympv/mpv.pyx":225
+ * values = []
+ * for i in range(nodelist.num):
+ * values.append(_convert_node_value(nodelist.values[i])) # <<<<<<<<<<<<<<
+ * return values
+ * elif format == MPV_FORMAT_NODE_MAP:
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 225, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":224
++ /* "vidcutter/libs/pympv/mpv.pyx":226
+ * for i in range(nodelist.num):
+ * values.append(_convert_node_value(nodelist.values[i]))
+ * return values # <<<<<<<<<<<<<<
+@@ -4805,7 +4805,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ __pyx_r = __pyx_v_values;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":219
++ /* "vidcutter/libs/pympv/mpv.pyx":221
+ * node = (<mpv_node*>data)[0]
+ * return _convert_node_value(node)
+ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+@@ -4815,7 +4815,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_NODE_MAP:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":226
++ /* "vidcutter/libs/pympv/mpv.pyx":228
+ * return values
+ * elif format == MPV_FORMAT_NODE_MAP:
+ * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
+@@ -4824,19 +4824,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ */
+ __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":227
++ /* "vidcutter/libs/pympv/mpv.pyx":229
+ * elif format == MPV_FORMAT_NODE_MAP:
+ * nodelist = (<mpv_node_list*>data)[0]
+ * values = {} # <<<<<<<<<<<<<<
+ * for i in range(nodelist.num):
+ * value = _convert_node_value(nodelist.values[i])
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_values = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":228
++ /* "vidcutter/libs/pympv/mpv.pyx":230
+ * nodelist = (<mpv_node_list*>data)[0]
+ * values = {}
+ * for i in range(nodelist.num): # <<<<<<<<<<<<<<
+@@ -4848,28 +4848,28 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_i = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":229
++ /* "vidcutter/libs/pympv/mpv.pyx":231
+ * values = {}
+ * for i in range(nodelist.num):
+ * value = _convert_node_value(nodelist.values[i]) # <<<<<<<<<<<<<<
+ * values[_strdec(nodelist.keys[i])] = value
+ * return values
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":230
++ /* "vidcutter/libs/pympv/mpv.pyx":232
+ * for i in range(nodelist.num):
+ * value = _convert_node_value(nodelist.values[i])
+ * values[_strdec(nodelist.keys[i])] = value # <<<<<<<<<<<<<<
+ * return values
+ * elif format == MPV_FORMAT_STRING:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -4884,14 +4884,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
++ if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":231
++ /* "vidcutter/libs/pympv/mpv.pyx":233
+ * value = _convert_node_value(nodelist.values[i])
+ * values[_strdec(nodelist.keys[i])] = value
+ * return values # <<<<<<<<<<<<<<
+@@ -4903,7 +4903,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ __pyx_r = __pyx_v_values;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":225
++ /* "vidcutter/libs/pympv/mpv.pyx":227
+ * values.append(_convert_node_value(nodelist.values[i]))
+ * return values
+ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+@@ -4913,7 +4913,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_STRING:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":233
++ /* "vidcutter/libs/pympv/mpv.pyx":235
+ * return values
+ * elif format == MPV_FORMAT_STRING:
+ * return _strdec(((<char**>data)[0])) # <<<<<<<<<<<<<<
+@@ -4921,9 +4921,9 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ * return not not (<uint64_t*>data)[0]
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -4938,14 +4938,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":232
++ /* "vidcutter/libs/pympv/mpv.pyx":234
+ * values[_strdec(nodelist.keys[i])] = value
+ * return values
+ * elif format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+@@ -4955,7 +4955,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_FLAG:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":235
++ /* "vidcutter/libs/pympv/mpv.pyx":237
+ * return _strdec(((<char**>data)[0]))
+ * elif format == MPV_FORMAT_FLAG:
+ * return not not (<uint64_t*>data)[0] # <<<<<<<<<<<<<<
+@@ -4963,13 +4963,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ * return int((<uint64_t*>data)[0])
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":234
++ /* "vidcutter/libs/pympv/mpv.pyx":236
+ * elif format == MPV_FORMAT_STRING:
+ * return _strdec(((<char**>data)[0]))
+ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+@@ -4979,7 +4979,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_INT64:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":237
++ /* "vidcutter/libs/pympv/mpv.pyx":239
+ * return not not (<uint64_t*>data)[0]
+ * elif format == MPV_FORMAT_INT64:
+ * return int((<uint64_t*>data)[0]) # <<<<<<<<<<<<<<
+@@ -4987,16 +4987,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ * return float((<double*>data)[0])
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":236
++ /* "vidcutter/libs/pympv/mpv.pyx":238
+ * elif format == MPV_FORMAT_FLAG:
+ * return not not (<uint64_t*>data)[0]
+ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+@@ -5006,7 +5006,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_DOUBLE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":239
++ /* "vidcutter/libs/pympv/mpv.pyx":241
+ * return int((<uint64_t*>data)[0])
+ * elif format == MPV_FORMAT_DOUBLE:
+ * return float((<double*>data)[0]) # <<<<<<<<<<<<<<
+@@ -5014,13 +5014,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
++ __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":238
++ /* "vidcutter/libs/pympv/mpv.pyx":240
+ * elif format == MPV_FORMAT_INT64:
+ * return int((<uint64_t*>data)[0])
+ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+@@ -5031,7 +5031,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ default: break;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":240
++ /* "vidcutter/libs/pympv/mpv.pyx":242
+ * elif format == MPV_FORMAT_DOUBLE:
+ * return float((<double*>data)[0])
+ * return None # <<<<<<<<<<<<<<
+@@ -5042,7 +5042,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":213
++ /* "vidcutter/libs/pympv/mpv.pyx":215
+ *
+ *
+ * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
+@@ -5066,7 +5066,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":250
++/* "vidcutter/libs/pympv/mpv.pyx":252
+ * cdef public object name, data
+ *
+ * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
+@@ -5086,16 +5086,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":251
++ /* "vidcutter/libs/pympv/mpv.pyx":253
+ *
+ * cdef _init(self, mpv_event_property* prop):
+ * self.name = _strdec(prop.name) # <<<<<<<<<<<<<<
+ * self.data = _convert_value(prop.data, prop.format)
+ * return self
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -5110,7 +5110,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -5119,14 +5119,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __pyx_v_self->name = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":252
++ /* "vidcutter/libs/pympv/mpv.pyx":254
+ * cdef _init(self, mpv_event_property* prop):
+ * self.name = _strdec(prop.name)
+ * self.data = _convert_value(prop.data, prop.format) # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->data);
+@@ -5134,7 +5134,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __pyx_v_self->data = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":253
++ /* "vidcutter/libs/pympv/mpv.pyx":255
+ * self.name = _strdec(prop.name)
+ * self.data = _convert_value(prop.data, prop.format)
+ * return self # <<<<<<<<<<<<<<
+@@ -5146,7 +5146,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":250
++ /* "vidcutter/libs/pympv/mpv.pyx":252
+ * cdef public object name, data
+ *
+ * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
+@@ -5168,7 +5168,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":248
++/* "vidcutter/libs/pympv/mpv.pyx":250
+ * Wraps: mpv_event_property
+ * """
+ * cdef public object name, data # <<<<<<<<<<<<<<
+@@ -5657,7 +5657,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(s
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":263
++/* "vidcutter/libs/pympv/mpv.pyx":265
+ *
+ * @property
+ * def error_str(self): # <<<<<<<<<<<<<<
+@@ -5691,7 +5691,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":266
++ /* "vidcutter/libs/pympv/mpv.pyx":268
+ * """mpv_error_string of the error proeprty"""
+ * cdef const char* err_c
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -5706,7 +5706,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":267
++ /* "vidcutter/libs/pympv/mpv.pyx":269
+ * cdef const char* err_c
+ * with nogil:
+ * err_c = mpv_error_string(self.error) # <<<<<<<<<<<<<<
+@@ -5716,7 +5716,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ __pyx_v_err_c = mpv_error_string(__pyx_v_self->error);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":266
++ /* "vidcutter/libs/pympv/mpv.pyx":268
+ * """mpv_error_string of the error proeprty"""
+ * cdef const char* err_c
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -5735,7 +5735,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":268
++ /* "vidcutter/libs/pympv/mpv.pyx":270
+ * with nogil:
+ * err_c = mpv_error_string(self.error)
+ * return _strdec(err_c) # <<<<<<<<<<<<<<
+@@ -5743,9 +5743,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ * cdef _data(self, mpv_event* event):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -5760,14 +5760,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":263
++ /* "vidcutter/libs/pympv/mpv.pyx":265
+ *
+ * @property
+ * def error_str(self): # <<<<<<<<<<<<<<
+@@ -5789,7 +5789,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":270
++/* "vidcutter/libs/pympv/mpv.pyx":272
+ * return _strdec(err_c)
+ *
+ * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
+@@ -5819,7 +5819,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_data", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":271
++ /* "vidcutter/libs/pympv/mpv.pyx":273
+ *
+ * cdef _data(self, mpv_event* event):
+ * cdef void* data = event.data # <<<<<<<<<<<<<<
+@@ -5829,7 +5829,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ __pyx_t_1 = __pyx_v_event->data;
+ __pyx_v_data = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":273
++ /* "vidcutter/libs/pympv/mpv.pyx":275
+ * cdef void* data = event.data
+ * cdef mpv_event_client_message* climsg
+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
+@@ -5839,7 +5839,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ switch (__pyx_v_self->id) {
+ case MPV_EVENT_GET_PROPERTY_REPLY:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":274
++ /* "vidcutter/libs/pympv/mpv.pyx":276
+ * cdef mpv_event_client_message* climsg
+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
+ * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
+@@ -5847,16 +5847,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ * return Property()._init(<mpv_event_property*>data)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":273
++ /* "vidcutter/libs/pympv/mpv.pyx":275
+ * cdef void* data = event.data
+ * cdef mpv_event_client_message* climsg
+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
+@@ -5866,7 +5866,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ break;
+ case MPV_EVENT_PROPERTY_CHANGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":276
++ /* "vidcutter/libs/pympv/mpv.pyx":278
+ * return Property()._init(<mpv_event_property*>data)
+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+ * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
+@@ -5874,16 +5874,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ * return LogMessage()._init(<mpv_event_log_message*>data)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":275
++ /* "vidcutter/libs/pympv/mpv.pyx":277
+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
+ * return Property()._init(<mpv_event_property*>data)
+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+@@ -5893,7 +5893,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ break;
+ case MPV_EVENT_LOG_MESSAGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":278
++ /* "vidcutter/libs/pympv/mpv.pyx":280
+ * return Property()._init(<mpv_event_property*>data)
+ * elif self.id == MPV_EVENT_LOG_MESSAGE:
+ * return LogMessage()._init(<mpv_event_log_message*>data) # <<<<<<<<<<<<<<
+@@ -5901,16 +5901,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":277
++ /* "vidcutter/libs/pympv/mpv.pyx":279
+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+ * return Property()._init(<mpv_event_property*>data)
+ * elif self.id == MPV_EVENT_LOG_MESSAGE: # <<<<<<<<<<<<<<
+@@ -5920,7 +5920,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ break;
+ case MPV_EVENT_CLIENT_MESSAGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":282
++ /* "vidcutter/libs/pympv/mpv.pyx":284
+ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+ * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+ * climsg = <mpv_event_client_message*>data # <<<<<<<<<<<<<<
+@@ -5929,19 +5929,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ */
+ __pyx_v_climsg = ((struct mpv_event_client_message *)__pyx_v_data);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":283
++ /* "vidcutter/libs/pympv/mpv.pyx":285
+ * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+ * climsg = <mpv_event_client_message*>data
+ * args = [] # <<<<<<<<<<<<<<
+ * num_args = climsg.num_args
+ * for i in range(num_args):
+ */
+- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
++ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_args = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":284
++ /* "vidcutter/libs/pympv/mpv.pyx":286
+ * climsg = <mpv_event_client_message*>data
+ * args = []
+ * num_args = climsg.num_args # <<<<<<<<<<<<<<
+@@ -5951,7 +5951,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ __pyx_t_4 = __pyx_v_climsg->num_args;
+ __pyx_v_num_args = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":285
++ /* "vidcutter/libs/pympv/mpv.pyx":287
+ * args = []
+ * num_args = climsg.num_args
+ * for i in range(num_args): # <<<<<<<<<<<<<<
+@@ -5963,26 +5963,26 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_i = __pyx_t_6;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":286
++ /* "vidcutter/libs/pympv/mpv.pyx":288
+ * num_args = climsg.num_args
+ * for i in range(num_args):
+ * arg = <char*>climsg.args[i] # <<<<<<<<<<<<<<
+ * arg = _strdec(arg)
+ * args.append(arg)
+ */
+- __pyx_t_3 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":287
++ /* "vidcutter/libs/pympv/mpv.pyx":289
+ * for i in range(num_args):
+ * arg = <char*>climsg.args[i]
+ * arg = _strdec(arg) # <<<<<<<<<<<<<<
+ * args.append(arg)
+ * return args
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -5996,23 +5996,23 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ }
+ __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_arg) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_arg);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":288
++ /* "vidcutter/libs/pympv/mpv.pyx":290
+ * arg = <char*>climsg.args[i]
+ * arg = _strdec(arg)
+ * args.append(arg) # <<<<<<<<<<<<<<
+ * return args
+ * elif self.id == MPV_EVENT_END_FILE:
+ */
+- __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
++ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 290, __pyx_L1_error)
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":289
++ /* "vidcutter/libs/pympv/mpv.pyx":291
+ * arg = _strdec(arg)
+ * args.append(arg)
+ * return args # <<<<<<<<<<<<<<
+@@ -6024,7 +6024,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ __pyx_r = __pyx_v_args;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":281
++ /* "vidcutter/libs/pympv/mpv.pyx":283
+ * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
+ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+ * elif self.id == MPV_EVENT_CLIENT_MESSAGE: # <<<<<<<<<<<<<<
+@@ -6034,7 +6034,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ break;
+ case MPV_EVENT_END_FILE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":291
++ /* "vidcutter/libs/pympv/mpv.pyx":293
+ * return args
+ * elif self.id == MPV_EVENT_END_FILE:
+ * return EndOfFileReached()._init(<mpv_event_end_file*>data) # <<<<<<<<<<<<<<
+@@ -6042,16 +6042,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":290
++ /* "vidcutter/libs/pympv/mpv.pyx":292
+ * args.append(arg)
+ * return args
+ * elif self.id == MPV_EVENT_END_FILE: # <<<<<<<<<<<<<<
+@@ -6062,7 +6062,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ default: break;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":292
++ /* "vidcutter/libs/pympv/mpv.pyx":294
+ * elif self.id == MPV_EVENT_END_FILE:
+ * return EndOfFileReached()._init(<mpv_event_end_file*>data)
+ * return None # <<<<<<<<<<<<<<
+@@ -6073,7 +6073,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":270
++ /* "vidcutter/libs/pympv/mpv.pyx":272
+ * return _strdec(err_c)
+ *
+ * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
+@@ -6096,7 +6096,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":295
++/* "vidcutter/libs/pympv/mpv.pyx":297
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+@@ -6130,7 +6130,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":298
++ /* "vidcutter/libs/pympv/mpv.pyx":300
+ * """mpv_event_name of the event id"""
+ * cdef const char* name_c
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -6145,7 +6145,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":299
++ /* "vidcutter/libs/pympv/mpv.pyx":301
+ * cdef const char* name_c
+ * with nogil:
+ * name_c = mpv_event_name(self.id) # <<<<<<<<<<<<<<
+@@ -6155,7 +6155,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ __pyx_v_name_c = mpv_event_name(__pyx_v_self->id);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":298
++ /* "vidcutter/libs/pympv/mpv.pyx":300
+ * """mpv_event_name of the event id"""
+ * cdef const char* name_c
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -6174,7 +6174,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":300
++ /* "vidcutter/libs/pympv/mpv.pyx":302
+ * with nogil:
+ * name_c = mpv_event_name(self.id)
+ * return _strdec(name_c) # <<<<<<<<<<<<<<
+@@ -6182,9 +6182,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ * cdef _init(self, mpv_event* event, ctx):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -6199,14 +6199,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":295
++ /* "vidcutter/libs/pympv/mpv.pyx":297
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+@@ -6228,7 +6228,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":302
++/* "vidcutter/libs/pympv/mpv.pyx":304
+ * return _strdec(name_c)
+ *
+ * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
+@@ -6257,20 +6257,20 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":303
++ /* "vidcutter/libs/pympv/mpv.pyx":305
+ *
+ * cdef _init(self, mpv_event* event, ctx):
+ * cdef uint64_t ctxid = <uint64_t>id(ctx) # <<<<<<<<<<<<<<
+ * self.id = event.event_id
+ * self.data = self._data(event)
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 305, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":304
++ /* "vidcutter/libs/pympv/mpv.pyx":306
+ * cdef _init(self, mpv_event* event, ctx):
+ * cdef uint64_t ctxid = <uint64_t>id(ctx)
+ * self.id = event.event_id # <<<<<<<<<<<<<<
+@@ -6280,14 +6280,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_t_3 = __pyx_v_event->event_id;
+ __pyx_v_self->id = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":305
++ /* "vidcutter/libs/pympv/mpv.pyx":307
+ * cdef uint64_t ctxid = <uint64_t>id(ctx)
+ * self.id = event.event_id
+ * self.data = self._data(event) # <<<<<<<<<<<<<<
+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->data);
+@@ -6295,19 +6295,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_v_self->data = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":306
++ /* "vidcutter/libs/pympv/mpv.pyx":308
+ * self.id = event.event_id
+ * self.data = self._data(event)
+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None) # <<<<<<<<<<<<<<
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+ * userdata.remove()
+ */
+- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+@@ -6324,7 +6324,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+@@ -6333,14 +6333,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+@@ -6351,7 +6351,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_None);
+ __pyx_t_4 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+@@ -6359,7 +6359,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_v_userdata = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":307
++ /* "vidcutter/libs/pympv/mpv.pyx":309
+ * self.data = self._data(event)
+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+@@ -6378,14 +6378,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":308
++ /* "vidcutter/libs/pympv/mpv.pyx":310
+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+ * userdata.remove() # <<<<<<<<<<<<<<
+ * if not userdata.observed and userdata.counter <= 0:
+ * del _reply_userdatas[ctxid][event.reply_userdata]
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+@@ -6399,21 +6399,21 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ }
+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":309
++ /* "vidcutter/libs/pympv/mpv.pyx":311
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+ * userdata.remove()
+ * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
+ * del _reply_userdatas[ctxid][event.reply_userdata]
+ * if userdata is not None:
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = ((!__pyx_t_11) != 0);
+ if (__pyx_t_10) {
+@@ -6421,29 +6421,29 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_t_9 = __pyx_t_10;
+ goto __pyx_L7_bool_binop_done;
+ }
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_9 = __pyx_t_10;
+ __pyx_L7_bool_binop_done:;
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":310
++ /* "vidcutter/libs/pympv/mpv.pyx":312
+ * userdata.remove()
+ * if not userdata.observed and userdata.counter <= 0:
+ * del _reply_userdatas[ctxid][event.reply_userdata] # <<<<<<<<<<<<<<
+ * if userdata is not None:
+ * userdata = userdata.data
+ */
+- __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+- if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
++ if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 312, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":309
++ /* "vidcutter/libs/pympv/mpv.pyx":311
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+ * userdata.remove()
+ * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
+@@ -6452,7 +6452,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":307
++ /* "vidcutter/libs/pympv/mpv.pyx":309
+ * self.data = self._data(event)
+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+@@ -6461,7 +6461,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":311
++ /* "vidcutter/libs/pympv/mpv.pyx":313
+ * if not userdata.observed and userdata.counter <= 0:
+ * del _reply_userdatas[ctxid][event.reply_userdata]
+ * if userdata is not None: # <<<<<<<<<<<<<<
+@@ -6472,19 +6472,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":312
++ /* "vidcutter/libs/pympv/mpv.pyx":314
+ * del _reply_userdatas[ctxid][event.reply_userdata]
+ * if userdata is not None:
+ * userdata = userdata.data # <<<<<<<<<<<<<<
+ * self.reply_userdata = userdata
+ * self.error = event.error
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF_SET(__pyx_v_userdata, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":311
++ /* "vidcutter/libs/pympv/mpv.pyx":313
+ * if not userdata.observed and userdata.counter <= 0:
+ * del _reply_userdatas[ctxid][event.reply_userdata]
+ * if userdata is not None: # <<<<<<<<<<<<<<
+@@ -6493,7 +6493,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":313
++ /* "vidcutter/libs/pympv/mpv.pyx":315
+ * if userdata is not None:
+ * userdata = userdata.data
+ * self.reply_userdata = userdata # <<<<<<<<<<<<<<
+@@ -6506,7 +6506,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __Pyx_DECREF(__pyx_v_self->reply_userdata);
+ __pyx_v_self->reply_userdata = __pyx_v_userdata;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":314
++ /* "vidcutter/libs/pympv/mpv.pyx":316
+ * userdata = userdata.data
+ * self.reply_userdata = userdata
+ * self.error = event.error # <<<<<<<<<<<<<<
+@@ -6516,7 +6516,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_t_7 = __pyx_v_event->error;
+ __pyx_v_self->error = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":315
++ /* "vidcutter/libs/pympv/mpv.pyx":317
+ * self.reply_userdata = userdata
+ * self.error = event.error
+ * return self # <<<<<<<<<<<<<<
+@@ -6528,7 +6528,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":302
++ /* "vidcutter/libs/pympv/mpv.pyx":304
+ * return _strdec(name_c)
+ *
+ * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
+@@ -6552,7 +6552,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":258
++/* "vidcutter/libs/pympv/mpv.pyx":260
+ * cdef class Event(object):
+ * """Wraps: mpv_event"""
+ * cdef public mpv_event_id id # <<<<<<<<<<<<<<
+@@ -6582,7 +6582,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(struct __pyx_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+@@ -6620,7 +6620,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__set__", 0);
+- __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error)
++ __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L1_error)
+ __pyx_v_self->id = __pyx_t_1;
+
+ /* function exit code */
+@@ -6634,7 +6634,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":259
++/* "vidcutter/libs/pympv/mpv.pyx":261
+ * """Wraps: mpv_event"""
+ * cdef public mpv_event_id id
+ * cdef public int error # <<<<<<<<<<<<<<
+@@ -6664,7 +6664,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __p
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+@@ -6702,7 +6702,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_ob
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__set__", 0);
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 261, __pyx_L1_error)
+ __pyx_v_self->error = __pyx_t_1;
+
+ /* function exit code */
+@@ -6716,7 +6716,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_ob
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":260
++/* "vidcutter/libs/pympv/mpv.pyx":262
+ * cdef public mpv_event_id id
+ * cdef public int error
+ * cdef public object data, reply_userdata # <<<<<<<<<<<<<<
+@@ -7215,7 +7215,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(stru
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":318
++/* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+@@ -7237,7 +7237,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, P
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":319
++/* "vidcutter/libs/pympv/mpv.pyx":321
+ *
+ * def _errors(fn):
+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+@@ -7285,42 +7285,42 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
+ __pyx_outer_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *) __Pyx_CyFunction_GetClosure(__pyx_self);
+ __pyx_cur_scope = __pyx_outer_scope;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":320
++ /* "vidcutter/libs/pympv/mpv.pyx":322
+ * def _errors(fn):
+ * def wrapped(*k, **kw):
+ * v = fn(*k, **kw) # <<<<<<<<<<<<<<
+ * if v < 0:
+ * raise MPVError(v)
+ */
+- if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 320, __pyx_L1_error) }
+- __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
++ if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 322, __pyx_L1_error) }
++ __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_v = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":321
++ /* "vidcutter/libs/pympv/mpv.pyx":323
+ * def wrapped(*k, **kw):
+ * v = fn(*k, **kw)
+ * if v < 0: # <<<<<<<<<<<<<<
+ * raise MPVError(v)
+ * return wrapped
+ */
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 321, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 323, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":322
++ /* "vidcutter/libs/pympv/mpv.pyx":324
+ * v = fn(*k, **kw)
+ * if v < 0:
+ * raise MPVError(v) # <<<<<<<<<<<<<<
+ * return wrapped
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+@@ -7334,14 +7334,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
+ }
+ __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_v);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 322, __pyx_L1_error)
++ __PYX_ERR(0, 324, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":321
++ /* "vidcutter/libs/pympv/mpv.pyx":323
+ * def wrapped(*k, **kw):
+ * v = fn(*k, **kw)
+ * if v < 0: # <<<<<<<<<<<<<<
+@@ -7350,7 +7350,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":319
++ /* "vidcutter/libs/pympv/mpv.pyx":321
+ *
+ * def _errors(fn):
+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+@@ -7374,7 +7374,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":318
++/* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+@@ -7396,7 +7396,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)Py_None);
+ __Pyx_INCREF(Py_None);
+- __PYX_ERR(0, 318, __pyx_L1_error)
++ __PYX_ERR(0, 320, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+@@ -7404,19 +7404,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":319
++ /* "vidcutter/libs/pympv/mpv.pyx":321
+ *
+ * def _errors(fn):
+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+ * v = fn(*k, **kw)
+ * if v < 0:
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_wrapped = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":323
++ /* "vidcutter/libs/pympv/mpv.pyx":325
+ * if v < 0:
+ * raise MPVError(v)
+ * return wrapped # <<<<<<<<<<<<<<
+@@ -7428,7 +7428,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
+ __pyx_r = __pyx_v_wrapped;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":318
++ /* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+@@ -7449,7 +7449,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":329
++/* "vidcutter/libs/pympv/mpv.pyx":331
+ * code = None
+ *
+ * def __init__(self, e): # <<<<<<<<<<<<<<
+@@ -7492,11 +7492,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 329, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 331, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 329, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 331, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -7509,7 +7509,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 331, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -7540,16 +7540,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ __Pyx_RefNannySetupContext("__init__", 0);
+ __Pyx_INCREF(__pyx_v_e);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":330
++ /* "vidcutter/libs/pympv/mpv.pyx":332
+ *
+ * def __init__(self, e):
+ * self.code = e # <<<<<<<<<<<<<<
+ * cdef const char* err_c
+ * cdef int e_i
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":333
++ /* "vidcutter/libs/pympv/mpv.pyx":335
+ * cdef const char* err_c
+ * cdef int e_i
+ * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
+@@ -7560,17 +7560,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":334
++ /* "vidcutter/libs/pympv/mpv.pyx":336
+ * cdef int e_i
+ * if not isinstance(e, basestring):
+ * e_i = e # <<<<<<<<<<<<<<
+ * with nogil:
+ * err_c = mpv_error_string(e_i)
+ */
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L1_error)
+ __pyx_v_e_i = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":335
++ /* "vidcutter/libs/pympv/mpv.pyx":337
+ * if not isinstance(e, basestring):
+ * e_i = e
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -7585,7 +7585,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":336
++ /* "vidcutter/libs/pympv/mpv.pyx":338
+ * e_i = e
+ * with nogil:
+ * err_c = mpv_error_string(e_i) # <<<<<<<<<<<<<<
+@@ -7595,7 +7595,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ __pyx_v_err_c = mpv_error_string(__pyx_v_e_i);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":335
++ /* "vidcutter/libs/pympv/mpv.pyx":337
+ * if not isinstance(e, basestring):
+ * e_i = e
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -7614,16 +7614,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":337
++ /* "vidcutter/libs/pympv/mpv.pyx":339
+ * with nogil:
+ * err_c = mpv_error_string(e_i)
+ * e = _strdec(err_c) # <<<<<<<<<<<<<<
+ * Exception.__init__(self, e)
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+@@ -7638,13 +7638,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":333
++ /* "vidcutter/libs/pympv/mpv.pyx":335
+ * cdef const char* err_c
+ * cdef int e_i
+ * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
+@@ -7653,14 +7653,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":338
++ /* "vidcutter/libs/pympv/mpv.pyx":340
+ * err_c = mpv_error_string(e_i)
+ * e = _strdec(err_c)
+ * Exception.__init__(self, e) # <<<<<<<<<<<<<<
+ *
+ * class PyMPVError(Exception):
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_3 = 0;
+@@ -7677,7 +7677,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
+- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+@@ -7685,13 +7685,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
+- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+@@ -7702,14 +7702,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ __Pyx_INCREF(__pyx_v_e);
+ __Pyx_GIVEREF(__pyx_v_e);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_3, __pyx_v_e);
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":329
++ /* "vidcutter/libs/pympv/mpv.pyx":331
+ * code = None
+ *
+ * def __init__(self, e): # <<<<<<<<<<<<<<
+@@ -7734,7 +7734,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":347
++/* "vidcutter/libs/pympv/mpv.pyx":349
+ *
+ * class _ReplyUserData(object):
+ * def __init__(self, data): # <<<<<<<<<<<<<<
+@@ -7777,11 +7777,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObj
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 347, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 349, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 347, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 349, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -7794,7 +7794,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObj
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 347, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 349, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -7815,34 +7815,34 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":348
++ /* "vidcutter/libs/pympv/mpv.pyx":350
+ * class _ReplyUserData(object):
+ * def __init__(self, data):
+ * self.counter = 0 # <<<<<<<<<<<<<<
+ * self.data = data
+ * self.observed = False
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":349
++ /* "vidcutter/libs/pympv/mpv.pyx":351
+ * def __init__(self, data):
+ * self.counter = 0
+ * self.data = data # <<<<<<<<<<<<<<
+ * self.observed = False
+ *
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":350
++ /* "vidcutter/libs/pympv/mpv.pyx":352
+ * self.counter = 0
+ * self.data = data
+ * self.observed = False # <<<<<<<<<<<<<<
+ *
+ * def add(self):
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":347
++ /* "vidcutter/libs/pympv/mpv.pyx":349
+ *
+ * class _ReplyUserData(object):
+ * def __init__(self, data): # <<<<<<<<<<<<<<
+@@ -7862,7 +7862,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":352
++/* "vidcutter/libs/pympv/mpv.pyx":354
+ * self.observed = False
+ *
+ * def add(self): # <<<<<<<<<<<<<<
+@@ -7894,22 +7894,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNU
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("add", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":353
++ /* "vidcutter/libs/pympv/mpv.pyx":355
+ *
+ * def add(self):
+ * self.counter += 1 # <<<<<<<<<<<<<<
+ *
+ * def remove(self):
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":352
++ /* "vidcutter/libs/pympv/mpv.pyx":354
+ * self.observed = False
+ *
+ * def add(self): # <<<<<<<<<<<<<<
+@@ -7931,7 +7931,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNU
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":355
++/* "vidcutter/libs/pympv/mpv.pyx":357
+ * self.counter += 1
+ *
+ * def remove(self): # <<<<<<<<<<<<<<
+@@ -7963,22 +7963,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("remove", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":356
++ /* "vidcutter/libs/pympv/mpv.pyx":358
+ *
+ * def remove(self):
+ * self.counter -= 1 # <<<<<<<<<<<<<<
+ *
+ *
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":355
++ /* "vidcutter/libs/pympv/mpv.pyx":357
+ * self.counter += 1
+ *
+ * def remove(self): # <<<<<<<<<<<<<<
+@@ -8000,7 +8000,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":370
++/* "vidcutter/libs/pympv/mpv.pyx":372
+ *
+ * @property
+ * def api_version(self): # <<<<<<<<<<<<<<
+@@ -8033,7 +8033,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":371
++ /* "vidcutter/libs/pympv/mpv.pyx":373
+ * @property
+ * def api_version(self):
+ * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION # <<<<<<<<<<<<<<
+@@ -8041,13 +8041,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
+ * @property
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+@@ -8062,7 +8062,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":370
++ /* "vidcutter/libs/pympv/mpv.pyx":372
+ *
+ * @property
+ * def api_version(self): # <<<<<<<<<<<<<<
+@@ -8084,7 +8084,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":374
++/* "vidcutter/libs/pympv/mpv.pyx":376
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+@@ -8118,7 +8118,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":380
++ /* "vidcutter/libs/pympv/mpv.pyx":382
+ * """
+ * cdef const char* name
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -8129,12 +8129,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 380, __pyx_L1_error)
++ __PYX_ERR(0, 382, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":381
++ /* "vidcutter/libs/pympv/mpv.pyx":383
+ * cdef const char* name
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8149,7 +8149,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":382
++ /* "vidcutter/libs/pympv/mpv.pyx":384
+ * assert self._ctx
+ * with nogil:
+ * name = mpv_client_name(self._ctx) # <<<<<<<<<<<<<<
+@@ -8159,7 +8159,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ __pyx_v_name = mpv_client_name(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":381
++ /* "vidcutter/libs/pympv/mpv.pyx":383
+ * cdef const char* name
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8178,7 +8178,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":383
++ /* "vidcutter/libs/pympv/mpv.pyx":385
+ * with nogil:
+ * name = mpv_client_name(self._ctx)
+ * return _strdec(name) # <<<<<<<<<<<<<<
+@@ -8186,9 +8186,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ * @property
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -8203,14 +8203,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":374
++ /* "vidcutter/libs/pympv/mpv.pyx":376
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+@@ -8232,7 +8232,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":386
++/* "vidcutter/libs/pympv/mpv.pyx":388
+ *
+ * @property
+ * def time(self): # <<<<<<<<<<<<<<
+@@ -8263,7 +8263,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":394
++ /* "vidcutter/libs/pympv/mpv.pyx":396
+ * """
+ * cdef int64_t time
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -8274,12 +8274,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 394, __pyx_L1_error)
++ __PYX_ERR(0, 396, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":395
++ /* "vidcutter/libs/pympv/mpv.pyx":397
+ * cdef int64_t time
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8294,7 +8294,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":396
++ /* "vidcutter/libs/pympv/mpv.pyx":398
+ * assert self._ctx
+ * with nogil:
+ * time = mpv_get_time_us(self._ctx) # <<<<<<<<<<<<<<
+@@ -8304,7 +8304,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ __pyx_v_time = mpv_get_time_us(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":395
++ /* "vidcutter/libs/pympv/mpv.pyx":397
+ * cdef int64_t time
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8323,7 +8323,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":397
++ /* "vidcutter/libs/pympv/mpv.pyx":399
+ * with nogil:
+ * time = mpv_get_time_us(self._ctx)
+ * return time # <<<<<<<<<<<<<<
+@@ -8331,13 +8331,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ * # def suspend(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":386
++ /* "vidcutter/libs/pympv/mpv.pyx":388
+ *
+ * @property
+ * def time(self): # <<<<<<<<<<<<<<
+@@ -8356,7 +8356,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":412
++/* "vidcutter/libs/pympv/mpv.pyx":414
+ *
+ * @_errors
+ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+@@ -8399,11 +8399,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enable)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 412, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 414, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 414, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -8416,7 +8416,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 414, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -8444,7 +8444,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("request_event", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":421
++ /* "vidcutter/libs/pympv/mpv.pyx":423
+ * Wraps: mpv_request_event
+ * """
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -8455,19 +8455,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 421, __pyx_L1_error)
++ __PYX_ERR(0, 423, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":422
++ /* "vidcutter/libs/pympv/mpv.pyx":424
+ * """
+ * assert self._ctx
+ * cdef int enable_i = 1 if enable else 0 # <<<<<<<<<<<<<<
+ * cdef int err
+ * cdef mpv_event_id event_id = event
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 424, __pyx_L1_error)
+ if (__pyx_t_2) {
+ __pyx_t_1 = 1;
+ } else {
+@@ -8475,17 +8475,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ }
+ __pyx_v_enable_i = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":424
++ /* "vidcutter/libs/pympv/mpv.pyx":426
+ * cdef int enable_i = 1 if enable else 0
+ * cdef int err
+ * cdef mpv_event_id event_id = event # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_request_event(self._ctx, event_id, enable_i)
+ */
+- __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
++ __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 426, __pyx_L1_error)
+ __pyx_v_event_id = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":425
++ /* "vidcutter/libs/pympv/mpv.pyx":427
+ * cdef int err
+ * cdef mpv_event_id event_id = event
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8500,7 +8500,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":426
++ /* "vidcutter/libs/pympv/mpv.pyx":428
+ * cdef mpv_event_id event_id = event
+ * with nogil:
+ * err = mpv_request_event(self._ctx, event_id, enable_i) # <<<<<<<<<<<<<<
+@@ -8510,7 +8510,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ __pyx_v_err = mpv_request_event(__pyx_v_self->_ctx, __pyx_v_event_id, __pyx_v_enable_i);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":425
++ /* "vidcutter/libs/pympv/mpv.pyx":427
+ * cdef int err
+ * cdef mpv_event_id event_id = event
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8529,7 +8529,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":427
++ /* "vidcutter/libs/pympv/mpv.pyx":429
+ * with nogil:
+ * err = mpv_request_event(self._ctx, event_id, enable_i)
+ * return err # <<<<<<<<<<<<<<
+@@ -8537,13 +8537,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":412
++ /* "vidcutter/libs/pympv/mpv.pyx":414
+ *
+ * @_errors
+ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+@@ -8562,7 +8562,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":430
++/* "vidcutter/libs/pympv/mpv.pyx":432
+ *
+ * @_errors
+ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+@@ -8599,7 +8599,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ __Pyx_RefNannySetupContext("set_log_level", 0);
+ __Pyx_INCREF(__pyx_v_loglevel);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":432
++ /* "vidcutter/libs/pympv/mpv.pyx":434
+ * def set_log_level(self, loglevel):
+ * """Wraps: mpv_request_log_messages"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -8610,19 +8610,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 432, __pyx_L1_error)
++ __PYX_ERR(0, 434, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":433
++ /* "vidcutter/libs/pympv/mpv.pyx":435
+ * """Wraps: mpv_request_log_messages"""
+ * assert self._ctx
+ * loglevel = _strenc(loglevel) # <<<<<<<<<<<<<<
+ * cdef const char* loglevel_c = loglevel
+ * cdef int err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -8636,23 +8636,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_loglevel) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loglevel);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_loglevel, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":434
++ /* "vidcutter/libs/pympv/mpv.pyx":436
+ * assert self._ctx
+ * loglevel = _strenc(loglevel)
+ * cdef const char* loglevel_c = loglevel # <<<<<<<<<<<<<<
+ * cdef int err
+ * with nogil:
+ */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
+ __pyx_v_loglevel_c = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":436
++ /* "vidcutter/libs/pympv/mpv.pyx":438
+ * cdef const char* loglevel_c = loglevel
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8667,7 +8667,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":437
++ /* "vidcutter/libs/pympv/mpv.pyx":439
+ * cdef int err
+ * with nogil:
+ * err = mpv_request_log_messages(self._ctx, loglevel_c) # <<<<<<<<<<<<<<
+@@ -8677,7 +8677,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ __pyx_v_err = mpv_request_log_messages(__pyx_v_self->_ctx, __pyx_v_loglevel_c);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":436
++ /* "vidcutter/libs/pympv/mpv.pyx":438
+ * cdef const char* loglevel_c = loglevel
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8696,7 +8696,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":438
++ /* "vidcutter/libs/pympv/mpv.pyx":440
+ * with nogil:
+ * err = mpv_request_log_messages(self._ctx, loglevel_c)
+ * return err # <<<<<<<<<<<<<<
+@@ -8704,13 +8704,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":430
++ /* "vidcutter/libs/pympv/mpv.pyx":432
+ *
+ * @_errors
+ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+@@ -8732,7 +8732,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":441
++/* "vidcutter/libs/pympv/mpv.pyx":443
+ *
+ * @_errors
+ * def load_config(self, filename): # <<<<<<<<<<<<<<
+@@ -8769,7 +8769,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ __Pyx_RefNannySetupContext("load_config", 0);
+ __Pyx_INCREF(__pyx_v_filename);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":443
++ /* "vidcutter/libs/pympv/mpv.pyx":445
+ * def load_config(self, filename):
+ * """Wraps: mpv_load_config_file"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -8780,19 +8780,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 443, __pyx_L1_error)
++ __PYX_ERR(0, 445, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":444
++ /* "vidcutter/libs/pympv/mpv.pyx":446
+ * """Wraps: mpv_load_config_file"""
+ * assert self._ctx
+ * filename = _strenc(filename) # <<<<<<<<<<<<<<
+ * cdef const char* _filename = filename
+ * cdef int err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -8806,23 +8806,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":445
++ /* "vidcutter/libs/pympv/mpv.pyx":447
+ * assert self._ctx
+ * filename = _strenc(filename)
+ * cdef const char* _filename = filename # <<<<<<<<<<<<<<
+ * cdef int err
+ * with nogil:
+ */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
+ __pyx_v__filename = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":447
++ /* "vidcutter/libs/pympv/mpv.pyx":449
+ * cdef const char* _filename = filename
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8837,7 +8837,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":448
++ /* "vidcutter/libs/pympv/mpv.pyx":450
+ * cdef int err
+ * with nogil:
+ * err = mpv_load_config_file(self._ctx, _filename) # <<<<<<<<<<<<<<
+@@ -8847,7 +8847,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ __pyx_v_err = mpv_load_config_file(__pyx_v_self->_ctx, __pyx_v__filename);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":447
++ /* "vidcutter/libs/pympv/mpv.pyx":449
+ * cdef const char* _filename = filename
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8866,7 +8866,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":449
++ /* "vidcutter/libs/pympv/mpv.pyx":451
+ * with nogil:
+ * err = mpv_load_config_file(self._ctx, _filename)
+ * return err # <<<<<<<<<<<<<<
+@@ -8874,13 +8874,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ * def _format_for(self, value):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":441
++ /* "vidcutter/libs/pympv/mpv.pyx":443
+ *
+ * @_errors
+ * def load_config(self, filename): # <<<<<<<<<<<<<<
+@@ -8902,7 +8902,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":451
++/* "vidcutter/libs/pympv/mpv.pyx":453
+ * return err
+ *
+ * def _format_for(self, value): # <<<<<<<<<<<<<<
+@@ -8935,7 +8935,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_format_for", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":452
++ /* "vidcutter/libs/pympv/mpv.pyx":454
+ *
+ * def _format_for(self, value):
+ * if isinstance(value, basestring): # <<<<<<<<<<<<<<
+@@ -8946,7 +8946,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":453
++ /* "vidcutter/libs/pympv/mpv.pyx":455
+ * def _format_for(self, value):
+ * if isinstance(value, basestring):
+ * return MPV_FORMAT_STRING # <<<<<<<<<<<<<<
+@@ -8954,13 +8954,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * return MPV_FORMAT_FLAG
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":452
++ /* "vidcutter/libs/pympv/mpv.pyx":454
+ *
+ * def _format_for(self, value):
+ * if isinstance(value, basestring): # <<<<<<<<<<<<<<
+@@ -8969,7 +8969,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":454
++ /* "vidcutter/libs/pympv/mpv.pyx":456
+ * if isinstance(value, basestring):
+ * return MPV_FORMAT_STRING
+ * elif isinstance(value, bool): # <<<<<<<<<<<<<<
+@@ -8978,12 +8978,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ __pyx_t_3 = ((PyObject*)&PyBool_Type);
+ __Pyx_INCREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 454, __pyx_L1_error)
++ __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 456, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":455
++ /* "vidcutter/libs/pympv/mpv.pyx":457
+ * return MPV_FORMAT_STRING
+ * elif isinstance(value, bool):
+ * return MPV_FORMAT_FLAG # <<<<<<<<<<<<<<
+@@ -8991,13 +8991,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * return MPV_FORMAT_INT64
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":454
++ /* "vidcutter/libs/pympv/mpv.pyx":456
+ * if isinstance(value, basestring):
+ * return MPV_FORMAT_STRING
+ * elif isinstance(value, bool): # <<<<<<<<<<<<<<
+@@ -9006,7 +9006,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":456
++ /* "vidcutter/libs/pympv/mpv.pyx":458
+ * elif isinstance(value, bool):
+ * return MPV_FORMAT_FLAG
+ * elif isinstance(value, int): # <<<<<<<<<<<<<<
+@@ -9017,7 +9017,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":457
++ /* "vidcutter/libs/pympv/mpv.pyx":459
+ * return MPV_FORMAT_FLAG
+ * elif isinstance(value, int):
+ * return MPV_FORMAT_INT64 # <<<<<<<<<<<<<<
+@@ -9025,13 +9025,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * return MPV_FORMAT_DOUBLE
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":456
++ /* "vidcutter/libs/pympv/mpv.pyx":458
+ * elif isinstance(value, bool):
+ * return MPV_FORMAT_FLAG
+ * elif isinstance(value, int): # <<<<<<<<<<<<<<
+@@ -9040,7 +9040,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":458
++ /* "vidcutter/libs/pympv/mpv.pyx":460
+ * elif isinstance(value, int):
+ * return MPV_FORMAT_INT64
+ * elif isinstance(value, float): # <<<<<<<<<<<<<<
+@@ -9051,7 +9051,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":459
++ /* "vidcutter/libs/pympv/mpv.pyx":461
+ * return MPV_FORMAT_INT64
+ * elif isinstance(value, float):
+ * return MPV_FORMAT_DOUBLE # <<<<<<<<<<<<<<
+@@ -9059,13 +9059,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * return MPV_FORMAT_NODE_ARRAY
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":458
++ /* "vidcutter/libs/pympv/mpv.pyx":460
+ * elif isinstance(value, int):
+ * return MPV_FORMAT_INT64
+ * elif isinstance(value, float): # <<<<<<<<<<<<<<
+@@ -9074,7 +9074,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":460
++ /* "vidcutter/libs/pympv/mpv.pyx":462
+ * elif isinstance(value, float):
+ * return MPV_FORMAT_DOUBLE
+ * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
+@@ -9095,7 +9095,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":461
++ /* "vidcutter/libs/pympv/mpv.pyx":463
+ * return MPV_FORMAT_DOUBLE
+ * elif isinstance(value, (tuple, list)):
+ * return MPV_FORMAT_NODE_ARRAY # <<<<<<<<<<<<<<
+@@ -9103,13 +9103,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * return MPV_FORMAT_NODE_MAP
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":460
++ /* "vidcutter/libs/pympv/mpv.pyx":462
+ * elif isinstance(value, float):
+ * return MPV_FORMAT_DOUBLE
+ * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
+@@ -9118,7 +9118,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":462
++ /* "vidcutter/libs/pympv/mpv.pyx":464
+ * elif isinstance(value, (tuple, list)):
+ * return MPV_FORMAT_NODE_ARRAY
+ * elif isinstance(value, dict): # <<<<<<<<<<<<<<
+@@ -9129,7 +9129,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":463
++ /* "vidcutter/libs/pympv/mpv.pyx":465
+ * return MPV_FORMAT_NODE_ARRAY
+ * elif isinstance(value, dict):
+ * return MPV_FORMAT_NODE_MAP # <<<<<<<<<<<<<<
+@@ -9137,13 +9137,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":462
++ /* "vidcutter/libs/pympv/mpv.pyx":464
+ * elif isinstance(value, (tuple, list)):
+ * return MPV_FORMAT_NODE_ARRAY
+ * elif isinstance(value, dict): # <<<<<<<<<<<<<<
+@@ -9152,7 +9152,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":464
++ /* "vidcutter/libs/pympv/mpv.pyx":466
+ * elif isinstance(value, dict):
+ * return MPV_FORMAT_NODE_MAP
+ * return MPV_FORMAT_NONE # <<<<<<<<<<<<<<
+@@ -9160,13 +9160,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * cdef mpv_node_list* _prep_node_list(self, values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":451
++ /* "vidcutter/libs/pympv/mpv.pyx":453
+ * return err
+ *
+ * def _format_for(self, value): # <<<<<<<<<<<<<<
+@@ -9185,7 +9185,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":466
++/* "vidcutter/libs/pympv/mpv.pyx":468
+ * return MPV_FORMAT_NONE
+ *
+ * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
+@@ -9216,7 +9216,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_prep_node_list", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":469
++ /* "vidcutter/libs/pympv/mpv.pyx":471
+ * cdef mpv_node node
+ * cdef mpv_format format
+ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list)) # <<<<<<<<<<<<<<
+@@ -9225,17 +9225,17 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ */
+ __pyx_v_node_list = ((struct mpv_node_list *)malloc((sizeof(struct mpv_node_list))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":470
++ /* "vidcutter/libs/pympv/mpv.pyx":472
+ * cdef mpv_format format
+ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
+ * node_list.num = len(values) # <<<<<<<<<<<<<<
+ * node_list.values = NULL
+ * node_list.keys = NULL
+ */
+- __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 470, __pyx_L1_error)
++ __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 472, __pyx_L1_error)
+ __pyx_v_node_list->num = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":471
++ /* "vidcutter/libs/pympv/mpv.pyx":473
+ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
+ * node_list.num = len(values)
+ * node_list.values = NULL # <<<<<<<<<<<<<<
+@@ -9244,7 +9244,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ */
+ __pyx_v_node_list->values = NULL;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":472
++ /* "vidcutter/libs/pympv/mpv.pyx":474
+ * node_list.num = len(values)
+ * node_list.values = NULL
+ * node_list.keys = NULL # <<<<<<<<<<<<<<
+@@ -9253,7 +9253,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ */
+ __pyx_v_node_list->keys = NULL;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":473
++ /* "vidcutter/libs/pympv/mpv.pyx":475
+ * node_list.values = NULL
+ * node_list.keys = NULL
+ * if node_list.num: # <<<<<<<<<<<<<<
+@@ -9263,7 +9263,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ __pyx_t_2 = (__pyx_v_node_list->num != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":474
++ /* "vidcutter/libs/pympv/mpv.pyx":476
+ * node_list.keys = NULL
+ * if node_list.num:
+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node)) # <<<<<<<<<<<<<<
+@@ -9272,7 +9272,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ */
+ __pyx_v_node_list->values = ((struct mpv_node *)malloc((__pyx_v_node_list->num * (sizeof(struct mpv_node)))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":473
++ /* "vidcutter/libs/pympv/mpv.pyx":475
+ * node_list.values = NULL
+ * node_list.keys = NULL
+ * if node_list.num: # <<<<<<<<<<<<<<
+@@ -9281,7 +9281,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":475
++ /* "vidcutter/libs/pympv/mpv.pyx":477
+ * if node_list.num:
+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+ * for i, value in enumerate(values): # <<<<<<<<<<<<<<
+@@ -9294,26 +9294,26 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+- __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_4))) {
+ if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 477, __pyx_L1_error)
+ #else
+- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 477, __pyx_L1_error)
+ #else
+- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ }
+@@ -9323,7 +9323,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 475, __pyx_L1_error)
++ else __PYX_ERR(0, 477, __pyx_L1_error)
+ }
+ break;
+ }
+@@ -9333,20 +9333,20 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ __pyx_t_6 = 0;
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+- __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3);
+ __pyx_t_3 = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":476
++ /* "vidcutter/libs/pympv/mpv.pyx":478
+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+ * for i, value in enumerate(values):
+ * format = self._format_for(value) # <<<<<<<<<<<<<<
+ * node = self._prep_native_value(value, format)
+ * node_list.values[i] = node
+ */
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 476, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 478, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+@@ -9360,36 +9360,36 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ }
+ __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
++ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 478, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L1_error)
++ __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_format = __pyx_t_9;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":477
++ /* "vidcutter/libs/pympv/mpv.pyx":479
+ * for i, value in enumerate(values):
+ * format = self._format_for(value)
+ * node = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+ * node_list.values[i] = node
+ * return node_list
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_6);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":478
++ /* "vidcutter/libs/pympv/mpv.pyx":480
+ * format = self._format_for(value)
+ * node = self._prep_native_value(value, format)
+ * node_list.values[i] = node # <<<<<<<<<<<<<<
+ * return node_list
+ *
+ */
+- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 480, __pyx_L1_error)
+ (__pyx_v_node_list->values[__pyx_t_10]) = __pyx_v_node;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":475
++ /* "vidcutter/libs/pympv/mpv.pyx":477
+ * if node_list.num:
+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+ * for i, value in enumerate(values): # <<<<<<<<<<<<<<
+@@ -9400,7 +9400,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":479
++ /* "vidcutter/libs/pympv/mpv.pyx":481
+ * node = self._prep_native_value(value, format)
+ * node_list.values[i] = node
+ * return node_list # <<<<<<<<<<<<<<
+@@ -9410,7 +9410,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ __pyx_r = __pyx_v_node_list;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":466
++ /* "vidcutter/libs/pympv/mpv.pyx":468
+ * return MPV_FORMAT_NONE
+ *
+ * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
+@@ -9434,7 +9434,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":481
++/* "vidcutter/libs/pympv/mpv.pyx":483
+ * return node_list
+ *
+ * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
+@@ -9466,14 +9466,14 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_prep_node_map", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":484
++ /* "vidcutter/libs/pympv/mpv.pyx":486
+ * cdef char* ckey
+ * cdef mpv_node_list* list
+ * list = self._prep_node_list(map.values()) # <<<<<<<<<<<<<<
+ * keys = map.keys()
+ * if not len(keys):
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -9487,20 +9487,20 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":485
++ /* "vidcutter/libs/pympv/mpv.pyx":487
+ * cdef mpv_node_list* list
+ * list = self._prep_node_list(map.values())
+ * keys = map.keys() # <<<<<<<<<<<<<<
+ * if not len(keys):
+ * return list
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -9514,24 +9514,24 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_keys = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":486
++ /* "vidcutter/libs/pympv/mpv.pyx":488
+ * list = self._prep_node_list(map.values())
+ * keys = map.keys()
+ * if not len(keys): # <<<<<<<<<<<<<<
+ * return list
+ * list.keys = <char**>malloc(list.num)
+ */
+- __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 486, __pyx_L1_error)
++ __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 488, __pyx_L1_error)
+ __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
+ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":487
++ /* "vidcutter/libs/pympv/mpv.pyx":489
+ * keys = map.keys()
+ * if not len(keys):
+ * return list # <<<<<<<<<<<<<<
+@@ -9541,7 +9541,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __pyx_r = __pyx_v_list;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":486
++ /* "vidcutter/libs/pympv/mpv.pyx":488
+ * list = self._prep_node_list(map.values())
+ * keys = map.keys()
+ * if not len(keys): # <<<<<<<<<<<<<<
+@@ -9550,7 +9550,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":488
++ /* "vidcutter/libs/pympv/mpv.pyx":490
+ * if not len(keys):
+ * return list
+ * list.keys = <char**>malloc(list.num) # <<<<<<<<<<<<<<
+@@ -9559,7 +9559,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ */
+ __pyx_v_list->keys = ((char **)malloc(__pyx_v_list->num));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":489
++ /* "vidcutter/libs/pympv/mpv.pyx":491
+ * return list
+ * list.keys = <char**>malloc(list.num)
+ * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
+@@ -9572,26 +9572,26 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __pyx_t_2 = __pyx_v_keys; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+ __pyx_t_6 = NULL;
+ } else {
+- __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_6)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 491, __pyx_L1_error)
+ #else
+- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 491, __pyx_L1_error)
+ #else
+- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+@@ -9601,7 +9601,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 489, __pyx_L1_error)
++ else __PYX_ERR(0, 491, __pyx_L1_error)
+ }
+ break;
+ }
+@@ -9611,20 +9611,20 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+- __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":490
++ /* "vidcutter/libs/pympv/mpv.pyx":492
+ * list.keys = <char**>malloc(list.num)
+ * for i, key in enumerate(keys):
+ * key = _strenc(key) # <<<<<<<<<<<<<<
+ * ckey = key
+ * list.keys[i] = <char*>malloc(len(key) + 1)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+@@ -9638,44 +9638,44 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ }
+ __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_key);
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":491
++ /* "vidcutter/libs/pympv/mpv.pyx":493
+ * for i, key in enumerate(keys):
+ * key = _strenc(key)
+ * ckey = key # <<<<<<<<<<<<<<
+ * list.keys[i] = <char*>malloc(len(key) + 1)
+ * strcpy(list.keys[i], ckey)
+ */
+- __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L1_error)
++ __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
+ __pyx_v_ckey = __pyx_t_9;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":492
++ /* "vidcutter/libs/pympv/mpv.pyx":494
+ * key = _strenc(key)
+ * ckey = key
+ * list.keys[i] = <char*>malloc(len(key) + 1) # <<<<<<<<<<<<<<
+ * strcpy(list.keys[i], ckey)
+ * return list
+ */
+- __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 492, __pyx_L1_error)
+- __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L1_error)
++ __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 494, __pyx_L1_error)
++ __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 494, __pyx_L1_error)
+ (__pyx_v_list->keys[__pyx_t_11]) = ((char *)malloc((__pyx_t_10 + 1)));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":493
++ /* "vidcutter/libs/pympv/mpv.pyx":495
+ * ckey = key
+ * list.keys[i] = <char*>malloc(len(key) + 1)
+ * strcpy(list.keys[i], ckey) # <<<<<<<<<<<<<<
+ * return list
+ *
+ */
+- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 495, __pyx_L1_error)
+ (void)(strcpy((__pyx_v_list->keys[__pyx_t_10]), __pyx_v_ckey));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":489
++ /* "vidcutter/libs/pympv/mpv.pyx":491
+ * return list
+ * list.keys = <char**>malloc(list.num)
+ * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
+@@ -9686,7 +9686,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":494
++ /* "vidcutter/libs/pympv/mpv.pyx":496
+ * list.keys[i] = <char*>malloc(len(key) + 1)
+ * strcpy(list.keys[i], ckey)
+ * return list # <<<<<<<<<<<<<<
+@@ -9696,7 +9696,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __pyx_r = __pyx_v_list;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":481
++ /* "vidcutter/libs/pympv/mpv.pyx":483
+ * return node_list
+ *
+ * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
+@@ -9721,7 +9721,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":496
++/* "vidcutter/libs/pympv/mpv.pyx":498
+ * return list
+ *
+ * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
+@@ -9749,39 +9749,39 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ __Pyx_RefNannySetupContext("_prep_native_value", 0);
+ __Pyx_INCREF(__pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":498
++ /* "vidcutter/libs/pympv/mpv.pyx":500
+ * cdef mpv_node _prep_native_value(self, value, format):
+ * cdef mpv_node node
+ * node.format = format # <<<<<<<<<<<<<<
+ * if format == MPV_FORMAT_STRING:
+ * value = _strenc(value)
+ */
+- __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error)
++ __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 500, __pyx_L1_error)
+ __pyx_v_node.format = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":499
++ /* "vidcutter/libs/pympv/mpv.pyx":501
+ * cdef mpv_node node
+ * node.format = format
+ * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+ * value = _strenc(value)
+ * node.u.string = <char*>malloc(len(value) + 1)
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":500
++ /* "vidcutter/libs/pympv/mpv.pyx":502
+ * node.format = format
+ * if format == MPV_FORMAT_STRING:
+ * value = _strenc(value) # <<<<<<<<<<<<<<
+ * node.u.string = <char*>malloc(len(value) + 1)
+ * strcpy(node.u.string, value)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -9795,33 +9795,33 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ }
+ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":501
++ /* "vidcutter/libs/pympv/mpv.pyx":503
+ * if format == MPV_FORMAT_STRING:
+ * value = _strenc(value)
+ * node.u.string = <char*>malloc(len(value) + 1) # <<<<<<<<<<<<<<
+ * strcpy(node.u.string, value)
+ * elif format == MPV_FORMAT_FLAG:
+ */
+- __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 501, __pyx_L1_error)
++ __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 503, __pyx_L1_error)
+ __pyx_v_node.u.string = ((char *)malloc((__pyx_t_6 + 1)));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":502
++ /* "vidcutter/libs/pympv/mpv.pyx":504
+ * value = _strenc(value)
+ * node.u.string = <char*>malloc(len(value) + 1)
+ * strcpy(node.u.string, value) # <<<<<<<<<<<<<<
+ * elif format == MPV_FORMAT_FLAG:
+ * node.u.flag = 1 if value else 0
+ */
+- __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L1_error)
+ (void)(strcpy(__pyx_v_node.u.string, __pyx_t_7));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":499
++ /* "vidcutter/libs/pympv/mpv.pyx":501
+ * cdef mpv_node node
+ * node.format = format
+ * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+@@ -9831,29 +9831,29 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":503
++ /* "vidcutter/libs/pympv/mpv.pyx":505
+ * node.u.string = <char*>malloc(len(value) + 1)
+ * strcpy(node.u.string, value)
+ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+ * node.u.flag = 1 if value else 0
+ * elif format == MPV_FORMAT_INT64:
+ */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":504
++ /* "vidcutter/libs/pympv/mpv.pyx":506
+ * strcpy(node.u.string, value)
+ * elif format == MPV_FORMAT_FLAG:
+ * node.u.flag = 1 if value else 0 # <<<<<<<<<<<<<<
+ * elif format == MPV_FORMAT_INT64:
+ * node.u.int64 = value
+ */
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 504, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 506, __pyx_L1_error)
+ if (__pyx_t_4) {
+ __pyx_t_8 = 1;
+ } else {
+@@ -9861,7 +9861,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ }
+ __pyx_v_node.u.flag = __pyx_t_8;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":503
++ /* "vidcutter/libs/pympv/mpv.pyx":505
+ * node.u.string = <char*>malloc(len(value) + 1)
+ * strcpy(node.u.string, value)
+ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+@@ -9871,32 +9871,32 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":505
++ /* "vidcutter/libs/pympv/mpv.pyx":507
+ * elif format == MPV_FORMAT_FLAG:
+ * node.u.flag = 1 if value else 0
+ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+ * node.u.int64 = value
+ * elif format == MPV_FORMAT_DOUBLE:
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":506
++ /* "vidcutter/libs/pympv/mpv.pyx":508
+ * node.u.flag = 1 if value else 0
+ * elif format == MPV_FORMAT_INT64:
+ * node.u.int64 = value # <<<<<<<<<<<<<<
+ * elif format == MPV_FORMAT_DOUBLE:
+ * node.u.double_ = value
+ */
+- __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error)
++ __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
+ __pyx_v_node.u.int64 = __pyx_t_9;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":505
++ /* "vidcutter/libs/pympv/mpv.pyx":507
+ * elif format == MPV_FORMAT_FLAG:
+ * node.u.flag = 1 if value else 0
+ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+@@ -9906,32 +9906,32 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":507
++ /* "vidcutter/libs/pympv/mpv.pyx":509
+ * elif format == MPV_FORMAT_INT64:
+ * node.u.int64 = value
+ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+ * node.u.double_ = value
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":508
++ /* "vidcutter/libs/pympv/mpv.pyx":510
+ * node.u.int64 = value
+ * elif format == MPV_FORMAT_DOUBLE:
+ * node.u.double_ = value # <<<<<<<<<<<<<<
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * node.u.list = self._prep_node_list(value)
+ */
+- __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
++ __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 510, __pyx_L1_error)
+ __pyx_v_node.u.double_ = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":507
++ /* "vidcutter/libs/pympv/mpv.pyx":509
+ * elif format == MPV_FORMAT_INT64:
+ * node.u.int64 = value
+ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+@@ -9941,22 +9941,22 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":509
++ /* "vidcutter/libs/pympv/mpv.pyx":511
+ * elif format == MPV_FORMAT_DOUBLE:
+ * node.u.double_ = value
+ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+ * node.u.list = self._prep_node_list(value)
+ * elif format == MPV_FORMAT_NODE_MAP:
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":510
++ /* "vidcutter/libs/pympv/mpv.pyx":512
+ * node.u.double_ = value
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * node.u.list = self._prep_node_list(value) # <<<<<<<<<<<<<<
+@@ -9965,7 +9965,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ */
+ __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":509
++ /* "vidcutter/libs/pympv/mpv.pyx":511
+ * elif format == MPV_FORMAT_DOUBLE:
+ * node.u.double_ = value
+ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+@@ -9975,22 +9975,22 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":511
++ /* "vidcutter/libs/pympv/mpv.pyx":513
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * node.u.list = self._prep_node_list(value)
+ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+ * node.u.list = self._prep_node_map(value)
+ * else:
+ */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":512
++ /* "vidcutter/libs/pympv/mpv.pyx":514
+ * node.u.list = self._prep_node_list(value)
+ * elif format == MPV_FORMAT_NODE_MAP:
+ * node.u.list = self._prep_node_map(value) # <<<<<<<<<<<<<<
+@@ -9999,7 +9999,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ */
+ __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_map(__pyx_v_self, __pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":511
++ /* "vidcutter/libs/pympv/mpv.pyx":513
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * node.u.list = self._prep_node_list(value)
+ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+@@ -10009,7 +10009,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":514
++ /* "vidcutter/libs/pympv/mpv.pyx":516
+ * node.u.list = self._prep_node_map(value)
+ * else:
+ * node.format = MPV_FORMAT_NONE # <<<<<<<<<<<<<<
+@@ -10021,7 +10021,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ }
+ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":515
++ /* "vidcutter/libs/pympv/mpv.pyx":517
+ * else:
+ * node.format = MPV_FORMAT_NONE
+ * return node # <<<<<<<<<<<<<<
+@@ -10031,7 +10031,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ __pyx_r = __pyx_v_node;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":496
++ /* "vidcutter/libs/pympv/mpv.pyx":498
+ * return list
+ *
+ * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
+@@ -10052,7 +10052,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":517
++/* "vidcutter/libs/pympv/mpv.pyx":519
+ * return node
+ *
+ * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
+@@ -10074,7 +10074,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_free_native_value", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":518
++ /* "vidcutter/libs/pympv/mpv.pyx":520
+ *
+ * cdef _free_native_value(self, mpv_node node):
+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
+@@ -10085,7 +10085,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ case MPV_FORMAT_NODE_ARRAY:
+ case MPV_FORMAT_NODE_MAP:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":519
++ /* "vidcutter/libs/pympv/mpv.pyx":521
+ * cdef _free_native_value(self, mpv_node node):
+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+ * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
+@@ -10097,19 +10097,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":520
++ /* "vidcutter/libs/pympv/mpv.pyx":522
+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+ * for i in range(node.u.list.num):
+ * self._free_native_value(node.u.list.values[i]) # <<<<<<<<<<<<<<
+ * free(node.u.list.values)
+ * if node.format == MPV_FORMAT_NODE_MAP:
+ */
+- __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
++ __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":521
++ /* "vidcutter/libs/pympv/mpv.pyx":523
+ * for i in range(node.u.list.num):
+ * self._free_native_value(node.u.list.values[i])
+ * free(node.u.list.values) # <<<<<<<<<<<<<<
+@@ -10118,7 +10118,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ */
+ free(__pyx_v_node.u.list->values);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":522
++ /* "vidcutter/libs/pympv/mpv.pyx":524
+ * self._free_native_value(node.u.list.values[i])
+ * free(node.u.list.values)
+ * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+@@ -10128,7 +10128,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ __pyx_t_5 = ((__pyx_v_node.format == MPV_FORMAT_NODE_MAP) != 0);
+ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":523
++ /* "vidcutter/libs/pympv/mpv.pyx":525
+ * free(node.u.list.values)
+ * if node.format == MPV_FORMAT_NODE_MAP:
+ * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
+@@ -10140,7 +10140,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":524
++ /* "vidcutter/libs/pympv/mpv.pyx":526
+ * if node.format == MPV_FORMAT_NODE_MAP:
+ * for i in range(node.u.list.num):
+ * free(node.u.list.keys[i]) # <<<<<<<<<<<<<<
+@@ -10150,7 +10150,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ free((__pyx_v_node.u.list->keys[__pyx_v_i]));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":525
++ /* "vidcutter/libs/pympv/mpv.pyx":527
+ * for i in range(node.u.list.num):
+ * free(node.u.list.keys[i])
+ * free(node.u.list.keys) # <<<<<<<<<<<<<<
+@@ -10159,7 +10159,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ */
+ free(__pyx_v_node.u.list->keys);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":522
++ /* "vidcutter/libs/pympv/mpv.pyx":524
+ * self._free_native_value(node.u.list.values[i])
+ * free(node.u.list.values)
+ * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+@@ -10168,7 +10168,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":526
++ /* "vidcutter/libs/pympv/mpv.pyx":528
+ * free(node.u.list.keys[i])
+ * free(node.u.list.keys)
+ * free(node.u.list) # <<<<<<<<<<<<<<
+@@ -10177,7 +10177,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ */
+ free(__pyx_v_node.u.list);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":518
++ /* "vidcutter/libs/pympv/mpv.pyx":520
+ *
+ * cdef _free_native_value(self, mpv_node node):
+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
+@@ -10187,7 +10187,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ break;
+ case MPV_FORMAT_STRING:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":528
++ /* "vidcutter/libs/pympv/mpv.pyx":530
+ * free(node.u.list)
+ * elif node.format == MPV_FORMAT_STRING:
+ * free(node.u.string) # <<<<<<<<<<<<<<
+@@ -10196,7 +10196,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ */
+ free(__pyx_v_node.u.string);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":527
++ /* "vidcutter/libs/pympv/mpv.pyx":529
+ * free(node.u.list.keys)
+ * free(node.u.list)
+ * elif node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+@@ -10207,7 +10207,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ default: break;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":517
++ /* "vidcutter/libs/pympv/mpv.pyx":519
+ * return node
+ *
+ * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
+@@ -10228,7 +10228,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":530
++/* "vidcutter/libs/pympv/mpv.pyx":532
+ * free(node.u.string)
+ *
+ * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+@@ -10280,7 +10280,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__py
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 530, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 532, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 0) {
+ goto __pyx_L5_argtuple_error;
+@@ -10291,7 +10291,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__py
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 530, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 532, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_cmdlist); __pyx_v_cmdlist = 0;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
+@@ -10338,7 +10338,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("command", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":544
++ /* "vidcutter/libs/pympv/mpv.pyx":546
+ * Wraps: mpv_command_node and mpv_command_node_async
+ * """
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -10349,19 +10349,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 544, __pyx_L1_error)
++ __PYX_ERR(0, 546, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":545
++ /* "vidcutter/libs/pympv/mpv.pyx":547
+ * """
+ * assert self._ctx
+ * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist)) # <<<<<<<<<<<<<<
+ * cdef mpv_node noderesult
+ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -10375,13 +10375,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_cmdlist) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cmdlist);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_cmdlist, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":549
++ /* "vidcutter/libs/pympv/mpv.pyx":551
+ * cdef int err
+ * cdef uint64_t data_id
+ * result = None # <<<<<<<<<<<<<<
+@@ -10391,7 +10391,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __Pyx_INCREF(Py_None);
+ __pyx_v_result = Py_None;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":550
++ /* "vidcutter/libs/pympv/mpv.pyx":552
+ * cdef uint64_t data_id
+ * result = None
+ * try: # <<<<<<<<<<<<<<
+@@ -10400,31 +10400,31 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ */
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":551
++ /* "vidcutter/libs/pympv/mpv.pyx":553
+ * result = None
+ * try:
+ * data_id = id(data) # <<<<<<<<<<<<<<
+ * if not asynchronous:
+ * with nogil:
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L4_error)
++ __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L4_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_data_id = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":552
++ /* "vidcutter/libs/pympv/mpv.pyx":554
+ * try:
+ * data_id = id(data)
+ * if not asynchronous: # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_command_node(self._ctx, &node, &noderesult)
+ */
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 552, __pyx_L4_error)
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 554, __pyx_L4_error)
+ __pyx_t_6 = ((!__pyx_t_5) != 0);
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":553
++ /* "vidcutter/libs/pympv/mpv.pyx":555
+ * data_id = id(data)
+ * if not asynchronous:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10439,7 +10439,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":554
++ /* "vidcutter/libs/pympv/mpv.pyx":556
+ * if not asynchronous:
+ * with nogil:
+ * err = mpv_command_node(self._ctx, &node, &noderesult) # <<<<<<<<<<<<<<
+@@ -10449,7 +10449,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_v_err = mpv_command_node(__pyx_v_self->_ctx, (&__pyx_v_node), (&__pyx_v_noderesult));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":553
++ /* "vidcutter/libs/pympv/mpv.pyx":555
+ * data_id = id(data)
+ * if not asynchronous:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10468,7 +10468,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":555
++ /* "vidcutter/libs/pympv/mpv.pyx":557
+ * with nogil:
+ * err = mpv_command_node(self._ctx, &node, &noderesult)
+ * try: # <<<<<<<<<<<<<<
+@@ -10477,7 +10477,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ */
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":556
++ /* "vidcutter/libs/pympv/mpv.pyx":558
+ * err = mpv_command_node(self._ctx, &node, &noderesult)
+ * try:
+ * result = _convert_node_value(noderesult) if err >= 0 else None # <<<<<<<<<<<<<<
+@@ -10485,7 +10485,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ * with nogil:
+ */
+ if (((__pyx_v_err >= 0) != 0)) {
+- __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L11_error)
++ __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L11_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+@@ -10497,7 +10497,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
++ /* "vidcutter/libs/pympv/mpv.pyx":560
+ * result = _convert_node_value(noderesult) if err >= 0 else None
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10514,7 +10514,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":559
++ /* "vidcutter/libs/pympv/mpv.pyx":561
+ * finally:
+ * with nogil:
+ * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
+@@ -10524,7 +10524,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ mpv_free_node_contents((&__pyx_v_noderesult));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
++ /* "vidcutter/libs/pympv/mpv.pyx":560
+ * result = _convert_node_value(noderesult) if err >= 0 else None
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10570,7 +10570,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":559
++ /* "vidcutter/libs/pympv/mpv.pyx":561
+ * finally:
+ * with nogil:
+ * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
+@@ -10580,7 +10580,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ mpv_free_node_contents((&__pyx_v_noderesult));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
++ /* "vidcutter/libs/pympv/mpv.pyx":560
+ * result = _convert_node_value(noderesult) if err >= 0 else None
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10616,7 +10616,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_L12:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":552
++ /* "vidcutter/libs/pympv/mpv.pyx":554
+ * try:
+ * data_id = id(data)
+ * if not asynchronous: # <<<<<<<<<<<<<<
+@@ -10626,7 +10626,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ goto __pyx_L6;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":561
++ /* "vidcutter/libs/pympv/mpv.pyx":563
+ * mpv_free_node_contents(&noderesult)
+ * else:
+ * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
+@@ -10634,9 +10634,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+ */
+ /*else*/ {
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_16 = NULL;
+ __pyx_t_8 = 0;
+@@ -10653,7 +10653,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+@@ -10662,14 +10662,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ if (__pyx_t_16) {
+ __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
+@@ -10680,7 +10680,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_8, Py_None);
+ __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ }
+@@ -10688,7 +10688,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_v_userdatas = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":562
++ /* "vidcutter/libs/pympv/mpv.pyx":564
+ * else:
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -10699,14 +10699,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_t_5 = (__pyx_t_6 != 0);
+ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":563
++ /* "vidcutter/libs/pympv/mpv.pyx":565
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None:
+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+ * userdatas.add()
+ * with nogil:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_17 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -10720,15 +10720,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ }
+ __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_17, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 563, __pyx_L4_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 565, __pyx_L4_error)
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":562
++ /* "vidcutter/libs/pympv/mpv.pyx":564
+ * else:
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -10737,14 +10737,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":564
++ /* "vidcutter/libs/pympv/mpv.pyx":566
+ * if userdatas is None:
+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add() # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_command_node_async(self._ctx, data_id, &node)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L4_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_17 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -10758,12 +10758,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ }
+ __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L4_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":565
++ /* "vidcutter/libs/pympv/mpv.pyx":567
+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add()
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10778,7 +10778,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":566
++ /* "vidcutter/libs/pympv/mpv.pyx":568
+ * userdatas.add()
+ * with nogil:
+ * err = mpv_command_node_async(self._ctx, data_id, &node) # <<<<<<<<<<<<<<
+@@ -10788,7 +10788,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_v_err = mpv_command_node_async(__pyx_v_self->_ctx, __pyx_v_data_id, (&__pyx_v_node));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":565
++ /* "vidcutter/libs/pympv/mpv.pyx":567
+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add()
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10810,7 +10810,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_L6:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":568
++ /* "vidcutter/libs/pympv/mpv.pyx":570
+ * err = mpv_command_node_async(self._ctx, data_id, &node)
+ * finally:
+ * self._free_native_value(node) # <<<<<<<<<<<<<<
+@@ -10819,7 +10819,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L5;
+@@ -10844,7 +10844,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __Pyx_XGOTREF(__pyx_t_10);
+ __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
+ {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L26_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L26_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+@@ -10877,7 +10877,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":569
++ /* "vidcutter/libs/pympv/mpv.pyx":571
+ * finally:
+ * self._free_native_value(node)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -10887,16 +10887,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_t_5 = ((__pyx_v_err < 0) != 0);
+ if (unlikely(__pyx_t_5)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":570
++ /* "vidcutter/libs/pympv/mpv.pyx":572
+ * self._free_native_value(node)
+ * if err < 0:
+ * raise MPVError(err) # <<<<<<<<<<<<<<
+ * return result
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 570, __pyx_L1_error)
++ __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 572, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -10911,14 +10911,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 570, __pyx_L1_error)
++ __PYX_ERR(0, 572, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":569
++ /* "vidcutter/libs/pympv/mpv.pyx":571
+ * finally:
+ * self._free_native_value(node)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -10927,7 +10927,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":571
++ /* "vidcutter/libs/pympv/mpv.pyx":573
+ * if err < 0:
+ * raise MPVError(err)
+ * return result # <<<<<<<<<<<<<<
+@@ -10939,7 +10939,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_r = __pyx_v_result;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":530
++ /* "vidcutter/libs/pympv/mpv.pyx":532
+ * free(node.u.string)
+ *
+ * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+@@ -10964,7 +10964,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":574
++/* "vidcutter/libs/pympv/mpv.pyx":576
+ *
+ * @_errors
+ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+@@ -11012,7 +11012,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(Py
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 574, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 576, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -11028,7 +11028,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(Py
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 574, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 576, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -11064,7 +11064,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ __Pyx_RefNannySetupContext("get_property_async", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":583
++ /* "vidcutter/libs/pympv/mpv.pyx":585
+ * data: Value to be passed into the reply_userdata of the response event.
+ * Wraps: mpv_get_property_async"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -11075,19 +11075,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 583, __pyx_L1_error)
++ __PYX_ERR(0, 585, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":584
++ /* "vidcutter/libs/pympv/mpv.pyx":586
+ * Wraps: mpv_get_property_async"""
+ * assert self._ctx
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -11101,32 +11101,32 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":585
++ /* "vidcutter/libs/pympv/mpv.pyx":587
+ * assert self._ctx
+ * prop = _strenc(prop)
+ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None:
+ */
+- __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 585, __pyx_L1_error)
++ __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 587, __pyx_L1_error)
+ __pyx_v_id_data = ((uint64_t)__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":586
++ /* "vidcutter/libs/pympv/mpv.pyx":588
+ * prop = _strenc(prop)
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+@@ -11143,7 +11143,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+@@ -11152,14 +11152,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+@@ -11170,7 +11170,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+ __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+@@ -11178,7 +11178,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ __pyx_v_userdatas = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":587
++ /* "vidcutter/libs/pympv/mpv.pyx":589
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -11189,14 +11189,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ __pyx_t_9 = (__pyx_t_8 != 0);
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":588
++ /* "vidcutter/libs/pympv/mpv.pyx":590
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+ * userdatas.add()
+ * cdef const char* prop_c = prop
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -11210,15 +11210,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ }
+ __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 588, __pyx_L1_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":587
++ /* "vidcutter/libs/pympv/mpv.pyx":589
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -11227,14 +11227,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":589
++ /* "vidcutter/libs/pympv/mpv.pyx":591
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ * userdatas.add() # <<<<<<<<<<<<<<
+ * cdef const char* prop_c = prop
+ * with nogil:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -11248,22 +11248,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ }
+ __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":590
++ /* "vidcutter/libs/pympv/mpv.pyx":592
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ * userdatas.add()
+ * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_get_property_async(
+ */
+- __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 590, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 592, __pyx_L1_error)
+ __pyx_v_prop_c = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":591
++ /* "vidcutter/libs/pympv/mpv.pyx":593
+ * userdatas.add()
+ * cdef const char* prop_c = prop
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -11278,7 +11278,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":592
++ /* "vidcutter/libs/pympv/mpv.pyx":594
+ * cdef const char* prop_c = prop
+ * with nogil:
+ * err = mpv_get_property_async( # <<<<<<<<<<<<<<
+@@ -11288,7 +11288,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ __pyx_v_err = mpv_get_property_async(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_prop_c, MPV_FORMAT_NODE);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":591
++ /* "vidcutter/libs/pympv/mpv.pyx":593
+ * userdatas.add()
+ * cdef const char* prop_c = prop
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -11307,7 +11307,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":598
++ /* "vidcutter/libs/pympv/mpv.pyx":600
+ * MPV_FORMAT_NODE,
+ * )
+ * return err # <<<<<<<<<<<<<<
+@@ -11315,13 +11315,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ * def try_get_property_async(self, prop, data=None, default=None):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":574
++ /* "vidcutter/libs/pympv/mpv.pyx":576
+ *
+ * @_errors
+ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+@@ -11346,7 +11346,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":600
++/* "vidcutter/libs/pympv/mpv.pyx":602
+ * return err
+ *
+ * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
+@@ -11403,7 +11403,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_asyn
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 600, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 602, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -11422,7 +11422,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_asyn
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 600, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 602, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -11451,7 +11451,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("try_get_property_async", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
++ /* "vidcutter/libs/pympv/mpv.pyx":603
+ *
+ * def try_get_property_async(self, prop, data=None, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11467,7 +11467,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":602
++ /* "vidcutter/libs/pympv/mpv.pyx":604
+ * def try_get_property_async(self, prop, data=None, default=None):
+ * try:
+ * return self.get_property_async(prop, data=data) # <<<<<<<<<<<<<<
+@@ -11475,17 +11475,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ * return default
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 604, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_prop);
+ __Pyx_GIVEREF(__pyx_v_prop);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_prop);
+- __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 602, __pyx_L3_error)
+- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L3_error)
++ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 604, __pyx_L3_error)
++ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+@@ -11494,7 +11494,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ __pyx_t_7 = 0;
+ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
++ /* "vidcutter/libs/pympv/mpv.pyx":603
+ *
+ * def try_get_property_async(self, prop, data=None, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11508,7 +11508,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":603
++ /* "vidcutter/libs/pympv/mpv.pyx":605
+ * try:
+ * return self.get_property_async(prop, data=data)
+ * except MPVError: # <<<<<<<<<<<<<<
+@@ -11516,7 +11516,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ *
+ */
+ __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L5_except_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 605, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+@@ -11524,12 +11524,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 603, __pyx_L5_except_error)
++ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 605, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":604
++ /* "vidcutter/libs/pympv/mpv.pyx":606
+ * return self.get_property_async(prop, data=data)
+ * except MPVError:
+ * return default # <<<<<<<<<<<<<<
+@@ -11547,7 +11547,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
++ /* "vidcutter/libs/pympv/mpv.pyx":603
+ *
+ * def try_get_property_async(self, prop, data=None, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11573,7 +11573,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ goto __pyx_L0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":600
++ /* "vidcutter/libs/pympv/mpv.pyx":602
+ * return err
+ *
+ * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
+@@ -11595,7 +11595,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":606
++/* "vidcutter/libs/pympv/mpv.pyx":608
+ * return default
+ *
+ * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
+@@ -11642,7 +11642,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyOb
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 606, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 608, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -11658,7 +11658,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyOb
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 608, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -11687,7 +11687,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("try_get_property", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":607
++ /* "vidcutter/libs/pympv/mpv.pyx":609
+ *
+ * def try_get_property(self, prop, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11703,7 +11703,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":608
++ /* "vidcutter/libs/pympv/mpv.pyx":610
+ * def try_get_property(self, prop, default=None):
+ * try:
+ * return self.get_property(prop) # <<<<<<<<<<<<<<
+@@ -11711,7 +11711,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ * return default
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L3_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+@@ -11725,14 +11725,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ }
+ __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L3_error)
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":607
++ /* "vidcutter/libs/pympv/mpv.pyx":609
+ *
+ * def try_get_property(self, prop, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11745,7 +11745,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":609
++ /* "vidcutter/libs/pympv/mpv.pyx":611
+ * try:
+ * return self.get_property(prop)
+ * except MPVError: # <<<<<<<<<<<<<<
+@@ -11753,7 +11753,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ *
+ */
+ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L5_except_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+@@ -11761,12 +11761,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 609, __pyx_L5_except_error)
++ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 611, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":610
++ /* "vidcutter/libs/pympv/mpv.pyx":612
+ * return self.get_property(prop)
+ * except MPVError:
+ * return default # <<<<<<<<<<<<<<
+@@ -11784,7 +11784,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":607
++ /* "vidcutter/libs/pympv/mpv.pyx":609
+ *
+ * def try_get_property(self, prop, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11810,7 +11810,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ goto __pyx_L0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":606
++ /* "vidcutter/libs/pympv/mpv.pyx":608
+ * return default
+ *
+ * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
+@@ -11832,7 +11832,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":612
++/* "vidcutter/libs/pympv/mpv.pyx":614
+ * return default
+ *
+ * def get_property(self, prop): # <<<<<<<<<<<<<<
+@@ -11882,7 +11882,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __Pyx_RefNannySetupContext("get_property", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":614
++ /* "vidcutter/libs/pympv/mpv.pyx":616
+ * def get_property(self, prop):
+ * """Wraps: mpv_get_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -11893,19 +11893,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 614, __pyx_L1_error)
++ __PYX_ERR(0, 616, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":616
++ /* "vidcutter/libs/pympv/mpv.pyx":618
+ * assert self._ctx
+ * cdef mpv_node result
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+ * cdef const char* prop_c = prop
+ * cdef int err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -11919,23 +11919,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":617
++ /* "vidcutter/libs/pympv/mpv.pyx":619
+ * cdef mpv_node result
+ * prop = _strenc(prop)
+ * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
+ * cdef int err
+ * with nogil:
+ */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 619, __pyx_L1_error)
+ __pyx_v_prop_c = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":619
++ /* "vidcutter/libs/pympv/mpv.pyx":621
+ * cdef const char* prop_c = prop
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -11950,7 +11950,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":620
++ /* "vidcutter/libs/pympv/mpv.pyx":622
+ * cdef int err
+ * with nogil:
+ * err = mpv_get_property( # <<<<<<<<<<<<<<
+@@ -11960,7 +11960,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __pyx_v_err = mpv_get_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_result));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":619
++ /* "vidcutter/libs/pympv/mpv.pyx":621
+ * cdef const char* prop_c = prop
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -11979,7 +11979,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":626
++ /* "vidcutter/libs/pympv/mpv.pyx":628
+ * &result,
+ * )
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -11989,16 +11989,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __pyx_t_5 = ((__pyx_v_err < 0) != 0);
+ if (unlikely(__pyx_t_5)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":627
++ /* "vidcutter/libs/pympv/mpv.pyx":629
+ * )
+ * if err < 0:
+ * raise MPVError(err) # <<<<<<<<<<<<<<
+ * try:
+ * v = _convert_node_value(result)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -12013,14 +12013,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 627, __pyx_L1_error)
++ __PYX_ERR(0, 629, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":626
++ /* "vidcutter/libs/pympv/mpv.pyx":628
+ * &result,
+ * )
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -12029,7 +12029,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":628
++ /* "vidcutter/libs/pympv/mpv.pyx":630
+ * if err < 0:
+ * raise MPVError(err)
+ * try: # <<<<<<<<<<<<<<
+@@ -12038,20 +12038,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ */
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":629
++ /* "vidcutter/libs/pympv/mpv.pyx":631
+ * raise MPVError(err)
+ * try:
+ * v = _convert_node_value(result) # <<<<<<<<<<<<<<
+ * finally:
+ * with nogil:
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L8_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L8_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_v = __pyx_t_1;
+ __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":631
++ /* "vidcutter/libs/pympv/mpv.pyx":633
+ * v = _convert_node_value(result)
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12068,7 +12068,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":632
++ /* "vidcutter/libs/pympv/mpv.pyx":634
+ * finally:
+ * with nogil:
+ * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
+@@ -12078,7 +12078,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ mpv_free_node_contents((&__pyx_v_result));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":631
++ /* "vidcutter/libs/pympv/mpv.pyx":633
+ * v = _convert_node_value(result)
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12125,7 +12125,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":632
++ /* "vidcutter/libs/pympv/mpv.pyx":634
+ * finally:
+ * with nogil:
+ * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
+@@ -12135,7 +12135,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ mpv_free_node_contents((&__pyx_v_result));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":631
++ /* "vidcutter/libs/pympv/mpv.pyx":633
+ * v = _convert_node_value(result)
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12171,7 +12171,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __pyx_L9:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":633
++ /* "vidcutter/libs/pympv/mpv.pyx":635
+ * with nogil:
+ * mpv_free_node_contents(&result)
+ * return v # <<<<<<<<<<<<<<
+@@ -12183,7 +12183,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __pyx_r = __pyx_v_v;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":612
++ /* "vidcutter/libs/pympv/mpv.pyx":614
+ * return default
+ *
+ * def get_property(self, prop): # <<<<<<<<<<<<<<
+@@ -12207,7 +12207,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":636
++/* "vidcutter/libs/pympv/mpv.pyx":638
+ *
+ * @_errors
+ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+@@ -12275,7 +12275,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 636, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 638, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -12297,7 +12297,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 638, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -12344,7 +12344,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __Pyx_RefNannySetupContext("set_property", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":638
++ /* "vidcutter/libs/pympv/mpv.pyx":640
+ * def set_property(self, prop, value=True, asynchronous=False, data=None):
+ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -12355,19 +12355,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 638, __pyx_L1_error)
++ __PYX_ERR(0, 640, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":639
++ /* "vidcutter/libs/pympv/mpv.pyx":641
+ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ * assert self._ctx
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+ * cdef mpv_format format = self._format_for(value)
+ * cdef mpv_node v = self._prep_native_value(value, format)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -12381,20 +12381,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":640
++ /* "vidcutter/libs/pympv/mpv.pyx":642
+ * assert self._ctx
+ * prop = _strenc(prop)
+ * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
+ * cdef mpv_node v = self._prep_native_value(value, format)
+ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -12408,26 +12408,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error)
++ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_format = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":641
++ /* "vidcutter/libs/pympv/mpv.pyx":643
+ * prop = _strenc(prop)
+ * cdef mpv_format format = self._format_for(value)
+ * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+ * cdef int err
+ * cdef uint64_t data_id
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":645
++ /* "vidcutter/libs/pympv/mpv.pyx":647
+ * cdef uint64_t data_id
+ * cdef const char* prop_c
+ * try: # <<<<<<<<<<<<<<
+@@ -12436,28 +12436,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ */
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":646
++ /* "vidcutter/libs/pympv/mpv.pyx":648
+ * cdef const char* prop_c
+ * try:
+ * prop_c = prop # <<<<<<<<<<<<<<
+ * if not asynchronous:
+ * with nogil:
+ */
+- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 646, __pyx_L4_error)
++ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L4_error)
+ __pyx_v_prop_c = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":647
++ /* "vidcutter/libs/pympv/mpv.pyx":649
+ * try:
+ * prop_c = prop
+ * if not asynchronous: # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_set_property(
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 647, __pyx_L4_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 649, __pyx_L4_error)
+ __pyx_t_7 = ((!__pyx_t_6) != 0);
+ if (__pyx_t_7) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":648
++ /* "vidcutter/libs/pympv/mpv.pyx":650
+ * prop_c = prop
+ * if not asynchronous:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12472,7 +12472,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":649
++ /* "vidcutter/libs/pympv/mpv.pyx":651
+ * if not asynchronous:
+ * with nogil:
+ * err = mpv_set_property( # <<<<<<<<<<<<<<
+@@ -12482,7 +12482,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_v_err = mpv_set_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":648
++ /* "vidcutter/libs/pympv/mpv.pyx":650
+ * prop_c = prop
+ * if not asynchronous:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12501,7 +12501,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":655
++ /* "vidcutter/libs/pympv/mpv.pyx":657
+ * &v
+ * )
+ * return err # <<<<<<<<<<<<<<
+@@ -12509,13 +12509,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ * userdatas = self.reply_userdata.get(data_id, None)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L3_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":647
++ /* "vidcutter/libs/pympv/mpv.pyx":649
+ * try:
+ * prop_c = prop
+ * if not asynchronous: # <<<<<<<<<<<<<<
+@@ -12524,26 +12524,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":656
++ /* "vidcutter/libs/pympv/mpv.pyx":658
+ * )
+ * return err
+ * data_id = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None:
+ */
+- __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 656, __pyx_L4_error)
++ __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 658, __pyx_L4_error)
+ __pyx_v_data_id = ((uint64_t)__pyx_t_8);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":657
++ /* "vidcutter/libs/pympv/mpv.pyx":659
+ * return err
+ * data_id = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
+ * if userdatas is None:
+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = NULL;
+ __pyx_t_10 = 0;
+@@ -12560,7 +12560,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+@@ -12569,14 +12569,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
+@@ -12587,7 +12587,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, Py_None);
+ __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+@@ -12595,7 +12595,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_v_userdatas = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":658
++ /* "vidcutter/libs/pympv/mpv.pyx":660
+ * data_id = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -12606,14 +12606,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_t_6 = (__pyx_t_7 != 0);
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":659
++ /* "vidcutter/libs/pympv/mpv.pyx":661
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None:
+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+ * userdatas.add()
+ * with nogil:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -12627,15 +12627,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 659, __pyx_L4_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 661, __pyx_L4_error)
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":658
++ /* "vidcutter/libs/pympv/mpv.pyx":660
+ * data_id = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -12644,14 +12644,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":660
++ /* "vidcutter/libs/pympv/mpv.pyx":662
+ * if userdatas is None:
+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add() # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_set_property_async(
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L4_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -12665,12 +12665,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L4_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":661
++ /* "vidcutter/libs/pympv/mpv.pyx":663
+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add()
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12685,7 +12685,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":662
++ /* "vidcutter/libs/pympv/mpv.pyx":664
+ * userdatas.add()
+ * with nogil:
+ * err = mpv_set_property_async( # <<<<<<<<<<<<<<
+@@ -12695,7 +12695,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_v_err = mpv_set_property_async(__pyx_v_self->_ctx, __pyx_v_data_id, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":661
++ /* "vidcutter/libs/pympv/mpv.pyx":663
+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add()
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12715,7 +12715,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":670
++ /* "vidcutter/libs/pympv/mpv.pyx":672
+ * )
+ * finally:
+ * self._free_native_value(v) # <<<<<<<<<<<<<<
+@@ -12724,7 +12724,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L5;
+@@ -12749,7 +12749,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __Pyx_XGOTREF(__pyx_t_19);
+ __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
+ {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L15_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+@@ -12782,7 +12782,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_L3_return: {
+ __pyx_t_19 = __pyx_r;
+ __pyx_r = 0;
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_19;
+@@ -12792,7 +12792,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":671
++ /* "vidcutter/libs/pympv/mpv.pyx":673
+ * finally:
+ * self._free_native_value(v)
+ * return err # <<<<<<<<<<<<<<
+@@ -12800,13 +12800,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":636
++ /* "vidcutter/libs/pympv/mpv.pyx":638
+ *
+ * @_errors
+ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+@@ -12831,7 +12831,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":674
++/* "vidcutter/libs/pympv/mpv.pyx":676
+ *
+ * @_errors
+ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+@@ -12879,7 +12879,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 674, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 676, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -12895,7 +12895,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 674, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 676, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -12935,7 +12935,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ __Pyx_RefNannySetupContext("set_option", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":676
++ /* "vidcutter/libs/pympv/mpv.pyx":678
+ * def set_option(self, prop, value=True):
+ * """Wraps: mpv_set_option"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -12946,19 +12946,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 676, __pyx_L1_error)
++ __PYX_ERR(0, 678, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":677
++ /* "vidcutter/libs/pympv/mpv.pyx":679
+ * """Wraps: mpv_set_option"""
+ * assert self._ctx
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+ * cdef mpv_format format = self._format_for(value)
+ * cdef mpv_node v = self._prep_native_value(value, format)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -12972,20 +12972,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":678
++ /* "vidcutter/libs/pympv/mpv.pyx":680
+ * assert self._ctx
+ * prop = _strenc(prop)
+ * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
+ * cdef mpv_node v = self._prep_native_value(value, format)
+ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -12999,26 +12999,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
++ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 680, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_format = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":679
++ /* "vidcutter/libs/pympv/mpv.pyx":681
+ * prop = _strenc(prop)
+ * cdef mpv_format format = self._format_for(value)
+ * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+ * cdef int err
+ * cdef const char* prop_c
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":682
++ /* "vidcutter/libs/pympv/mpv.pyx":684
+ * cdef int err
+ * cdef const char* prop_c
+ * try: # <<<<<<<<<<<<<<
+@@ -13027,17 +13027,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ */
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":683
++ /* "vidcutter/libs/pympv/mpv.pyx":685
+ * cdef const char* prop_c
+ * try:
+ * prop_c = prop # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_set_option(
+ */
+- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L4_error)
++ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 685, __pyx_L4_error)
+ __pyx_v_prop_c = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":684
++ /* "vidcutter/libs/pympv/mpv.pyx":686
+ * try:
+ * prop_c = prop
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13052,7 +13052,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":685
++ /* "vidcutter/libs/pympv/mpv.pyx":687
+ * prop_c = prop
+ * with nogil:
+ * err = mpv_set_option( # <<<<<<<<<<<<<<
+@@ -13062,7 +13062,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ __pyx_v_err = mpv_set_option(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":684
++ /* "vidcutter/libs/pympv/mpv.pyx":686
+ * try:
+ * prop_c = prop
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13082,7 +13082,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":692
++ /* "vidcutter/libs/pympv/mpv.pyx":694
+ * )
+ * finally:
+ * self._free_native_value(v) # <<<<<<<<<<<<<<
+@@ -13091,7 +13091,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L5;
+@@ -13114,7 +13114,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ __Pyx_XGOTREF(__pyx_t_14);
+ __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
+ {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L10_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L10_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+@@ -13147,7 +13147,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":693
++ /* "vidcutter/libs/pympv/mpv.pyx":695
+ * finally:
+ * self._free_native_value(v)
+ * return err # <<<<<<<<<<<<<<
+@@ -13155,13 +13155,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":674
++ /* "vidcutter/libs/pympv/mpv.pyx":676
+ *
+ * @_errors
+ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+@@ -13183,7 +13183,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":696
++/* "vidcutter/libs/pympv/mpv.pyx":698
+ *
+ * @_errors
+ * def initialize(self): # <<<<<<<<<<<<<<
+@@ -13215,7 +13215,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("initialize", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":698
++ /* "vidcutter/libs/pympv/mpv.pyx":700
+ * def initialize(self):
+ * """Wraps: mpv_initialize"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -13226,12 +13226,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 698, __pyx_L1_error)
++ __PYX_ERR(0, 700, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":700
++ /* "vidcutter/libs/pympv/mpv.pyx":702
+ * assert self._ctx
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13246,7 +13246,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":701
++ /* "vidcutter/libs/pympv/mpv.pyx":703
+ * cdef int err
+ * with nogil:
+ * err = mpv_initialize(self._ctx) # <<<<<<<<<<<<<<
+@@ -13256,7 +13256,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ __pyx_v_err = mpv_initialize(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":700
++ /* "vidcutter/libs/pympv/mpv.pyx":702
+ * assert self._ctx
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13275,7 +13275,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":702
++ /* "vidcutter/libs/pympv/mpv.pyx":704
+ * with nogil:
+ * err = mpv_initialize(self._ctx)
+ * return err # <<<<<<<<<<<<<<
+@@ -13283,13 +13283,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ * def wait_event(self, timeout=None):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":696
++ /* "vidcutter/libs/pympv/mpv.pyx":698
+ *
+ * @_errors
+ * def initialize(self): # <<<<<<<<<<<<<<
+@@ -13308,7 +13308,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":704
++/* "vidcutter/libs/pympv/mpv.pyx":706
+ * return err
+ *
+ * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
+@@ -13349,7 +13349,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 704, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 706, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -13363,7 +13363,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 704, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 706, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -13391,7 +13391,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("wait_event", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":706
++ /* "vidcutter/libs/pympv/mpv.pyx":708
+ * def wait_event(self, timeout=None):
+ * """Wraps: mpv_wait_event"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -13402,12 +13402,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 706, __pyx_L1_error)
++ __PYX_ERR(0, 708, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":707
++ /* "vidcutter/libs/pympv/mpv.pyx":709
+ * """Wraps: mpv_wait_event"""
+ * assert self._ctx
+ * cdef double timeout_d = timeout if timeout is not None else -1 # <<<<<<<<<<<<<<
+@@ -13416,14 +13416,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ */
+ __pyx_t_2 = (__pyx_v_timeout != Py_None);
+ if ((__pyx_t_2 != 0)) {
+- __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
++ __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 709, __pyx_L1_error)
+ __pyx_t_1 = __pyx_t_3;
+ } else {
+ __pyx_t_1 = -1.0;
+ }
+ __pyx_v_timeout_d = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":709
++ /* "vidcutter/libs/pympv/mpv.pyx":711
+ * cdef double timeout_d = timeout if timeout is not None else -1
+ * cdef mpv_event* event
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13438,7 +13438,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":710
++ /* "vidcutter/libs/pympv/mpv.pyx":712
+ * cdef mpv_event* event
+ * with nogil:
+ * event = mpv_wait_event(self._ctx, timeout_d) # <<<<<<<<<<<<<<
+@@ -13448,7 +13448,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ __pyx_v_event = mpv_wait_event(__pyx_v_self->_ctx, __pyx_v_timeout_d);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":709
++ /* "vidcutter/libs/pympv/mpv.pyx":711
+ * cdef double timeout_d = timeout if timeout is not None else -1
+ * cdef mpv_event* event
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13467,7 +13467,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":711
++ /* "vidcutter/libs/pympv/mpv.pyx":713
+ * with nogil:
+ * event = mpv_wait_event(self._ctx, timeout_d)
+ * return Event()._init(event, self) # <<<<<<<<<<<<<<
+@@ -13475,16 +13475,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ * def wakeup(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
++ __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":704
++ /* "vidcutter/libs/pympv/mpv.pyx":706
+ * return err
+ *
+ * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
+@@ -13504,7 +13504,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":713
++/* "vidcutter/libs/pympv/mpv.pyx":715
+ * return Event()._init(event, self)
+ *
+ * def wakeup(self): # <<<<<<<<<<<<<<
+@@ -13534,7 +13534,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("wakeup", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":715
++ /* "vidcutter/libs/pympv/mpv.pyx":717
+ * def wakeup(self):
+ * """Wraps: mpv_wakeup"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -13545,12 +13545,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 715, __pyx_L1_error)
++ __PYX_ERR(0, 717, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":716
++ /* "vidcutter/libs/pympv/mpv.pyx":718
+ * """Wraps: mpv_wakeup"""
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13565,7 +13565,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":717
++ /* "vidcutter/libs/pympv/mpv.pyx":719
+ * assert self._ctx
+ * with nogil:
+ * mpv_wakeup(self._ctx) # <<<<<<<<<<<<<<
+@@ -13575,7 +13575,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ mpv_wakeup(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":716
++ /* "vidcutter/libs/pympv/mpv.pyx":718
+ * """Wraps: mpv_wakeup"""
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13594,7 +13594,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":713
++ /* "vidcutter/libs/pympv/mpv.pyx":715
+ * return Event()._init(event, self)
+ *
+ * def wakeup(self): # <<<<<<<<<<<<<<
+@@ -13614,7 +13614,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":719
++/* "vidcutter/libs/pympv/mpv.pyx":721
+ * mpv_wakeup(self._ctx)
+ *
+ * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
+@@ -13649,7 +13649,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("set_wakeup_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":721
++ /* "vidcutter/libs/pympv/mpv.pyx":723
+ * def set_wakeup_callback(self, callback):
+ * """Wraps: mpv_set_wakeup_callback"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -13660,25 +13660,25 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 721, __pyx_L1_error)
++ __PYX_ERR(0, 723, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":722
++ /* "vidcutter/libs/pympv/mpv.pyx":724
+ * """Wraps: mpv_set_wakeup_callback"""
+ * assert self._ctx
+ * cdef uint64_t name = <uint64_t>id(self) # <<<<<<<<<<<<<<
+ * self.callback = callback
+ * self.callbackthread.set(callback)
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_name = ((uint64_t)__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":723
++ /* "vidcutter/libs/pympv/mpv.pyx":725
+ * assert self._ctx
+ * cdef uint64_t name = <uint64_t>id(self)
+ * self.callback = callback # <<<<<<<<<<<<<<
+@@ -13691,14 +13691,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ __Pyx_DECREF(__pyx_v_self->callback);
+ __pyx_v_self->callback = __pyx_v_callback;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":724
++ /* "vidcutter/libs/pympv/mpv.pyx":726
+ * cdef uint64_t name = <uint64_t>id(self)
+ * self.callback = callback
+ * self.callbackthread.set(callback) # <<<<<<<<<<<<<<
+ * with nogil:
+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+@@ -13712,12 +13712,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ }
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callback);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":725
++ /* "vidcutter/libs/pympv/mpv.pyx":727
+ * self.callback = callback
+ * self.callbackthread.set(callback)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13732,7 +13732,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":726
++ /* "vidcutter/libs/pympv/mpv.pyx":728
+ * self.callbackthread.set(callback)
+ * with nogil:
+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name) # <<<<<<<<<<<<<<
+@@ -13742,7 +13742,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ mpv_set_wakeup_callback(__pyx_v_self->_ctx, __pyx_f_9vidcutter_4libs_3mpv__c_callback, ((void *)__pyx_v_name));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":725
++ /* "vidcutter/libs/pympv/mpv.pyx":727
+ * self.callback = callback
+ * self.callbackthread.set(callback)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13761,7 +13761,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":719
++ /* "vidcutter/libs/pympv/mpv.pyx":721
+ * mpv_wakeup(self._ctx)
+ *
+ * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
+@@ -13784,7 +13784,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":728
++/* "vidcutter/libs/pympv/mpv.pyx":730
+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+ *
+ * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
+@@ -13816,7 +13816,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("get_wakeup_pipe", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":730
++ /* "vidcutter/libs/pympv/mpv.pyx":732
+ * def get_wakeup_pipe(self):
+ * """Wraps: mpv_get_wakeup_pipe"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -13827,12 +13827,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 730, __pyx_L1_error)
++ __PYX_ERR(0, 732, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":732
++ /* "vidcutter/libs/pympv/mpv.pyx":734
+ * assert self._ctx
+ * cdef int pipe
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13847,7 +13847,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":733
++ /* "vidcutter/libs/pympv/mpv.pyx":735
+ * cdef int pipe
+ * with nogil:
+ * pipe = mpv_get_wakeup_pipe(self._ctx) # <<<<<<<<<<<<<<
+@@ -13857,7 +13857,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ __pyx_v_pipe = mpv_get_wakeup_pipe(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":732
++ /* "vidcutter/libs/pympv/mpv.pyx":734
+ * assert self._ctx
+ * cdef int pipe
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13876,7 +13876,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":734
++ /* "vidcutter/libs/pympv/mpv.pyx":736
+ * with nogil:
+ * pipe = mpv_get_wakeup_pipe(self._ctx)
+ * return pipe # <<<<<<<<<<<<<<
+@@ -13884,13 +13884,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ * def __cinit__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":728
++ /* "vidcutter/libs/pympv/mpv.pyx":730
+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+ *
+ * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
+@@ -13909,7 +13909,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":736
++/* "vidcutter/libs/pympv/mpv.pyx":738
+ * return pipe
+ *
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+@@ -13947,20 +13947,20 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":737
++ /* "vidcutter/libs/pympv/mpv.pyx":739
+ *
+ * def __cinit__(self):
+ * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
+ * with nogil:
+ * self._ctx = mpv_create()
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 739, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":738
++ /* "vidcutter/libs/pympv/mpv.pyx":740
+ * def __cinit__(self):
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13975,7 +13975,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":739
++ /* "vidcutter/libs/pympv/mpv.pyx":741
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil:
+ * self._ctx = mpv_create() # <<<<<<<<<<<<<<
+@@ -13985,7 +13985,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ __pyx_v_self->_ctx = mpv_create();
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":738
++ /* "vidcutter/libs/pympv/mpv.pyx":740
+ * def __cinit__(self):
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14004,7 +14004,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":740
++ /* "vidcutter/libs/pympv/mpv.pyx":742
+ * with nogil:
+ * self._ctx = mpv_create()
+ * if not self._ctx: # <<<<<<<<<<<<<<
+@@ -14014,14 +14014,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ __pyx_t_3 = ((!(__pyx_v_self->_ctx != 0)) != 0);
+ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":741
++ /* "vidcutter/libs/pympv/mpv.pyx":743
+ * self._ctx = mpv_create()
+ * if not self._ctx:
+ * raise MPVError("Context creation error") # <<<<<<<<<<<<<<
+ * self.callbackthread = CallbackThread()
+ * _callbacks[ctxid] = self.callbackthread
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 743, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+@@ -14035,14 +14035,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ }
+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Context_creation_error) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Context_creation_error);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 741, __pyx_L1_error)
++ __PYX_ERR(0, 743, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":740
++ /* "vidcutter/libs/pympv/mpv.pyx":742
+ * with nogil:
+ * self._ctx = mpv_create()
+ * if not self._ctx: # <<<<<<<<<<<<<<
+@@ -14051,14 +14051,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":742
++ /* "vidcutter/libs/pympv/mpv.pyx":744
+ * if not self._ctx:
+ * raise MPVError("Context creation error")
+ * self.callbackthread = CallbackThread() # <<<<<<<<<<<<<<
+ * _callbacks[ctxid] = self.callbackthread
+ * self.reply_userdata = dict()
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+@@ -14072,7 +14072,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ }
+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -14081,7 +14081,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ __pyx_v_self->callbackthread = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":743
++ /* "vidcutter/libs/pympv/mpv.pyx":745
+ * raise MPVError("Context creation error")
+ * self.callbackthread = CallbackThread()
+ * _callbacks[ctxid] = self.callbackthread # <<<<<<<<<<<<<<
+@@ -14090,17 +14090,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ */
+ __pyx_t_1 = __pyx_v_self->callbackthread;
+ __Pyx_INCREF(__pyx_t_1);
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":744
++ /* "vidcutter/libs/pympv/mpv.pyx":746
+ * self.callbackthread = CallbackThread()
+ * _callbacks[ctxid] = self.callbackthread
+ * self.reply_userdata = dict() # <<<<<<<<<<<<<<
+ * _reply_userdatas[ctxid] = self.reply_userdata
+ * self.callbackthread.start()
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+@@ -14108,7 +14108,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ __pyx_v_self->reply_userdata = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":745
++ /* "vidcutter/libs/pympv/mpv.pyx":747
+ * _callbacks[ctxid] = self.callbackthread
+ * self.reply_userdata = dict()
+ * _reply_userdatas[ctxid] = self.reply_userdata # <<<<<<<<<<<<<<
+@@ -14117,17 +14117,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ */
+ __pyx_t_1 = __pyx_v_self->reply_userdata;
+ __Pyx_INCREF(__pyx_t_1);
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 747, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":746
++ /* "vidcutter/libs/pympv/mpv.pyx":748
+ * self.reply_userdata = dict()
+ * _reply_userdatas[ctxid] = self.reply_userdata
+ * self.callbackthread.start() # <<<<<<<<<<<<<<
+ *
+ * @_errors
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 748, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+@@ -14141,12 +14141,12 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ }
+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":736
++ /* "vidcutter/libs/pympv/mpv.pyx":738
+ * return pipe
+ *
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+@@ -14168,7 +14168,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":749
++/* "vidcutter/libs/pympv/mpv.pyx":751
+ *
+ * @_errors
+ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+@@ -14216,7 +14216,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyOb
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 749, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 751, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -14232,7 +14232,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyOb
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 749, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 751, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -14268,7 +14268,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ __Pyx_RefNannySetupContext("observe_property", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":751
++ /* "vidcutter/libs/pympv/mpv.pyx":753
+ * def observe_property(self, prop, data=None):
+ * """Wraps: mpv_observe_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -14279,41 +14279,41 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 751, __pyx_L1_error)
++ __PYX_ERR(0, 753, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":752
++ /* "vidcutter/libs/pympv/mpv.pyx":754
+ * """Wraps: mpv_observe_property"""
+ * assert self._ctx
+ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+ * id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 754, __pyx_L1_error)
+ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":753
++ /* "vidcutter/libs/pympv/mpv.pyx":755
+ * assert self._ctx
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None:
+ */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 753, __pyx_L1_error)
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 755, __pyx_L1_error)
+ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":754
++ /* "vidcutter/libs/pympv/mpv.pyx":756
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+@@ -14330,7 +14330,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+@@ -14339,14 +14339,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+@@ -14357,7 +14357,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+ __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+@@ -14365,7 +14365,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ __pyx_v_userdatas = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":755
++ /* "vidcutter/libs/pympv/mpv.pyx":757
+ * id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -14376,14 +14376,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ __pyx_t_9 = (__pyx_t_8 != 0);
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":756
++ /* "vidcutter/libs/pympv/mpv.pyx":758
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+ * userdatas.observed = True
+ * prop = _strenc(prop)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+@@ -14397,15 +14397,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ }
+ __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":755
++ /* "vidcutter/libs/pympv/mpv.pyx":757
+ * id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -14414,23 +14414,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":757
++ /* "vidcutter/libs/pympv/mpv.pyx":759
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ * userdatas.observed = True # <<<<<<<<<<<<<<
+ * prop = _strenc(prop)
+ * cdef char* propc = prop
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 759, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":758
++ /* "vidcutter/libs/pympv/mpv.pyx":760
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ * userdatas.observed = True
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+ * cdef char* propc = prop
+ * cdef int err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+@@ -14444,23 +14444,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ }
+ __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":759
++ /* "vidcutter/libs/pympv/mpv.pyx":761
+ * userdatas.observed = True
+ * prop = _strenc(prop)
+ * cdef char* propc = prop # <<<<<<<<<<<<<<
+ * cdef int err
+ * with nogil:
+ */
+- __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 761, __pyx_L1_error)
+ __pyx_v_propc = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":761
++ /* "vidcutter/libs/pympv/mpv.pyx":763
+ * cdef char* propc = prop
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14475,7 +14475,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":762
++ /* "vidcutter/libs/pympv/mpv.pyx":764
+ * cdef int err
+ * with nogil:
+ * err = mpv_observe_property( # <<<<<<<<<<<<<<
+@@ -14485,7 +14485,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ __pyx_v_err = mpv_observe_property(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_propc, MPV_FORMAT_NODE);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":761
++ /* "vidcutter/libs/pympv/mpv.pyx":763
+ * cdef char* propc = prop
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14504,7 +14504,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":768
++ /* "vidcutter/libs/pympv/mpv.pyx":770
+ * MPV_FORMAT_NODE,
+ * )
+ * return err # <<<<<<<<<<<<<<
+@@ -14512,13 +14512,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":749
++ /* "vidcutter/libs/pympv/mpv.pyx":751
+ *
+ * @_errors
+ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+@@ -14543,7 +14543,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":771
++/* "vidcutter/libs/pympv/mpv.pyx":773
+ *
+ * @_errors
+ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+@@ -14585,7 +14585,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("unobserve_property", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":773
++ /* "vidcutter/libs/pympv/mpv.pyx":775
+ * def unobserve_property(self, data):
+ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -14596,31 +14596,31 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 773, __pyx_L1_error)
++ __PYX_ERR(0, 775, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":774
++ /* "vidcutter/libs/pympv/mpv.pyx":776
+ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx
+ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is not None:
+ */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 776, __pyx_L1_error)
+ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":775
++ /* "vidcutter/libs/pympv/mpv.pyx":777
+ * assert self._ctx
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+ * if userdatas is not None:
+ * userdatas.observed = False
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+@@ -14637,7 +14637,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+@@ -14646,14 +14646,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+@@ -14664,7 +14664,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+ __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+@@ -14672,7 +14672,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ __pyx_v_userdatas = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":776
++ /* "vidcutter/libs/pympv/mpv.pyx":778
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is not None: # <<<<<<<<<<<<<<
+@@ -14683,40 +14683,40 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ __pyx_t_9 = (__pyx_t_8 != 0);
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":777
++ /* "vidcutter/libs/pympv/mpv.pyx":779
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is not None:
+ * userdatas.observed = False # <<<<<<<<<<<<<<
+ * if userdatas.counter <= 0:
+ * del self.reply_userdata[id_data]
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 779, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":778
++ /* "vidcutter/libs/pympv/mpv.pyx":780
+ * if userdatas is not None:
+ * userdatas.observed = False
+ * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
+ * del self.reply_userdata[id_data]
+ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 780, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 780, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":779
++ /* "vidcutter/libs/pympv/mpv.pyx":781
+ * userdatas.observed = False
+ * if userdatas.counter <= 0:
+ * del self.reply_userdata[id_data] # <<<<<<<<<<<<<<
+ * cdef int err
+ * with nogil:
+ */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 779, __pyx_L1_error)
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 781, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":778
++ /* "vidcutter/libs/pympv/mpv.pyx":780
+ * if userdatas is not None:
+ * userdatas.observed = False
+ * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
+@@ -14725,7 +14725,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":776
++ /* "vidcutter/libs/pympv/mpv.pyx":778
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is not None: # <<<<<<<<<<<<<<
+@@ -14734,7 +14734,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":781
++ /* "vidcutter/libs/pympv/mpv.pyx":783
+ * del self.reply_userdata[id_data]
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14749,7 +14749,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":782
++ /* "vidcutter/libs/pympv/mpv.pyx":784
+ * cdef int err
+ * with nogil:
+ * err = mpv_unobserve_property( # <<<<<<<<<<<<<<
+@@ -14759,7 +14759,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ __pyx_v_err = mpv_unobserve_property(__pyx_v_self->_ctx, __pyx_v_id_data);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":781
++ /* "vidcutter/libs/pympv/mpv.pyx":783
+ * del self.reply_userdata[id_data]
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14778,7 +14778,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":786
++ /* "vidcutter/libs/pympv/mpv.pyx":788
+ * id_data,
+ * )
+ * return err # <<<<<<<<<<<<<<
+@@ -14786,13 +14786,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ * def shutdown(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 788, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":771
++ /* "vidcutter/libs/pympv/mpv.pyx":773
+ *
+ * @_errors
+ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+@@ -14816,7 +14816,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":788
++/* "vidcutter/libs/pympv/mpv.pyx":790
+ * return err
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+@@ -14851,7 +14851,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("shutdown", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":789
++ /* "vidcutter/libs/pympv/mpv.pyx":791
+ *
+ * def shutdown(self):
+ * if self._ctx == NULL: # <<<<<<<<<<<<<<
+@@ -14861,7 +14861,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ __pyx_t_1 = ((__pyx_v_self->_ctx == NULL) != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":790
++ /* "vidcutter/libs/pympv/mpv.pyx":792
+ * def shutdown(self):
+ * if self._ctx == NULL:
+ * return # <<<<<<<<<<<<<<
+@@ -14872,7 +14872,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":789
++ /* "vidcutter/libs/pympv/mpv.pyx":791
+ *
+ * def shutdown(self):
+ * if self._ctx == NULL: # <<<<<<<<<<<<<<
+@@ -14881,20 +14881,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":791
++ /* "vidcutter/libs/pympv/mpv.pyx":793
+ * if self._ctx == NULL:
+ * return
+ * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
+ * with nogil:
+ * mpv_terminate_destroy(self._ctx)
+ */
+- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 793, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_ctxid = ((uint64_t)__pyx_t_3);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":792
++ /* "vidcutter/libs/pympv/mpv.pyx":794
+ * return
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14909,7 +14909,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":793
++ /* "vidcutter/libs/pympv/mpv.pyx":795
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil:
+ * mpv_terminate_destroy(self._ctx) # <<<<<<<<<<<<<<
+@@ -14919,7 +14919,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ mpv_terminate_destroy(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":792
++ /* "vidcutter/libs/pympv/mpv.pyx":794
+ * return
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14938,14 +14938,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":794
++ /* "vidcutter/libs/pympv/mpv.pyx":796
+ * with nogil:
+ * mpv_terminate_destroy(self._ctx)
+ * self.callbackthread.shutdown() # <<<<<<<<<<<<<<
+ * del _callbacks[ctxid]
+ * del _reply_userdatas[ctxid]
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+@@ -14959,30 +14959,30 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ }
+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":795
++ /* "vidcutter/libs/pympv/mpv.pyx":797
+ * mpv_terminate_destroy(self._ctx)
+ * self.callbackthread.shutdown()
+ * del _callbacks[ctxid] # <<<<<<<<<<<<<<
+ * del _reply_userdatas[ctxid]
+ * self.callback = None
+ */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 797, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":796
++ /* "vidcutter/libs/pympv/mpv.pyx":798
+ * self.callbackthread.shutdown()
+ * del _callbacks[ctxid]
+ * del _reply_userdatas[ctxid] # <<<<<<<<<<<<<<
+ * self.callback = None
+ * self.reply_userdata = None
+ */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 796, __pyx_L1_error)
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 798, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":797
++ /* "vidcutter/libs/pympv/mpv.pyx":799
+ * del _callbacks[ctxid]
+ * del _reply_userdatas[ctxid]
+ * self.callback = None # <<<<<<<<<<<<<<
+@@ -14995,7 +14995,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ __Pyx_DECREF(__pyx_v_self->callback);
+ __pyx_v_self->callback = Py_None;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":798
++ /* "vidcutter/libs/pympv/mpv.pyx":800
+ * del _reply_userdatas[ctxid]
+ * self.callback = None
+ * self.reply_userdata = None # <<<<<<<<<<<<<<
+@@ -15008,7 +15008,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ __Pyx_DECREF(__pyx_v_self->reply_userdata);
+ __pyx_v_self->reply_userdata = Py_None;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":799
++ /* "vidcutter/libs/pympv/mpv.pyx":801
+ * self.callback = None
+ * self.reply_userdata = None
+ * self._ctx = NULL # <<<<<<<<<<<<<<
+@@ -15017,7 +15017,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ */
+ __pyx_v_self->_ctx = NULL;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":788
++ /* "vidcutter/libs/pympv/mpv.pyx":790
+ * return err
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+@@ -15040,7 +15040,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":813
++/* "vidcutter/libs/pympv/mpv.pyx":815
+ * # return ctx
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -15069,14 +15069,14 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_o
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":814
++ /* "vidcutter/libs/pympv/mpv.pyx":816
+ *
+ * def __dealloc__(self):
+ * self.shutdown() # <<<<<<<<<<<<<<
+ *
+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -15090,12 +15090,12 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_o
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":813
++ /* "vidcutter/libs/pympv/mpv.pyx":815
+ * # return ctx
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -15227,7 +15227,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(C
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":816
++/* "vidcutter/libs/pympv/mpv.pyx":818
+ * self.shutdown()
+ *
+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
+@@ -15251,14 +15251,14 @@ static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx,
+ #endif
+ __Pyx_RefNannySetupContext("_c_getprocaddress", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":817
++ /* "vidcutter/libs/pympv/mpv.pyx":819
+ *
+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
+ * return <void *><intptr_t>(<object>ctx)(name) # <<<<<<<<<<<<<<
+ *
+ * cdef void _c_updatecb(void *ctx) with gil:
+ */
+- __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
+ __pyx_t_3 = ((PyObject *)__pyx_v_ctx); __pyx_t_4 = NULL;
+@@ -15274,15 +15274,15 @@ static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx,
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = ((void *)((intptr_t)__pyx_t_5));
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":816
++ /* "vidcutter/libs/pympv/mpv.pyx":818
+ * self.shutdown()
+ *
+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
+@@ -15306,7 +15306,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx,
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":819
++/* "vidcutter/libs/pympv/mpv.pyx":821
+ * return <void *><intptr_t>(<object>ctx)(name)
+ *
+ * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
+@@ -15327,7 +15327,7 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
+ #endif
+ __Pyx_RefNannySetupContext("_c_updatecb", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":820
++ /* "vidcutter/libs/pympv/mpv.pyx":822
+ *
+ * cdef void _c_updatecb(void *ctx) with gil:
+ * (<object>ctx)() # <<<<<<<<<<<<<<
+@@ -15347,12 +15347,12 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":819
++ /* "vidcutter/libs/pympv/mpv.pyx":821
+ * return <void *><intptr_t>(<object>ctx)(name)
+ *
+ * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
+@@ -15374,7 +15374,7 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
+ #endif
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":886
++/* "vidcutter/libs/pympv/mpv.pyx":888
+ * object owned
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+@@ -15407,14 +15407,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":887
++ /* "vidcutter/libs/pympv/mpv.pyx":889
+ *
+ * def __init__(self):
+ * self.owned = [] # <<<<<<<<<<<<<<
+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+ */
+- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->owned);
+@@ -15422,7 +15422,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
+ __pyx_v_self->owned = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":888
++ /* "vidcutter/libs/pympv/mpv.pyx":890
+ * def __init__(self):
+ * self.owned = []
+ * self.params[0].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
+@@ -15431,7 +15431,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
+ */
+ (__pyx_v_self->params[0]).type = MPV_RENDER_PARAM_INVALID;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":886
++ /* "vidcutter/libs/pympv/mpv.pyx":888
+ * object owned
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+@@ -15451,7 +15451,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":890
++/* "vidcutter/libs/pympv/mpv.pyx":892
+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
+@@ -15480,7 +15480,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":891
++ /* "vidcutter/libs/pympv/mpv.pyx":893
+ *
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+ * count = len(self.owned) # <<<<<<<<<<<<<<
+@@ -15489,26 +15489,26 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ */
+ __pyx_t_1 = __pyx_v_self->owned;
+ __Pyx_INCREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 891, __pyx_L1_error)
++ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
++ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_count = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":892
++ /* "vidcutter/libs/pympv/mpv.pyx":894
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+ * count = len(self.owned)
+ * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
+ * if owned:
+ * free(p)
+ */
+- __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
++ __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 894, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":893
++ /* "vidcutter/libs/pympv/mpv.pyx":895
+ * count = len(self.owned)
+ * if count >= MAX_RENDER_PARAMS:
+ * if owned: # <<<<<<<<<<<<<<
+@@ -15518,7 +15518,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ __pyx_t_3 = (__pyx_v_owned != 0);
+ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":894
++ /* "vidcutter/libs/pympv/mpv.pyx":896
+ * if count >= MAX_RENDER_PARAMS:
+ * if owned:
+ * free(p) # <<<<<<<<<<<<<<
+@@ -15527,7 +15527,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ */
+ free(__pyx_v_p);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":893
++ /* "vidcutter/libs/pympv/mpv.pyx":895
+ * count = len(self.owned)
+ * if count >= MAX_RENDER_PARAMS:
+ * if owned: # <<<<<<<<<<<<<<
+@@ -15536,14 +15536,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":895
++ /* "vidcutter/libs/pympv/mpv.pyx":897
+ * if owned:
+ * free(p)
+ * raise PyMPVError("RenderParams overflow") # <<<<<<<<<<<<<<
+ *
+ * self.params[count].type = t
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+@@ -15557,14 +15557,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ }
+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_RenderParams_overflow) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_RenderParams_overflow);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 895, __pyx_L1_error)
++ __PYX_ERR(0, 897, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":892
++ /* "vidcutter/libs/pympv/mpv.pyx":894
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+ * count = len(self.owned)
+ * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
+@@ -15573,52 +15573,52 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":897
++ /* "vidcutter/libs/pympv/mpv.pyx":899
+ * raise PyMPVError("RenderParams overflow")
+ *
+ * self.params[count].type = t # <<<<<<<<<<<<<<
+ * self.params[count].data = p
+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+ */
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
+ (__pyx_v_self->params[__pyx_t_2]).type = __pyx_v_t;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":898
++ /* "vidcutter/libs/pympv/mpv.pyx":900
+ *
+ * self.params[count].type = t
+ * self.params[count].data = p # <<<<<<<<<<<<<<
+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+ * self.owned.append(owned)
+ */
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error)
+ (__pyx_v_self->params[__pyx_t_2]).data = __pyx_v_p;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":899
++ /* "vidcutter/libs/pympv/mpv.pyx":901
+ * self.params[count].type = t
+ * self.params[count].data = p
+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
+ * self.owned.append(owned)
+ *
+ */
+- __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ (__pyx_v_self->params[__pyx_t_2]).type = MPV_RENDER_PARAM_INVALID;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":900
++ /* "vidcutter/libs/pympv/mpv.pyx":902
+ * self.params[count].data = p
+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+ * self.owned.append(owned) # <<<<<<<<<<<<<<
+ *
+ * cdef add_int(self, mpv_render_param_type t, int val):
+ */
+- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 900, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 902, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":890
++ /* "vidcutter/libs/pympv/mpv.pyx":892
+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
+@@ -15642,7 +15642,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":902
++/* "vidcutter/libs/pympv/mpv.pyx":904
+ * self.owned.append(owned)
+ *
+ * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
+@@ -15660,7 +15660,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("add_int", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":903
++ /* "vidcutter/libs/pympv/mpv.pyx":905
+ *
+ * cdef add_int(self, mpv_render_param_type t, int val):
+ * cdef int *p = <int *>malloc(sizeof(int)) # <<<<<<<<<<<<<<
+@@ -15669,7 +15669,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
+ */
+ __pyx_v_p = ((int *)malloc((sizeof(int))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":904
++ /* "vidcutter/libs/pympv/mpv.pyx":906
+ * cdef add_int(self, mpv_render_param_type t, int val):
+ * cdef int *p = <int *>malloc(sizeof(int))
+ * p[0] = val # <<<<<<<<<<<<<<
+@@ -15678,18 +15678,18 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
+ */
+ (__pyx_v_p[0]) = __pyx_v_val;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":905
++ /* "vidcutter/libs/pympv/mpv.pyx":907
+ * cdef int *p = <int *>malloc(sizeof(int))
+ * p[0] = val
+ * self.add_voidp(t, p) # <<<<<<<<<<<<<<
+ *
+ * cdef add_string(self, mpv_render_param_type t, char *s):
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":902
++ /* "vidcutter/libs/pympv/mpv.pyx":904
+ * self.owned.append(owned)
+ *
+ * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
+@@ -15710,7 +15710,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":907
++/* "vidcutter/libs/pympv/mpv.pyx":909
+ * self.add_voidp(t, p)
+ *
+ * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
+@@ -15728,7 +15728,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("add_string", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":908
++ /* "vidcutter/libs/pympv/mpv.pyx":910
+ *
+ * cdef add_string(self, mpv_render_param_type t, char *s):
+ * cdef char *p = <char *>malloc(strlen(s) + 1) # <<<<<<<<<<<<<<
+@@ -15737,7 +15737,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
+ */
+ __pyx_v_p = ((char *)malloc((strlen(__pyx_v_s) + 1)));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":909
++ /* "vidcutter/libs/pympv/mpv.pyx":911
+ * cdef add_string(self, mpv_render_param_type t, char *s):
+ * cdef char *p = <char *>malloc(strlen(s) + 1)
+ * strcpy(p, s) # <<<<<<<<<<<<<<
+@@ -15746,18 +15746,18 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
+ */
+ (void)(strcpy(__pyx_v_p, __pyx_v_s));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":910
++ /* "vidcutter/libs/pympv/mpv.pyx":912
+ * cdef char *p = <char *>malloc(strlen(s) + 1)
+ * strcpy(p, s)
+ * self.add_voidp(t, p) # <<<<<<<<<<<<<<
+ *
+ * def __dealloc__(self):
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":907
++ /* "vidcutter/libs/pympv/mpv.pyx":909
+ * self.add_voidp(t, p)
+ *
+ * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
+@@ -15778,7 +15778,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":912
++/* "vidcutter/libs/pympv/mpv.pyx":914
+ * self.add_voidp(t, p)
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -15813,7 +15813,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":913
++ /* "vidcutter/libs/pympv/mpv.pyx":915
+ *
+ * def __dealloc__(self):
+ * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
+@@ -15826,26 +15826,26 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ __pyx_t_2 = __pyx_v_self->owned; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 915, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 915, __pyx_L1_error)
+ #else
+- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ } else {
+ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 915, __pyx_L1_error)
+ #else
+- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ }
+@@ -15855,7 +15855,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 913, __pyx_L1_error)
++ else __PYX_ERR(0, 915, __pyx_L1_error)
+ }
+ break;
+ }
+@@ -15865,33 +15865,33 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ __pyx_t_5 = 0;
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+- __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":914
++ /* "vidcutter/libs/pympv/mpv.pyx":916
+ * def __dealloc__(self):
+ * for i, j in enumerate(self.owned):
+ * if j: # <<<<<<<<<<<<<<
+ * free(self.params[i].data)
+ *
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 914, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 916, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":915
++ /* "vidcutter/libs/pympv/mpv.pyx":917
+ * for i, j in enumerate(self.owned):
+ * if j:
+ * free(self.params[i].data) # <<<<<<<<<<<<<<
+ *
+ * cdef void *get_pointer(const char *name, object obj):
+ */
+- __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 917, __pyx_L1_error)
+ free((__pyx_v_self->params[__pyx_t_7]).data);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":914
++ /* "vidcutter/libs/pympv/mpv.pyx":916
+ * def __dealloc__(self):
+ * for i, j in enumerate(self.owned):
+ * if j: # <<<<<<<<<<<<<<
+@@ -15900,7 +15900,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":913
++ /* "vidcutter/libs/pympv/mpv.pyx":915
+ *
+ * def __dealloc__(self):
+ * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
+@@ -15911,7 +15911,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":912
++ /* "vidcutter/libs/pympv/mpv.pyx":914
+ * self.add_voidp(t, p)
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -16045,7 +16045,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cyth
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":917
++/* "vidcutter/libs/pympv/mpv.pyx":919
+ * free(self.params[i].data)
+ *
+ * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
+@@ -16071,7 +16071,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("get_pointer", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":919
++ /* "vidcutter/libs/pympv/mpv.pyx":921
+ * cdef void *get_pointer(const char *name, object obj):
+ * cdef void *p
+ * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
+@@ -16081,17 +16081,17 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ __pyx_t_1 = (PyCapsule_IsValid(__pyx_v_obj, __pyx_v_name) != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":920
++ /* "vidcutter/libs/pympv/mpv.pyx":922
+ * cdef void *p
+ * if PyCapsule_IsValid(obj, name):
+ * p = PyCapsule_GetPointer(obj, name) # <<<<<<<<<<<<<<
+ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+ * p = <void *><intptr_t>obj
+ */
+- __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error)
++ __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
+ __pyx_v_p = __pyx_t_2;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":919
++ /* "vidcutter/libs/pympv/mpv.pyx":921
+ * cdef void *get_pointer(const char *name, object obj):
+ * cdef void *p
+ * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
+@@ -16101,7 +16101,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":921
++ /* "vidcutter/libs/pympv/mpv.pyx":923
+ * if PyCapsule_IsValid(obj, name):
+ * p = PyCapsule_GetPointer(obj, name)
+ * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
+@@ -16122,22 +16122,22 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ __pyx_t_1 = __pyx_t_3;
+ goto __pyx_L4_bool_binop_done;
+ }
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 923, __pyx_L1_error)
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_L4_bool_binop_done:;
+ if (likely(__pyx_t_1)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":922
++ /* "vidcutter/libs/pympv/mpv.pyx":924
+ * p = PyCapsule_GetPointer(obj, name)
+ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+ * p = <void *><intptr_t>obj # <<<<<<<<<<<<<<
+ * else:
+ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
+ */
+- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 924, __pyx_L1_error)
+ __pyx_v_p = ((void *)((intptr_t)__pyx_t_5));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":921
++ /* "vidcutter/libs/pympv/mpv.pyx":923
+ * if PyCapsule_IsValid(obj, name):
+ * p = PyCapsule_GetPointer(obj, name)
+ * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
+@@ -16147,7 +16147,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":924
++ /* "vidcutter/libs/pympv/mpv.pyx":926
+ * p = <void *><intptr_t>obj
+ * else:
+ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj) # <<<<<<<<<<<<<<
+@@ -16155,9 +16155,9 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ *
+ */
+ /*else*/ {
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
++ __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+@@ -16172,16 +16172,16 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 924, __pyx_L1_error)
++ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __PYX_ERR(0, 924, __pyx_L1_error)
++ __PYX_ERR(0, 926, __pyx_L1_error)
+ }
+ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":925
++ /* "vidcutter/libs/pympv/mpv.pyx":927
+ * else:
+ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
+ * return p # <<<<<<<<<<<<<<
+@@ -16191,7 +16191,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ __pyx_r = __pyx_v_p;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":917
++ /* "vidcutter/libs/pympv/mpv.pyx":919
+ * free(self.params[i].data)
+ *
+ * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
+@@ -16212,7 +16212,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":929
++/* "vidcutter/libs/pympv/mpv.pyx":931
+ * @cython.internal
+ * cdef class RenderFrameInfo(object):
+ * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
+@@ -16230,83 +16230,83 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(st
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_from_struct", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":930
++ /* "vidcutter/libs/pympv/mpv.pyx":932
+ * cdef class RenderFrameInfo(object):
+ * cdef _from_struct(self, mpv_render_frame_info *info):
+ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT) # <<<<<<<<<<<<<<
+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":931
++ /* "vidcutter/libs/pympv/mpv.pyx":933
+ * cdef _from_struct(self, mpv_render_frame_info *info):
+ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW) # <<<<<<<<<<<<<<
+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 931, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":932
++ /* "vidcutter/libs/pympv/mpv.pyx":934
+ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT) # <<<<<<<<<<<<<<
+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+ * self.target_time = info[0].target_time
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 934, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":933
++ /* "vidcutter/libs/pympv/mpv.pyx":935
+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC) # <<<<<<<<<<<<<<
+ * self.target_time = info[0].target_time
+ * return self
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 935, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 935, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":934
++ /* "vidcutter/libs/pympv/mpv.pyx":936
+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+ * self.target_time = info[0].target_time # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 936, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":935
++ /* "vidcutter/libs/pympv/mpv.pyx":937
+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+ * self.target_time = info[0].target_time
+ * return self # <<<<<<<<<<<<<<
+@@ -16318,7 +16318,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(st
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":929
++ /* "vidcutter/libs/pympv/mpv.pyx":931
+ * @cython.internal
+ * cdef class RenderFrameInfo(object):
+ * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
+@@ -16624,7 +16624,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cy
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":950
++/* "vidcutter/libs/pympv/mpv.pyx":952
+ * bint inited
+ *
+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
+@@ -16653,7 +16653,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_api_type,&__pyx_n_s_opengl_init_params,&__pyx_n_s_advanced_control,&__pyx_n_s_x11_display,&__pyx_n_s_wl_display,&__pyx_n_s_drm_display,&__pyx_n_s_drm_osd_size,0};
+ PyObject* values[8] = {0,0,0,0,0,0,0,0};
+
+- /* "vidcutter/libs/pympv/mpv.pyx":952
++ /* "vidcutter/libs/pympv/mpv.pyx":954
+ * def __init__(self, mpv,
+ * api_type,
+ * opengl_init_params=None, # <<<<<<<<<<<<<<
+@@ -16662,7 +16662,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ */
+ values[2] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":953
++ /* "vidcutter/libs/pympv/mpv.pyx":955
+ * api_type,
+ * opengl_init_params=None,
+ * advanced_control=False, # <<<<<<<<<<<<<<
+@@ -16671,7 +16671,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ */
+ values[3] = ((PyObject *)Py_False);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":954
++ /* "vidcutter/libs/pympv/mpv.pyx":956
+ * opengl_init_params=None,
+ * advanced_control=False,
+ * x11_display=None, # <<<<<<<<<<<<<<
+@@ -16680,7 +16680,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ */
+ values[4] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":955
++ /* "vidcutter/libs/pympv/mpv.pyx":957
+ * advanced_control=False,
+ * x11_display=None,
+ * wl_display=None, # <<<<<<<<<<<<<<
+@@ -16689,7 +16689,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ */
+ values[5] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":956
++ /* "vidcutter/libs/pympv/mpv.pyx":958
+ * x11_display=None,
+ * wl_display=None,
+ * drm_display=None, # <<<<<<<<<<<<<<
+@@ -16698,7 +16698,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ */
+ values[6] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":957
++ /* "vidcutter/libs/pympv/mpv.pyx":959
+ * wl_display=None,
+ * drm_display=None,
+ * drm_osd_size=None # <<<<<<<<<<<<<<
+@@ -16738,7 +16738,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_api_type)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 950, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 952, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+@@ -16778,7 +16778,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 950, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 952, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -16811,7 +16811,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 950, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 952, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -16819,7 +16819,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_api_type, __pyx_v_opengl_init_params, __pyx_v_advanced_control, __pyx_v_x11_display, __pyx_v_wl_display, __pyx_v_drm_display, __pyx_v_drm_osd_size);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":950
++ /* "vidcutter/libs/pympv/mpv.pyx":952
+ * bint inited
+ *
+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
+@@ -16856,14 +16856,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":965
++ /* "vidcutter/libs/pympv/mpv.pyx":967
+ * mpv_opengl_drm_osd_size _drm_osd_size
+ *
+ * self._mpv = mpv # <<<<<<<<<<<<<<
+ *
+ * memset(&gl_params, 0, sizeof(gl_params))
+ */
+- if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 965, __pyx_L1_error)
++ if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 967, __pyx_L1_error)
+ __pyx_t_1 = __pyx_v_mpv;
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -16872,7 +16872,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_v_self->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":967
++ /* "vidcutter/libs/pympv/mpv.pyx":969
+ * self._mpv = mpv
+ *
+ * memset(&gl_params, 0, sizeof(gl_params)) # <<<<<<<<<<<<<<
+@@ -16881,7 +16881,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ (void)(memset((&__pyx_v_gl_params), 0, (sizeof(__pyx_v_gl_params))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":968
++ /* "vidcutter/libs/pympv/mpv.pyx":970
+ *
+ * memset(&gl_params, 0, sizeof(gl_params))
+ * memset(&drm_params, 0, sizeof(drm_params)) # <<<<<<<<<<<<<<
+@@ -16890,7 +16890,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ (void)(memset((&__pyx_v_drm_params), 0, (sizeof(__pyx_v_drm_params))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":969
++ /* "vidcutter/libs/pympv/mpv.pyx":971
+ * memset(&gl_params, 0, sizeof(gl_params))
+ * memset(&drm_params, 0, sizeof(drm_params))
+ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size)) # <<<<<<<<<<<<<<
+@@ -16899,45 +16899,45 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ (void)(memset((&__pyx_v__drm_osd_size), 0, (sizeof(__pyx_v__drm_osd_size))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":971
++ /* "vidcutter/libs/pympv/mpv.pyx":973
+ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
+ *
+ * params = _RenderParams() # <<<<<<<<<<<<<<
+ *
+ * if api_type == self.API_OPENGL:
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":973
++ /* "vidcutter/libs/pympv/mpv.pyx":975
+ * params = _RenderParams()
+ *
+ * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
+ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
+ * else:
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 975, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":974
++ /* "vidcutter/libs/pympv/mpv.pyx":976
+ *
+ * if api_type == self.API_OPENGL:
+ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL) # <<<<<<<<<<<<<<
+ * else:
+ * raise PyMPVError("Unknown api_type %r" % api_type)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":973
++ /* "vidcutter/libs/pympv/mpv.pyx":975
+ * params = _RenderParams()
+ *
+ * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
+@@ -16947,7 +16947,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":976
++ /* "vidcutter/libs/pympv/mpv.pyx":978
+ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
+ * else:
+ * raise PyMPVError("Unknown api_type %r" % api_type) # <<<<<<<<<<<<<<
+@@ -16955,9 +16955,9 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ * if opengl_init_params is not None:
+ */
+ /*else*/ {
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+@@ -16972,16 +16972,16 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 976, __pyx_L1_error)
++ __PYX_ERR(0, 978, __pyx_L1_error)
+ }
+ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":978
++ /* "vidcutter/libs/pympv/mpv.pyx":980
+ * raise PyMPVError("Unknown api_type %r" % api_type)
+ *
+ * if opengl_init_params is not None: # <<<<<<<<<<<<<<
+@@ -16992,14 +16992,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_t_6 = (__pyx_t_3 != 0);
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":979
++ /* "vidcutter/libs/pympv/mpv.pyx":981
+ *
+ * if opengl_init_params is not None:
+ * self._get_proc_address = opengl_init_params["get_proc_address"] # <<<<<<<<<<<<<<
+ * gl_params.get_proc_address = &_c_getprocaddress
+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+ */
+- __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_v_self->_get_proc_address);
+@@ -17007,7 +17007,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_v_self->_get_proc_address = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":980
++ /* "vidcutter/libs/pympv/mpv.pyx":982
+ * if opengl_init_params is not None:
+ * self._get_proc_address = opengl_init_params["get_proc_address"]
+ * gl_params.get_proc_address = &_c_getprocaddress # <<<<<<<<<<<<<<
+@@ -17016,7 +17016,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ __pyx_v_gl_params.get_proc_address = (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":981
++ /* "vidcutter/libs/pympv/mpv.pyx":983
+ * self._get_proc_address = opengl_init_params["get_proc_address"]
+ * gl_params.get_proc_address = &_c_getprocaddress
+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address # <<<<<<<<<<<<<<
+@@ -17025,18 +17025,18 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ __pyx_v_gl_params.get_proc_address_ctx = ((void *)__pyx_v_self->_get_proc_address);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":982
++ /* "vidcutter/libs/pympv/mpv.pyx":984
+ * gl_params.get_proc_address = &_c_getprocaddress
+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params) # <<<<<<<<<<<<<<
+ * if advanced_control:
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":978
++ /* "vidcutter/libs/pympv/mpv.pyx":980
+ * raise PyMPVError("Unknown api_type %r" % api_type)
+ *
+ * if opengl_init_params is not None: # <<<<<<<<<<<<<<
+@@ -17045,28 +17045,28 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":983
++ /* "vidcutter/libs/pympv/mpv.pyx":985
+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+ * if advanced_control: # <<<<<<<<<<<<<<
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+ * if x11_display:
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 983, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":984
++ /* "vidcutter/libs/pympv/mpv.pyx":986
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+ * if advanced_control:
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1) # <<<<<<<<<<<<<<
+ * if x11_display:
+ * self._x11_display = x11_display
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":983
++ /* "vidcutter/libs/pympv/mpv.pyx":985
+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+ * if advanced_control: # <<<<<<<<<<<<<<
+@@ -17075,17 +17075,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":985
++ /* "vidcutter/libs/pympv/mpv.pyx":987
+ * if advanced_control:
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+ * if x11_display: # <<<<<<<<<<<<<<
+ * self._x11_display = x11_display
+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 987, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":986
++ /* "vidcutter/libs/pympv/mpv.pyx":988
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+ * if x11_display:
+ * self._x11_display = x11_display # <<<<<<<<<<<<<<
+@@ -17098,18 +17098,18 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __Pyx_DECREF(__pyx_v_self->_x11_display);
+ __pyx_v_self->_x11_display = __pyx_v_x11_display;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":987
++ /* "vidcutter/libs/pympv/mpv.pyx":989
+ * if x11_display:
+ * self._x11_display = x11_display
+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display)) # <<<<<<<<<<<<<<
+ * if wl_display:
+ * self._wl_display = wl_display
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":985
++ /* "vidcutter/libs/pympv/mpv.pyx":987
+ * if advanced_control:
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+ * if x11_display: # <<<<<<<<<<<<<<
+@@ -17118,17 +17118,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":988
++ /* "vidcutter/libs/pympv/mpv.pyx":990
+ * self._x11_display = x11_display
+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ * if wl_display: # <<<<<<<<<<<<<<
+ * self._wl_display = wl_display
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 990, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":989
++ /* "vidcutter/libs/pympv/mpv.pyx":991
+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ * if wl_display:
+ * self._wl_display = wl_display # <<<<<<<<<<<<<<
+@@ -17141,18 +17141,18 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __Pyx_DECREF(__pyx_v_self->_wl_display);
+ __pyx_v_self->_wl_display = __pyx_v_wl_display;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":990
++ /* "vidcutter/libs/pympv/mpv.pyx":992
+ * if wl_display:
+ * self._wl_display = wl_display
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display)) # <<<<<<<<<<<<<<
+ * if drm_display:
+ * drm_params.fd = drm_display.get("fd", -1)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":988
++ /* "vidcutter/libs/pympv/mpv.pyx":990
+ * self._x11_display = x11_display
+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ * if wl_display: # <<<<<<<<<<<<<<
+@@ -17161,80 +17161,80 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":991
++ /* "vidcutter/libs/pympv/mpv.pyx":993
+ * self._wl_display = wl_display
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ * if drm_display: # <<<<<<<<<<<<<<
+ * drm_params.fd = drm_display.get("fd", -1)
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 991, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 993, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":992
++ /* "vidcutter/libs/pympv/mpv.pyx":994
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ * if drm_display:
+ * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_drm_params.fd = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":993
++ /* "vidcutter/libs/pympv/mpv.pyx":995
+ * if drm_display:
+ * drm_params.fd = drm_display.get("fd", -1)
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None)
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 993, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 995, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_drm_params.crtc_id = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":994
++ /* "vidcutter/libs/pympv/mpv.pyx":996
+ * drm_params.fd = drm_display.get("fd", -1)
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
+ * arp = drm_display.get("atomic_request_ptr", None)
+ * if arp is not None:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 996, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 996, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_drm_params.connector_id = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":995
++ /* "vidcutter/libs/pympv/mpv.pyx":997
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
+ * if arp is not None:
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_arp = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":996
++ /* "vidcutter/libs/pympv/mpv.pyx":998
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None)
+ * if arp is not None: # <<<<<<<<<<<<<<
+@@ -17245,17 +17245,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_t_3 = (__pyx_t_6 != 0);
+ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":997
++ /* "vidcutter/libs/pympv/mpv.pyx":999
+ * arp = drm_display.get("atomic_request_ptr", None)
+ * if arp is not None:
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*") # <<<<<<<<<<<<<<
+ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ */
+- __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L1_error)
++ __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 999, __pyx_L1_error)
+ __pyx_v_drm_params.atomic_request_ptr = ((struct _drmModeAtomicReq **)__pyx_f_9vidcutter_4libs_3mpv_get_pointer(__pyx_t_8, __pyx_kp_s_drmModeAtomicReq));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":996
++ /* "vidcutter/libs/pympv/mpv.pyx":998
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None)
+ * if arp is not None: # <<<<<<<<<<<<<<
+@@ -17264,34 +17264,34 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":998
++ /* "vidcutter/libs/pympv/mpv.pyx":1000
+ * if arp is not None:
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ * if drm_osd_size:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1000, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_drm_params.render_fd = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":999
++ /* "vidcutter/libs/pympv/mpv.pyx":1001
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params) # <<<<<<<<<<<<<<
+ * if drm_osd_size:
+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":991
++ /* "vidcutter/libs/pympv/mpv.pyx":993
+ * self._wl_display = wl_display
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ * if drm_display: # <<<<<<<<<<<<<<
+@@ -17300,17 +17300,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1000
++ /* "vidcutter/libs/pympv/mpv.pyx":1002
+ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ * if drm_osd_size: # <<<<<<<<<<<<<<
+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ */
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1000, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1002, __pyx_L1_error)
+ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1001
++ /* "vidcutter/libs/pympv/mpv.pyx":1003
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ * if drm_osd_size:
+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size # <<<<<<<<<<<<<<
+@@ -17323,7 +17323,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+- __PYX_ERR(0, 1001, __pyx_L1_error)
++ __PYX_ERR(0, 1003, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+@@ -17336,21 +17336,21 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+- __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+- if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
++ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __pyx_t_9 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L12_unpacking_done;
+@@ -17358,28 +17358,28 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_9 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+- __PYX_ERR(0, 1001, __pyx_L1_error)
++ __PYX_ERR(0, 1003, __pyx_L1_error)
+ __pyx_L12_unpacking_done:;
+ }
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v__drm_osd_size.width = __pyx_t_7;
+ __pyx_v__drm_osd_size.height = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1002
++ /* "vidcutter/libs/pympv/mpv.pyx":1004
+ * if drm_osd_size:
+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size) # <<<<<<<<<<<<<<
+ *
+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1000
++ /* "vidcutter/libs/pympv/mpv.pyx":1002
+ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ * if drm_osd_size: # <<<<<<<<<<<<<<
+@@ -17388,7 +17388,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1004
++ /* "vidcutter/libs/pympv/mpv.pyx":1006
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ *
+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params) # <<<<<<<<<<<<<<
+@@ -17397,7 +17397,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ __pyx_v_err = mpv_render_context_create((&__pyx_v_self->_ctx), __pyx_v_self->_mpv->_ctx, __pyx_v_params->params);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1005
++ /* "vidcutter/libs/pympv/mpv.pyx":1007
+ *
+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -17407,16 +17407,16 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_t_3 = ((__pyx_v_err < 0) != 0);
+ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1006
++ /* "vidcutter/libs/pympv/mpv.pyx":1008
+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+ * if err < 0:
+ * raise MPVError(err) # <<<<<<<<<<<<<<
+ * self.inited = True
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1008, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+@@ -17431,14 +17431,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 1006, __pyx_L1_error)
++ __PYX_ERR(0, 1008, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1005
++ /* "vidcutter/libs/pympv/mpv.pyx":1007
+ *
+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -17447,7 +17447,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1007
++ /* "vidcutter/libs/pympv/mpv.pyx":1009
+ * if err < 0:
+ * raise MPVError(err)
+ * self.inited = True # <<<<<<<<<<<<<<
+@@ -17456,7 +17456,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ __pyx_v_self->inited = 1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":950
++ /* "vidcutter/libs/pympv/mpv.pyx":952
+ * bint inited
+ *
+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
+@@ -17481,7 +17481,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1010
++/* "vidcutter/libs/pympv/mpv.pyx":1012
+ *
+ * @_errors
+ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+@@ -17520,7 +17520,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("set_icc_profile", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1016
++ /* "vidcutter/libs/pympv/mpv.pyx":1018
+ * int err
+ *
+ * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
+@@ -17531,14 +17531,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
+ if (unlikely(__pyx_t_2)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1017
++ /* "vidcutter/libs/pympv/mpv.pyx":1019
+ *
+ * if not isinstance(icc_blob, bytes):
+ * raise PyMPVError("icc_blob should be a bytes instance") # <<<<<<<<<<<<<<
+ * val.data = <void *><char *>icc_blob
+ * val.size = len(icc_blob)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1019, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+@@ -17552,14 +17552,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ }
+ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_icc_blob_should_be_a_bytes_insta) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_icc_blob_should_be_a_bytes_insta);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(0, 1017, __pyx_L1_error)
++ __PYX_ERR(0, 1019, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1016
++ /* "vidcutter/libs/pympv/mpv.pyx":1018
+ * int err
+ *
+ * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
+@@ -17568,27 +17568,27 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1018
++ /* "vidcutter/libs/pympv/mpv.pyx":1020
+ * if not isinstance(icc_blob, bytes):
+ * raise PyMPVError("icc_blob should be a bytes instance")
+ * val.data = <void *><char *>icc_blob # <<<<<<<<<<<<<<
+ * val.size = len(icc_blob)
+ *
+ */
+- __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1020, __pyx_L1_error)
+ __pyx_v_val.data = ((void *)((char *)__pyx_t_6));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1019
++ /* "vidcutter/libs/pympv/mpv.pyx":1021
+ * raise PyMPVError("icc_blob should be a bytes instance")
+ * val.data = <void *><char *>icc_blob
+ * val.size = len(icc_blob) # <<<<<<<<<<<<<<
+ *
+ * param.type = MPV_RENDER_PARAM_ICC_PROFILE
+ */
+- __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1019, __pyx_L1_error)
++ __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1021, __pyx_L1_error)
+ __pyx_v_val.size = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1021
++ /* "vidcutter/libs/pympv/mpv.pyx":1023
+ * val.size = len(icc_blob)
+ *
+ * param.type = MPV_RENDER_PARAM_ICC_PROFILE # <<<<<<<<<<<<<<
+@@ -17597,7 +17597,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ */
+ __pyx_v_param.type = MPV_RENDER_PARAM_ICC_PROFILE;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1022
++ /* "vidcutter/libs/pympv/mpv.pyx":1024
+ *
+ * param.type = MPV_RENDER_PARAM_ICC_PROFILE
+ * param.data = &val # <<<<<<<<<<<<<<
+@@ -17606,7 +17606,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ */
+ __pyx_v_param.data = (&__pyx_v_val);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1024
++ /* "vidcutter/libs/pympv/mpv.pyx":1026
+ * param.data = &val
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17621,7 +17621,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1025
++ /* "vidcutter/libs/pympv/mpv.pyx":1027
+ *
+ * with nogil:
+ * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
+@@ -17631,7 +17631,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1024
++ /* "vidcutter/libs/pympv/mpv.pyx":1026
+ * param.data = &val
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17650,7 +17650,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1026
++ /* "vidcutter/libs/pympv/mpv.pyx":1028
+ * with nogil:
+ * err = mpv_render_context_set_parameter(self._ctx, param)
+ * return err # <<<<<<<<<<<<<<
+@@ -17658,13 +17658,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1028, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1010
++ /* "vidcutter/libs/pympv/mpv.pyx":1012
+ *
+ * @_errors
+ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+@@ -17685,7 +17685,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1029
++/* "vidcutter/libs/pympv/mpv.pyx":1031
+ *
+ * @_errors
+ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+@@ -17719,17 +17719,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("set_ambient_light", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1035
++ /* "vidcutter/libs/pympv/mpv.pyx":1037
+ * int err
+ *
+ * val = lux # <<<<<<<<<<<<<<
+ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
+ * param.data = &val
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1037, __pyx_L1_error)
+ __pyx_v_val = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1036
++ /* "vidcutter/libs/pympv/mpv.pyx":1038
+ *
+ * val = lux
+ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT # <<<<<<<<<<<<<<
+@@ -17738,7 +17738,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ */
+ __pyx_v_param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1037
++ /* "vidcutter/libs/pympv/mpv.pyx":1039
+ * val = lux
+ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
+ * param.data = &val # <<<<<<<<<<<<<<
+@@ -17747,7 +17747,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ */
+ __pyx_v_param.data = (&__pyx_v_val);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1039
++ /* "vidcutter/libs/pympv/mpv.pyx":1041
+ * param.data = &val
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17762,7 +17762,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1040
++ /* "vidcutter/libs/pympv/mpv.pyx":1042
+ *
+ * with nogil:
+ * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
+@@ -17772,7 +17772,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1039
++ /* "vidcutter/libs/pympv/mpv.pyx":1041
+ * param.data = &val
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17791,7 +17791,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1041
++ /* "vidcutter/libs/pympv/mpv.pyx":1043
+ * with nogil:
+ * err = mpv_render_context_set_parameter(self._ctx, param)
+ * return err # <<<<<<<<<<<<<<
+@@ -17799,13 +17799,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ * def get_next_frame_info(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1029
++ /* "vidcutter/libs/pympv/mpv.pyx":1031
+ *
+ * @_errors
+ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+@@ -17824,7 +17824,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1043
++/* "vidcutter/libs/pympv/mpv.pyx":1045
+ * return err
+ *
+ * def get_next_frame_info(self): # <<<<<<<<<<<<<<
+@@ -17861,7 +17861,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("get_next_frame_info", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1048
++ /* "vidcutter/libs/pympv/mpv.pyx":1050
+ * mpv_render_param param
+ *
+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO # <<<<<<<<<<<<<<
+@@ -17870,7 +17870,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ */
+ __pyx_v_param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1049
++ /* "vidcutter/libs/pympv/mpv.pyx":1051
+ *
+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+ * param.data = &info # <<<<<<<<<<<<<<
+@@ -17879,7 +17879,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ */
+ __pyx_v_param.data = (&__pyx_v_info);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1050
++ /* "vidcutter/libs/pympv/mpv.pyx":1052
+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+ * param.data = &info
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17894,7 +17894,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1051
++ /* "vidcutter/libs/pympv/mpv.pyx":1053
+ * param.data = &info
+ * with nogil:
+ * err = mpv_render_context_get_info(self._ctx, param) # <<<<<<<<<<<<<<
+@@ -17904,7 +17904,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ __pyx_v_err = mpv_render_context_get_info(__pyx_v_self->_ctx, __pyx_v_param);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1050
++ /* "vidcutter/libs/pympv/mpv.pyx":1052
+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+ * param.data = &info
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17923,7 +17923,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1052
++ /* "vidcutter/libs/pympv/mpv.pyx":1054
+ * with nogil:
+ * err = mpv_render_context_get_info(self._ctx, param)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -17933,16 +17933,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ __pyx_t_1 = ((__pyx_v_err < 0) != 0);
+ if (unlikely(__pyx_t_1)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1053
++ /* "vidcutter/libs/pympv/mpv.pyx":1055
+ * err = mpv_render_context_get_info(self._ctx, param)
+ * if err < 0:
+ * raise MPVError(err) # <<<<<<<<<<<<<<
+ *
+ * return RenderFrameInfo()._from_struct(&info)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+@@ -17957,14 +17957,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 1053, __pyx_L1_error)
++ __PYX_ERR(0, 1055, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1052
++ /* "vidcutter/libs/pympv/mpv.pyx":1054
+ * with nogil:
+ * err = mpv_render_context_get_info(self._ctx, param)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -17973,7 +17973,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1055
++ /* "vidcutter/libs/pympv/mpv.pyx":1057
+ * raise MPVError(err)
+ *
+ * return RenderFrameInfo()._from_struct(&info) # <<<<<<<<<<<<<<
+@@ -17981,16 +17981,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ * def set_update_callback(self, cb):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1043
++ /* "vidcutter/libs/pympv/mpv.pyx":1045
+ * return err
+ *
+ * def get_next_frame_info(self): # <<<<<<<<<<<<<<
+@@ -18012,7 +18012,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1057
++/* "vidcutter/libs/pympv/mpv.pyx":1059
+ * return RenderFrameInfo()._from_struct(&info)
+ *
+ * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+@@ -18038,7 +18038,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("set_update_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1058
++ /* "vidcutter/libs/pympv/mpv.pyx":1060
+ *
+ * def set_update_callback(self, cb):
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18053,7 +18053,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1059
++ /* "vidcutter/libs/pympv/mpv.pyx":1061
+ * def set_update_callback(self, cb):
+ * with nogil:
+ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
+@@ -18063,7 +18063,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ mpv_render_context_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1058
++ /* "vidcutter/libs/pympv/mpv.pyx":1060
+ *
+ * def set_update_callback(self, cb):
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18082,7 +18082,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1060
++ /* "vidcutter/libs/pympv/mpv.pyx":1062
+ * with nogil:
+ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+ * self.update_cb = cb # <<<<<<<<<<<<<<
+@@ -18095,7 +18095,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ __Pyx_DECREF(__pyx_v_self->update_cb);
+ __pyx_v_self->update_cb = __pyx_v_cb;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1057
++ /* "vidcutter/libs/pympv/mpv.pyx":1059
+ * return RenderFrameInfo()._from_struct(&info)
+ *
+ * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+@@ -18110,7 +18110,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1062
++/* "vidcutter/libs/pympv/mpv.pyx":1064
+ * self.update_cb = cb
+ *
+ * def update(self): # <<<<<<<<<<<<<<
+@@ -18141,7 +18141,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("update", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1064
++ /* "vidcutter/libs/pympv/mpv.pyx":1066
+ * def update(self):
+ * cdef uint64_t ret
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18156,7 +18156,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1065
++ /* "vidcutter/libs/pympv/mpv.pyx":1067
+ * cdef uint64_t ret
+ * with nogil:
+ * ret = mpv_render_context_update(self._ctx) # <<<<<<<<<<<<<<
+@@ -18166,7 +18166,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ __pyx_v_ret = mpv_render_context_update(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1064
++ /* "vidcutter/libs/pympv/mpv.pyx":1066
+ * def update(self):
+ * cdef uint64_t ret
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18185,7 +18185,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1066
++ /* "vidcutter/libs/pympv/mpv.pyx":1068
+ * with nogil:
+ * ret = mpv_render_context_update(self._ctx)
+ * return ret # <<<<<<<<<<<<<<
+@@ -18193,13 +18193,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1062
++ /* "vidcutter/libs/pympv/mpv.pyx":1064
+ * self.update_cb = cb
+ *
+ * def update(self): # <<<<<<<<<<<<<<
+@@ -18218,7 +18218,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1069
++/* "vidcutter/libs/pympv/mpv.pyx":1071
+ *
+ * @_errors
+ * def render(self, # <<<<<<<<<<<<<<
+@@ -18244,7 +18244,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_opengl_fbo,&__pyx_n_s_flip_y,&__pyx_n_s_depth,&__pyx_n_s_block_for_target_time,&__pyx_n_s_skip_rendering,0};
+ PyObject* values[5] = {0,0,0,0,0};
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1070
++ /* "vidcutter/libs/pympv/mpv.pyx":1072
+ * @_errors
+ * def render(self,
+ * opengl_fbo=None, # <<<<<<<<<<<<<<
+@@ -18253,7 +18253,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ */
+ values[0] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1071
++ /* "vidcutter/libs/pympv/mpv.pyx":1073
+ * def render(self,
+ * opengl_fbo=None,
+ * flip_y=False, # <<<<<<<<<<<<<<
+@@ -18262,7 +18262,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ */
+ values[1] = ((PyObject *)Py_False);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1072
++ /* "vidcutter/libs/pympv/mpv.pyx":1074
+ * opengl_fbo=None,
+ * flip_y=False,
+ * depth=None, # <<<<<<<<<<<<<<
+@@ -18271,7 +18271,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ */
+ values[2] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1073
++ /* "vidcutter/libs/pympv/mpv.pyx":1075
+ * flip_y=False,
+ * depth=None,
+ * block_for_target_time=True, # <<<<<<<<<<<<<<
+@@ -18280,7 +18280,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ */
+ values[3] = ((PyObject *)Py_True);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1074
++ /* "vidcutter/libs/pympv/mpv.pyx":1076
+ * depth=None,
+ * block_for_target_time=True,
+ * skip_rendering=False): # <<<<<<<<<<<<<<
+@@ -18338,7 +18338,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1069, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1071, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -18364,7 +18364,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1069, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1071, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -18372,7 +18372,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_opengl_fbo, __pyx_v_flip_y, __pyx_v_depth, __pyx_v_block_for_target_time, __pyx_v_skip_rendering);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
++ /* "vidcutter/libs/pympv/mpv.pyx":1071
+ *
+ * @_errors
+ * def render(self, # <<<<<<<<<<<<<<
+@@ -18402,29 +18402,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("render", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1079
++ /* "vidcutter/libs/pympv/mpv.pyx":1081
+ * mpv_opengl_fbo fbo
+ *
+ * params = _RenderParams() # <<<<<<<<<<<<<<
+ *
+ * if opengl_fbo:
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1081
++ /* "vidcutter/libs/pympv/mpv.pyx":1083
+ * params = _RenderParams()
+ *
+ * if opengl_fbo: # <<<<<<<<<<<<<<
+ * memset(&fbo, 0, sizeof(fbo))
+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1082
++ /* "vidcutter/libs/pympv/mpv.pyx":1084
+ *
+ * if opengl_fbo:
+ * memset(&fbo, 0, sizeof(fbo)) # <<<<<<<<<<<<<<
+@@ -18433,23 +18433,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ (void)(memset((&__pyx_v_fbo), 0, (sizeof(__pyx_v_fbo))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1083
++ /* "vidcutter/libs/pympv/mpv.pyx":1085
+ * if opengl_fbo:
+ * memset(&fbo, 0, sizeof(fbo))
+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
+ * fbo.w = opengl_fbo["w"]
+ * fbo.h = opengl_fbo["h"]
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ if (!__pyx_t_2) {
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __pyx_t_3 = __pyx_t_5;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L4_bool_binop_done;
+@@ -18458,49 +18458,49 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ __pyx_L4_bool_binop_done:;
+ __pyx_v_fbo.fbo = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1084
++ /* "vidcutter/libs/pympv/mpv.pyx":1086
+ * memset(&fbo, 0, sizeof(fbo))
+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ * fbo.w = opengl_fbo["w"] # <<<<<<<<<<<<<<
+ * fbo.h = opengl_fbo["h"]
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ */
+- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_fbo.w = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1085
++ /* "vidcutter/libs/pympv/mpv.pyx":1087
+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ * fbo.w = opengl_fbo["w"]
+ * fbo.h = opengl_fbo["h"] # <<<<<<<<<<<<<<
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ */
+- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1087, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_fbo.h = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1086
++ /* "vidcutter/libs/pympv/mpv.pyx":1088
+ * fbo.w = opengl_fbo["w"]
+ * fbo.h = opengl_fbo["h"]
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ * if flip_y:
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
+ if (!__pyx_t_2) {
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1088, __pyx_L1_error)
+ __pyx_t_3 = __pyx_t_5;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L6_bool_binop_done;
+@@ -18509,18 +18509,18 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ __pyx_L6_bool_binop_done:;
+ __pyx_v_fbo.internal_format = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1087
++ /* "vidcutter/libs/pympv/mpv.pyx":1089
+ * fbo.h = opengl_fbo["h"]
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo) # <<<<<<<<<<<<<<
+ * if flip_y:
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1081
++ /* "vidcutter/libs/pympv/mpv.pyx":1083
+ * params = _RenderParams()
+ *
+ * if opengl_fbo: # <<<<<<<<<<<<<<
+@@ -18529,28 +18529,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1088
++ /* "vidcutter/libs/pympv/mpv.pyx":1090
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ * if flip_y: # <<<<<<<<<<<<<<
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+ * if depth is not None:
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1090, __pyx_L1_error)
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1089
++ /* "vidcutter/libs/pympv/mpv.pyx":1091
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ * if flip_y:
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1) # <<<<<<<<<<<<<<
+ * if depth is not None:
+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1088
++ /* "vidcutter/libs/pympv/mpv.pyx":1090
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ * if flip_y: # <<<<<<<<<<<<<<
+@@ -18559,7 +18559,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1090
++ /* "vidcutter/libs/pympv/mpv.pyx":1092
+ * if flip_y:
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+ * if depth is not None: # <<<<<<<<<<<<<<
+@@ -18570,19 +18570,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ __pyx_t_6 = (__pyx_t_2 != 0);
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1091
++ /* "vidcutter/libs/pympv/mpv.pyx":1093
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+ * if depth is not None:
+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth) # <<<<<<<<<<<<<<
+ * if not block_for_target_time:
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ */
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1093, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1090
++ /* "vidcutter/libs/pympv/mpv.pyx":1092
+ * if flip_y:
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+ * if depth is not None: # <<<<<<<<<<<<<<
+@@ -18591,29 +18591,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1092
++ /* "vidcutter/libs/pympv/mpv.pyx":1094
+ * if depth is not None:
+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+ * if not block_for_target_time: # <<<<<<<<<<<<<<
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ * if skip_rendering:
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __pyx_t_2 = ((!__pyx_t_6) != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1093
++ /* "vidcutter/libs/pympv/mpv.pyx":1095
+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+ * if not block_for_target_time:
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0) # <<<<<<<<<<<<<<
+ * if skip_rendering:
+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1092
++ /* "vidcutter/libs/pympv/mpv.pyx":1094
+ * if depth is not None:
+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+ * if not block_for_target_time: # <<<<<<<<<<<<<<
+@@ -18622,28 +18622,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1094
++ /* "vidcutter/libs/pympv/mpv.pyx":1096
+ * if not block_for_target_time:
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ * if skip_rendering: # <<<<<<<<<<<<<<
+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+ *
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1096, __pyx_L1_error)
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1095
++ /* "vidcutter/libs/pympv/mpv.pyx":1097
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ * if skip_rendering:
+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1) # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1094
++ /* "vidcutter/libs/pympv/mpv.pyx":1096
+ * if not block_for_target_time:
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ * if skip_rendering: # <<<<<<<<<<<<<<
+@@ -18652,7 +18652,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1097
++ /* "vidcutter/libs/pympv/mpv.pyx":1099
+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18667,7 +18667,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1098
++ /* "vidcutter/libs/pympv/mpv.pyx":1100
+ *
+ * with nogil:
+ * ret = mpv_render_context_render(self._ctx, params.params) # <<<<<<<<<<<<<<
+@@ -18677,7 +18677,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ __pyx_v_ret = mpv_render_context_render(__pyx_v_self->_ctx, __pyx_v_params->params);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1097
++ /* "vidcutter/libs/pympv/mpv.pyx":1099
+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18696,7 +18696,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1099
++ /* "vidcutter/libs/pympv/mpv.pyx":1101
+ * with nogil:
+ * ret = mpv_render_context_render(self._ctx, params.params)
+ * return ret # <<<<<<<<<<<<<<
+@@ -18704,13 +18704,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ * def report_swap(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
++ /* "vidcutter/libs/pympv/mpv.pyx":1071
+ *
+ * @_errors
+ * def render(self, # <<<<<<<<<<<<<<
+@@ -18731,7 +18731,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1101
++/* "vidcutter/libs/pympv/mpv.pyx":1103
+ * return ret
+ *
+ * def report_swap(self): # <<<<<<<<<<<<<<
+@@ -18757,7 +18757,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("report_swap", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1102
++ /* "vidcutter/libs/pympv/mpv.pyx":1104
+ *
+ * def report_swap(self):
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18772,7 +18772,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1103
++ /* "vidcutter/libs/pympv/mpv.pyx":1105
+ * def report_swap(self):
+ * with nogil:
+ * mpv_render_context_report_swap(self._ctx) # <<<<<<<<<<<<<<
+@@ -18782,7 +18782,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
+ mpv_render_context_report_swap(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1102
++ /* "vidcutter/libs/pympv/mpv.pyx":1104
+ *
+ * def report_swap(self):
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18801,7 +18801,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1101
++ /* "vidcutter/libs/pympv/mpv.pyx":1103
+ * return ret
+ *
+ * def report_swap(self): # <<<<<<<<<<<<<<
+@@ -18816,7 +18816,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1105
++/* "vidcutter/libs/pympv/mpv.pyx":1107
+ * mpv_render_context_report_swap(self._ctx)
+ *
+ * def free(self): # <<<<<<<<<<<<<<
+@@ -18843,7 +18843,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("free", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1106
++ /* "vidcutter/libs/pympv/mpv.pyx":1108
+ *
+ * def free(self):
+ * if not self.inited: # <<<<<<<<<<<<<<
+@@ -18853,7 +18853,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1107
++ /* "vidcutter/libs/pympv/mpv.pyx":1109
+ * def free(self):
+ * if not self.inited:
+ * return # <<<<<<<<<<<<<<
+@@ -18864,7 +18864,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1106
++ /* "vidcutter/libs/pympv/mpv.pyx":1108
+ *
+ * def free(self):
+ * if not self.inited: # <<<<<<<<<<<<<<
+@@ -18873,7 +18873,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1108
++ /* "vidcutter/libs/pympv/mpv.pyx":1110
+ * if not self.inited:
+ * return
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18888,7 +18888,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1109
++ /* "vidcutter/libs/pympv/mpv.pyx":1111
+ * return
+ * with nogil:
+ * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
+@@ -18898,7 +18898,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ mpv_render_context_free(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1108
++ /* "vidcutter/libs/pympv/mpv.pyx":1110
+ * if not self.inited:
+ * return
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18917,7 +18917,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1110
++ /* "vidcutter/libs/pympv/mpv.pyx":1112
+ * with nogil:
+ * mpv_render_context_free(self._ctx)
+ * self.inited = False # <<<<<<<<<<<<<<
+@@ -18926,7 +18926,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ */
+ __pyx_v_self->inited = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1105
++ /* "vidcutter/libs/pympv/mpv.pyx":1107
+ * mpv_render_context_report_swap(self._ctx)
+ *
+ * def free(self): # <<<<<<<<<<<<<<
+@@ -18942,7 +18942,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1112
++/* "vidcutter/libs/pympv/mpv.pyx":1114
+ * self.inited = False
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+@@ -18969,7 +18969,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("close", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1113
++ /* "vidcutter/libs/pympv/mpv.pyx":1115
+ *
+ * def close(self):
+ * if not self.inited: # <<<<<<<<<<<<<<
+@@ -18979,7 +18979,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1114
++ /* "vidcutter/libs/pympv/mpv.pyx":1116
+ * def close(self):
+ * if not self.inited:
+ * return # <<<<<<<<<<<<<<
+@@ -18990,7 +18990,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1113
++ /* "vidcutter/libs/pympv/mpv.pyx":1115
+ *
+ * def close(self):
+ * if not self.inited: # <<<<<<<<<<<<<<
+@@ -18999,7 +18999,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1115
++ /* "vidcutter/libs/pympv/mpv.pyx":1117
+ * if not self.inited:
+ * return
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -19014,7 +19014,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1116
++ /* "vidcutter/libs/pympv/mpv.pyx":1118
+ * return
+ * with nogil:
+ * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
+@@ -19024,7 +19024,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ mpv_render_context_free(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1115
++ /* "vidcutter/libs/pympv/mpv.pyx":1117
+ * if not self.inited:
+ * return
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -19043,7 +19043,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1117
++ /* "vidcutter/libs/pympv/mpv.pyx":1119
+ * with nogil:
+ * mpv_render_context_free(self._ctx)
+ * self.inited = False # <<<<<<<<<<<<<<
+@@ -19052,7 +19052,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ */
+ __pyx_v_self->inited = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1112
++ /* "vidcutter/libs/pympv/mpv.pyx":1114
+ * self.inited = False
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+@@ -19068,7 +19068,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1119
++/* "vidcutter/libs/pympv/mpv.pyx":1121
+ * self.inited = False
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -19097,14 +19097,14 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1120
++ /* "vidcutter/libs/pympv/mpv.pyx":1122
+ *
+ * def __dealloc__(self):
+ * self.close() # <<<<<<<<<<<<<<
+ *
+ * cdef class OpenGLRenderContext(RenderContext):
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -19118,12 +19118,12 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1119
++ /* "vidcutter/libs/pympv/mpv.pyx":1121
+ * self.inited = False
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -19255,7 +19255,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cyt
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1123
++/* "vidcutter/libs/pympv/mpv.pyx":1125
+ *
+ * cdef class OpenGLRenderContext(RenderContext):
+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
+@@ -19312,12 +19312,12 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObje
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1123, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1125, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1123, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1125, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -19330,7 +19330,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObje
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1123, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1125, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+@@ -19360,39 +19360,39 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1127
++ /* "vidcutter/libs/pympv/mpv.pyx":1129
+ * *args, **kwargs):
+ * init_params = {
+ * "get_proc_address": get_proc_address # <<<<<<<<<<<<<<
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1127, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __pyx_v_init_params = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1129
++ /* "vidcutter/libs/pympv/mpv.pyx":1131
+ * "get_proc_address": get_proc_address
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
+ * init_params, *args, **kwargs)
+ *
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1130
++ /* "vidcutter/libs/pympv/mpv.pyx":1132
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
+ * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
+ *
+ * class CallbackThread(Thread):
+ */
+- __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+@@ -19407,42 +19407,42 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct
+ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_init_params);
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1129
++ /* "vidcutter/libs/pympv/mpv.pyx":1131
+ * "get_proc_address": get_proc_address
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
+ * init_params, *args, **kwargs)
+ *
+ */
+- __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1130
++ /* "vidcutter/libs/pympv/mpv.pyx":1132
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
+ * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
+ *
+ * class CallbackThread(Thread):
+ */
+- __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error)
++ __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1129
++ /* "vidcutter/libs/pympv/mpv.pyx":1131
+ * "get_proc_address": get_proc_address
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
+ * init_params, *args, **kwargs)
+ *
+ */
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1123
++ /* "vidcutter/libs/pympv/mpv.pyx":1125
+ *
+ * cdef class OpenGLRenderContext(RenderContext):
+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
+@@ -19579,7 +19579,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstat
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1133
++/* "vidcutter/libs/pympv/mpv.pyx":1135
+ *
+ * class CallbackThread(Thread):
+ * def __init__(self): # <<<<<<<<<<<<<<
+@@ -19612,16 +19612,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1134
++ /* "vidcutter/libs/pympv/mpv.pyx":1136
+ * class CallbackThread(Thread):
+ * def __init__(self):
+ * Thread.__init__(self) # <<<<<<<<<<<<<<
+ * self.daemon = True
+ * self.lock = Semaphore()
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+@@ -19636,28 +19636,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
+ }
+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self);
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1135
++ /* "vidcutter/libs/pympv/mpv.pyx":1137
+ * def __init__(self):
+ * Thread.__init__(self)
+ * self.daemon = True # <<<<<<<<<<<<<<
+ * self.lock = Semaphore()
+ * self.lock.acquire(True)
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1137, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1136
++ /* "vidcutter/libs/pympv/mpv.pyx":1138
+ * Thread.__init__(self)
+ * self.daemon = True
+ * self.lock = Semaphore() # <<<<<<<<<<<<<<
+ * self.lock.acquire(True)
+ * self.callback = None
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+@@ -19671,22 +19671,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
+ }
+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1137
++ /* "vidcutter/libs/pympv/mpv.pyx":1139
+ * self.daemon = True
+ * self.lock = Semaphore()
+ * self.lock.acquire(True) # <<<<<<<<<<<<<<
+ * self.callback = None
+ * self.isshutdown = False
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+@@ -19701,30 +19701,30 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_True);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1138
++ /* "vidcutter/libs/pympv/mpv.pyx":1140
+ * self.lock = Semaphore()
+ * self.lock.acquire(True)
+ * self.callback = None # <<<<<<<<<<<<<<
+ * self.isshutdown = False
+ *
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1140, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1139
++ /* "vidcutter/libs/pympv/mpv.pyx":1141
+ * self.lock.acquire(True)
+ * self.callback = None
+ * self.isshutdown = False # <<<<<<<<<<<<<<
+ *
+ * def shutdown(self):
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
++ /* "vidcutter/libs/pympv/mpv.pyx":1135
+ *
+ * class CallbackThread(Thread):
+ * def __init__(self): # <<<<<<<<<<<<<<
+@@ -19747,7 +19747,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1141
++/* "vidcutter/libs/pympv/mpv.pyx":1143
+ * self.isshutdown = False
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+@@ -19780,34 +19780,34 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHO
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("shutdown", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1142
++ /* "vidcutter/libs/pympv/mpv.pyx":1144
+ *
+ * def shutdown(self):
+ * self.isshutdown = True # <<<<<<<<<<<<<<
+ * self.callback = None
+ * self.lock.release()
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1144, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1143
++ /* "vidcutter/libs/pympv/mpv.pyx":1145
+ * def shutdown(self):
+ * self.isshutdown = True
+ * self.callback = None # <<<<<<<<<<<<<<
+ * self.lock.release()
+ *
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1145, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1144
++ /* "vidcutter/libs/pympv/mpv.pyx":1146
+ * self.isshutdown = True
+ * self.callback = None
+ * self.lock.release() # <<<<<<<<<<<<<<
+ *
+ * def call(self):
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+@@ -19822,12 +19822,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHO
+ }
+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
++ /* "vidcutter/libs/pympv/mpv.pyx":1143
+ * self.isshutdown = False
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+@@ -19850,7 +19850,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHO
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1146
++/* "vidcutter/libs/pympv/mpv.pyx":1148
+ * self.lock.release()
+ *
+ * def call(self): # <<<<<<<<<<<<<<
+@@ -19883,16 +19883,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("call", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1147
++ /* "vidcutter/libs/pympv/mpv.pyx":1149
+ *
+ * def call(self):
+ * self.lock.release() # <<<<<<<<<<<<<<
+ *
+ * def set(self, callback):
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+@@ -19907,12 +19907,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
+ }
+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
++ /* "vidcutter/libs/pympv/mpv.pyx":1148
+ * self.lock.release()
+ *
+ * def call(self): # <<<<<<<<<<<<<<
+@@ -19935,7 +19935,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1149
++/* "vidcutter/libs/pympv/mpv.pyx":1151
+ * self.lock.release()
+ *
+ * def set(self, callback): # <<<<<<<<<<<<<<
+@@ -19978,11 +19978,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1149, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1151, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1149, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1151, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -19995,7 +19995,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1149, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1151, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -20016,16 +20016,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNU
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("set", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1150
++ /* "vidcutter/libs/pympv/mpv.pyx":1152
+ *
+ * def set(self, callback):
+ * self.callback = callback # <<<<<<<<<<<<<<
+ *
+ * def run(self):
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
++ /* "vidcutter/libs/pympv/mpv.pyx":1151
+ * self.lock.release()
+ *
+ * def set(self, callback): # <<<<<<<<<<<<<<
+@@ -20045,7 +20045,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNU
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1152
++/* "vidcutter/libs/pympv/mpv.pyx":1154
+ * self.callback = callback
+ *
+ * def run(self): # <<<<<<<<<<<<<<
+@@ -20082,7 +20082,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("run", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1153
++ /* "vidcutter/libs/pympv/mpv.pyx":1155
+ *
+ * def run(self):
+ * while not self.isshutdown: # <<<<<<<<<<<<<<
+@@ -20090,23 +20090,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ * self.mpv_callback(self.callback) if self.callback else None
+ */
+ while (1) {
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((!__pyx_t_2) != 0);
+ if (!__pyx_t_3) break;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1154
++ /* "vidcutter/libs/pympv/mpv.pyx":1156
+ * def run(self):
+ * while not self.isshutdown:
+ * self.lock.acquire(True) # <<<<<<<<<<<<<<
+ * self.mpv_callback(self.callback) if self.callback else None
+ *
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+@@ -20121,26 +20121,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ }
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_True);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1155
++ /* "vidcutter/libs/pympv/mpv.pyx":1157
+ * while not self.isshutdown:
+ * self.lock.acquire(True)
+ * self.mpv_callback(self.callback) if self.callback else None # <<<<<<<<<<<<<<
+ *
+ * def mpv_callback(self, callback):
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1157, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_3) {
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+@@ -20155,7 +20155,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = __pyx_t_5;
+@@ -20167,7 +20167,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
++ /* "vidcutter/libs/pympv/mpv.pyx":1154
+ * self.callback = callback
+ *
+ * def run(self): # <<<<<<<<<<<<<<
+@@ -20192,7 +20192,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1157
++/* "vidcutter/libs/pympv/mpv.pyx":1159
+ * self.mpv_callback(self.callback) if self.callback else None
+ *
+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+@@ -20235,11 +20235,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1157, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1159, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1159, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -20252,7 +20252,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1157, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1159, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -20285,7 +20285,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("mpv_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
++ /* "vidcutter/libs/pympv/mpv.pyx":1160
+ *
+ * def mpv_callback(self, callback):
+ * try: # <<<<<<<<<<<<<<
+@@ -20301,7 +20301,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1159
++ /* "vidcutter/libs/pympv/mpv.pyx":1161
+ * def mpv_callback(self, callback):
+ * try:
+ * callback() # <<<<<<<<<<<<<<
+@@ -20321,12 +20321,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ }
+ __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L3_error)
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1161, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
++ /* "vidcutter/libs/pympv/mpv.pyx":1160
+ *
+ * def mpv_callback(self, callback):
+ * try: # <<<<<<<<<<<<<<
+@@ -20343,7 +20343,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1160
++ /* "vidcutter/libs/pympv/mpv.pyx":1162
+ * try:
+ * callback()
+ * except Exception as e: # <<<<<<<<<<<<<<
+@@ -20353,29 +20353,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ if (__pyx_t_7) {
+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1160, __pyx_L5_except_error)
++ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1162, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_5);
+ __pyx_v_e = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1161
++ /* "vidcutter/libs/pympv/mpv.pyx":1163
+ * callback()
+ * except Exception as e:
+ * sys.stderr.write("pympv error during callback: %s\n" % e) # <<<<<<<<<<<<<<
+ *
+ * cdef void _c_callback(void* d) with gil:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+- __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+@@ -20390,7 +20390,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+@@ -20402,7 +20402,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
++ /* "vidcutter/libs/pympv/mpv.pyx":1160
+ *
+ * def mpv_callback(self, callback):
+ * try: # <<<<<<<<<<<<<<
+@@ -20422,7 +20422,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ __pyx_L8_try_end:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
++ /* "vidcutter/libs/pympv/mpv.pyx":1159
+ * self.mpv_callback(self.callback) if self.callback else None
+ *
+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+@@ -20450,7 +20450,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1163
++/* "vidcutter/libs/pympv/mpv.pyx":1165
+ * sys.stderr.write("pympv error during callback: %s\n" % e)
+ *
+ * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
+@@ -20474,7 +20474,7 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
+ #endif
+ __Pyx_RefNannySetupContext("_c_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1164
++ /* "vidcutter/libs/pympv/mpv.pyx":1166
+ *
+ * cdef void _c_callback(void* d) with gil:
+ * cdef uint64_t name = <uint64_t>d # <<<<<<<<<<<<<<
+@@ -20483,15 +20483,15 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
+ */
+ __pyx_v_name = ((uint64_t)__pyx_v_d);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1165
++ /* "vidcutter/libs/pympv/mpv.pyx":1167
+ * cdef void _c_callback(void* d) with gil:
+ * cdef uint64_t name = <uint64_t>d
+ * callback = _callbacks.get(name) # <<<<<<<<<<<<<<
+ * callback.call()
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -20506,18 +20506,18 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_callback = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1166
++ /* "vidcutter/libs/pympv/mpv.pyx":1168
+ * cdef uint64_t name = <uint64_t>d
+ * callback = _callbacks.get(name)
+ * callback.call() # <<<<<<<<<<<<<<
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -20531,12 +20531,12 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1163
++ /* "vidcutter/libs/pympv/mpv.pyx":1165
+ * sys.stderr.write("pympv error during callback: %s\n" % e)
+ *
+ * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
+@@ -24444,13 +24444,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
+ {0, 0, 0, 0, 0, 0, 0}
+ };
+ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
+- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 44, __pyx_L1_error)
+- __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 346, __pyx_L1_error)
+- __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 58, __pyx_L1_error)
+- __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 66, __pyx_L1_error)
+- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 222, __pyx_L1_error)
+- __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 303, __pyx_L1_error)
+- __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 46, __pyx_L1_error)
++ __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 348, __pyx_L1_error)
++ __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 60, __pyx_L1_error)
++ __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 68, __pyx_L1_error)
++ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 224, __pyx_L1_error)
++ __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 305, __pyx_L1_error)
++ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 477, __pyx_L1_error)
+ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+@@ -24461,17 +24461,17 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":319
++ /* "vidcutter/libs/pympv/mpv.pyx":321
+ *
+ * def _errors(fn):
+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+ * v = fn(*k, **kw)
+ * if v < 0:
+ */
+- __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 319, __pyx_L1_error)
++ __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 321, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple_);
+ __Pyx_GIVEREF(__pyx_tuple_);
+- __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 319, __pyx_L1_error)
++ __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 321, __pyx_L1_error)
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+@@ -24511,80 +24511,80 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
+ __Pyx_GOTREF(__pyx_tuple__6);
+ __Pyx_GIVEREF(__pyx_tuple__6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":992
++ /* "vidcutter/libs/pympv/mpv.pyx":994
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ * if drm_display:
+ * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ */
+- __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__7);
+ __Pyx_GIVEREF(__pyx_tuple__7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":993
++ /* "vidcutter/libs/pympv/mpv.pyx":995
+ * if drm_display:
+ * drm_params.fd = drm_display.get("fd", -1)
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None)
+ */
+- __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 995, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__8);
+ __Pyx_GIVEREF(__pyx_tuple__8);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":994
++ /* "vidcutter/libs/pympv/mpv.pyx":996
+ * drm_params.fd = drm_display.get("fd", -1)
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
+ * arp = drm_display.get("atomic_request_ptr", None)
+ * if arp is not None:
+ */
+- __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 996, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__9);
+ __Pyx_GIVEREF(__pyx_tuple__9);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":995
++ /* "vidcutter/libs/pympv/mpv.pyx":997
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
+ * if arp is not None:
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ */
+- __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 997, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__10);
+ __Pyx_GIVEREF(__pyx_tuple__10);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":998
++ /* "vidcutter/libs/pympv/mpv.pyx":1000
+ * if arp is not None:
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ * if drm_osd_size:
+ */
+- __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 1000, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__11);
+ __Pyx_GIVEREF(__pyx_tuple__11);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1083
++ /* "vidcutter/libs/pympv/mpv.pyx":1085
+ * if opengl_fbo:
+ * memset(&fbo, 0, sizeof(fbo))
+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
+ * fbo.w = opengl_fbo["w"]
+ * fbo.h = opengl_fbo["h"]
+ */
+- __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__12);
+ __Pyx_GIVEREF(__pyx_tuple__12);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1086
++ /* "vidcutter/libs/pympv/mpv.pyx":1088
+ * fbo.w = opengl_fbo["w"]
+ * fbo.h = opengl_fbo["h"]
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ * if flip_y:
+ */
+- __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__13);
+ __Pyx_GIVEREF(__pyx_tuple__13);
+
+@@ -24626,183 +24626,183 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
+ __Pyx_GOTREF(__pyx_tuple__17);
+ __Pyx_GIVEREF(__pyx_tuple__17);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":52
++ /* "vidcutter/libs/pympv/mpv.pyx":54
+ * void Py_Initialize()
+ *
+ * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ */
+- __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 54, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__18);
+ __Pyx_GIVEREF(__pyx_tuple__18);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":55
++ /* "vidcutter/libs/pympv/mpv.pyx":57
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ * def _strdec(s): # <<<<<<<<<<<<<<
+ * try:
+ * return s.decode("utf-8", _strdec_err)
+ */
+- __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 55, __pyx_L1_error)
++ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__19);
+ __Pyx_GIVEREF(__pyx_tuple__19);
+- __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 55, __pyx_L1_error)
++ __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 57, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":63
++ /* "vidcutter/libs/pympv/mpv.pyx":65
+ *
+ * # Python -> mpv
+ * def _strenc(s): # <<<<<<<<<<<<<<
+ * try:
+ * return s.encode("utf-8", _strdec_err)
+ */
+- __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 63, __pyx_L1_error)
++ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 65, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__21);
+ __Pyx_GIVEREF(__pyx_tuple__21);
+- __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 63, __pyx_L1_error)
++ __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 65, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":318
++ /* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+ * def wrapped(*k, **kw):
+ * v = fn(*k, **kw)
+ */
+- __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 318, __pyx_L1_error)
++ __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__23);
+ __Pyx_GIVEREF(__pyx_tuple__23);
+- __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 318, __pyx_L1_error)
++ __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 320, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":329
++ /* "vidcutter/libs/pympv/mpv.pyx":331
+ * code = None
+ *
+ * def __init__(self, e): # <<<<<<<<<<<<<<
+ * self.code = e
+ * cdef const char* err_c
+ */
+- __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 329, __pyx_L1_error)
++ __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__25);
+ __Pyx_GIVEREF(__pyx_tuple__25);
+- __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 329, __pyx_L1_error)
++ __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 331, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":346
++ /* "vidcutter/libs/pympv/mpv.pyx":348
+ * cdef _reply_userdatas = dict()
+ *
+ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+ * def __init__(self, data):
+ * self.counter = 0
+ */
+- __pyx_tuple__27 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__27);
+ __Pyx_GIVEREF(__pyx_tuple__27);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":347
++ /* "vidcutter/libs/pympv/mpv.pyx":349
+ *
+ * class _ReplyUserData(object):
+ * def __init__(self, data): # <<<<<<<<<<<<<<
+ * self.counter = 0
+ * self.data = data
+ */
+- __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 347, __pyx_L1_error)
++ __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__28);
+ __Pyx_GIVEREF(__pyx_tuple__28);
+- __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 347, __pyx_L1_error)
++ __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 349, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":352
++ /* "vidcutter/libs/pympv/mpv.pyx":354
+ * self.observed = False
+ *
+ * def add(self): # <<<<<<<<<<<<<<
+ * self.counter += 1
+ *
+ */
+- __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 352, __pyx_L1_error)
++ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__30);
+ __Pyx_GIVEREF(__pyx_tuple__30);
+- __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 352, __pyx_L1_error)
++ __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 354, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 354, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":355
++ /* "vidcutter/libs/pympv/mpv.pyx":357
+ * self.counter += 1
+ *
+ * def remove(self): # <<<<<<<<<<<<<<
+ * self.counter -= 1
+ *
+ */
+- __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 355, __pyx_L1_error)
++ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__32);
+ __Pyx_GIVEREF(__pyx_tuple__32);
+- __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 355, __pyx_L1_error)
++ __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 357, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 357, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
++ /* "vidcutter/libs/pympv/mpv.pyx":1135
+ *
+ * class CallbackThread(Thread):
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * Thread.__init__(self)
+ * self.daemon = True
+ */
+- __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__34);
+ __Pyx_GIVEREF(__pyx_tuple__34);
+- __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1135, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
++ /* "vidcutter/libs/pympv/mpv.pyx":1143
+ * self.isshutdown = False
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+ * self.isshutdown = True
+ * self.callback = None
+ */
+- __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__36);
+ __Pyx_GIVEREF(__pyx_tuple__36);
+- __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1143, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
++ /* "vidcutter/libs/pympv/mpv.pyx":1148
+ * self.lock.release()
+ *
+ * def call(self): # <<<<<<<<<<<<<<
+ * self.lock.release()
+ *
+ */
+- __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1148, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__38);
+ __Pyx_GIVEREF(__pyx_tuple__38);
+- __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1148, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
++ /* "vidcutter/libs/pympv/mpv.pyx":1151
+ * self.lock.release()
+ *
+ * def set(self, callback): # <<<<<<<<<<<<<<
+ * self.callback = callback
+ *
+ */
+- __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__40);
+ __Pyx_GIVEREF(__pyx_tuple__40);
+- __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1151, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1151, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
++ /* "vidcutter/libs/pympv/mpv.pyx":1154
+ * self.callback = callback
+ *
+ * def run(self): # <<<<<<<<<<<<<<
+ * while not self.isshutdown:
+ * self.lock.acquire(True)
+ */
+- __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__42);
+ __Pyx_GIVEREF(__pyx_tuple__42);
+- __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 1154, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
++ /* "vidcutter/libs/pympv/mpv.pyx":1159
+ * self.mpv_callback(self.callback) if self.callback else None
+ *
+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+ * try:
+ * callback()
+ */
+- __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1159, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__44);
+ __Pyx_GIVEREF(__pyx_tuple__44);
+- __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1159, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+@@ -24840,9 +24840,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
+ if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_109 = PyInt_FromLong(109); if (unlikely(!__pyx_int_109)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_5713169 = PyInt_FromLong(5713169L); if (unlikely(!__pyx_int_5713169)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_90958262 = PyInt_FromLong(90958262L); if (unlikely(!__pyx_int_90958262)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_142036910 = PyInt_FromLong(142036910L); if (unlikely(!__pyx_int_142036910)) __PYX_ERR(0, 1, __pyx_L1_error)
+@@ -24897,122 +24897,122 @@ static int __Pyx_modinit_type_init_code(void) {
+ /*--- Type init code ---*/
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
+ __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, struct mpv_event_end_file *))__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage = &__pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
+ __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, struct mpv_event_log_message *))__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = &__pyx_type_9vidcutter_4libs_3mpv_LogMessage;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_Property = &__pyx_vtable_9vidcutter_4libs_3mpv_Property;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Property._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, struct mpv_event_property *))__pyx_f_9vidcutter_4libs_3mpv_8Property__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_Property.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_Property = &__pyx_type_9vidcutter_4libs_3mpv_Property;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_Event = &__pyx_vtable_9vidcutter_4libs_3mpv_Event;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Event._data = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *))__pyx_f_9vidcutter_4libs_3mpv_5Event__data;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Event._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_5Event__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_Event.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_Event = &__pyx_type_9vidcutter_4libs_3mpv_Event;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_Context = &__pyx_vtable_9vidcutter_4libs_3mpv_Context;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_list = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_map = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_native_value = (struct mpv_node (*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._free_native_value = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, struct mpv_node))__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_Context.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_Context = &__pyx_type_9vidcutter_4libs_3mpv_Context;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams = &__pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
+ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_voidp = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, void *, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
+ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_int = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, int))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int;
+ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_string = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, char *))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = &__pyx_type_9vidcutter_4libs_3mpv__RenderParams;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
+ __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo._from_struct = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *, struct mpv_render_frame_info *))__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = &__pyx_type_9vidcutter_4libs_3mpv_RenderContext;
+ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_base = __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLRenderContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_print = 0;
+ #endif
+@@ -25315,29 +25315,29 @@ if (!__Pyx_RefNanny) {
+ * __version__ = "0.3.0"
+ * __author__ = "Andre D" # <<<<<<<<<<<<<<
+ *
+- * _REQUIRED_CAPI_MAJOR = 2
++ * #_REQUIRED_CAPI_MAJOR = 2
+ */
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_s_Andre_D) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":33
+- * __author__ = "Andre D"
+- *
+- * _REQUIRED_CAPI_MAJOR = 2 # <<<<<<<<<<<<<<
+- * _MIN_CAPI_MINOR = 0
++ /* "vidcutter/libs/pympv/mpv.pyx":35
++ * #_REQUIRED_CAPI_MAJOR = 2
++ * #_MIN_CAPI_MINOR = 0
++ * _REQUIRED_CAPI_MAJOR = 1 # <<<<<<<<<<<<<<
++ * _MIN_CAPI_MINOR = 109
+ *
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":34
+- *
+- * _REQUIRED_CAPI_MAJOR = 2
+- * _MIN_CAPI_MINOR = 0 # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":36
++ * #_MIN_CAPI_MINOR = 0
++ * _REQUIRED_CAPI_MAJOR = 1
++ * _MIN_CAPI_MINOR = 109 # <<<<<<<<<<<<<<
+ *
+ * cdef unsigned long _CAPI_VERSION
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_0) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_109) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":37
++ /* "vidcutter/libs/pympv/mpv.pyx":39
+ *
+ * cdef unsigned long _CAPI_VERSION
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -25352,7 +25352,7 @@ if (!__Pyx_RefNanny) {
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":38
++ /* "vidcutter/libs/pympv/mpv.pyx":40
+ * cdef unsigned long _CAPI_VERSION
+ * with nogil:
+ * _CAPI_VERSION = mpv_client_api_version() # <<<<<<<<<<<<<<
+@@ -25362,7 +25362,7 @@ if (!__Pyx_RefNanny) {
+ __pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION = mpv_client_api_version();
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":37
++ /* "vidcutter/libs/pympv/mpv.pyx":39
+ *
+ * cdef unsigned long _CAPI_VERSION
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -25381,80 +25381,80 @@ if (!__Pyx_RefNanny) {
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":40
++ /* "vidcutter/libs/pympv/mpv.pyx":42
+ * _CAPI_VERSION = mpv_client_api_version()
+ *
+ * _CAPI_MAJOR = _CAPI_VERSION >> 16 # <<<<<<<<<<<<<<
+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+ *
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":41
++ /* "vidcutter/libs/pympv/mpv.pyx":43
+ *
+ * _CAPI_MAJOR = _CAPI_VERSION >> 16
+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF # <<<<<<<<<<<<<<
+ *
+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":43
++ /* "vidcutter/libs/pympv/mpv.pyx":45
+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+ *
+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
+ * raise ImportError(
+ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L6_bool_binop_done;
+ }
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L6_bool_binop_done:;
+ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":46
++ /* "vidcutter/libs/pympv/mpv.pyx":48
+ * raise ImportError(
+ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR) # <<<<<<<<<<<<<<
+ * )
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
+@@ -25469,32 +25469,32 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_4 = 0;
+ __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":45
++ /* "vidcutter/libs/pympv/mpv.pyx":47
+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+ * raise ImportError(
+ * "libmpv version is incorrect. Required %d.%d got %d.%d." % # <<<<<<<<<<<<<<
+ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
+ * )
+ */
+- __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":44
++ /* "vidcutter/libs/pympv/mpv.pyx":46
+ *
+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+ * raise ImportError( # <<<<<<<<<<<<<<
+ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
+ */
+- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __PYX_ERR(0, 44, __pyx_L1_error)
++ __PYX_ERR(0, 46, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":43
++ /* "vidcutter/libs/pympv/mpv.pyx":45
+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+ *
+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
+@@ -25503,33 +25503,33 @@ if (!__Pyx_RefNanny) {
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":52
++ /* "vidcutter/libs/pympv/mpv.pyx":54
+ * void Py_Initialize()
+ *
+ * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__18, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__18, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":53
++ /* "vidcutter/libs/pympv/mpv.pyx":55
+ *
+ * _is_py3 = sys.version_info >= (3,)
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict" # <<<<<<<<<<<<<<
+ * # mpv -> Python
+ * def _strdec(s):
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 55, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 53, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 55, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_3) {
+ __Pyx_INCREF(__pyx_n_s_surrogateescape);
+@@ -25538,34 +25538,34 @@ if (!__Pyx_RefNanny) {
+ __Pyx_INCREF(__pyx_n_s_strict);
+ __pyx_t_7 = __pyx_n_s_strict;
+ }
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":55
++ /* "vidcutter/libs/pympv/mpv.pyx":57
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ * def _strdec(s): # <<<<<<<<<<<<<<
+ * try:
+ * return s.decode("utf-8", _strdec_err)
+ */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error)
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":63
++ /* "vidcutter/libs/pympv/mpv.pyx":65
+ *
+ * # Python -> mpv
+ * def _strenc(s): # <<<<<<<<<<<<<<
+ * try:
+ * return s.encode("utf-8", _strdec_err)
+ */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error)
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 65, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":70
++ /* "vidcutter/libs/pympv/mpv.pyx":72
+ * return s
+ *
+ * Py_Initialize() # <<<<<<<<<<<<<<
+@@ -25574,883 +25574,883 @@ if (!__Pyx_RefNanny) {
+ */
+ Py_Initialize();
+
+- /* "vidcutter/libs/pympv/mpv.pyx":72
++ /* "vidcutter/libs/pympv/mpv.pyx":74
+ * Py_Initialize()
+ *
+ * class Errors: # <<<<<<<<<<<<<<
+ * """Set of known error codes from MpvError and Event responses.
+ *
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 72, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 74, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":79
++ /* "vidcutter/libs/pympv/mpv.pyx":81
+ * You should handle the possibility that error codes may not be any of these values.
+ * """
+ * success = MPV_ERROR_SUCCESS # <<<<<<<<<<<<<<
+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+ * nomem = MPV_ERROR_NOMEM
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":80
++ /* "vidcutter/libs/pympv/mpv.pyx":82
+ * """
+ * success = MPV_ERROR_SUCCESS
+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL # <<<<<<<<<<<<<<
+ * nomem = MPV_ERROR_NOMEM
+ * uninitialized = MPV_ERROR_UNINITIALIZED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":81
++ /* "vidcutter/libs/pympv/mpv.pyx":83
+ * success = MPV_ERROR_SUCCESS
+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+ * nomem = MPV_ERROR_NOMEM # <<<<<<<<<<<<<<
+ * uninitialized = MPV_ERROR_UNINITIALIZED
+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":82
++ /* "vidcutter/libs/pympv/mpv.pyx":84
+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+ * nomem = MPV_ERROR_NOMEM
+ * uninitialized = MPV_ERROR_UNINITIALIZED # <<<<<<<<<<<<<<
+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":83
++ /* "vidcutter/libs/pympv/mpv.pyx":85
+ * nomem = MPV_ERROR_NOMEM
+ * uninitialized = MPV_ERROR_UNINITIALIZED
+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER # <<<<<<<<<<<<<<
+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
+ * option_format = MPV_ERROR_OPTION_FORMAT
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":84
++ /* "vidcutter/libs/pympv/mpv.pyx":86
+ * uninitialized = MPV_ERROR_UNINITIALIZED
+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+ * not_found = MPV_ERROR_OPTION_NOT_FOUND # <<<<<<<<<<<<<<
+ * option_format = MPV_ERROR_OPTION_FORMAT
+ * option_error = MPV_ERROR_OPTION_ERROR
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":85
++ /* "vidcutter/libs/pympv/mpv.pyx":87
+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
+ * option_format = MPV_ERROR_OPTION_FORMAT # <<<<<<<<<<<<<<
+ * option_error = MPV_ERROR_OPTION_ERROR
+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":86
++ /* "vidcutter/libs/pympv/mpv.pyx":88
+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
+ * option_format = MPV_ERROR_OPTION_FORMAT
+ * option_error = MPV_ERROR_OPTION_ERROR # <<<<<<<<<<<<<<
+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+ * property_format = MPV_ERROR_PROPERTY_FORMAT
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":87
++ /* "vidcutter/libs/pympv/mpv.pyx":89
+ * option_format = MPV_ERROR_OPTION_FORMAT
+ * option_error = MPV_ERROR_OPTION_ERROR
+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND # <<<<<<<<<<<<<<
+ * property_format = MPV_ERROR_PROPERTY_FORMAT
+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":88
++ /* "vidcutter/libs/pympv/mpv.pyx":90
+ * option_error = MPV_ERROR_OPTION_ERROR
+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+ * property_format = MPV_ERROR_PROPERTY_FORMAT # <<<<<<<<<<<<<<
+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+ * property_error = MPV_ERROR_PROPERTY_ERROR
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":89
++ /* "vidcutter/libs/pympv/mpv.pyx":91
+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+ * property_format = MPV_ERROR_PROPERTY_FORMAT
+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE # <<<<<<<<<<<<<<
+ * property_error = MPV_ERROR_PROPERTY_ERROR
+ * command_error = MPV_ERROR_COMMAND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":90
++ /* "vidcutter/libs/pympv/mpv.pyx":92
+ * property_format = MPV_ERROR_PROPERTY_FORMAT
+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+ * property_error = MPV_ERROR_PROPERTY_ERROR # <<<<<<<<<<<<<<
+ * command_error = MPV_ERROR_COMMAND
+ * loading_failed = MPV_ERROR_LOADING_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":91
++ /* "vidcutter/libs/pympv/mpv.pyx":93
+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+ * property_error = MPV_ERROR_PROPERTY_ERROR
+ * command_error = MPV_ERROR_COMMAND # <<<<<<<<<<<<<<
+ * loading_failed = MPV_ERROR_LOADING_FAILED
+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":92
++ /* "vidcutter/libs/pympv/mpv.pyx":94
+ * property_error = MPV_ERROR_PROPERTY_ERROR
+ * command_error = MPV_ERROR_COMMAND
+ * loading_failed = MPV_ERROR_LOADING_FAILED # <<<<<<<<<<<<<<
+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":93
++ /* "vidcutter/libs/pympv/mpv.pyx":95
+ * command_error = MPV_ERROR_COMMAND
+ * loading_failed = MPV_ERROR_LOADING_FAILED
+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED # <<<<<<<<<<<<<<
+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":94
++ /* "vidcutter/libs/pympv/mpv.pyx":96
+ * loading_failed = MPV_ERROR_LOADING_FAILED
+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED # <<<<<<<<<<<<<<
+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":95
++ /* "vidcutter/libs/pympv/mpv.pyx":97
+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY # <<<<<<<<<<<<<<
+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+ * unsupported = MPV_ERROR_UNSUPPORTED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":96
++ /* "vidcutter/libs/pympv/mpv.pyx":98
+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT # <<<<<<<<<<<<<<
+ * unsupported = MPV_ERROR_UNSUPPORTED
+ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":97
++ /* "vidcutter/libs/pympv/mpv.pyx":99
+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+ * unsupported = MPV_ERROR_UNSUPPORTED # <<<<<<<<<<<<<<
+ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":98
++ /* "vidcutter/libs/pympv/mpv.pyx":100
+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+ * unsupported = MPV_ERROR_UNSUPPORTED
+ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED # <<<<<<<<<<<<<<
+ *
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":72
++ /* "vidcutter/libs/pympv/mpv.pyx":74
+ * Py_Initialize()
+ *
+ * class Errors: # <<<<<<<<<<<<<<
+ * """Set of known error codes from MpvError and Event responses.
+ *
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":101
++ /* "vidcutter/libs/pympv/mpv.pyx":103
+ *
+ *
+ * class Events: # <<<<<<<<<<<<<<
+ * """Set of known values for Event ids.
+ *
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 103, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":108
++ /* "vidcutter/libs/pympv/mpv.pyx":110
+ * You should handle the possibility that event ids may not be any of these values.
+ * """
+ * none = MPV_EVENT_NONE # <<<<<<<<<<<<<<
+ * shutdown = MPV_EVENT_SHUTDOWN
+ * log_message = MPV_EVENT_LOG_MESSAGE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":109
++ /* "vidcutter/libs/pympv/mpv.pyx":111
+ * """
+ * none = MPV_EVENT_NONE
+ * shutdown = MPV_EVENT_SHUTDOWN # <<<<<<<<<<<<<<
+ * log_message = MPV_EVENT_LOG_MESSAGE
+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 109, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":110
++ /* "vidcutter/libs/pympv/mpv.pyx":112
+ * none = MPV_EVENT_NONE
+ * shutdown = MPV_EVENT_SHUTDOWN
+ * log_message = MPV_EVENT_LOG_MESSAGE # <<<<<<<<<<<<<<
+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":111
++ /* "vidcutter/libs/pympv/mpv.pyx":113
+ * shutdown = MPV_EVENT_SHUTDOWN
+ * log_message = MPV_EVENT_LOG_MESSAGE
+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY # <<<<<<<<<<<<<<
+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+ * command_reply = MPV_EVENT_COMMAND_REPLY
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":112
++ /* "vidcutter/libs/pympv/mpv.pyx":114
+ * log_message = MPV_EVENT_LOG_MESSAGE
+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY # <<<<<<<<<<<<<<
+ * command_reply = MPV_EVENT_COMMAND_REPLY
+ * start_file = MPV_EVENT_START_FILE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":113
++ /* "vidcutter/libs/pympv/mpv.pyx":115
+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+ * command_reply = MPV_EVENT_COMMAND_REPLY # <<<<<<<<<<<<<<
+ * start_file = MPV_EVENT_START_FILE
+ * end_file = MPV_EVENT_END_FILE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":114
++ /* "vidcutter/libs/pympv/mpv.pyx":116
+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+ * command_reply = MPV_EVENT_COMMAND_REPLY
+ * start_file = MPV_EVENT_START_FILE # <<<<<<<<<<<<<<
+ * end_file = MPV_EVENT_END_FILE
+ * file_loaded = MPV_EVENT_FILE_LOADED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":115
++ /* "vidcutter/libs/pympv/mpv.pyx":117
+ * command_reply = MPV_EVENT_COMMAND_REPLY
+ * start_file = MPV_EVENT_START_FILE
+ * end_file = MPV_EVENT_END_FILE # <<<<<<<<<<<<<<
+ * file_loaded = MPV_EVENT_FILE_LOADED
+ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":116
++ /* "vidcutter/libs/pympv/mpv.pyx":118
+ * start_file = MPV_EVENT_START_FILE
+ * end_file = MPV_EVENT_END_FILE
+ * file_loaded = MPV_EVENT_FILE_LOADED # <<<<<<<<<<<<<<
+ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
+ * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 118, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":119
++ /* "vidcutter/libs/pympv/mpv.pyx":121
+ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
+ * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
+ * idle = MPV_EVENT_IDLE # <<<<<<<<<<<<<<
+ * # pause = MPV_EVENT_PAUSE
+ * # unpause = MPV_EVENT_UNPAUSE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 121, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":122
++ /* "vidcutter/libs/pympv/mpv.pyx":124
+ * # pause = MPV_EVENT_PAUSE
+ * # unpause = MPV_EVENT_UNPAUSE
+ * tick = MPV_EVENT_TICK # <<<<<<<<<<<<<<
+ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ * client_message = MPV_EVENT_CLIENT_MESSAGE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":124
++ /* "vidcutter/libs/pympv/mpv.pyx":126
+ * tick = MPV_EVENT_TICK
+ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ * client_message = MPV_EVENT_CLIENT_MESSAGE # <<<<<<<<<<<<<<
+ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":125
++ /* "vidcutter/libs/pympv/mpv.pyx":127
+ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ * client_message = MPV_EVENT_CLIENT_MESSAGE
+ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG # <<<<<<<<<<<<<<
+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":126
++ /* "vidcutter/libs/pympv/mpv.pyx":128
+ * client_message = MPV_EVENT_CLIENT_MESSAGE
+ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG # <<<<<<<<<<<<<<
+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
+ * seek = MPV_EVENT_SEEK
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":128
++ /* "vidcutter/libs/pympv/mpv.pyx":130
+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
+ * seek = MPV_EVENT_SEEK # <<<<<<<<<<<<<<
+ * playback_restart = MPV_EVENT_PLAYBACK_RESTART
+ * property_change = MPV_EVENT_PROPERTY_CHANGE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":129
++ /* "vidcutter/libs/pympv/mpv.pyx":131
+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
+ * seek = MPV_EVENT_SEEK
+ * playback_restart = MPV_EVENT_PLAYBACK_RESTART # <<<<<<<<<<<<<<
+ * property_change = MPV_EVENT_PROPERTY_CHANGE
+ * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":130
++ /* "vidcutter/libs/pympv/mpv.pyx":132
+ * seek = MPV_EVENT_SEEK
+ * playback_restart = MPV_EVENT_PLAYBACK_RESTART
+ * property_change = MPV_EVENT_PROPERTY_CHANGE # <<<<<<<<<<<<<<
+ * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":101
++ /* "vidcutter/libs/pympv/mpv.pyx":103
+ *
+ *
+ * class Events: # <<<<<<<<<<<<<<
+ * """Set of known values for Event ids.
+ *
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 103, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":134
++ /* "vidcutter/libs/pympv/mpv.pyx":136
+ *
+ *
+ * class LogLevels: # <<<<<<<<<<<<<<
+ * no = MPV_LOG_LEVEL_NONE
+ * fatal = MPV_LOG_LEVEL_FATAL
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":135
++ /* "vidcutter/libs/pympv/mpv.pyx":137
+ *
+ * class LogLevels:
+ * no = MPV_LOG_LEVEL_NONE # <<<<<<<<<<<<<<
+ * fatal = MPV_LOG_LEVEL_FATAL
+ * error = MPV_LOG_LEVEL_ERROR
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":136
++ /* "vidcutter/libs/pympv/mpv.pyx":138
+ * class LogLevels:
+ * no = MPV_LOG_LEVEL_NONE
+ * fatal = MPV_LOG_LEVEL_FATAL # <<<<<<<<<<<<<<
+ * error = MPV_LOG_LEVEL_ERROR
+ * warn = MPV_LOG_LEVEL_WARN
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":137
++ /* "vidcutter/libs/pympv/mpv.pyx":139
+ * no = MPV_LOG_LEVEL_NONE
+ * fatal = MPV_LOG_LEVEL_FATAL
+ * error = MPV_LOG_LEVEL_ERROR # <<<<<<<<<<<<<<
+ * warn = MPV_LOG_LEVEL_WARN
+ * info = MPV_LOG_LEVEL_INFO
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":138
++ /* "vidcutter/libs/pympv/mpv.pyx":140
+ * fatal = MPV_LOG_LEVEL_FATAL
+ * error = MPV_LOG_LEVEL_ERROR
+ * warn = MPV_LOG_LEVEL_WARN # <<<<<<<<<<<<<<
+ * info = MPV_LOG_LEVEL_INFO
+ * v = MPV_LOG_LEVEL_V
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":139
++ /* "vidcutter/libs/pympv/mpv.pyx":141
+ * error = MPV_LOG_LEVEL_ERROR
+ * warn = MPV_LOG_LEVEL_WARN
+ * info = MPV_LOG_LEVEL_INFO # <<<<<<<<<<<<<<
+ * v = MPV_LOG_LEVEL_V
+ * debug = MPV_LOG_LEVEL_DEBUG
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":140
++ /* "vidcutter/libs/pympv/mpv.pyx":142
+ * warn = MPV_LOG_LEVEL_WARN
+ * info = MPV_LOG_LEVEL_INFO
+ * v = MPV_LOG_LEVEL_V # <<<<<<<<<<<<<<
+ * debug = MPV_LOG_LEVEL_DEBUG
+ * trace = MPV_LOG_LEVEL_TRACE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":141
++ /* "vidcutter/libs/pympv/mpv.pyx":143
+ * info = MPV_LOG_LEVEL_INFO
+ * v = MPV_LOG_LEVEL_V
+ * debug = MPV_LOG_LEVEL_DEBUG # <<<<<<<<<<<<<<
+ * trace = MPV_LOG_LEVEL_TRACE
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":142
++ /* "vidcutter/libs/pympv/mpv.pyx":144
+ * v = MPV_LOG_LEVEL_V
+ * debug = MPV_LOG_LEVEL_DEBUG
+ * trace = MPV_LOG_LEVEL_TRACE # <<<<<<<<<<<<<<
+ *
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":134
++ /* "vidcutter/libs/pympv/mpv.pyx":136
+ *
+ *
+ * class LogLevels: # <<<<<<<<<<<<<<
+ * no = MPV_LOG_LEVEL_NONE
+ * fatal = MPV_LOG_LEVEL_FATAL
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":145
++ /* "vidcutter/libs/pympv/mpv.pyx":147
+ *
+ *
+ * class EOFReasons: # <<<<<<<<<<<<<<
+ * """Known possible values for EndOfFileReached reason.
+ *
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 147, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":150
++ /* "vidcutter/libs/pympv/mpv.pyx":152
+ * You should handle the possibility that the reason may not be any of these values.
+ * """
+ * eof = MPV_END_FILE_REASON_EOF # <<<<<<<<<<<<<<
+ * aborted = MPV_END_FILE_REASON_STOP
+ * quit = MPV_END_FILE_REASON_QUIT
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":151
++ /* "vidcutter/libs/pympv/mpv.pyx":153
+ * """
+ * eof = MPV_END_FILE_REASON_EOF
+ * aborted = MPV_END_FILE_REASON_STOP # <<<<<<<<<<<<<<
+ * quit = MPV_END_FILE_REASON_QUIT
+ * error = MPV_END_FILE_REASON_ERROR
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":152
++ /* "vidcutter/libs/pympv/mpv.pyx":154
+ * eof = MPV_END_FILE_REASON_EOF
+ * aborted = MPV_END_FILE_REASON_STOP
+ * quit = MPV_END_FILE_REASON_QUIT # <<<<<<<<<<<<<<
+ * error = MPV_END_FILE_REASON_ERROR
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":153
++ /* "vidcutter/libs/pympv/mpv.pyx":155
+ * aborted = MPV_END_FILE_REASON_STOP
+ * quit = MPV_END_FILE_REASON_QUIT
+ * error = MPV_END_FILE_REASON_ERROR # <<<<<<<<<<<<<<
+ *
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":145
++ /* "vidcutter/libs/pympv/mpv.pyx":147
+ *
+ *
+ * class EOFReasons: # <<<<<<<<<<<<<<
+ * """Known possible values for EndOfFileReached reason.
+ *
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":318
++ /* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+ * def wrapped(*k, **kw):
+ * v = fn(*k, **kw)
+ */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":326
++ /* "vidcutter/libs/pympv/mpv.pyx":328
+ *
+ *
+ * class MPVError(Exception): # <<<<<<<<<<<<<<
+ * code = None
+ *
+ */
+- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":327
++ /* "vidcutter/libs/pympv/mpv.pyx":329
+ *
+ * class MPVError(Exception):
+ * code = None # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, e):
+ */
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":329
++ /* "vidcutter/libs/pympv/mpv.pyx":331
+ * code = None
+ *
+ * def __init__(self, e): # <<<<<<<<<<<<<<
+ * self.code = e
+ * cdef const char* err_c
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":326
++ /* "vidcutter/libs/pympv/mpv.pyx":328
+ *
+ *
+ * class MPVError(Exception): # <<<<<<<<<<<<<<
+ * code = None
+ *
+ */
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":340
++ /* "vidcutter/libs/pympv/mpv.pyx":342
+ * Exception.__init__(self, e)
+ *
+ * class PyMPVError(Exception): # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 340, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":343
++ /* "vidcutter/libs/pympv/mpv.pyx":345
+ * pass
+ *
+ * cdef _callbacks = dict() # <<<<<<<<<<<<<<
+ * cdef _reply_userdatas = dict()
+ *
+ */
+- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 345, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__callbacks);
+ __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":344
++ /* "vidcutter/libs/pympv/mpv.pyx":346
+ *
+ * cdef _callbacks = dict()
+ * cdef _reply_userdatas = dict() # <<<<<<<<<<<<<<
+ *
+ * class _ReplyUserData(object):
+ */
+- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas);
+ __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":346
++ /* "vidcutter/libs/pympv/mpv.pyx":348
+ * cdef _reply_userdatas = dict()
+ *
+ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+ * def __init__(self, data):
+ * self.counter = 0
+ */
+- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__27); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__27); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__27, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__27, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":347
++ /* "vidcutter/libs/pympv/mpv.pyx":349
+ *
+ * class _ReplyUserData(object):
+ * def __init__(self, data): # <<<<<<<<<<<<<<
+ * self.counter = 0
+ * self.data = data
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":352
++ /* "vidcutter/libs/pympv/mpv.pyx":354
+ * self.observed = False
+ *
+ * def add(self): # <<<<<<<<<<<<<<
+ * self.counter += 1
+ *
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":355
++ /* "vidcutter/libs/pympv/mpv.pyx":357
+ * self.counter += 1
+ *
+ * def remove(self): # <<<<<<<<<<<<<<
+ * self.counter -= 1
+ *
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":346
++ /* "vidcutter/libs/pympv/mpv.pyx":348
+ * cdef _reply_userdatas = dict()
+ *
+ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+ * def __init__(self, data):
+ * self.counter = 0
+ */
+- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__27, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__27, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":411
++ /* "vidcutter/libs/pympv/mpv.pyx":413
+ * # mpv_resume(self._ctx)
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def request_event(self, event, enable):
+ * """Enable or disable a given event.
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":412
++ /* "vidcutter/libs/pympv/mpv.pyx":414
+ *
+ * @_errors
+ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+ * """Enable or disable a given event.
+ *
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26465,31 +26465,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 413, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":429
++ /* "vidcutter/libs/pympv/mpv.pyx":431
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def set_log_level(self, loglevel):
+ * """Wraps: mpv_request_log_messages"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":430
++ /* "vidcutter/libs/pympv/mpv.pyx":432
+ *
+ * @_errors
+ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_request_log_messages"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26504,31 +26504,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 432, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":440
++ /* "vidcutter/libs/pympv/mpv.pyx":442
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def load_config(self, filename):
+ * """Wraps: mpv_load_config_file"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":441
++ /* "vidcutter/libs/pympv/mpv.pyx":443
+ *
+ * @_errors
+ * def load_config(self, filename): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_load_config_file"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26543,31 +26543,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":573
++ /* "vidcutter/libs/pympv/mpv.pyx":575
+ * return result
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def get_property_async(self, prop, data=None):
+ * """Gets the value of a property asynchronously.
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":574
++ /* "vidcutter/libs/pympv/mpv.pyx":576
+ *
+ * @_errors
+ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+ * """Gets the value of a property asynchronously.
+ *
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26582,31 +26582,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 576, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":635
++ /* "vidcutter/libs/pympv/mpv.pyx":637
+ * return v
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def set_property(self, prop, value=True, asynchronous=False, data=None):
+ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 637, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":636
++ /* "vidcutter/libs/pympv/mpv.pyx":638
+ *
+ * @_errors
+ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26621,31 +26621,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 637, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":673
++ /* "vidcutter/libs/pympv/mpv.pyx":675
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def set_option(self, prop, value=True):
+ * """Wraps: mpv_set_option"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 675, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":674
++ /* "vidcutter/libs/pympv/mpv.pyx":676
+ *
+ * @_errors
+ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_set_option"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 674, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26660,31 +26660,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":695
++ /* "vidcutter/libs/pympv/mpv.pyx":697
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def initialize(self):
+ * """Wraps: mpv_initialize"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 697, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":696
++ /* "vidcutter/libs/pympv/mpv.pyx":698
+ *
+ * @_errors
+ * def initialize(self): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_initialize"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26699,31 +26699,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 697, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 698, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":748
++ /* "vidcutter/libs/pympv/mpv.pyx":750
+ * self.callbackthread.start()
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def observe_property(self, prop, data=None):
+ * """Wraps: mpv_observe_property"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":749
++ /* "vidcutter/libs/pympv/mpv.pyx":751
+ *
+ * @_errors
+ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_observe_property"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26738,31 +26738,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 751, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":770
++ /* "vidcutter/libs/pympv/mpv.pyx":772
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def unobserve_property(self, data):
+ * """Wraps: mpv_unobserve_property"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":771
++ /* "vidcutter/libs/pympv/mpv.pyx":773
+ *
+ * @_errors
+ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 773, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26777,54 +26777,54 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 773, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":938
++ /* "vidcutter/libs/pympv/mpv.pyx":940
+ *
+ * cdef class RenderContext(object):
+ * API_OPENGL = "opengl" # <<<<<<<<<<<<<<
+ * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME
+ *
+ */
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 940, __pyx_L1_error)
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":939
++ /* "vidcutter/libs/pympv/mpv.pyx":941
+ * cdef class RenderContext(object):
+ * API_OPENGL = "opengl"
+ * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME # <<<<<<<<<<<<<<
+ *
+ * cdef:
+ */
+- __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 939, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 941, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 941, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1009
++ /* "vidcutter/libs/pympv/mpv.pyx":1011
+ * self.inited = True
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def set_icc_profile(self, icc_blob):
+ * cdef:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1009, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1011, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1010
++ /* "vidcutter/libs/pympv/mpv.pyx":1012
+ *
+ * @_errors
+ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+ * cdef:
+ * mpv_render_param param
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1012, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26839,31 +26839,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1009, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1011, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1012, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1028
++ /* "vidcutter/libs/pympv/mpv.pyx":1030
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def set_ambient_light(self, lux):
+ * cdef:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1030, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1029
++ /* "vidcutter/libs/pympv/mpv.pyx":1031
+ *
+ * @_errors
+ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+ * cdef:
+ * mpv_render_param param
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26878,31 +26878,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1030, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1031, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1068
++ /* "vidcutter/libs/pympv/mpv.pyx":1070
+ * return ret
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def render(self,
+ * opengl_fbo=None,
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1070, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
++ /* "vidcutter/libs/pympv/mpv.pyx":1071
+ *
+ * @_errors
+ * def render(self, # <<<<<<<<<<<<<<
+ * opengl_fbo=None,
+ * flip_y=False,
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26917,114 +26917,114 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1070, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1071, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1132
++ /* "vidcutter/libs/pympv/mpv.pyx":1134
+ * init_params, *args, **kwargs)
+ *
+ * class CallbackThread(Thread): # <<<<<<<<<<<<<<
+ * def __init__(self):
+ * Thread.__init__(self)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
+ __pyx_t_7 = 0;
+- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
++ /* "vidcutter/libs/pympv/mpv.pyx":1135
+ *
+ * class CallbackThread(Thread):
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * Thread.__init__(self)
+ * self.daemon = True
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1133, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
++ /* "vidcutter/libs/pympv/mpv.pyx":1143
+ * self.isshutdown = False
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+ * self.isshutdown = True
+ * self.callback = None
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
++ /* "vidcutter/libs/pympv/mpv.pyx":1148
+ * self.lock.release()
+ *
+ * def call(self): # <<<<<<<<<<<<<<
+ * self.lock.release()
+ *
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1146, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1148, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
++ /* "vidcutter/libs/pympv/mpv.pyx":1151
+ * self.lock.release()
+ *
+ * def set(self, callback): # <<<<<<<<<<<<<<
+ * self.callback = callback
+ *
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1151, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
++ /* "vidcutter/libs/pympv/mpv.pyx":1154
+ * self.callback = callback
+ *
+ * def run(self): # <<<<<<<<<<<<<<
+ * while not self.isshutdown:
+ * self.lock.acquire(True)
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
++ /* "vidcutter/libs/pympv/mpv.pyx":1159
+ * self.mpv_callback(self.callback) if self.callback else None
+ *
+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+ * try:
+ * callback()
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1157, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1132
++ /* "vidcutter/libs/pympv/mpv.pyx":1134
+ * init_params, *args, **kwargs)
+ *
+ * class CallbackThread(Thread): # <<<<<<<<<<<<<<
+ * def __init__(self):
+ * Thread.__init__(self)
+ */
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1132, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+diff --git a/vidcutter/libs/pympv/mpv.pyx b/vidcutter/libs/pympv/mpv.pyx
+index 8af2dcc7..1decdda8 100644
+--- a/vidcutter/libs/pympv/mpv.pyx
++++ b/vidcutter/libs/pympv/mpv.pyx
+@@ -30,8 +30,10 @@ from client cimport *
+ __version__ = "0.3.0"
+ __author__ = "Andre D"
+
+-_REQUIRED_CAPI_MAJOR = 2
+-_MIN_CAPI_MINOR = 0
++#_REQUIRED_CAPI_MAJOR = 2
++#_MIN_CAPI_MINOR = 0
++_REQUIRED_CAPI_MAJOR = 1
++_MIN_CAPI_MINOR = 109
+
+ cdef unsigned long _CAPI_VERSION
+ with nogil:
diff --git a/srcpkgs/vidcutter/template b/srcpkgs/vidcutter/template
index 07bda50c917c..93e6dbefaacc 100644
--- a/srcpkgs/vidcutter/template
+++ b/srcpkgs/vidcutter/template
@@ -1,7 +1,7 @@
# Template file for 'vidcutter'
pkgname=vidcutter
-version=6.0.0
-revision=6
+version=6.0.5.1
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython"
makedepends="mpv-devel python3-devel"
@@ -12,7 +12,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/ozmartian/vidcutter"
distfiles="https://github.com/ozmartian/vidcutter/archive/refs/tags/${version}.tar.gz"
-checksum=c09be7eceaf42ff7211fe3b8125279c4fec7f7d251d272b61d579e426bd4e2c2
+checksum=c6374eaedb845f9e580e555dd12c1db1cf2ffa28d3756b08e2ae28c1a4cd4a96
pre_build() {
rm -f vidcutter/libs/pympv/mpv.c
From 96306bf8f59a1dcd6fa068f4aed371d9925dd850 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Mon, 14 Nov 2022 08:08:31 -0600
Subject: [PATCH 8/8] stremio-shell: rebuild for mpv-0.35.0
---
srcpkgs/stremio-shell/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/stremio-shell/template b/srcpkgs/stremio-shell/template
index 641000d6fe64..2b0c0b23af69 100644
--- a/srcpkgs/stremio-shell/template
+++ b/srcpkgs/stremio-shell/template
@@ -1,7 +1,7 @@
# Template file for 'stremio-shell'
pkgname=stremio-shell
version=4.4.159
-revision=2
+revision=3
_singleapplication_hash=f1e15081dc57a9c03f7f4f165677f18802e1437a
_libmpv_hash=822a41a1087daf2911fc336fbd9509f962158fef
create_wrksrc=yes
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (14 preceding siblings ...)
2022-11-14 14:18 ` [PR PATCH] [Updated] mpv-0.35.0 abenson
@ 2022-11-14 14:54 ` sgn
2022-11-14 15:12 ` [PR PATCH] [Updated] mpv-0.35.0 sgn
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: sgn @ 2022-11-14 14:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1313879918
Comment:
Please remove `mpv.c` from the patches, that will keep the patch shorter.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (15 preceding siblings ...)
2022-11-14 14:54 ` mpv-0.35.0 sgn
@ 2022-11-14 15:12 ` sgn
2022-11-17 17:21 ` abenson
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: sgn @ 2022-11-14 15:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/abenson/void-packages mpv_0.35.0
https://github.com/void-linux/void-packages/pull/40497
mpv-0.35.0
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### Local build testing
- I built this PR locally for my native architecture, x86-64
[ci skip]
A patch file from https://github.com/void-linux/void-packages/pull/40497.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mpv_0.35.0-40497.patch --]
[-- Type: text/x-diff, Size: 6209767 bytes --]
From 85983ca8e1a04658160769239599d4081315040b Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:06:05 -0600
Subject: [PATCH 1/9] mpv: update to 0.35.0.
---
common/shlibs | 2 +-
srcpkgs/mpv/template | 57 ++++++++++++++++++++++++--------------------
2 files changed, 32 insertions(+), 27 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 481250d5c924..aa1bbafb1bba 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2214,7 +2214,7 @@ librrd.so.8 rrdtool-1.6.0_1
librrd_th.so.4 rrdtool-1.4.9_1
libmosquitto.so.1 libmosquitto-1.6.3_5
libmosquittopp.so.1 libmosquittopp-1.6.3_5
-libmpv.so.1 mpv-0.8.0_2
+libmpv.so.2 mpv-0.35.0_1
libmbedtls.so.12 mbedtls-2.13.1_1
libmbedcrypto.so.3 mbedtls-2.9.0_1
libmbedx509.so.0 mbedtls-2.9.0_1
diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template
index ded8c1bbe98f..0e3c3ed8f81c 100644
--- a/srcpkgs/mpv/template
+++ b/srcpkgs/mpv/template
@@ -1,15 +1,26 @@
# Template file for 'mpv'
pkgname=mpv
-version=0.34.1
-revision=2
-build_style=waf3
-configure_args="--confdir=/etc/mpv --docdir=/usr/share/examples/mpv
- --enable-cdda --enable-dvbin --enable-dvdnav --enable-libarchive
- --enable-libmpv-shared --enable-cplugins $(vopt_enable alsa) $(vopt_enable caca)
- $(vopt_enable jack) $(vopt_enable lcms lcms2) $(vopt_enable lua)
- $(vopt_enable openal) $(vopt_enable pulseaudio pulse) $(vopt_enable sdl2)
- $(vopt_enable vapoursynth) $(vopt_enable vdpau) $(vopt_enable vulkan)
- $(vopt_enable vulkan shaderc) $(vopt_enable wayland) $(vopt_enable x11)"
+version=0.35.0
+revision=1
+build_style=meson
+configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled
+ -Dlibmpv=true -Dcplugins=enabled
+ -Dalsa=$(vopt_if alsa enabled disabled)
+ -Dcaca=$(vopt_if caca enabled disabled)
+ -Djack=$(vopt_if jack enabled disabled)
+ -Dlcms2=$(vopt_if lcms enabled disabled)
+ -Dlua=$(vopt_if lua enabled disabled)
+ -Dopenal=$(vopt_if openal enabled disabled)
+ -Dpulse=$(vopt_if pulseaudio enabled disabled)
+ -Dsdl2=$(vopt_if sdl2 enabled disabled)
+ -Dvapoursynth=$(vopt_if vapoursynth enabled disabled)
+ -Dvdpau=$(vopt_if vdpau enabled disabled)
+ -Dvulkan=$(vopt_if vulkan enabled disabled)
+ -Dshaderc=$(vopt_if vulkan enabled disabled)
+ -Dwayland=$(vopt_if wayland enabled disabled)
+ -Dx11=$(vopt_if x11 enabled disabled)
+ -Dpipewire=$(vopt_if pipewire enabled disabled)
+ -Dsndio=$(vopt_if sndio enabled disabled)"
hostmakedepends="pkg-config python3-docutils $(vopt_if wayland wayland-devel)"
makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libass-devel libbluray-devel libcdio-paranoia-devel libdvdnav-devel
@@ -17,11 +28,12 @@ makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libarchive-devel $(vopt_if alsa alsa-lib-devel) $(vopt_if caca libcaca-devel)
$(vopt_if jack jack-devel) $(vopt_if lcms lcms2-devel)
$(vopt_if lua lua52-devel) $(vopt_if openal libopenal-devel)
- $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if sdl2 SDL2-devel)
- $(vopt_if vapoursynth vapoursynth-devel) $(vopt_if vdpau libvdpau-devel)
+ $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if pipewire pipewire-devel)
+ $(vopt_if sdl2 SDL2-devel) $(vopt_if vapoursynth vapoursynth-devel)
+ $(vopt_if vdpau libvdpau-devel) $(vopt_if sndio sndio-devel)
$(vopt_if vulkan "Vulkan-Headers vulkan-loader shaderc libplacebo-devel")
$(vopt_if wayland "wayland-devel wayland-protocols libxkbcommon-devel")
- $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel")"
+ $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel libXpresent-devel")"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Video player based on MPlayer/mplayer2"
maintainer="travankor <travankor@tuta.io>"
@@ -29,30 +41,23 @@ license="GPL-2.0-or-later"
homepage="https://mpv.io"
changelog="https://github.com/mpv-player/mpv/releases"
distfiles="https://github.com/mpv-player/${pkgname}/archive/v${version}.tar.gz"
-checksum=32ded8c13b6398310fa27767378193dc1db6d78b006b70dbcbd3123a1445e746
+checksum=dc411c899a64548250c142bf1fa1aa7528f1b4398a24c86b816093999049ec00
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
-build_options="alsa caca jack lcms lua openal pulseaudio sdl2 vapoursynth vdpau
- vulkan wayland x11"
-build_options_default="alsa jack lcms lua pulseaudio vdpau vulkan wayland x11"
+build_options="alsa caca jack lcms lua openal pulseaudio pipewire sdl2
+ sndio vapoursynth vdpau vulkan wayland x11"
+build_options_default="alsa jack lcms lua pulseaudio pipewire vdpau vulkan
+ sndio wayland x11"
desc_option_caca="Enable support for libcaca video output"
desc_option_lcms="Enable support for LittleCMS 2 engine"
desc_option_openal="Enable support for OpenAL audio output"
vopt_conflict sdl2 wayland
-if [ -z "$CROSS_BUILD" ]; then
- configure_args+=" --zshdir=/usr/share/zsh/site-functions"
-fi
-
-pre_configure() {
- python3 bootstrap.py
-}
-
mpv-devel_package() {
- depends="${sourcepkg}>=${version}_${revision}"
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
From 204fe84127ae3f05fc4d8b14a1521f41d5207153 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 2/9] celluloid: rebuild for mpv-0.35.0
---
srcpkgs/celluloid/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/celluloid/template b/srcpkgs/celluloid/template
index 739911562045..904fe4f631c0 100644
--- a/srcpkgs/celluloid/template
+++ b/srcpkgs/celluloid/template
@@ -1,7 +1,7 @@
# Template file for 'celluloid'
pkgname=celluloid
version=0.23
-revision=1
+revision=2
build_style=meson
hostmakedepends="gettext glib-devel pkg-config"
makedepends="gtk4-devel libepoxy-devel libglib-devel mpv-devel"
From ef732e6b0565624422c33aef59547fb743d41b35 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 3/9] minitube: rebuild for mpv-0.35.0
---
srcpkgs/minitube/patches/mpv-0.35.patch | 14 ++++++++++++++
srcpkgs/minitube/template | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/minitube/patches/mpv-0.35.patch
diff --git a/srcpkgs/minitube/patches/mpv-0.35.patch b/srcpkgs/minitube/patches/mpv-0.35.patch
new file mode 100644
index 000000000000..db13f9058f7f
--- /dev/null
+++ b/srcpkgs/minitube/patches/mpv-0.35.patch
@@ -0,0 +1,14 @@
+https://github.com/mpv-player/mpv/commit/632059816adde518c67f6606e3cfdef5bec18b52
+Index: minitube-3.9.3/lib/media/src/mpv/mpvwidget.cpp
+===================================================================
+--- minitube-3.9.3.orig/lib/media/src/mpv/mpvwidget.cpp
++++ minitube-3.9.3/lib/media/src/mpv/mpvwidget.cpp
+@@ -30,7 +30,7 @@ void MpvWidget::initializeGL() {
+ qDebug() << "initializeGL" << nativeParent;
+ if (nativeParent == nullptr) qFatal("No native parent");
+
+- mpv_opengl_init_params gl_init_params{get_proc_address, this, nullptr};
++ mpv_opengl_init_params gl_init_params{get_proc_address, this};
+ mpv_render_param params[]{{MPV_RENDER_PARAM_API_TYPE, (void *)MPV_RENDER_API_TYPE_OPENGL},
+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
+ {MPV_RENDER_PARAM_INVALID, nullptr},
diff --git a/srcpkgs/minitube/template b/srcpkgs/minitube/template
index 915458a43a6a..b4b50c0f9694 100644
--- a/srcpkgs/minitube/template
+++ b/srcpkgs/minitube/template
@@ -1,7 +1,7 @@
# Template file for 'minitube'
pkgname=minitube
version=3.9.3
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-tools qt5-host-tools qt5-qmake git"
makedepends="qt5-devel phonon-qt5-devel qt5-script-devel qt5-declarative-devel
From 951818f3887589475241f394cef99a82a16ddeeb Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 4/9] mpc-qt: update to 22.02.
---
srcpkgs/mpc-qt/template | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/srcpkgs/mpc-qt/template b/srcpkgs/mpc-qt/template
index 3e60cb06c896..7a7ae6f6cf96 100644
--- a/srcpkgs/mpc-qt/template
+++ b/srcpkgs/mpc-qt/template
@@ -1,6 +1,6 @@
# Template file for 'mpc-qt'
pkgname=mpc-qt
-version=18.08
+version=22.02
revision=1
build_style=qmake
configure_args="MPCQT_VERSION=${version}"
@@ -9,16 +9,6 @@ makedepends="qt5-devel qt5-x11extras-devel mpv-devel"
short_desc="Clone of Media Player Classic reimplemented in Qt"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="GPL-2.0-or-later"
-homepage="https://github.com/cmdrkotori/mpc-qt"
-#distfiles="${homepage}/archive/v${version}.tar.gz"
-# https://github.com/mpv-player/mpv/commit/575197ff8b0a0d8cd14f7ee78461c1d61d045d72
-distfiles="https://sources.voidlinux.org/mpc-qt-18.08/v18.08.tar.gz
- https://raw.githubusercontent.com/mpv-player/mpv/2337fa4e0213993398d36cb3222633766d677dfd/libmpv/qthelper.hpp"
-checksum="c58fd90926773c9da8bdfc1a8e4dba0b95cbc58cee6db9981e8de94fd9534406
- 86e1fcba6001829b7e23a856db84d01ebc76e63528f74064d7bc5705015a2684"
-skip_extraction="qthelper.hpp"
-
-post_extract() {
- mkdir -p mpv
- cp $XBPS_SRCDISTDIR/mpc-qt-$version/qthelper.hpp mpv/
-}
+homepage="https://mpc-qt.github.io/"
+distfiles="https://github.com/mpc-qt/mpc-qt/archive/refs/tags/v${version}.tar.gz"
+checksum=fa6cffd6bde1304b6c0ec3aba8e98d03f4d73999fee4e4546026ec159530350d
From 6f9085568c75b003f86e164fee0129ac8cb54931 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 5/9] [TODO] orion: rebuild for mpv-0.35.0
---
srcpkgs/orion/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/orion/template b/srcpkgs/orion/template
index d69f2ff04dd4..b1f2215b1d43 100644
--- a/srcpkgs/orion/template
+++ b/srcpkgs/orion/template
@@ -1,7 +1,7 @@
# Template file for 'orion'
pkgname=orion
version=1.6.7
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-declarative-devel qt5-quickcontrols2-devel mpv-devel"
From 946ac44c785ce0a7796bd802ebc76d991282c30c Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 6/9] qimgv: rebuild for mpv-0.35.0
---
srcpkgs/qimgv/patches/fix-mpv-opengl.patch | 11 +++++++++++
srcpkgs/qimgv/template | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/qimgv/patches/fix-mpv-opengl.patch
diff --git a/srcpkgs/qimgv/patches/fix-mpv-opengl.patch b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
new file mode 100644
index 000000000000..9fd3dffe9f96
--- /dev/null
+++ b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
@@ -0,0 +1,11 @@
+--- a/plugins/player_mpv/src/mpvwidget.cpp
++++ b/plugins/player_mpv/src/mpvwidget.cpp
+@@ -69,7 +69,7 @@
+ }
+
+ void MpvWidget::initializeGL() {
+- mpv_opengl_init_params gl_init_params{get_proc_address, nullptr, nullptr};
++ mpv_opengl_init_params gl_init_params{get_proc_address, nullptr};
+ mpv_render_param params[]{
+ {MPV_RENDER_PARAM_API_TYPE, const_cast<char *>(MPV_RENDER_API_TYPE_OPENGL)},
+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
diff --git a/srcpkgs/qimgv/template b/srcpkgs/qimgv/template
index bb91ee98eab7..7eb30db33992 100644
--- a/srcpkgs/qimgv/template
+++ b/srcpkgs/qimgv/template
@@ -1,7 +1,7 @@
# Template file for 'qimgv'
pkgname=qimgv
version=1.0.2
-revision=1
+revision=2
build_style=cmake
configure_args="$(vopt_if video -DVIDEO_SUPPORT=ON -DVIDEO_SUPPORT=OFF)
$(vopt_if scale -DOPENCV_SUPPORT=ON -DOPENCV_SUPPORT=OFF)
From 9f55dff699a802589ae61e393559b4045b80c1e9 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 7/9] vidcutter: update to 6.0.5.1.
---
srcpkgs/vidcutter/patches/mpv-0.35-1.patch | 52658 +++++++++++++++++++
srcpkgs/vidcutter/patches/mpv-0.35-2.patch | 24 +
srcpkgs/vidcutter/patches/mpv-0.35-3.patch | 13289 +++++
srcpkgs/vidcutter/template | 6 +-
4 files changed, 65974 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/vidcutter/patches/mpv-0.35-1.patch
create mode 100644 srcpkgs/vidcutter/patches/mpv-0.35-2.patch
create mode 100644 srcpkgs/vidcutter/patches/mpv-0.35-3.patch
diff --git a/srcpkgs/vidcutter/patches/mpv-0.35-1.patch b/srcpkgs/vidcutter/patches/mpv-0.35-1.patch
new file mode 100644
index 000000000000..c33bad4a82bb
--- /dev/null
+++ b/srcpkgs/vidcutter/patches/mpv-0.35-1.patch
@@ -0,0 +1,52658 @@
+https://github.com/ozmartian/vidcutter/commit/1d88825feb5a73a50d019914ba9d0008562a58ce.patch
+
+From 1d88825feb5a73a50d019914ba9d0008562a58ce Mon Sep 17 00:00:00 2001
+From: Pete Alexandrou <pete@ozmartians.com>
+Date: Tue, 22 Feb 2022 11:29:00 +1100
+Subject: [PATCH] Patches to pympv to workaround opengl_cb deprecation from
+ libmpv
+
+---
+ vidcutter/libs/pympv/client.pxd | 54 +-
+ vidcutter/libs/pympv/mpv.c | 46394 ++++++++++++++----------------
+ vidcutter/libs/pympv/mpv.pyx | 192 +-
+ 3 files changed, 21832 insertions(+), 24808 deletions(-)
+
+diff --git a/vidcutter/libs/pympv/client.pxd b/vidcutter/libs/pympv/client.pxd
+index befe219e..d9a8816f 100644
+--- a/vidcutter/libs/pympv/client.pxd
++++ b/vidcutter/libs/pympv/client.pxd
+@@ -112,9 +112,9 @@ cdef extern from "mpv/client.h":
+
+ int mpv_load_config_file(mpv_handle *ctx, const char *filename) nogil
+
+- void mpv_suspend(mpv_handle *ctx) nogil
++ # void mpv_suspend(mpv_handle *ctx) nogil
+
+- void mpv_resume(mpv_handle *ctx) nogil
++ # void mpv_resume(mpv_handle *ctx) nogil
+
+ int64_t mpv_get_time_us(mpv_handle *ctx) nogil
+
+@@ -200,21 +200,21 @@ cdef extern from "mpv/client.h":
+ MPV_EVENT_START_FILE
+ MPV_EVENT_END_FILE
+ MPV_EVENT_FILE_LOADED
+- MPV_EVENT_TRACKS_CHANGED
+- MPV_EVENT_TRACK_SWITCHED
++ # MPV_EVENT_TRACKS_CHANGED
++ # MPV_EVENT_TRACK_SWITCHED
+ MPV_EVENT_IDLE
+- MPV_EVENT_PAUSE
+- MPV_EVENT_UNPAUSE
++ # MPV_EVENT_PAUSE
++ # MPV_EVENT_UNPAUSE
+ MPV_EVENT_TICK
+- MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ # MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ MPV_EVENT_CLIENT_MESSAGE
+ MPV_EVENT_VIDEO_RECONFIG
+ MPV_EVENT_AUDIO_RECONFIG
+- MPV_EVENT_METADATA_UPDATE
++ # MPV_EVENT_METADATA_UPDATE
+ MPV_EVENT_SEEK
+ MPV_EVENT_PLAYBACK_RESTART
+ MPV_EVENT_PROPERTY_CHANGE
+- MPV_EVENT_CHAPTER_CHANGE
++ # MPV_EVENT_CHAPTER_CHANGE
+
+ const char *mpv_event_name(mpv_event_id event) nogil
+
+@@ -249,9 +249,9 @@ cdef extern from "mpv/client.h":
+ int reason
+ int error
+
+- cdef struct mpv_event_script_input_dispatch:
+- int arg0
+- const char *type
++ # cdef struct mpv_event_script_input_dispatch:
++ # int arg0
++ # const char *type
+
+ cdef struct mpv_event_client_message:
+ int num_args
+@@ -282,27 +282,27 @@ cdef extern from "mpv/client.h":
+
+ void *mpv_get_sub_api(mpv_handle *ctx, mpv_sub_api sub_api) nogil
+
+-cdef extern from "mpv/opengl_cb.h":
+- struct mpv_opengl_cb_context:
+- pass
++# cdef extern from "mpv/opengl_cb.h":
++# struct mpv_opengl_cb_context:
++# pass
+
+- ctypedef void (*mpv_opengl_cb_update_fn)(void *cb_ctx) nogil
+- ctypedef void *(*mpv_opengl_cb_get_proc_address_fn)(void *fn_ctx,
+- const char *name) nogil
++# ctypedef void (*mpv_opengl_cb_update_fn)(void *cb_ctx) nogil
++# ctypedef void *(*mpv_opengl_cb_get_proc_address_fn)(void *fn_ctx,
++# const char *name) nogil
+
+- void mpv_opengl_cb_set_update_callback(mpv_opengl_cb_context *ctx,
+- mpv_opengl_cb_update_fn callback,
+- void *callback_ctx) nogil
++# void mpv_opengl_cb_set_update_callback(mpv_opengl_cb_context *ctx,
++# mpv_opengl_cb_update_fn callback,
++# void *callback_ctx) nogil
+
+- int mpv_opengl_cb_init_gl(mpv_opengl_cb_context *ctx, const char *exts,
+- mpv_opengl_cb_get_proc_address_fn get_proc_address,
+- void *get_proc_address_ctx) nogil
++# int mpv_opengl_cb_init_gl(mpv_opengl_cb_context *ctx, const char *exts,
++# mpv_opengl_cb_get_proc_address_fn get_proc_address,
++# void *get_proc_address_ctx) nogil
+
+- int mpv_opengl_cb_draw(mpv_opengl_cb_context *ctx, int fbo, int w, int h) nogil
++# int mpv_opengl_cb_draw(mpv_opengl_cb_context *ctx, int fbo, int w, int h) nogil
+
+- int mpv_opengl_cb_report_flip(mpv_opengl_cb_context *ctx, int64_t time) nogil
++# int mpv_opengl_cb_report_flip(mpv_opengl_cb_context *ctx, int64_t time) nogil
+
+- int mpv_opengl_cb_uninit_gl(mpv_opengl_cb_context *ctx) nogil
++# int mpv_opengl_cb_uninit_gl(mpv_opengl_cb_context *ctx) nogil
+
+
+ cdef extern from "mpv/render.h":
+diff --git a/vidcutter/libs/pympv/mpv.c b/vidcutter/libs/pympv/mpv.c
+index 202aae8c..a3522ef5 100644
+--- a/vidcutter/libs/pympv/mpv.c
++++ b/vidcutter/libs/pympv/mpv.c
+@@ -1,4 +1,4 @@
+-/* Generated by Cython 0.29.21 */
++/* Generated by Cython 0.29.28 */
+
+ /* BEGIN: Cython Metadata
+ {
+@@ -19,15 +19,17 @@
+ }
+ END: Cython Metadata */
+
++#ifndef PY_SSIZE_T_CLEAN
+ #define PY_SSIZE_T_CLEAN
++#endif /* PY_SSIZE_T_CLEAN */
+ #include "Python.h"
+ #ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
+ #error Cython requires Python 2.6+ or Python 3.3+.
+ #else
+-#define CYTHON_ABI "0_29_21"
+-#define CYTHON_HEX_VERSION 0x001D15F0
++#define CYTHON_ABI "0_29_28"
++#define CYTHON_HEX_VERSION 0x001D1CF0
+ #define CYTHON_FUTURE_DIVISION 0
+ #include <stddef.h>
+ #ifndef offsetof
+@@ -174,7 +176,7 @@ END: Cython Metadata */
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+- #if PY_VERSION_HEX < 0x030300F0
++ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #elif !defined(CYTHON_USE_UNICODE_WRITER)
+@@ -189,11 +191,14 @@ END: Cython Metadata */
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+- #ifndef CYTHON_FAST_THREAD_STATE
++ #if PY_VERSION_HEX >= 0x030B00A4
++ #undef CYTHON_FAST_THREAD_STATE
++ #define CYTHON_FAST_THREAD_STATE 0
++ #elif !defined(CYTHON_FAST_THREAD_STATE)
+ #define CYTHON_FAST_THREAD_STATE 1
+ #endif
+ #ifndef CYTHON_FAST_PYCALL
+- #define CYTHON_FAST_PYCALL 1
++ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1)
+ #endif
+ #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
+@@ -204,7 +209,10 @@ END: Cython Metadata */
+ #ifndef CYTHON_USE_DICT_VERSIONS
+ #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
+ #endif
+- #ifndef CYTHON_USE_EXC_INFO_STACK
++ #if PY_VERSION_HEX >= 0x030B00A4
++ #undef CYTHON_USE_EXC_INFO_STACK
++ #define CYTHON_USE_EXC_INFO_STACK 0
++ #elif !defined(CYTHON_USE_EXC_INFO_STACK)
+ #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
+ #endif
+ #endif
+@@ -212,7 +220,9 @@ END: Cython Metadata */
+ #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+- #include "longintrepr.h"
++ #if PY_MAJOR_VERSION < 3
++ #include "longintrepr.h"
++ #endif
+ #undef SHIFT
+ #undef BASE
+ #undef MASK
+@@ -329,9 +339,68 @@ END: Cython Metadata */
+ #define __Pyx_DefaultClassType PyClass_Type
+ #else
+ #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+-#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
+- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
++ #define __Pyx_DefaultClassType PyType_Type
++#if PY_VERSION_HEX >= 0x030B00A1
++ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
++ PyObject *code, PyObject *c, PyObject* n, PyObject *v,
++ PyObject *fv, PyObject *cell, PyObject* fn,
++ PyObject *name, int fline, PyObject *lnos) {
++ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
++ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
++ const char *fn_cstr=NULL;
++ const char *name_cstr=NULL;
++ PyCodeObject* co=NULL;
++ PyObject *type, *value, *traceback;
++ PyErr_Fetch(&type, &value, &traceback);
++ if (!(kwds=PyDict_New())) goto end;
++ if (!(argcount=PyLong_FromLong(a))) goto end;
++ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
++ if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
++ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
++ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
++ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
++ if (!(nlocals=PyLong_FromLong(l))) goto end;
++ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
++ if (!(stacksize=PyLong_FromLong(s))) goto end;
++ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
++ if (!(flags=PyLong_FromLong(f))) goto end;
++ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
++ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
++ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
++ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
++ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
++ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
++ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
++ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
++ Py_XDECREF((PyObject*)co);
++ co = (PyCodeObject*)call_result;
++ call_result = NULL;
++ if (0) {
++ cleanup_code_too:
++ Py_XDECREF((PyObject*)co);
++ co = NULL;
++ }
++ end:
++ Py_XDECREF(kwds);
++ Py_XDECREF(argcount);
++ Py_XDECREF(posonlyargcount);
++ Py_XDECREF(kwonlyargcount);
++ Py_XDECREF(nlocals);
++ Py_XDECREF(stacksize);
++ Py_XDECREF(replace);
++ Py_XDECREF(call_result);
++ Py_XDECREF(empty);
++ if (type) {
++ PyErr_Restore(type, value, traceback);
++ }
++ return co;
++ }
+ #else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+@@ -445,8 +514,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
+ #endif
+ #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+ #define CYTHON_PEP393_ENABLED 1
++ #if defined(PyUnicode_IS_READY)
+ #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
+ 0 : _PyUnicode_Ready((PyObject *)(op)))
++ #else
++ #define __Pyx_PyUnicode_READY(op) (0)
++ #endif
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
+@@ -455,7 +528,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
+ #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
++ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
++ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
++ #else
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
++ #endif
+ #else
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
+ #endif
+@@ -627,7 +704,6 @@ static CYTHON_INLINE float __PYX_NAN() {
+ #include <string.h>
+ #include <stdlib.h>
+ #include "mpv/client.h"
+-#include "mpv/opengl_cb.h"
+ #include "mpv/render.h"
+ #include "mpv/render_gl.h"
+ #ifdef _OPENMP
+@@ -857,12 +933,10 @@ static const char *__pyx_f[] = {
+
+ /*--- Type declarations ---*/
+ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached;
+-struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_Property;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_Event;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_Context;
+-struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext;
+ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo;
+ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext;
+@@ -897,21 +971,6 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":169
+- *
+- *
+- * cdef class InputDispatch(object): # <<<<<<<<<<<<<<
+- * """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
+- *
+- */
+-struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch {
+- PyObject_HEAD
+- struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch *__pyx_vtab;
+- PyObject *arg0;
+- PyObject *type;
+-};
+-
+-
+ /* "vidcutter/libs/pympv/mpv.pyx":182
+ *
+ *
+@@ -978,21 +1037,6 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Context {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":822
+- * (<object>ctx)()
+- *
+- * cdef class OpenGLContext(object): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_opengl_cb_context *_ctx
+- */
+-struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext {
+- PyObject_HEAD
+- struct mpv_opengl_cb_context *_ctx;
+- int inited;
+- PyObject *update_cb;
+-};
+-
+-
+ /* "vidcutter/libs/pympv/mpv.pyx":881
+ * DEF MAX_RENDER_PARAMS = 32
+ *
+@@ -1080,20 +1124,6 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":169
+- *
+- *
+- * cdef class InputDispatch(object): # <<<<<<<<<<<<<<
+- * """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
+- *
+- */
+-
+-struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch {
+- PyObject *(*_init)(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *, struct mpv_event_script_input_dispatch *);
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch *__pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch;
+-
+-
+ /* "vidcutter/libs/pympv/mpv.pyx":182
+ *
+ *
+@@ -1318,6 +1348,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args,
+ #ifndef Py_MEMBER_SIZE
+ #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
+ #endif
++#if CYTHON_FAST_PYCALL
+ static size_t __pyx_pyframe_localsplus_offset = 0;
+ #include "frameobject.h"
+ #define __Pxy_PyFrame_Initialize_Offsets()\
+@@ -1325,6 +1356,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args,
+ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
+ #define __Pyx_PyFrame_GetLocalsplus(frame)\
+ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
++#endif // CYTHON_FAST_PYCALL
+ #endif
+
+ /* PyCFunctionFastCall.proto */
+@@ -1747,12 +1779,23 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+ static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename);
+
++/* GCCDiagnostics.proto */
++#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
++#define __Pyx_HAS_GCC_DIAGNOSTIC
++#endif
++
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
++/* CIntFromPy.proto */
++static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
++
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_event_id(enum mpv_event_id value);
+
++/* CIntFromPy.proto */
++static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObject *);
++
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value);
+
+@@ -1768,30 +1811,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_end_file_reason(enum m
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_render_update_flag(enum mpv_render_update_flag value);
+
++/* CIntFromPy.proto */
++static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
++
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);
+
+ /* CIntToPy.proto */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);
+
+-/* CIntToPy.proto */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value);
+-
+-/* CIntToPy.proto */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+-
+-/* CIntFromPy.proto */
+-static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+-
+-/* CIntFromPy.proto */
+-static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObject *);
+-
+-/* CIntFromPy.proto */
+-static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+-
+ /* CIntFromPy.proto */
+ static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);
+
++/* CIntToPy.proto */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value);
++
+ /* CIntFromPy.proto */
+ static CYTHON_INLINE enum mpv_format __Pyx_PyInt_As_enum__mpv_format(PyObject *);
+
+@@ -1801,6 +1835,9 @@ static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);
+ /* CIntFromPy.proto */
+ static CYTHON_INLINE intptr_t __Pyx_PyInt_As_intptr_t(PyObject *);
+
++/* CIntToPy.proto */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
++
+ /* CheckBinaryVersion.proto */
+ static int __Pyx_check_binary_version(void);
+
+@@ -1808,7 +1845,6 @@ static int __Pyx_check_binary_version(void);
+ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self, struct mpv_event_end_file *__pyx_v_eof); /* proto*/
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, struct mpv_event_script_input_dispatch *__pyx_v_input); /* proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, struct mpv_event_log_message *__pyx_v_msg); /* proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, struct mpv_event_property *__pyx_v_prop); /* proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event); /* proto*/
+@@ -1834,12 +1870,10 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(st
+
+ /* Module declarations from 'vidcutter.libs.mpv' */
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = 0;
+-static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_Property = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_Event = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_Context = 0;
+-static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_OpenGLContext = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = 0;
+ static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = 0;
+@@ -1855,7 +1889,6 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *); /*proto*/
+ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *, PyObject *); /*proto*/
+ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *); /*proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, PyObject *); /*proto*/
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *, PyObject *); /*proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, PyObject *); /*proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, PyObject *); /*proto*/
+ static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, PyObject *); /*proto*/
+@@ -1873,7 +1906,6 @@ static PyObject *__pyx_builtin_range;
+ static PyObject *__pyx_builtin_id;
+ static PyObject *__pyx_builtin_enumerate;
+ static PyObject *__pyx_builtin_TypeError;
+-static PyObject *__pyx_builtin_DeprecationWarning;
+ static const char __pyx_k_e[] = "e";
+ static const char __pyx_k_h[] = "h";
+ static const char __pyx_k_k[] = "k";
+@@ -1900,7 +1932,6 @@ static const char __pyx_k_call[] = "call";
+ static const char __pyx_k_code[] = "code";
+ static const char __pyx_k_data[] = "data";
+ static const char __pyx_k_dict[] = "__dict__";
+-static const char __pyx_k_exts[] = "exts";
+ static const char __pyx_k_idle[] = "idle";
+ static const char __pyx_k_info[] = "info";
+ static const char __pyx_k_init[] = "__init__";
+@@ -1926,7 +1957,6 @@ static const char __pyx_k_error[] = "error";
+ static const char __pyx_k_event[] = "event";
+ static const char __pyx_k_fatal[] = "fatal";
+ static const char __pyx_k_nomem[] = "nomem";
+-static const char __pyx_k_pause[] = "pause";
+ static const char __pyx_k_range[] = "range";
+ static const char __pyx_k_start[] = "start";
+ static const char __pyx_k_trace[] = "trace";
+@@ -1973,7 +2003,6 @@ static const char __pyx_k_present[] = "present";
+ static const char __pyx_k_release[] = "release";
+ static const char __pyx_k_success[] = "success";
+ static const char __pyx_k_timeout[] = "timeout";
+-static const char __pyx_k_unpause[] = "unpause";
+ static const char __pyx_k_version[] = "__version__";
+ static const char __pyx_k_wrapped[] = "wrapped";
+ static const char __pyx_k_MPVError[] = "MPVError";
+@@ -1998,7 +2027,6 @@ static const char __pyx_k_pyx_state[] = "__pyx_state";
+ static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
+ static const char __pyx_k_render_fd[] = "render_fd";
+ static const char __pyx_k_threading[] = "threading";
+-static const char __pyx_k_uninit_gl[] = "uninit_gl";
+ static const char __pyx_k_API_OPENGL[] = "API_OPENGL";
+ static const char __pyx_k_CAPI_MAJOR[] = "_CAPI_MAJOR";
+ static const char __pyx_k_CAPI_MINOR[] = "_CAPI_MINOR";
+@@ -2038,8 +2066,6 @@ static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
+ static const char __pyx_k_set_property[] = "set_property";
+ static const char __pyx_k_stringsource[] = "stringsource";
+ static const char __pyx_k_version_info[] = "version_info";
+-static const char __pyx_k_InputDispatch[] = "InputDispatch";
+-static const char __pyx_k_OpenGLContext[] = "OpenGLContext";
+ static const char __pyx_k_RenderContext[] = "RenderContext";
+ static const char __pyx_k_ReplyUserData[] = "_ReplyUserData";
+ static const char __pyx_k_command_error[] = "command_error";
+@@ -2053,18 +2079,15 @@ static const char __pyx_k_CallbackThread[] = "CallbackThread";
+ static const char __pyx_k_MIN_CAPI_MINOR[] = "_MIN_CAPI_MINOR";
+ static const char __pyx_k_ao_init_failed[] = "ao_init_failed";
+ static const char __pyx_k_audio_reconfig[] = "audio_reconfig";
+-static const char __pyx_k_chapter_change[] = "chapter_change";
+ static const char __pyx_k_client_message[] = "client_message";
+ static const char __pyx_k_loading_failed[] = "loading_failed";
+ static const char __pyx_k_property_error[] = "property_error";
+ static const char __pyx_k_skip_rendering[] = "skip_rendering";
+-static const char __pyx_k_tracks_changed[] = "tracks_changed";
+ static const char __pyx_k_unknown_format[] = "unknown_format";
+ static const char __pyx_k_video_reconfig[] = "video_reconfig";
+ static const char __pyx_k_vo_init_failed[] = "vo_init_failed";
+ static const char __pyx_k_MPVError___init[] = "MPVError.__init__";
+ static const char __pyx_k_internal_format[] = "internal_format";
+-static const char __pyx_k_metadata_update[] = "metadata_update";
+ static const char __pyx_k_not_implemented[] = "not_implemented";
+ static const char __pyx_k_nothing_to_play[] = "nothing_to_play";
+ static const char __pyx_k_property_change[] = "property_change";
+@@ -2073,7 +2096,6 @@ static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
+ static const char __pyx_k_set_icc_profile[] = "set_icc_profile";
+ static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
+ static const char __pyx_k_surrogateescape[] = "surrogateescape";
+-static const char __pyx_k_tracks_switched[] = "tracks_switched";
+ static const char __pyx_k_EndOfFileReached[] = "EndOfFileReached";
+ static const char __pyx_k_advanced_control[] = "advanced_control";
+ static const char __pyx_k_drmModeAtomicReq[] = "drmModeAtomicReq*";
+@@ -2085,7 +2107,6 @@ static const char __pyx_k_invalid_parameter[] = "invalid_parameter";
+ static const char __pyx_k_set_ambient_light[] = "set_ambient_light";
+ static const char __pyx_k_CallbackThread_run[] = "CallbackThread.run";
+ static const char __pyx_k_CallbackThread_set[] = "CallbackThread.set";
+-static const char __pyx_k_DeprecationWarning[] = "DeprecationWarning";
+ static const char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError";
+ static const char __pyx_k_UnicodeEncodeError[] = "UnicodeEncodeError";
+ static const char __pyx_k_Unknown_api_type_r[] = "Unknown api_type %r";
+@@ -2109,12 +2130,9 @@ static const char __pyx_k_RenderParams_overflow[] = "RenderParams overflow";
+ static const char __pyx_k_block_for_target_time[] = "block_for_target_time";
+ static const char __pyx_k_errors_locals_wrapped[] = "_errors.<locals>.wrapped";
+ static const char __pyx_k_pyx_unpickle_Property[] = "__pyx_unpickle_Property";
+-static const char __pyx_k_script_input_dispatch[] = "script_input_dispatch";
+ static const char __pyx_k_Context_creation_error[] = "Context creation error";
+ static const char __pyx_k_CallbackThread_shutdown[] = "CallbackThread.shutdown";
+ static const char __pyx_k_pyx_unpickle_LogMessage[] = "__pyx_unpickle_LogMessage";
+-static const char __pyx_k_OpenGL_API_not_available[] = "OpenGL API not available";
+-static const char __pyx_k_pyx_unpickle_InputDispatch[] = "__pyx_unpickle_InputDispatch";
+ static const char __pyx_k_CallbackThread_mpv_callback[] = "CallbackThread.mpv_callback";
+ static const char __pyx_k_pyx_unpickle_RenderFrameInfo[] = "__pyx_unpickle_RenderFrameInfo";
+ static const char __pyx_k_vidcutter_libs_pympv_mpv_pyx[] = "vidcutter/libs/pympv/mpv.pyx";
+@@ -2125,11 +2143,9 @@ static const char __pyx_k_self_params_cannot_be_converted[] = "self.params canno
+ static const char __pyx_k_Incompatible_checksums_s_vs_0x05[] = "Incompatible checksums (%s vs 0x0572d11 = (data, name))";
+ static const char __pyx_k_Incompatible_checksums_s_vs_0x56[] = "Incompatible checksums (%s vs 0x56be9b6 = (error, reason))";
+ static const char __pyx_k_Incompatible_checksums_s_vs_0x87[] = "Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))";
+-static const char __pyx_k_Incompatible_checksums_s_vs_0xbf[] = "Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))";
+ static const char __pyx_k_Incompatible_checksums_s_vs_0xd4[] = "Incompatible checksums (%s vs 0xd41d8cd = ())";
+ static const char __pyx_k_Incompatible_checksums_s_vs_0xda[] = "Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))";
+ static const char __pyx_k_Known_possible_values_for_EndOfF[] = "Known possible values for EndOfFileReached reason.\n\n You should handle the possibility that the reason may not be any of these values.\n ";
+-static const char __pyx_k_OpenGLContext_is_deprecated_plea[] = "OpenGLContext is deprecated, please switch to RenderContext";
+ static const char __pyx_k_Set_of_known_error_codes_from_Mp[] = "Set of known error codes from MpvError and Event responses.\n\n Mostly wraps the enum mpv_error.\n Values might not always be integers in the future.\n You should handle the possibility that error codes may not be any of these values.\n ";
+ static const char __pyx_k_Set_of_known_values_for_Event_id[] = "Set of known values for Event ids.\n\n Mostly wraps the enum mpv_event_id.\n Values might not always be integers in the future.\n You should handle the possibility that event ids may not be any of these values.\n ";
+ static const char __pyx_k_Unknown_or_invalid_pointer_objec[] = "Unknown or invalid pointer object: %r";
+@@ -2151,7 +2167,6 @@ static PyObject *__pyx_n_s_CallbackThread_set;
+ static PyObject *__pyx_n_s_CallbackThread_shutdown;
+ static PyObject *__pyx_n_s_Context;
+ static PyObject *__pyx_kp_s_Context_creation_error;
+-static PyObject *__pyx_n_s_DeprecationWarning;
+ static PyObject *__pyx_n_s_EOFReasons;
+ static PyObject *__pyx_n_s_EndOfFileReached;
+ static PyObject *__pyx_n_s_Errors;
+@@ -2161,20 +2176,15 @@ static PyObject *__pyx_n_s_ImportError;
+ static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x05;
+ static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x56;
+ static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x87;
+-static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xbf;
+ static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd4;
+ static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xda;
+-static PyObject *__pyx_n_s_InputDispatch;
+ static PyObject *__pyx_kp_s_Known_possible_values_for_EndOfF;
+ static PyObject *__pyx_n_s_LogLevels;
+ static PyObject *__pyx_n_s_LogMessage;
+ static PyObject *__pyx_n_s_MIN_CAPI_MINOR;
+ static PyObject *__pyx_n_s_MPVError;
+ static PyObject *__pyx_n_s_MPVError___init;
+-static PyObject *__pyx_n_s_OpenGLContext;
+-static PyObject *__pyx_kp_s_OpenGLContext_is_deprecated_plea;
+ static PyObject *__pyx_n_s_OpenGLRenderContext;
+-static PyObject *__pyx_kp_s_OpenGL_API_not_available;
+ static PyObject *__pyx_n_s_PickleError;
+ static PyObject *__pyx_n_s_Property;
+ static PyObject *__pyx_n_s_PyMPVError;
+@@ -2211,7 +2221,6 @@ static PyObject *__pyx_n_s_block_for_target_time;
+ static PyObject *__pyx_n_s_block_vsync;
+ static PyObject *__pyx_n_s_call;
+ static PyObject *__pyx_n_s_callback;
+-static PyObject *__pyx_n_s_chapter_change;
+ static PyObject *__pyx_n_s_client_message;
+ static PyObject *__pyx_n_s_cline_in_traceback;
+ static PyObject *__pyx_n_s_close;
+@@ -2244,7 +2253,6 @@ static PyObject *__pyx_n_s_error;
+ static PyObject *__pyx_n_s_errors;
+ static PyObject *__pyx_n_s_errors_locals_wrapped;
+ static PyObject *__pyx_n_s_event;
+-static PyObject *__pyx_n_s_exts;
+ static PyObject *__pyx_n_s_fatal;
+ static PyObject *__pyx_n_s_fbo;
+ static PyObject *__pyx_n_s_fd;
+@@ -2280,7 +2288,6 @@ static PyObject *__pyx_n_s_lock;
+ static PyObject *__pyx_n_s_log_message;
+ static PyObject *__pyx_n_s_main;
+ static PyObject *__pyx_n_s_metaclass;
+-static PyObject *__pyx_n_s_metadata_update;
+ static PyObject *__pyx_n_s_module;
+ static PyObject *__pyx_n_s_mpv;
+ static PyObject *__pyx_n_s_mpv_callback;
+@@ -2301,7 +2308,6 @@ static PyObject *__pyx_n_s_opengl_fbo;
+ static PyObject *__pyx_n_s_opengl_init_params;
+ static PyObject *__pyx_n_s_option_error;
+ static PyObject *__pyx_n_s_option_format;
+-static PyObject *__pyx_n_s_pause;
+ static PyObject *__pyx_n_s_pickle;
+ static PyObject *__pyx_n_s_playback_restart;
+ static PyObject *__pyx_n_s_prepare;
+@@ -2319,7 +2325,6 @@ static PyObject *__pyx_n_s_pyx_state;
+ static PyObject *__pyx_n_s_pyx_type;
+ static PyObject *__pyx_n_s_pyx_unpickle_EndOfFileReached;
+ static PyObject *__pyx_n_s_pyx_unpickle_Event;
+-static PyObject *__pyx_n_s_pyx_unpickle_InputDispatch;
+ static PyObject *__pyx_n_s_pyx_unpickle_LogMessage;
+ static PyObject *__pyx_n_s_pyx_unpickle_Property;
+ static PyObject *__pyx_n_s_pyx_unpickle_RenderFrameInfo;
+@@ -2340,7 +2345,6 @@ static PyObject *__pyx_n_s_repeat;
+ static PyObject *__pyx_n_s_request_event;
+ static PyObject *__pyx_n_s_run;
+ static PyObject *__pyx_n_s_s;
+-static PyObject *__pyx_n_s_script_input_dispatch;
+ static PyObject *__pyx_n_s_seek;
+ static PyObject *__pyx_n_s_self;
+ static PyObject *__pyx_kp_s_self__ctx_cannot_be_converted_to;
+@@ -2373,13 +2377,9 @@ static PyObject *__pyx_n_s_threading;
+ static PyObject *__pyx_n_s_tick;
+ static PyObject *__pyx_n_s_timeout;
+ static PyObject *__pyx_n_s_trace;
+-static PyObject *__pyx_n_s_tracks_changed;
+-static PyObject *__pyx_n_s_tracks_switched;
+-static PyObject *__pyx_n_s_uninit_gl;
+ static PyObject *__pyx_n_s_uninitialized;
+ static PyObject *__pyx_n_s_unknown_format;
+ static PyObject *__pyx_n_s_unobserve_property;
+-static PyObject *__pyx_n_s_unpause;
+ static PyObject *__pyx_n_s_unsupported;
+ static PyObject *__pyx_n_s_update;
+ static PyObject *__pyx_kp_s_utf_8;
+@@ -2409,14 +2409,6 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_2__set__(str
+ static int __pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self); /* proto */
+ static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+ static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self); /* proto */
+@@ -2462,41 +2454,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_suspend(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2resume(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_40unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44opengl_cb_api(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_2init_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_exts, PyObject *__pyx_v_get_proc_address); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_4set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_cb); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_6draw(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_fbo, PyObject *__pyx_v_w, PyObject *__pyx_v_h); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_8report_flip(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_time); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_10uninit_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
+-static void __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_12__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self); /* proto */
+ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self); /* proto */
+@@ -2526,18 +2506,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNU
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
+ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_InputDispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_InputDispatch(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Property(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Event(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Context(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+@@ -2545,13 +2522,12 @@ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeOb
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_int_0;
+ static PyObject *__pyx_int_1;
++static PyObject *__pyx_int_2;
+ static PyObject *__pyx_int_3;
+-static PyObject *__pyx_int_9;
+ static PyObject *__pyx_int_32;
+ static PyObject *__pyx_int_5713169;
+ static PyObject *__pyx_int_90958262;
+ static PyObject *__pyx_int_142036910;
+-static PyObject *__pyx_int_200688041;
+ static PyObject *__pyx_int_222419149;
+ static PyObject *__pyx_int_228822053;
+ static PyObject *__pyx_int_neg_1;
+@@ -2573,48 +2549,43 @@ static PyObject *__pyx_tuple__16;
+ static PyObject *__pyx_tuple__17;
+ static PyObject *__pyx_tuple__18;
+ static PyObject *__pyx_tuple__19;
+-static PyObject *__pyx_tuple__20;
+ static PyObject *__pyx_tuple__21;
+-static PyObject *__pyx_tuple__22;
+-static PyObject *__pyx_tuple__24;
+-static PyObject *__pyx_tuple__26;
++static PyObject *__pyx_tuple__23;
++static PyObject *__pyx_tuple__25;
++static PyObject *__pyx_tuple__27;
+ static PyObject *__pyx_tuple__28;
+ static PyObject *__pyx_tuple__30;
+-static PyObject *__pyx_tuple__31;
+-static PyObject *__pyx_tuple__33;
+-static PyObject *__pyx_tuple__35;
+-static PyObject *__pyx_tuple__37;
+-static PyObject *__pyx_tuple__39;
+-static PyObject *__pyx_tuple__41;
+-static PyObject *__pyx_tuple__43;
+-static PyObject *__pyx_tuple__45;
+-static PyObject *__pyx_tuple__47;
+-static PyObject *__pyx_tuple__49;
+-static PyObject *__pyx_tuple__51;
+-static PyObject *__pyx_tuple__53;
+-static PyObject *__pyx_tuple__55;
+-static PyObject *__pyx_tuple__57;
+-static PyObject *__pyx_tuple__59;
++static PyObject *__pyx_tuple__32;
++static PyObject *__pyx_tuple__34;
++static PyObject *__pyx_tuple__36;
++static PyObject *__pyx_tuple__38;
++static PyObject *__pyx_tuple__40;
++static PyObject *__pyx_tuple__42;
++static PyObject *__pyx_tuple__44;
++static PyObject *__pyx_tuple__46;
++static PyObject *__pyx_tuple__48;
++static PyObject *__pyx_tuple__50;
++static PyObject *__pyx_tuple__52;
++static PyObject *__pyx_tuple__54;
+ static PyObject *__pyx_codeobj__2;
+-static PyObject *__pyx_codeobj__23;
+-static PyObject *__pyx_codeobj__25;
+-static PyObject *__pyx_codeobj__27;
++static PyObject *__pyx_codeobj__20;
++static PyObject *__pyx_codeobj__22;
++static PyObject *__pyx_codeobj__24;
++static PyObject *__pyx_codeobj__26;
+ static PyObject *__pyx_codeobj__29;
+-static PyObject *__pyx_codeobj__32;
+-static PyObject *__pyx_codeobj__34;
+-static PyObject *__pyx_codeobj__36;
+-static PyObject *__pyx_codeobj__38;
+-static PyObject *__pyx_codeobj__40;
+-static PyObject *__pyx_codeobj__42;
+-static PyObject *__pyx_codeobj__44;
+-static PyObject *__pyx_codeobj__46;
+-static PyObject *__pyx_codeobj__48;
+-static PyObject *__pyx_codeobj__50;
+-static PyObject *__pyx_codeobj__52;
+-static PyObject *__pyx_codeobj__54;
+-static PyObject *__pyx_codeobj__56;
+-static PyObject *__pyx_codeobj__58;
+-static PyObject *__pyx_codeobj__60;
++static PyObject *__pyx_codeobj__31;
++static PyObject *__pyx_codeobj__33;
++static PyObject *__pyx_codeobj__35;
++static PyObject *__pyx_codeobj__37;
++static PyObject *__pyx_codeobj__39;
++static PyObject *__pyx_codeobj__41;
++static PyObject *__pyx_codeobj__43;
++static PyObject *__pyx_codeobj__45;
++static PyObject *__pyx_codeobj__47;
++static PyObject *__pyx_codeobj__49;
++static PyObject *__pyx_codeobj__51;
++static PyObject *__pyx_codeobj__53;
++static PyObject *__pyx_codeobj__55;
+ /* Late includes */
+
+ /* "vidcutter/libs/pympv/mpv.pyx":55
+@@ -2987,7 +2958,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ * # In python2, assume bytes and walk right through
+ * return s # <<<<<<<<<<<<<<
+ *
+- * PyEval_InitThreads()
++ * Py_Initialize()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_s);
+@@ -3616,15 +3587,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_2__setstate_c
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":176
+- * cdef public object arg0, type
++/* "vidcutter/libs/pympv/mpv.pyx":189
++ * cdef public object prefix, level, text, log_level
+ *
+- * cdef _init(self, mpv_event_script_input_dispatch* input): # <<<<<<<<<<<<<<
+- * self.arg0 = input.arg0
+- * self.type = _strdec(input.type)
++ * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
++ * self.level = _strdec(msg.level)
++ * self.prefix = _strdec(msg.prefix)
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, struct mpv_event_script_input_dispatch *__pyx_v_input) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, struct mpv_event_log_message *__pyx_v_msg) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+@@ -3636,31 +3607,82 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":177
++ /* "vidcutter/libs/pympv/mpv.pyx":190
+ *
+- * cdef _init(self, mpv_event_script_input_dispatch* input):
+- * self.arg0 = input.arg0 # <<<<<<<<<<<<<<
+- * self.type = _strdec(input.type)
+- * return self
++ * cdef _init(self, mpv_event_log_message* msg):
++ * self.level = _strdec(msg.level) # <<<<<<<<<<<<<<
++ * self.prefix = _strdec(msg.prefix)
++ * self.text = _strdec(msg.text)
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->level);
++ __Pyx_DECREF(__pyx_v_self->level);
++ __pyx_v_self->level = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":191
++ * cdef _init(self, mpv_event_log_message* msg):
++ * self.level = _strdec(msg.level)
++ * self.prefix = _strdec(msg.prefix) # <<<<<<<<<<<<<<
++ * self.text = _strdec(msg.text)
++ * self.log_level = msg.log_level
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_input->arg0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->arg0);
+- __Pyx_DECREF(__pyx_v_self->arg0);
+- __pyx_v_self->arg0 = __pyx_t_1;
++ __Pyx_GOTREF(__pyx_v_self->prefix);
++ __Pyx_DECREF(__pyx_v_self->prefix);
++ __pyx_v_self->prefix = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":178
+- * cdef _init(self, mpv_event_script_input_dispatch* input):
+- * self.arg0 = input.arg0
+- * self.type = _strdec(input.type) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":192
++ * self.level = _strdec(msg.level)
++ * self.prefix = _strdec(msg.prefix)
++ * self.text = _strdec(msg.text) # <<<<<<<<<<<<<<
++ * self.log_level = msg.log_level
+ * return self
+- *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_input->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -3675,18 +3697,33 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->type);
+- __Pyx_DECREF(__pyx_v_self->type);
+- __pyx_v_self->type = __pyx_t_1;
++ __Pyx_GOTREF(__pyx_v_self->text);
++ __Pyx_DECREF(__pyx_v_self->text);
++ __pyx_v_self->text = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":193
++ * self.prefix = _strdec(msg.prefix)
++ * self.text = _strdec(msg.text)
++ * self.log_level = msg.log_level # <<<<<<<<<<<<<<
++ * return self
++ *
++ */
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->log_level);
++ __Pyx_DECREF(__pyx_v_self->log_level);
++ __pyx_v_self->log_level = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":179
+- * self.arg0 = input.arg0
+- * self.type = _strdec(input.type)
++ /* "vidcutter/libs/pympv/mpv.pyx":194
++ * self.text = _strdec(msg.text)
++ * self.log_level = msg.log_level
+ * return self # <<<<<<<<<<<<<<
+ *
+ *
+@@ -3696,12 +3733,12 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":176
+- * cdef public object arg0, type
++ /* "vidcutter/libs/pympv/mpv.pyx":189
++ * cdef public object prefix, level, text, log_level
+ *
+- * cdef _init(self, mpv_event_script_input_dispatch* input): # <<<<<<<<<<<<<<
+- * self.arg0 = input.arg0
+- * self.type = _strdec(input.type)
++ * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
++ * self.level = _strdec(msg.level)
++ * self.prefix = _strdec(msg.prefix)
+ */
+
+ /* function exit code */
+@@ -3710,7 +3747,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.InputDispatch._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -3718,34 +3755,34 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":174
+- * Wraps: mpv_event_script_input_dispatch
++/* "vidcutter/libs/pympv/mpv.pyx":187
++ * Wraps: mpv_event_log_message
+ * """
+- * cdef public object arg0, type # <<<<<<<<<<<<<<
++ * cdef public object prefix, level, text, log_level # <<<<<<<<<<<<<<
+ *
+- * cdef _init(self, mpv_event_script_input_dispatch* input):
++ * cdef _init(self, mpv_event_log_message* msg):
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->arg0);
+- __pyx_r = __pyx_v_self->arg0;
++ __Pyx_INCREF(__pyx_v_self->prefix);
++ __pyx_r = __pyx_v_self->prefix;
+ goto __pyx_L0;
+
+ /* function exit code */
+@@ -3756,27 +3793,27 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(st
+ }
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value) {
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->arg0);
+- __Pyx_DECREF(__pyx_v_self->arg0);
+- __pyx_v_self->arg0 = __pyx_v_value;
++ __Pyx_GOTREF(__pyx_v_self->prefix);
++ __Pyx_DECREF(__pyx_v_self->prefix);
++ __pyx_v_self->prefix = __pyx_v_value;
+
+ /* function exit code */
+ __pyx_r = 0;
+@@ -3785,27 +3822,27 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(struct
+ }
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_5__del__(PyObject *__pyx_v_self) {
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->arg0);
+- __Pyx_DECREF(__pyx_v_self->arg0);
+- __pyx_v_self->arg0 = Py_None;
++ __Pyx_GOTREF(__pyx_v_self->prefix);
++ __Pyx_DECREF(__pyx_v_self->prefix);
++ __pyx_v_self->prefix = Py_None;
+
+ /* function exit code */
+ __pyx_r = 0;
+@@ -3814,25 +3851,25 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(struct
+ }
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->type);
+- __pyx_r = __pyx_v_self->type;
++ __Pyx_INCREF(__pyx_v_self->level);
++ __pyx_r = __pyx_v_self->level;
+ goto __pyx_L0;
+
+ /* function exit code */
+@@ -3843,27 +3880,27 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(st
+ }
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value) {
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__set__", 0);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->type);
+- __Pyx_DECREF(__pyx_v_self->type);
+- __pyx_v_self->type = __pyx_v_value;
++ __Pyx_GOTREF(__pyx_v_self->level);
++ __Pyx_DECREF(__pyx_v_self->level);
++ __pyx_v_self->level = __pyx_v_value;
+
+ /* function exit code */
+ __pyx_r = 0;
+@@ -3872,27 +3909,27 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(struct
+ }
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_5__del__(PyObject *__pyx_v_self) {
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__del__", 0);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->type);
+- __Pyx_DECREF(__pyx_v_self->type);
+- __pyx_v_self->type = Py_None;
++ __Pyx_GOTREF(__pyx_v_self->level);
++ __Pyx_DECREF(__pyx_v_self->level);
++ __pyx_v_self->level = Py_None;
+
+ /* function exit code */
+ __pyx_r = 0;
+@@ -3900,63 +3937,243 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(struct
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
+- */
+-
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
+- PyObject *__pyx_v_state = 0;
+- PyObject *__pyx_v__dict = 0;
+- int __pyx_v_use_setstate;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_self->text);
++ __pyx_r = __pyx_v_self->text;
++ goto __pyx_L0;
+
+- /* "(tree fragment)":5
+- * cdef object _dict
+- * cdef bint use_setstate
+- * state = (self.arg0, self.type) # <<<<<<<<<<<<<<
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- */
+- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v_self->arg0);
+- __Pyx_GIVEREF(__pyx_v_self->arg0);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->arg0);
+- __Pyx_INCREF(__pyx_v_self->type);
+- __Pyx_GIVEREF(__pyx_v_self->type);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->type);
++ /* function exit code */
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->text);
++ __Pyx_DECREF(__pyx_v_self->text);
++ __pyx_v_self->text = __pyx_v_value;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->text);
++ __Pyx_DECREF(__pyx_v_self->text);
++ __pyx_v_self->text = Py_None;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_self->log_level);
++ __pyx_r = __pyx_v_self->log_level;
++ goto __pyx_L0;
++
++ /* function exit code */
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->log_level);
++ __Pyx_DECREF(__pyx_v_self->log_level);
++ __pyx_v_self->log_level = __pyx_v_value;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->log_level);
++ __Pyx_DECREF(__pyx_v_self->log_level);
++ __pyx_v_self->log_level = Py_None;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
++ */
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
++ PyObject *__pyx_v_state = 0;
++ PyObject *__pyx_v__dict = 0;
++ int __pyx_v_use_setstate;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++
++ /* "(tree fragment)":5
++ * cdef object _dict
++ * cdef bint use_setstate
++ * state = (self.level, self.log_level, self.prefix, self.text) # <<<<<<<<<<<<<<
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
++ */
++ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_INCREF(__pyx_v_self->level);
++ __Pyx_GIVEREF(__pyx_v_self->level);
++ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->level);
++ __Pyx_INCREF(__pyx_v_self->log_level);
++ __Pyx_GIVEREF(__pyx_v_self->log_level);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->log_level);
++ __Pyx_INCREF(__pyx_v_self->prefix);
++ __Pyx_GIVEREF(__pyx_v_self->prefix);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->prefix);
++ __Pyx_INCREF(__pyx_v_self->text);
++ __Pyx_GIVEREF(__pyx_v_self->text);
++ PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->text);
+ __pyx_v_state = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "(tree fragment)":6
+ * cdef bint use_setstate
+- * state = (self.arg0, self.type)
++ * state = (self.level, self.log_level, self.prefix, self.text)
+ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
+ * if _dict is not None:
+ * state += (_dict,)
+@@ -3967,7 +4184,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+ __pyx_t_1 = 0;
+
+ /* "(tree fragment)":7
+- * state = (self.arg0, self.type)
++ * state = (self.level, self.log_level, self.prefix, self.text)
+ * _dict = getattr(self, '__dict__', None)
+ * if _dict is not None: # <<<<<<<<<<<<<<
+ * state += (_dict,)
+@@ -4000,12 +4217,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+ * state += (_dict,)
+ * use_setstate = True # <<<<<<<<<<<<<<
+ * else:
+- * use_setstate = self.arg0 is not None or self.type is not None
++ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+ */
+ __pyx_v_use_setstate = 1;
+
+ /* "(tree fragment)":7
+- * state = (self.arg0, self.type)
++ * state = (self.level, self.log_level, self.prefix, self.text)
+ * _dict = getattr(self, '__dict__', None)
+ * if _dict is not None: # <<<<<<<<<<<<<<
+ * state += (_dict,)
+@@ -4017,19 +4234,33 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+ /* "(tree fragment)":11
+ * use_setstate = True
+ * else:
+- * use_setstate = self.arg0 is not None or self.type is not None # <<<<<<<<<<<<<<
++ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None # <<<<<<<<<<<<<<
+ * if use_setstate:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+ */
+ /*else*/ {
+- __pyx_t_2 = (__pyx_v_self->arg0 != Py_None);
++ __pyx_t_2 = (__pyx_v_self->level != Py_None);
++ __pyx_t_5 = (__pyx_t_2 != 0);
++ if (!__pyx_t_5) {
++ } else {
++ __pyx_t_3 = __pyx_t_5;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_5 = (__pyx_v_self->log_level != Py_None);
++ __pyx_t_2 = (__pyx_t_5 != 0);
++ if (!__pyx_t_2) {
++ } else {
++ __pyx_t_3 = __pyx_t_2;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_2 = (__pyx_v_self->prefix != Py_None);
+ __pyx_t_5 = (__pyx_t_2 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+- __pyx_t_5 = (__pyx_v_self->type != Py_None);
++ __pyx_t_5 = (__pyx_v_self->text != Py_None);
+ __pyx_t_2 = (__pyx_t_5 != 0);
+ __pyx_t_3 = __pyx_t_2;
+ __pyx_L4_bool_binop_done:;
+@@ -4039,32 +4270,32 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+
+ /* "(tree fragment)":12
+ * else:
+- * use_setstate = self.arg0 is not None or self.type is not None
++ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+ * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+ * else:
+ */
+ __pyx_t_3 = (__pyx_v_use_setstate != 0);
+ if (__pyx_t_3) {
+
+ /* "(tree fragment)":13
+- * use_setstate = self.arg0 is not None or self.type is not None
++ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+ * if use_setstate:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state # <<<<<<<<<<<<<<
+ * else:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_InputDispatch); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_200688041);
+- __Pyx_GIVEREF(__pyx_int_200688041);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_200688041);
++ __Pyx_INCREF(__pyx_int_142036910);
++ __Pyx_GIVEREF(__pyx_int_142036910);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+@@ -4085,32 +4316,32 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+
+ /* "(tree fragment)":12
+ * else:
+- * use_setstate = self.arg0 is not None or self.type is not None
++ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+ * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+ * else:
+ */
+ }
+
+ /* "(tree fragment)":15
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+ * else:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state) # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state) # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state)
++ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_InputDispatch); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_200688041);
+- __Pyx_GIVEREF(__pyx_int_200688041);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_200688041);
++ __Pyx_INCREF(__pyx_int_142036910);
++ __Pyx_GIVEREF(__pyx_int_142036910);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
+ __Pyx_INCREF(__pyx_v_state);
+ __Pyx_GIVEREF(__pyx_v_state);
+ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
+@@ -4138,7 +4369,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.InputDispatch.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+@@ -4150,25 +4381,25 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
+
+ /* "(tree fragment)":16
+ * else:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state)
++ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+@@ -4178,20 +4409,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cyth
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":17
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+ * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
++ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+ */
+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "(tree fragment)":16
+ * else:
+- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
++ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state)
++ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+ */
+
+ /* function exit code */
+@@ -4199,7 +4430,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cyth
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.InputDispatch.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -4207,1494 +4438,1687 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cyth
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":189
+- * cdef public object prefix, level, text, log_level
++/* "vidcutter/libs/pympv/mpv.pyx":197
+ *
+- * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
+- * self.level = _strdec(msg.level)
+- * self.prefix = _strdec(msg.prefix)
++ *
++ * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
++ * if node.format == MPV_FORMAT_STRING:
++ * return _strdec(node.u.string)
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, struct mpv_event_log_message *__pyx_v_msg) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_node __pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_5;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_init", 0);
++ __Pyx_RefNannySetupContext("_convert_node_value", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":190
++ /* "vidcutter/libs/pympv/mpv.pyx":198
+ *
+- * cdef _init(self, mpv_event_log_message* msg):
+- * self.level = _strdec(msg.level) # <<<<<<<<<<<<<<
+- * self.prefix = _strdec(msg.prefix)
+- * self.text = _strdec(msg.text)
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->level);
+- __Pyx_DECREF(__pyx_v_self->level);
+- __pyx_v_self->level = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":191
+- * cdef _init(self, mpv_event_log_message* msg):
+- * self.level = _strdec(msg.level)
+- * self.prefix = _strdec(msg.prefix) # <<<<<<<<<<<<<<
+- * self.text = _strdec(msg.text)
+- * self.log_level = msg.log_level
++ * cdef _convert_node_value(mpv_node node):
++ * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * return _strdec(node.u.string)
++ * elif node.format == MPV_FORMAT_FLAG:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->prefix);
+- __Pyx_DECREF(__pyx_v_self->prefix);
+- __pyx_v_self->prefix = __pyx_t_1;
+- __pyx_t_1 = 0;
++ switch (__pyx_v_node.format) {
++ case MPV_FORMAT_STRING:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":192
+- * self.level = _strdec(msg.level)
+- * self.prefix = _strdec(msg.prefix)
+- * self.text = _strdec(msg.text) # <<<<<<<<<<<<<<
+- * self.log_level = msg.log_level
+- * return self
++ /* "vidcutter/libs/pympv/mpv.pyx":199
++ * cdef _convert_node_value(mpv_node node):
++ * if node.format == MPV_FORMAT_STRING:
++ * return _strdec(node.u.string) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_FLAG:
++ * return not not int(node.u.flag)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
+ }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->text);
+- __Pyx_DECREF(__pyx_v_self->text);
+- __pyx_v_self->text = __pyx_t_1;
+- __pyx_t_1 = 0;
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":193
+- * self.prefix = _strdec(msg.prefix)
+- * self.text = _strdec(msg.text)
+- * self.log_level = msg.log_level # <<<<<<<<<<<<<<
+- * return self
++ /* "vidcutter/libs/pympv/mpv.pyx":198
+ *
++ * cdef _convert_node_value(mpv_node node):
++ * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * return _strdec(node.u.string)
++ * elif node.format == MPV_FORMAT_FLAG:
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->log_level);
+- __Pyx_DECREF(__pyx_v_self->log_level);
+- __pyx_v_self->log_level = __pyx_t_1;
+- __pyx_t_1 = 0;
++ break;
++ case MPV_FORMAT_FLAG:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":194
+- * self.text = _strdec(msg.text)
+- * self.log_level = msg.log_level
+- * return self # <<<<<<<<<<<<<<
+- *
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":201
++ * return _strdec(node.u.string)
++ * elif node.format == MPV_FORMAT_FLAG:
++ * return not not int(node.u.flag) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_INT64:
++ * return int(node.u.int64)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(((PyObject *)__pyx_v_self));
+- __pyx_r = ((PyObject *)__pyx_v_self);
+- goto __pyx_L0;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_r = __pyx_t_2;
++ __pyx_t_2 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":189
+- * cdef public object prefix, level, text, log_level
+- *
+- * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
+- * self.level = _strdec(msg.level)
+- * self.prefix = _strdec(msg.prefix)
++ /* "vidcutter/libs/pympv/mpv.pyx":200
++ * if node.format == MPV_FORMAT_STRING:
++ * return _strdec(node.u.string)
++ * elif node.format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
++ * return not not int(node.u.flag)
++ * elif node.format == MPV_FORMAT_INT64:
+ */
++ break;
++ case MPV_FORMAT_INT64:
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":203
++ * return not not int(node.u.flag)
++ * elif node.format == MPV_FORMAT_INT64:
++ * return int(node.u.int64) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_DOUBLE:
++ * return float(node.u.double_)
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":187
+- * Wraps: mpv_event_log_message
+- * """
+- * cdef public object prefix, level, text, log_level # <<<<<<<<<<<<<<
+- *
+- * cdef _init(self, mpv_event_log_message* msg):
++ /* "vidcutter/libs/pympv/mpv.pyx":202
++ * elif node.format == MPV_FORMAT_FLAG:
++ * return not not int(node.u.flag)
++ * elif node.format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
++ * return int(node.u.int64)
++ * elif node.format == MPV_FORMAT_DOUBLE:
+ */
++ break;
++ case MPV_FORMAT_DOUBLE:
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->prefix);
+- __pyx_r = __pyx_v_self->prefix;
+- goto __pyx_L0;
+-
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":205
++ * return int(node.u.int64)
++ * elif node.format == MPV_FORMAT_DOUBLE:
++ * return float(node.u.double_) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_NODE_MAP:
++ * return _convert_value(node.u.list, node.format)
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":204
++ * elif node.format == MPV_FORMAT_INT64:
++ * return int(node.u.int64)
++ * elif node.format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
++ * return float(node.u.double_)
++ * elif node.format == MPV_FORMAT_NODE_MAP:
++ */
++ break;
++ case MPV_FORMAT_NODE_MAP:
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":207
++ * return float(node.u.double_)
++ * elif node.format == MPV_FORMAT_NODE_MAP:
++ * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_NODE_ARRAY:
++ * return _convert_value(node.u.list, node.format)
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->prefix);
+- __Pyx_DECREF(__pyx_v_self->prefix);
+- __pyx_v_self->prefix = __pyx_v_value;
++ /* "vidcutter/libs/pympv/mpv.pyx":206
++ * elif node.format == MPV_FORMAT_DOUBLE:
++ * return float(node.u.double_)
++ * elif node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * return _convert_value(node.u.list, node.format)
++ * elif node.format == MPV_FORMAT_NODE_ARRAY:
++ */
++ break;
++ case MPV_FORMAT_NODE_ARRAY:
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":209
++ * return _convert_value(node.u.list, node.format)
++ * elif node.format == MPV_FORMAT_NODE_ARRAY:
++ * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
++ * return None
++ *
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":208
++ * elif node.format == MPV_FORMAT_NODE_MAP:
++ * return _convert_value(node.u.list, node.format)
++ * elif node.format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
++ * return _convert_value(node.u.list, node.format)
++ * return None
++ */
++ break;
++ default: break;
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":210
++ * elif node.format == MPV_FORMAT_NODE_ARRAY:
++ * return _convert_value(node.u.list, node.format)
++ * return None # <<<<<<<<<<<<<<
++ *
++ *
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->prefix);
+- __Pyx_DECREF(__pyx_v_self->prefix);
+- __pyx_v_self->prefix = Py_None;
++ /* "vidcutter/libs/pympv/mpv.pyx":197
++ *
++ *
++ * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
++ * if node.format == MPV_FORMAT_STRING:
++ * return _strdec(node.u.string)
++ */
+
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._convert_node_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++/* "vidcutter/libs/pympv/mpv.pyx":213
++ *
++ *
++ * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * cdef mpv_node_list nodelist
++ */
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data, enum mpv_format __pyx_v_format) {
++ struct mpv_node __pyx_v_node;
++ struct mpv_node_list __pyx_v_nodelist;
++ PyObject *__pyx_v_values = NULL;
++ int __pyx_v_i;
++ PyObject *__pyx_v_value = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->level);
+- __pyx_r = __pyx_v_self->level;
+- goto __pyx_L0;
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ int __pyx_t_4;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("_convert_value", 0);
+
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":216
++ * cdef mpv_node node
++ * cdef mpv_node_list nodelist
++ * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
++ * node = (<mpv_node*>data)[0]
++ * return _convert_node_value(node)
++ */
++ switch (__pyx_v_format) {
++ case MPV_FORMAT_NODE:
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":217
++ * cdef mpv_node_list nodelist
++ * if format == MPV_FORMAT_NODE:
++ * node = (<mpv_node*>data)[0] # <<<<<<<<<<<<<<
++ * return _convert_node_value(node)
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ */
++ __pyx_v_node = (((struct mpv_node *)__pyx_v_data)[0]);
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":218
++ * if format == MPV_FORMAT_NODE:
++ * node = (<mpv_node*>data)[0]
++ * return _convert_node_value(node) # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * nodelist = (<mpv_node_list*>data)[0]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->level);
+- __Pyx_DECREF(__pyx_v_self->level);
+- __pyx_v_self->level = __pyx_v_value;
++ /* "vidcutter/libs/pympv/mpv.pyx":216
++ * cdef mpv_node node
++ * cdef mpv_node_list nodelist
++ * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
++ * node = (<mpv_node*>data)[0]
++ * return _convert_node_value(node)
++ */
++ break;
++ case MPV_FORMAT_NODE_ARRAY:
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":220
++ * return _convert_node_value(node)
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
++ * values = []
++ * for i in range(nodelist.num):
++ */
++ __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":221
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = [] # <<<<<<<<<<<<<<
++ * for i in range(nodelist.num):
++ * values.append(_convert_node_value(nodelist.values[i]))
++ */
++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_values = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":222
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = []
++ * for i in range(nodelist.num): # <<<<<<<<<<<<<<
++ * values.append(_convert_node_value(nodelist.values[i]))
++ * return values
++ */
++ __pyx_t_2 = __pyx_v_nodelist.num;
++ __pyx_t_3 = __pyx_t_2;
++ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
++ __pyx_v_i = __pyx_t_4;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->level);
+- __Pyx_DECREF(__pyx_v_self->level);
+- __pyx_v_self->level = Py_None;
++ /* "vidcutter/libs/pympv/mpv.pyx":223
++ * values = []
++ * for i in range(nodelist.num):
++ * values.append(_convert_node_value(nodelist.values[i])) # <<<<<<<<<<<<<<
++ * return values
++ * elif format == MPV_FORMAT_NODE_MAP:
++ */
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":224
++ * for i in range(nodelist.num):
++ * values.append(_convert_node_value(nodelist.values[i]))
++ * return values # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_NODE_MAP:
++ * nodelist = (<mpv_node_list*>data)[0]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_values);
++ __pyx_r = __pyx_v_values;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":219
++ * node = (<mpv_node*>data)[0]
++ * return _convert_node_value(node)
++ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = []
++ */
++ break;
++ case MPV_FORMAT_NODE_MAP:
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":226
++ * return values
++ * elif format == MPV_FORMAT_NODE_MAP:
++ * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
++ * values = {}
++ * for i in range(nodelist.num):
++ */
++ __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->text);
+- __pyx_r = __pyx_v_self->text;
+- goto __pyx_L0;
++ /* "vidcutter/libs/pympv/mpv.pyx":227
++ * elif format == MPV_FORMAT_NODE_MAP:
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = {} # <<<<<<<<<<<<<<
++ * for i in range(nodelist.num):
++ * value = _convert_node_value(nodelist.values[i])
++ */
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_values = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":228
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = {}
++ * for i in range(nodelist.num): # <<<<<<<<<<<<<<
++ * value = _convert_node_value(nodelist.values[i])
++ * values[_strdec(nodelist.keys[i])] = value
++ */
++ __pyx_t_2 = __pyx_v_nodelist.num;
++ __pyx_t_3 = __pyx_t_2;
++ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
++ __pyx_v_i = __pyx_t_4;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":229
++ * values = {}
++ * for i in range(nodelist.num):
++ * value = _convert_node_value(nodelist.values[i]) # <<<<<<<<<<<<<<
++ * values[_strdec(nodelist.keys[i])] = value
++ * return values
++ */
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":230
++ * for i in range(nodelist.num):
++ * value = _convert_node_value(nodelist.values[i])
++ * values[_strdec(nodelist.keys[i])] = value # <<<<<<<<<<<<<<
++ * return values
++ * elif format == MPV_FORMAT_STRING:
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->text);
+- __Pyx_DECREF(__pyx_v_self->text);
+- __pyx_v_self->text = __pyx_v_value;
++ /* "vidcutter/libs/pympv/mpv.pyx":231
++ * value = _convert_node_value(nodelist.values[i])
++ * values[_strdec(nodelist.keys[i])] = value
++ * return values # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_STRING:
++ * return _strdec(((<char**>data)[0]))
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_values);
++ __pyx_r = __pyx_v_values;
++ goto __pyx_L0;
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":225
++ * values.append(_convert_node_value(nodelist.values[i]))
++ * return values
++ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * nodelist = (<mpv_node_list*>data)[0]
++ * values = {}
++ */
++ break;
++ case MPV_FORMAT_STRING:
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->text);
+- __Pyx_DECREF(__pyx_v_self->text);
+- __pyx_v_self->text = Py_None;
+-
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":233
++ * return values
++ * elif format == MPV_FORMAT_STRING:
++ * return _strdec(((<char**>data)[0])) # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_FLAG:
++ * return not not (<uint64_t*>data)[0]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->log_level);
+- __pyx_r = __pyx_v_self->log_level;
+- goto __pyx_L0;
++ /* "vidcutter/libs/pympv/mpv.pyx":232
++ * values[_strdec(nodelist.keys[i])] = value
++ * return values
++ * elif format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * return _strdec(((<char**>data)[0]))
++ * elif format == MPV_FORMAT_FLAG:
++ */
++ break;
++ case MPV_FORMAT_FLAG:
+
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":235
++ * return _strdec(((<char**>data)[0]))
++ * elif format == MPV_FORMAT_FLAG:
++ * return not not (<uint64_t*>data)[0] # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_INT64:
++ * return int((<uint64_t*>data)[0])
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":234
++ * elif format == MPV_FORMAT_STRING:
++ * return _strdec(((<char**>data)[0]))
++ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
++ * return not not (<uint64_t*>data)[0]
++ * elif format == MPV_FORMAT_INT64:
++ */
++ break;
++ case MPV_FORMAT_INT64:
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":237
++ * return not not (<uint64_t*>data)[0]
++ * elif format == MPV_FORMAT_INT64:
++ * return int((<uint64_t*>data)[0]) # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_DOUBLE:
++ * return float((<double*>data)[0])
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_6;
++ __pyx_t_6 = 0;
++ goto __pyx_L0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->log_level);
+- __Pyx_DECREF(__pyx_v_self->log_level);
+- __pyx_v_self->log_level = __pyx_v_value;
++ /* "vidcutter/libs/pympv/mpv.pyx":236
++ * elif format == MPV_FORMAT_FLAG:
++ * return not not (<uint64_t*>data)[0]
++ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
++ * return int((<uint64_t*>data)[0])
++ * elif format == MPV_FORMAT_DOUBLE:
++ */
++ break;
++ case MPV_FORMAT_DOUBLE:
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":239
++ * return int((<uint64_t*>data)[0])
++ * elif format == MPV_FORMAT_DOUBLE:
++ * return float((<double*>data)[0]) # <<<<<<<<<<<<<<
++ * return None
++ *
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_r = __pyx_t_6;
++ __pyx_t_6 = 0;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":238
++ * elif format == MPV_FORMAT_INT64:
++ * return int((<uint64_t*>data)[0])
++ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
++ * return float((<double*>data)[0])
++ * return None
++ */
++ break;
++ default: break;
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":240
++ * elif format == MPV_FORMAT_DOUBLE:
++ * return float((<double*>data)[0])
++ * return None # <<<<<<<<<<<<<<
++ *
++ *
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->log_level);
+- __Pyx_DECREF(__pyx_v_self->log_level);
+- __pyx_v_self->log_level = Py_None;
++ /* "vidcutter/libs/pympv/mpv.pyx":213
++ *
++ *
++ * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * cdef mpv_node_list nodelist
++ */
+
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._convert_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_values);
++ __Pyx_XDECREF(__pyx_v_value);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++/* "vidcutter/libs/pympv/mpv.pyx":250
++ * cdef public object name, data
++ *
++ * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
++ * self.name = _strdec(prop.name)
++ * self.data = _convert_value(prop.data, prop.format)
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, struct mpv_event_property *__pyx_v_prop) {
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
+- PyObject *__pyx_v_state = 0;
+- PyObject *__pyx_v__dict = 0;
+- int __pyx_v_use_setstate;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+-
+- /* "(tree fragment)":5
+- * cdef object _dict
+- * cdef bint use_setstate
+- * state = (self.level, self.log_level, self.prefix, self.text) # <<<<<<<<<<<<<<
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
++ /* "vidcutter/libs/pympv/mpv.pyx":251
++ *
++ * cdef _init(self, mpv_event_property* prop):
++ * self.name = _strdec(prop.name) # <<<<<<<<<<<<<<
++ * self.data = _convert_value(prop.data, prop.format)
++ * return self
+ */
+- __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v_self->level);
+- __Pyx_GIVEREF(__pyx_v_self->level);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->level);
+- __Pyx_INCREF(__pyx_v_self->log_level);
+- __Pyx_GIVEREF(__pyx_v_self->log_level);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->log_level);
+- __Pyx_INCREF(__pyx_v_self->prefix);
+- __Pyx_GIVEREF(__pyx_v_self->prefix);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->prefix);
+- __Pyx_INCREF(__pyx_v_self->text);
+- __Pyx_GIVEREF(__pyx_v_self->text);
+- PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->text);
+- __pyx_v_state = ((PyObject*)__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->name);
++ __Pyx_DECREF(__pyx_v_self->name);
++ __pyx_v_self->name = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "(tree fragment)":6
+- * cdef bint use_setstate
+- * state = (self.level, self.log_level, self.prefix, self.text)
+- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
+- * if _dict is not None:
+- * state += (_dict,)
++ /* "vidcutter/libs/pympv/mpv.pyx":252
++ * cdef _init(self, mpv_event_property* prop):
++ * self.name = _strdec(prop.name)
++ * self.data = _convert_value(prop.data, prop.format) # <<<<<<<<<<<<<<
++ * return self
++ *
+ */
+- __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v__dict = __pyx_t_1;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "(tree fragment)":7
+- * state = (self.level, self.log_level, self.prefix, self.text)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
++ /* "vidcutter/libs/pympv/mpv.pyx":253
++ * self.name = _strdec(prop.name)
++ * self.data = _convert_value(prop.data, prop.format)
++ * return self # <<<<<<<<<<<<<<
++ *
++ *
+ */
+- __pyx_t_2 = (__pyx_v__dict != Py_None);
+- __pyx_t_3 = (__pyx_t_2 != 0);
+- if (__pyx_t_3) {
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(((PyObject *)__pyx_v_self));
++ __pyx_r = ((PyObject *)__pyx_v_self);
++ goto __pyx_L0;
+
+- /* "(tree fragment)":8
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- * state += (_dict,) # <<<<<<<<<<<<<<
+- * use_setstate = True
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":250
++ * cdef public object name, data
++ *
++ * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
++ * self.name = _strdec(prop.name)
++ * self.data = _convert_value(prop.data, prop.format)
+ */
+- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v__dict);
+- __Pyx_GIVEREF(__pyx_v__dict);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
+- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
+- __pyx_t_4 = 0;
+
+- /* "(tree fragment)":9
+- * if _dict is not None:
+- * state += (_dict,)
+- * use_setstate = True # <<<<<<<<<<<<<<
+- * else:
+- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+- */
+- __pyx_v_use_setstate = 1;
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Property._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "(tree fragment)":7
+- * state = (self.level, self.log_level, self.prefix, self.text)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
++/* "vidcutter/libs/pympv/mpv.pyx":248
++ * Wraps: mpv_event_property
++ * """
++ * cdef public object name, data # <<<<<<<<<<<<<<
++ *
++ * cdef _init(self, mpv_event_property* prop):
+ */
+- goto __pyx_L3;
+- }
+
+- /* "(tree fragment)":11
+- * use_setstate = True
+- * else:
+- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None # <<<<<<<<<<<<<<
+- * if use_setstate:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+- */
+- /*else*/ {
+- __pyx_t_2 = (__pyx_v_self->level != Py_None);
+- __pyx_t_5 = (__pyx_t_2 != 0);
+- if (!__pyx_t_5) {
+- } else {
+- __pyx_t_3 = __pyx_t_5;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_5 = (__pyx_v_self->log_level != Py_None);
+- __pyx_t_2 = (__pyx_t_5 != 0);
+- if (!__pyx_t_2) {
+- } else {
+- __pyx_t_3 = __pyx_t_2;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_2 = (__pyx_v_self->prefix != Py_None);
+- __pyx_t_5 = (__pyx_t_2 != 0);
+- if (!__pyx_t_5) {
+- } else {
+- __pyx_t_3 = __pyx_t_5;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_5 = (__pyx_v_self->text != Py_None);
+- __pyx_t_2 = (__pyx_t_5 != 0);
+- __pyx_t_3 = __pyx_t_2;
+- __pyx_L4_bool_binop_done:;
+- __pyx_v_use_setstate = __pyx_t_3;
+- }
+- __pyx_L3:;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
+
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+- * else:
+- */
+- __pyx_t_3 = (__pyx_v_use_setstate != 0);
+- if (__pyx_t_3) {
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "(tree fragment)":13
+- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+- * if use_setstate:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state # <<<<<<<<<<<<<<
+- * else:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_142036910);
+- __Pyx_GIVEREF(__pyx_int_142036910);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
+- __pyx_t_4 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_6;
+- __pyx_t_6 = 0;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+- * else:
+- */
+- }
+-
+- /* "(tree fragment)":15
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
+- * else:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state) # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+- */
+- /*else*/ {
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_142036910);
+- __Pyx_GIVEREF(__pyx_int_142036910);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
+- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_6);
+- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+- __pyx_t_6 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
+- goto __pyx_L0;
+- }
+-
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
+- */
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_self->name);
++ __pyx_r = __pyx_v_self->name;
++ goto __pyx_L0;
+
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_state);
+- __Pyx_XDECREF(__pyx_v__dict);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+- */
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->name);
++ __Pyx_DECREF(__pyx_v_self->name);
++ __pyx_v_self->name = __pyx_v_value;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = 0;
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
++static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->name);
++ __Pyx_DECREF(__pyx_v_self->name);
++ __pyx_v_self->name = Py_None;
+
+- /* "(tree fragment)":17
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
+- */
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_self->data);
++ __pyx_r = __pyx_v_self->data;
+ goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++
++ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":197
+- *
+- *
+- * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
+- * if node.format == MPV_FORMAT_STRING:
+- * return _strdec(node.u.string)
+- */
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_node __pyx_v_node) {
+- PyObject *__pyx_r = NULL;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_convert_node_value", 0);
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = __pyx_v_value;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":198
+- *
+- * cdef _convert_node_value(mpv_node node):
+- * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * return _strdec(node.u.string)
+- * elif node.format == MPV_FORMAT_FLAG:
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = Py_None;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+- switch (__pyx_v_node.format) {
+- case MPV_FORMAT_STRING:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":199
+- * cdef _convert_node_value(mpv_node node):
+- * if node.format == MPV_FORMAT_STRING:
+- * return _strdec(node.u.string) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_FLAG:
+- * return not not int(node.u.flag)
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++ PyObject *__pyx_v_state = 0;
++ PyObject *__pyx_v__dict = 0;
++ int __pyx_v_use_setstate;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++
++ /* "(tree fragment)":5
++ * cdef object _dict
++ * cdef bint use_setstate
++ * state = (self.data, self.name) # <<<<<<<<<<<<<<
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_INCREF(__pyx_v_self->data);
++ __Pyx_GIVEREF(__pyx_v_self->data);
++ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->data);
++ __Pyx_INCREF(__pyx_v_self->name);
++ __Pyx_GIVEREF(__pyx_v_self->name);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name);
++ __pyx_v_state = ((PyObject*)__pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":198
+- *
+- * cdef _convert_node_value(mpv_node node):
+- * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * return _strdec(node.u.string)
+- * elif node.format == MPV_FORMAT_FLAG:
++ /* "(tree fragment)":6
++ * cdef bint use_setstate
++ * state = (self.data, self.name)
++ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
++ * if _dict is not None:
++ * state += (_dict,)
+ */
+- break;
+- case MPV_FORMAT_FLAG:
++ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v__dict = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":201
+- * return _strdec(node.u.string)
+- * elif node.format == MPV_FORMAT_FLAG:
+- * return not not int(node.u.flag) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_INT64:
+- * return int(node.u.int64)
++ /* "(tree fragment)":7
++ * state = (self.data, self.name)
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __pyx_t_2 = (__pyx_v__dict != Py_None);
++ __pyx_t_3 = (__pyx_t_2 != 0);
++ if (__pyx_t_3) {
++
++ /* "(tree fragment)":8
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
++ * state += (_dict,) # <<<<<<<<<<<<<<
++ * use_setstate = True
++ * else:
++ */
++ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_v__dict);
++ __Pyx_GIVEREF(__pyx_v__dict);
++ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
++ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_r = __pyx_t_2;
+- __pyx_t_2 = 0;
+- goto __pyx_L0;
++ __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
++ __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":200
+- * if node.format == MPV_FORMAT_STRING:
+- * return _strdec(node.u.string)
+- * elif node.format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+- * return not not int(node.u.flag)
+- * elif node.format == MPV_FORMAT_INT64:
++ /* "(tree fragment)":9
++ * if _dict is not None:
++ * state += (_dict,)
++ * use_setstate = True # <<<<<<<<<<<<<<
++ * else:
++ * use_setstate = self.data is not None or self.name is not None
+ */
+- break;
+- case MPV_FORMAT_INT64:
++ __pyx_v_use_setstate = 1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":203
+- * return not not int(node.u.flag)
+- * elif node.format == MPV_FORMAT_INT64:
+- * return int(node.u.int64) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_DOUBLE:
+- * return float(node.u.double_)
++ /* "(tree fragment)":7
++ * state = (self.data, self.name)
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ goto __pyx_L3;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":202
+- * elif node.format == MPV_FORMAT_FLAG:
+- * return not not int(node.u.flag)
+- * elif node.format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+- * return int(node.u.int64)
+- * elif node.format == MPV_FORMAT_DOUBLE:
++ /* "(tree fragment)":11
++ * use_setstate = True
++ * else:
++ * use_setstate = self.data is not None or self.name is not None # <<<<<<<<<<<<<<
++ * if use_setstate:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
+ */
+- break;
+- case MPV_FORMAT_DOUBLE:
++ /*else*/ {
++ __pyx_t_2 = (__pyx_v_self->data != Py_None);
++ __pyx_t_5 = (__pyx_t_2 != 0);
++ if (!__pyx_t_5) {
++ } else {
++ __pyx_t_3 = __pyx_t_5;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_5 = (__pyx_v_self->name != Py_None);
++ __pyx_t_2 = (__pyx_t_5 != 0);
++ __pyx_t_3 = __pyx_t_2;
++ __pyx_L4_bool_binop_done:;
++ __pyx_v_use_setstate = __pyx_t_3;
++ }
++ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":205
+- * return int(node.u.int64)
+- * elif node.format == MPV_FORMAT_DOUBLE:
+- * return float(node.u.double_) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_NODE_MAP:
+- * return _convert_value(node.u.list, node.format)
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = self.data is not None or self.name is not None
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
++ * else:
++ */
++ __pyx_t_3 = (__pyx_v_use_setstate != 0);
++ if (__pyx_t_3) {
++
++ /* "(tree fragment)":13
++ * use_setstate = self.data is not None or self.name is not None
++ * if use_setstate:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state # <<<<<<<<<<<<<<
++ * else:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_5713169);
++ __Pyx_GIVEREF(__pyx_int_5713169);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
++ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
++ __pyx_t_4 = 0;
+ __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_6;
++ __pyx_t_6 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":204
+- * elif node.format == MPV_FORMAT_INT64:
+- * return int(node.u.int64)
+- * elif node.format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+- * return float(node.u.double_)
+- * elif node.format == MPV_FORMAT_NODE_MAP:
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = self.data is not None or self.name is not None
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
++ * else:
+ */
+- break;
+- case MPV_FORMAT_NODE_MAP:
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":207
+- * return float(node.u.double_)
+- * elif node.format == MPV_FORMAT_NODE_MAP:
+- * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_NODE_ARRAY:
+- * return _convert_value(node.u.list, node.format)
++ /* "(tree fragment)":15
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
++ * else:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state) # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_Property__set_state(self, __pyx_state)
+ */
++ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_5713169);
++ __Pyx_GIVEREF(__pyx_int_5713169);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
++ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_6);
++ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
++ __pyx_t_6 = 0;
+ __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_4;
++ __pyx_t_4 = 0;
+ goto __pyx_L0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":206
+- * elif node.format == MPV_FORMAT_DOUBLE:
+- * return float(node.u.double_)
+- * elif node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * return _convert_value(node.u.list, node.format)
+- * elif node.format == MPV_FORMAT_NODE_ARRAY:
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+- break;
+- case MPV_FORMAT_NODE_ARRAY:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":209
+- * return _convert_value(node.u.list, node.format)
+- * elif node.format == MPV_FORMAT_NODE_ARRAY:
+- * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
+- * return None
+- *
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_state);
++ __Pyx_XDECREF(__pyx_v__dict);
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":208
+- * elif node.format == MPV_FORMAT_NODE_MAP:
+- * return _convert_value(node.u.list, node.format)
+- * elif node.format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+- * return _convert_value(node.u.list, node.format)
+- * return None
++/* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Property__set_state(self, __pyx_state)
+ */
+- break;
+- default: break;
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":210
+- * elif node.format == MPV_FORMAT_NODE_ARRAY:
+- * return _convert_value(node.u.list, node.format)
+- * return None # <<<<<<<<<<<<<<
+- *
+- *
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++
++ /* "(tree fragment)":17
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_Property__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":197
+- *
+- *
+- * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
+- * if node.format == MPV_FORMAT_STRING:
+- * return _strdec(node.u.string)
++ /* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Property__set_state(self, __pyx_state)
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._convert_node_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":213
+- *
++/* "vidcutter/libs/pympv/mpv.pyx":263
+ *
+- * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * cdef mpv_node_list nodelist
++ * @property
++ * def error_str(self): # <<<<<<<<<<<<<<
++ * """mpv_error_string of the error proeprty"""
++ * cdef const char* err_c
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data, enum mpv_format __pyx_v_format) {
+- struct mpv_node __pyx_v_node;
+- struct mpv_node_list __pyx_v_nodelist;
+- PyObject *__pyx_v_values = NULL;
+- int __pyx_v_i;
+- PyObject *__pyx_v_value = NULL;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ char const *__pyx_v_err_c;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_convert_value", 0);
++ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":216
+- * cdef mpv_node node
+- * cdef mpv_node_list nodelist
+- * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
+- * node = (<mpv_node*>data)[0]
+- * return _convert_node_value(node)
++ /* "vidcutter/libs/pympv/mpv.pyx":266
++ * """mpv_error_string of the error proeprty"""
++ * cdef const char* err_c
++ * with nogil: # <<<<<<<<<<<<<<
++ * err_c = mpv_error_string(self.error)
++ * return _strdec(err_c)
+ */
+- switch (__pyx_v_format) {
+- case MPV_FORMAT_NODE:
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":217
+- * cdef mpv_node_list nodelist
+- * if format == MPV_FORMAT_NODE:
+- * node = (<mpv_node*>data)[0] # <<<<<<<<<<<<<<
+- * return _convert_node_value(node)
+- * elif format == MPV_FORMAT_NODE_ARRAY:
++ /* "vidcutter/libs/pympv/mpv.pyx":267
++ * cdef const char* err_c
++ * with nogil:
++ * err_c = mpv_error_string(self.error) # <<<<<<<<<<<<<<
++ * return _strdec(err_c)
++ *
+ */
+- __pyx_v_node = (((struct mpv_node *)__pyx_v_data)[0]);
++ __pyx_v_err_c = mpv_error_string(__pyx_v_self->error);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":218
+- * if format == MPV_FORMAT_NODE:
+- * node = (<mpv_node*>data)[0]
+- * return _convert_node_value(node) # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * nodelist = (<mpv_node_list*>data)[0]
++ /* "vidcutter/libs/pympv/mpv.pyx":266
++ * """mpv_error_string of the error proeprty"""
++ * cdef const char* err_c
++ * with nogil: # <<<<<<<<<<<<<<
++ * err_c = mpv_error_string(self.error)
++ * return _strdec(err_c)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":216
+- * cdef mpv_node node
+- * cdef mpv_node_list nodelist
+- * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
+- * node = (<mpv_node*>data)[0]
+- * return _convert_node_value(node)
++ /* "vidcutter/libs/pympv/mpv.pyx":268
++ * with nogil:
++ * err_c = mpv_error_string(self.error)
++ * return _strdec(err_c) # <<<<<<<<<<<<<<
++ *
++ * cdef _data(self, mpv_event* event):
+ */
+- break;
+- case MPV_FORMAT_NODE_ARRAY:
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":220
+- * return _convert_node_value(node)
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
+- * values = []
+- * for i in range(nodelist.num):
++ /* "vidcutter/libs/pympv/mpv.pyx":263
++ *
++ * @property
++ * def error_str(self): # <<<<<<<<<<<<<<
++ * """mpv_error_string of the error proeprty"""
++ * cdef const char* err_c
+ */
+- __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":221
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = [] # <<<<<<<<<<<<<<
+- * for i in range(nodelist.num):
+- * values.append(_convert_node_value(nodelist.values[i]))
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error_str.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":270
++ * return _strdec(err_c)
++ *
++ * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
++ * cdef void* data = event.data
++ * cdef mpv_event_client_message* climsg
+ */
+- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_values = __pyx_t_1;
+- __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":222
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = []
+- * for i in range(nodelist.num): # <<<<<<<<<<<<<<
+- * values.append(_convert_node_value(nodelist.values[i]))
+- * return values
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event) {
++ void *__pyx_v_data;
++ struct mpv_event_client_message *__pyx_v_climsg;
++ PyObject *__pyx_v_args = NULL;
++ int __pyx_v_num_args;
++ int __pyx_v_i;
++ PyObject *__pyx_v_arg = NULL;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ void *__pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_4;
++ int __pyx_t_5;
++ int __pyx_t_6;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_t_8;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("_data", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":271
++ *
++ * cdef _data(self, mpv_event* event):
++ * cdef void* data = event.data # <<<<<<<<<<<<<<
++ * cdef mpv_event_client_message* climsg
++ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
+ */
+- __pyx_t_2 = __pyx_v_nodelist.num;
+- __pyx_t_3 = __pyx_t_2;
+- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+- __pyx_v_i = __pyx_t_4;
++ __pyx_t_1 = __pyx_v_event->data;
++ __pyx_v_data = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":223
+- * values = []
+- * for i in range(nodelist.num):
+- * values.append(_convert_node_value(nodelist.values[i])) # <<<<<<<<<<<<<<
+- * return values
+- * elif format == MPV_FORMAT_NODE_MAP:
++ /* "vidcutter/libs/pympv/mpv.pyx":273
++ * cdef void* data = event.data
++ * cdef mpv_event_client_message* climsg
++ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- }
++ switch (__pyx_v_self->id) {
++ case MPV_EVENT_GET_PROPERTY_REPLY:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":224
+- * for i in range(nodelist.num):
+- * values.append(_convert_node_value(nodelist.values[i]))
+- * return values # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_NODE_MAP:
+- * nodelist = (<mpv_node_list*>data)[0]
++ /* "vidcutter/libs/pympv/mpv.pyx":274
++ * cdef mpv_event_client_message* climsg
++ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
++ * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
++ * return Property()._init(<mpv_event_property*>data)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_values);
+- __pyx_r = __pyx_v_values;
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":219
+- * node = (<mpv_node*>data)[0]
+- * return _convert_node_value(node)
+- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = []
++ /* "vidcutter/libs/pympv/mpv.pyx":273
++ * cdef void* data = event.data
++ * cdef mpv_event_client_message* climsg
++ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+ */
+ break;
+- case MPV_FORMAT_NODE_MAP:
++ case MPV_EVENT_PROPERTY_CHANGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":226
+- * return values
+- * elif format == MPV_FORMAT_NODE_MAP:
+- * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
+- * values = {}
+- * for i in range(nodelist.num):
++ /* "vidcutter/libs/pympv/mpv.pyx":276
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
++ * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
++ * elif self.id == MPV_EVENT_LOG_MESSAGE:
++ * return LogMessage()._init(<mpv_event_log_message*>data)
+ */
+- __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_r = __pyx_t_2;
++ __pyx_t_2 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":227
+- * elif format == MPV_FORMAT_NODE_MAP:
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = {} # <<<<<<<<<<<<<<
+- * for i in range(nodelist.num):
+- * value = _convert_node_value(nodelist.values[i])
++ /* "vidcutter/libs/pympv/mpv.pyx":275
++ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_LOG_MESSAGE:
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_values = __pyx_t_1;
+- __pyx_t_1 = 0;
++ break;
++ case MPV_EVENT_LOG_MESSAGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":228
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = {}
+- * for i in range(nodelist.num): # <<<<<<<<<<<<<<
+- * value = _convert_node_value(nodelist.values[i])
+- * values[_strdec(nodelist.keys[i])] = value
++ /* "vidcutter/libs/pympv/mpv.pyx":278
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_LOG_MESSAGE:
++ * return LogMessage()._init(<mpv_event_log_message*>data) # <<<<<<<<<<<<<<
++ * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+ */
+- __pyx_t_2 = __pyx_v_nodelist.num;
+- __pyx_t_3 = __pyx_t_2;
+- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+- __pyx_v_i = __pyx_t_4;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":229
+- * values = {}
+- * for i in range(nodelist.num):
+- * value = _convert_node_value(nodelist.values[i]) # <<<<<<<<<<<<<<
+- * values[_strdec(nodelist.keys[i])] = value
+- * return values
+- */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
+- __pyx_t_1 = 0;
++ /* "vidcutter/libs/pympv/mpv.pyx":277
++ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
++ * return Property()._init(<mpv_event_property*>data)
++ * elif self.id == MPV_EVENT_LOG_MESSAGE: # <<<<<<<<<<<<<<
++ * return LogMessage()._init(<mpv_event_log_message*>data)
++ * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ */
++ break;
++ case MPV_EVENT_CLIENT_MESSAGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":230
+- * for i in range(nodelist.num):
+- * value = _convert_node_value(nodelist.values[i])
+- * values[_strdec(nodelist.keys[i])] = value # <<<<<<<<<<<<<<
+- * return values
+- * elif format == MPV_FORMAT_STRING:
++ /* "vidcutter/libs/pympv/mpv.pyx":282
++ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
++ * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
++ * climsg = <mpv_event_client_message*>data # <<<<<<<<<<<<<<
++ * args = []
++ * num_args = climsg.num_args
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- }
++ __pyx_v_climsg = ((struct mpv_event_client_message *)__pyx_v_data);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":231
+- * value = _convert_node_value(nodelist.values[i])
+- * values[_strdec(nodelist.keys[i])] = value
+- * return values # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_STRING:
+- * return _strdec(((<char**>data)[0]))
++ /* "vidcutter/libs/pympv/mpv.pyx":283
++ * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
++ * climsg = <mpv_event_client_message*>data
++ * args = [] # <<<<<<<<<<<<<<
++ * num_args = climsg.num_args
++ * for i in range(num_args):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_values);
+- __pyx_r = __pyx_v_values;
+- goto __pyx_L0;
++ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_v_args = ((PyObject*)__pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":225
+- * values.append(_convert_node_value(nodelist.values[i]))
+- * return values
+- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * nodelist = (<mpv_node_list*>data)[0]
+- * values = {}
++ /* "vidcutter/libs/pympv/mpv.pyx":284
++ * climsg = <mpv_event_client_message*>data
++ * args = []
++ * num_args = climsg.num_args # <<<<<<<<<<<<<<
++ * for i in range(num_args):
++ * arg = <char*>climsg.args[i]
+ */
+- break;
+- case MPV_FORMAT_STRING:
++ __pyx_t_4 = __pyx_v_climsg->num_args;
++ __pyx_v_num_args = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":233
+- * return values
+- * elif format == MPV_FORMAT_STRING:
+- * return _strdec(((<char**>data)[0])) # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_FLAG:
+- * return not not (<uint64_t*>data)[0]
++ /* "vidcutter/libs/pympv/mpv.pyx":285
++ * args = []
++ * num_args = climsg.num_args
++ * for i in range(num_args): # <<<<<<<<<<<<<<
++ * arg = <char*>climsg.args[i]
++ * arg = _strdec(arg)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_t_4 = __pyx_v_num_args;
++ __pyx_t_5 = __pyx_t_4;
++ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
++ __pyx_v_i = __pyx_t_6;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":232
+- * values[_strdec(nodelist.keys[i])] = value
+- * return values
+- * elif format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * return _strdec(((<char**>data)[0]))
+- * elif format == MPV_FORMAT_FLAG:
++ /* "vidcutter/libs/pympv/mpv.pyx":286
++ * num_args = climsg.num_args
++ * for i in range(num_args):
++ * arg = <char*>climsg.args[i] # <<<<<<<<<<<<<<
++ * arg = _strdec(arg)
++ * args.append(arg)
+ */
+- break;
+- case MPV_FORMAT_FLAG:
++ __pyx_t_3 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":235
+- * return _strdec(((<char**>data)[0]))
+- * elif format == MPV_FORMAT_FLAG:
+- * return not not (<uint64_t*>data)[0] # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_INT64:
+- * return int((<uint64_t*>data)[0])
++ /* "vidcutter/libs/pympv/mpv.pyx":287
++ * for i in range(num_args):
++ * arg = <char*>climsg.args[i]
++ * arg = _strdec(arg) # <<<<<<<<<<<<<<
++ * args.append(arg)
++ * return args
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_arg) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_arg);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":234
+- * elif format == MPV_FORMAT_STRING:
+- * return _strdec(((<char**>data)[0]))
+- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+- * return not not (<uint64_t*>data)[0]
+- * elif format == MPV_FORMAT_INT64:
++ /* "vidcutter/libs/pympv/mpv.pyx":288
++ * arg = <char*>climsg.args[i]
++ * arg = _strdec(arg)
++ * args.append(arg) # <<<<<<<<<<<<<<
++ * return args
++ * elif self.id == MPV_EVENT_END_FILE:
+ */
+- break;
+- case MPV_FORMAT_INT64:
++ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":237
+- * return not not (<uint64_t*>data)[0]
+- * elif format == MPV_FORMAT_INT64:
+- * return int((<uint64_t*>data)[0]) # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_DOUBLE:
+- * return float((<double*>data)[0])
++ /* "vidcutter/libs/pympv/mpv.pyx":289
++ * arg = _strdec(arg)
++ * args.append(arg)
++ * return args # <<<<<<<<<<<<<<
++ * elif self.id == MPV_EVENT_END_FILE:
++ * return EndOfFileReached()._init(<mpv_event_end_file*>data)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_6;
+- __pyx_t_6 = 0;
++ __Pyx_INCREF(__pyx_v_args);
++ __pyx_r = __pyx_v_args;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":236
+- * elif format == MPV_FORMAT_FLAG:
+- * return not not (<uint64_t*>data)[0]
+- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+- * return int((<uint64_t*>data)[0])
+- * elif format == MPV_FORMAT_DOUBLE:
++ /* "vidcutter/libs/pympv/mpv.pyx":281
++ * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
++ * elif self.id == MPV_EVENT_CLIENT_MESSAGE: # <<<<<<<<<<<<<<
++ * climsg = <mpv_event_client_message*>data
++ * args = []
+ */
+ break;
+- case MPV_FORMAT_DOUBLE:
++ case MPV_EVENT_END_FILE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":239
+- * return int((<uint64_t*>data)[0])
+- * elif format == MPV_FORMAT_DOUBLE:
+- * return float((<double*>data)[0]) # <<<<<<<<<<<<<<
+- * return None
++ /* "vidcutter/libs/pympv/mpv.pyx":291
++ * return args
++ * elif self.id == MPV_EVENT_END_FILE:
++ * return EndOfFileReached()._init(<mpv_event_end_file*>data) # <<<<<<<<<<<<<<
++ * return None
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_r = __pyx_t_6;
+- __pyx_t_6 = 0;
++ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_r = __pyx_t_2;
++ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":238
+- * elif format == MPV_FORMAT_INT64:
+- * return int((<uint64_t*>data)[0])
+- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+- * return float((<double*>data)[0])
+- * return None
++ /* "vidcutter/libs/pympv/mpv.pyx":290
++ * args.append(arg)
++ * return args
++ * elif self.id == MPV_EVENT_END_FILE: # <<<<<<<<<<<<<<
++ * return EndOfFileReached()._init(<mpv_event_end_file*>data)
++ * return None
+ */
+ break;
+ default: break;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":240
+- * elif format == MPV_FORMAT_DOUBLE:
+- * return float((<double*>data)[0])
+- * return None # <<<<<<<<<<<<<<
+- *
+- *
+- */
++ /* "vidcutter/libs/pympv/mpv.pyx":292
++ * elif self.id == MPV_EVENT_END_FILE:
++ * return EndOfFileReached()._init(<mpv_event_end_file*>data)
++ * return None # <<<<<<<<<<<<<<
++ *
++ * @property
++ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":213
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":270
++ * return _strdec(err_c)
+ *
+- * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * cdef mpv_node_list nodelist
++ * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
++ * cdef void* data = event.data
++ * cdef mpv_event_client_message* climsg
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._convert_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event._data", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_values);
+- __Pyx_XDECREF(__pyx_v_value);
++ __Pyx_XDECREF(__pyx_v_args);
++ __Pyx_XDECREF(__pyx_v_arg);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":250
+- * cdef public object name, data
++/* "vidcutter/libs/pympv/mpv.pyx":295
+ *
+- * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
+- * self.name = _strdec(prop.name)
+- * self.data = _convert_value(prop.data, prop.format)
++ * @property
++ * def name(self): # <<<<<<<<<<<<<<
++ * """mpv_event_name of the event id"""
++ * cdef const char* name_c
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, struct mpv_event_property *__pyx_v_prop) {
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ char const *__pyx_v_name_c;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+@@ -5704,18 +6128,63 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_init", 0);
++ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":251
++ /* "vidcutter/libs/pympv/mpv.pyx":298
++ * """mpv_event_name of the event id"""
++ * cdef const char* name_c
++ * with nogil: # <<<<<<<<<<<<<<
++ * name_c = mpv_event_name(self.id)
++ * return _strdec(name_c)
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":299
++ * cdef const char* name_c
++ * with nogil:
++ * name_c = mpv_event_name(self.id) # <<<<<<<<<<<<<<
++ * return _strdec(name_c)
+ *
+- * cdef _init(self, mpv_event_property* prop):
+- * self.name = _strdec(prop.name) # <<<<<<<<<<<<<<
+- * self.data = _convert_value(prop.data, prop.format)
+- * return self
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __pyx_v_name_c = mpv_event_name(__pyx_v_self->id);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":298
++ * """mpv_event_name of the event id"""
++ * cdef const char* name_c
++ * with nogil: # <<<<<<<<<<<<<<
++ * name_c = mpv_event_name(self.id)
++ * return _strdec(name_c)
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":300
++ * with nogil:
++ * name_c = mpv_event_name(self.id)
++ * return _strdec(name_c) # <<<<<<<<<<<<<<
++ *
++ * cdef _init(self, mpv_event* event, ctx):
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -5730,48 +6199,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->name);
+- __Pyx_DECREF(__pyx_v_self->name);
+- __pyx_v_self->name = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":252
+- * cdef _init(self, mpv_event_property* prop):
+- * self.name = _strdec(prop.name)
+- * self.data = _convert_value(prop.data, prop.format) # <<<<<<<<<<<<<<
+- * return self
+- *
+- */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = __pyx_t_1;
++ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":253
+- * self.name = _strdec(prop.name)
+- * self.data = _convert_value(prop.data, prop.format)
+- * return self # <<<<<<<<<<<<<<
+- *
+- *
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(((PyObject *)__pyx_v_self));
+- __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":250
+- * cdef public object name, data
++ /* "vidcutter/libs/pympv/mpv.pyx":295
+ *
+- * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
+- * self.name = _strdec(prop.name)
+- * self.data = _convert_value(prop.data, prop.format)
++ * @property
++ * def name(self): # <<<<<<<<<<<<<<
++ * """mpv_event_name of the event id"""
++ * cdef const char* name_c
+ */
+
+ /* function exit code */
+@@ -5780,1547 +6220,1710 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Property._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":248
+- * Wraps: mpv_event_property
+- * """
+- * cdef public object name, data # <<<<<<<<<<<<<<
++/* "vidcutter/libs/pympv/mpv.pyx":302
++ * return _strdec(name_c)
+ *
+- * cdef _init(self, mpv_event_property* prop):
++ * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
++ * cdef uint64_t ctxid = <uint64_t>id(ctx)
++ * self.id = event.event_id
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event, PyObject *__pyx_v_ctx) {
++ uint64_t __pyx_v_ctxid;
++ PyObject *__pyx_v_userdata = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->name);
+- __pyx_r = __pyx_v_self->name;
+- goto __pyx_L0;
+-
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ PyObject *__pyx_t_1 = NULL;
++ uint64_t __pyx_t_2;
++ enum mpv_event_id __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ int __pyx_t_7;
++ PyObject *__pyx_t_8 = NULL;
++ int __pyx_t_9;
++ int __pyx_t_10;
++ int __pyx_t_11;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("_init", 0);
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":303
++ *
++ * cdef _init(self, mpv_event* event, ctx):
++ * cdef uint64_t ctxid = <uint64_t>id(ctx) # <<<<<<<<<<<<<<
++ * self.id = event.event_id
++ * self.data = self._data(event)
++ */
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":304
++ * cdef _init(self, mpv_event* event, ctx):
++ * cdef uint64_t ctxid = <uint64_t>id(ctx)
++ * self.id = event.event_id # <<<<<<<<<<<<<<
++ * self.data = self._data(event)
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ */
++ __pyx_t_3 = __pyx_v_event->event_id;
++ __pyx_v_self->id = __pyx_t_3;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->name);
+- __Pyx_DECREF(__pyx_v_self->name);
+- __pyx_v_self->name = __pyx_v_value;
++ /* "vidcutter/libs/pympv/mpv.pyx":305
++ * cdef uint64_t ctxid = <uint64_t>id(ctx)
++ * self.id = event.event_id
++ * self.data = self._data(event) # <<<<<<<<<<<<<<
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ */
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":306
++ * self.id = event.event_id
++ * self.data = self._data(event)
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None) # <<<<<<<<<<<<<<
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ * userdata.remove()
++ */
++ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_6 = NULL;
++ __pyx_t_7 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_6)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_6);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ __pyx_t_7 = 1;
++ }
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_5)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_8);
++ if (__pyx_t_6) {
++ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
++ }
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_None);
++ __pyx_t_4 = 0;
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ }
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __pyx_v_userdata = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":307
++ * self.data = self._data(event)
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
++ * userdata.remove()
++ * if not userdata.observed and userdata.counter <= 0:
++ */
++ __pyx_t_10 = (__pyx_v_userdata != Py_None);
++ __pyx_t_11 = (__pyx_t_10 != 0);
++ if (__pyx_t_11) {
++ } else {
++ __pyx_t_9 = __pyx_t_11;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_11 = ((__pyx_v_self->id != MPV_EVENT_PROPERTY_CHANGE) != 0);
++ __pyx_t_9 = __pyx_t_11;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_9) {
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":308
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ * userdata.remove() # <<<<<<<<<<<<<<
++ * if not userdata.observed and userdata.counter <= 0:
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ */
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->name);
+- __Pyx_DECREF(__pyx_v_self->name);
+- __pyx_v_self->name = Py_None;
++ /* "vidcutter/libs/pympv/mpv.pyx":309
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ * userdata.remove()
++ * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ * if userdata is not None:
++ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_10 = ((!__pyx_t_11) != 0);
++ if (__pyx_t_10) {
++ } else {
++ __pyx_t_9 = __pyx_t_10;
++ goto __pyx_L7_bool_binop_done;
++ }
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __pyx_t_9 = __pyx_t_10;
++ __pyx_L7_bool_binop_done:;
++ if (__pyx_t_9) {
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":310
++ * userdata.remove()
++ * if not userdata.observed and userdata.counter <= 0:
++ * del _reply_userdatas[ctxid][event.reply_userdata] # <<<<<<<<<<<<<<
++ * if userdata is not None:
++ * userdata = userdata.data
++ */
++ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":309
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ * userdata.remove()
++ * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ * if userdata is not None:
++ */
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":307
++ * self.data = self._data(event)
++ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
++ * userdata.remove()
++ * if not userdata.observed and userdata.counter <= 0:
++ */
++ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->data);
+- __pyx_r = __pyx_v_self->data;
+- goto __pyx_L0;
++ /* "vidcutter/libs/pympv/mpv.pyx":311
++ * if not userdata.observed and userdata.counter <= 0:
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ * if userdata is not None: # <<<<<<<<<<<<<<
++ * userdata = userdata.data
++ * self.reply_userdata = userdata
++ */
++ __pyx_t_9 = (__pyx_v_userdata != Py_None);
++ __pyx_t_10 = (__pyx_t_9 != 0);
++ if (__pyx_t_10) {
+
+- /* function exit code */
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":312
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ * if userdata is not None:
++ * userdata = userdata.data # <<<<<<<<<<<<<<
++ * self.reply_userdata = userdata
++ * self.error = event.error
++ */
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF_SET(__pyx_v_userdata, __pyx_t_5);
++ __pyx_t_5 = 0;
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":311
++ * if not userdata.observed and userdata.counter <= 0:
++ * del _reply_userdatas[ctxid][event.reply_userdata]
++ * if userdata is not None: # <<<<<<<<<<<<<<
++ * userdata = userdata.data
++ * self.reply_userdata = userdata
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":313
++ * if userdata is not None:
++ * userdata = userdata.data
++ * self.reply_userdata = userdata # <<<<<<<<<<<<<<
++ * self.error = event.error
++ * return self
++ */
++ __Pyx_INCREF(__pyx_v_userdata);
++ __Pyx_GIVEREF(__pyx_v_userdata);
++ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
++ __Pyx_DECREF(__pyx_v_self->reply_userdata);
++ __pyx_v_self->reply_userdata = __pyx_v_userdata;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":314
++ * userdata = userdata.data
++ * self.reply_userdata = userdata
++ * self.error = event.error # <<<<<<<<<<<<<<
++ * return self
++ *
++ */
++ __pyx_t_7 = __pyx_v_event->error;
++ __pyx_v_self->error = __pyx_t_7;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":315
++ * self.reply_userdata = userdata
++ * self.error = event.error
++ * return self # <<<<<<<<<<<<<<
++ *
++ *
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(((PyObject *)__pyx_v_self));
++ __pyx_r = ((PyObject *)__pyx_v_self);
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":302
++ * return _strdec(name_c)
++ *
++ * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
++ * cdef uint64_t ctxid = <uint64_t>id(ctx)
++ * self.id = event.event_id
++ */
+
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_userdata);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
++/* "vidcutter/libs/pympv/mpv.pyx":258
++ * cdef class Event(object):
++ * """Wraps: mpv_event"""
++ * cdef public mpv_event_id id # <<<<<<<<<<<<<<
++ * cdef public int error
++ * cdef public object data, reply_userdata
++ */
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = __pyx_v_value;
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+
+ /* function exit code */
+- __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
++
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self) {
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = Py_None;
++ enum mpv_event_id __pyx_t_1;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error)
++ __pyx_v_self->id = __pyx_t_1;
+
+ /* function exit code */
+ __pyx_r = 0;
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = -1;
++ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++/* "vidcutter/libs/pympv/mpv.pyx":259
++ * """Wraps: mpv_event"""
++ * cdef public mpv_event_id id
++ * cdef public int error # <<<<<<<<<<<<<<
++ * cdef public object data, reply_userdata
++ *
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
+- PyObject *__pyx_v_state = 0;
+- PyObject *__pyx_v__dict = 0;
+- int __pyx_v_use_setstate;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+-
+- /* "(tree fragment)":5
+- * cdef object _dict
+- * cdef bint use_setstate
+- * state = (self.data, self.name) # <<<<<<<<<<<<<<
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- */
+- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v_self->data);
+- __Pyx_GIVEREF(__pyx_v_self->data);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->data);
+- __Pyx_INCREF(__pyx_v_self->name);
+- __Pyx_GIVEREF(__pyx_v_self->name);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name);
+- __pyx_v_state = ((PyObject*)__pyx_t_1);
++ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "(tree fragment)":6
+- * cdef bint use_setstate
+- * state = (self.data, self.name)
+- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
+- * if _dict is not None:
+- * state += (_dict,)
+- */
+- __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v__dict = __pyx_t_1;
+- __pyx_t_1 = 0;
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "(tree fragment)":7
+- * state = (self.data, self.name)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- __pyx_t_2 = (__pyx_v__dict != Py_None);
+- __pyx_t_3 = (__pyx_t_2 != 0);
+- if (__pyx_t_3) {
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+- /* "(tree fragment)":8
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- * state += (_dict,) # <<<<<<<<<<<<<<
+- * use_setstate = True
+- * else:
+- */
+- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v__dict);
+- __Pyx_GIVEREF(__pyx_v__dict);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
+- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
+- __pyx_t_4 = 0;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "(tree fragment)":9
+- * if _dict is not None:
+- * state += (_dict,)
+- * use_setstate = True # <<<<<<<<<<<<<<
+- * else:
+- * use_setstate = self.data is not None or self.name is not None
+- */
+- __pyx_v_use_setstate = 1;
+-
+- /* "(tree fragment)":7
+- * state = (self.data, self.name)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "(tree fragment)":11
+- * use_setstate = True
+- * else:
+- * use_setstate = self.data is not None or self.name is not None # <<<<<<<<<<<<<<
+- * if use_setstate:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
+- */
+- /*else*/ {
+- __pyx_t_2 = (__pyx_v_self->data != Py_None);
+- __pyx_t_5 = (__pyx_t_2 != 0);
+- if (!__pyx_t_5) {
+- } else {
+- __pyx_t_3 = __pyx_t_5;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_5 = (__pyx_v_self->name != Py_None);
+- __pyx_t_2 = (__pyx_t_5 != 0);
+- __pyx_t_3 = __pyx_t_2;
+- __pyx_L4_bool_binop_done:;
+- __pyx_v_use_setstate = __pyx_t_3;
+- }
+- __pyx_L3:;
+-
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.data is not None or self.name is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
+- * else:
+- */
+- __pyx_t_3 = (__pyx_v_use_setstate != 0);
+- if (__pyx_t_3) {
+-
+- /* "(tree fragment)":13
+- * use_setstate = self.data is not None or self.name is not None
+- * if use_setstate:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state # <<<<<<<<<<<<<<
+- * else:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_5713169);
+- __Pyx_GIVEREF(__pyx_int_5713169);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
+- __pyx_t_4 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_6;
+- __pyx_t_6 = 0;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.data is not None or self.name is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
+- * else:
+- */
+- }
+-
+- /* "(tree fragment)":15
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
+- * else:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state) # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_Property__set_state(self, __pyx_state)
+- */
+- /*else*/ {
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_5713169);
+- __Pyx_GIVEREF(__pyx_int_5713169);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
+- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_6);
+- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+- __pyx_t_6 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
+- goto __pyx_L0;
+- }
+-
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
+- */
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ int __pyx_t_1;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error)
++ __pyx_v_self->error = __pyx_t_1;
+
+ /* function exit code */
++ __pyx_r = 0;
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = -1;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_state);
+- __Pyx_XDECREF(__pyx_v__dict);
+- __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Property__set_state(self, __pyx_state)
++/* "vidcutter/libs/pympv/mpv.pyx":260
++ * cdef public mpv_event_id id
++ * cdef public int error
++ * cdef public object data, reply_userdata # <<<<<<<<<<<<<<
++ *
++ * @property
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+-
+- /* "(tree fragment)":17
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_Property__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Property__set_state(self, __pyx_state)
+- */
++ __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_self->data);
++ __pyx_r = __pyx_v_self->data;
++ goto __pyx_L0;
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":263
+- *
+- * @property
+- * def error_str(self): # <<<<<<<<<<<<<<
+- * """mpv_error_string of the error proeprty"""
+- * cdef const char* err_c
+- */
+-
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- char const *__pyx_v_err_c;
+- PyObject *__pyx_r = NULL;
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = __pyx_v_value;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":266
+- * """mpv_error_string of the error proeprty"""
+- * cdef const char* err_c
+- * with nogil: # <<<<<<<<<<<<<<
+- * err_c = mpv_error_string(self.error)
+- * return _strdec(err_c)
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":267
+- * cdef const char* err_c
+- * with nogil:
+- * err_c = mpv_error_string(self.error) # <<<<<<<<<<<<<<
+- * return _strdec(err_c)
+- *
+- */
+- __pyx_v_err_c = mpv_error_string(__pyx_v_self->error);
+- }
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":266
+- * """mpv_error_string of the error proeprty"""
+- * cdef const char* err_c
+- * with nogil: # <<<<<<<<<<<<<<
+- * err_c = mpv_error_string(self.error)
+- * return _strdec(err_c)
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":268
+- * with nogil:
+- * err_c = mpv_error_string(self.error)
+- * return _strdec(err_c) # <<<<<<<<<<<<<<
+- *
+- * cdef _data(self, mpv_event* event):
+- */
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->data);
++ __Pyx_DECREF(__pyx_v_self->data);
++ __pyx_v_self->data = Py_None;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
++ __Pyx_INCREF(__pyx_v_self->reply_userdata);
++ __pyx_r = __pyx_v_self->reply_userdata;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":263
+- *
+- * @property
+- * def error_str(self): # <<<<<<<<<<<<<<
+- * """mpv_error_string of the error proeprty"""
+- * cdef const char* err_c
+- */
+-
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error_str.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":270
+- * return _strdec(err_c)
+- *
+- * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
+- * cdef void* data = event.data
+- * cdef mpv_event_client_message* climsg
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__set__", 0);
++ __Pyx_INCREF(__pyx_v_value);
++ __Pyx_GIVEREF(__pyx_v_value);
++ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
++ __Pyx_DECREF(__pyx_v_self->reply_userdata);
++ __pyx_v_self->reply_userdata = __pyx_v_value;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__del__", 0);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
++ __Pyx_DECREF(__pyx_v_self->reply_userdata);
++ __pyx_v_self->reply_userdata = Py_None;
++
++ /* function exit code */
++ __pyx_r = 0;
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event) {
+- void *__pyx_v_data;
+- struct mpv_event_client_message *__pyx_v_climsg;
+- PyObject *__pyx_v_args = NULL;
+- int __pyx_v_num_args;
+- int __pyx_v_i;
+- PyObject *__pyx_v_arg = NULL;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++ PyObject *__pyx_v_state = 0;
++ PyObject *__pyx_v__dict = 0;
++ int __pyx_v_use_setstate;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- void *__pyx_t_1;
++ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ int __pyx_t_6;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_data", 0);
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":271
+- *
+- * cdef _data(self, mpv_event* event):
+- * cdef void* data = event.data # <<<<<<<<<<<<<<
+- * cdef mpv_event_client_message* climsg
+- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
++ /* "(tree fragment)":5
++ * cdef object _dict
++ * cdef bint use_setstate
++ * state = (self.data, self.error, self.id, self.reply_userdata) # <<<<<<<<<<<<<<
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
+ */
+- __pyx_t_1 = __pyx_v_event->data;
+- __pyx_v_data = __pyx_t_1;
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_INCREF(__pyx_v_self->data);
++ __Pyx_GIVEREF(__pyx_v_self->data);
++ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->data);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_2);
++ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
++ __Pyx_INCREF(__pyx_v_self->reply_userdata);
++ __Pyx_GIVEREF(__pyx_v_self->reply_userdata);
++ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->reply_userdata);
++ __pyx_t_1 = 0;
++ __pyx_t_2 = 0;
++ __pyx_v_state = ((PyObject*)__pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":273
+- * cdef void* data = event.data
+- * cdef mpv_event_client_message* climsg
+- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+- */
+- switch (__pyx_v_self->id) {
+- case MPV_EVENT_GET_PROPERTY_REPLY:
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":274
+- * cdef mpv_event_client_message* climsg
+- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
+- * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+- * return Property()._init(<mpv_event_property*>data)
++ /* "(tree fragment)":6
++ * cdef bint use_setstate
++ * state = (self.data, self.error, self.id, self.reply_userdata)
++ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
++ * if _dict is not None:
++ * state += (_dict,)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_v__dict = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":273
+- * cdef void* data = event.data
+- * cdef mpv_event_client_message* climsg
+- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
++ /* "(tree fragment)":7
++ * state = (self.data, self.error, self.id, self.reply_userdata)
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
+ */
+- break;
+- case MPV_EVENT_PROPERTY_CHANGE:
++ __pyx_t_4 = (__pyx_v__dict != Py_None);
++ __pyx_t_5 = (__pyx_t_4 != 0);
++ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":276
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+- * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
+- * elif self.id == MPV_EVENT_LOG_MESSAGE:
+- * return LogMessage()._init(<mpv_event_log_message*>data)
++ /* "(tree fragment)":8
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
++ * state += (_dict,) # <<<<<<<<<<<<<<
++ * use_setstate = True
++ * else:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __Pyx_INCREF(__pyx_v__dict);
++ __Pyx_GIVEREF(__pyx_v__dict);
++ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
++ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_r = __pyx_t_2;
++ __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
+ __pyx_t_2 = 0;
+- goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":275
+- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_LOG_MESSAGE:
++ /* "(tree fragment)":9
++ * if _dict is not None:
++ * state += (_dict,)
++ * use_setstate = True # <<<<<<<<<<<<<<
++ * else:
++ * use_setstate = self.data is not None or self.reply_userdata is not None
+ */
+- break;
+- case MPV_EVENT_LOG_MESSAGE:
++ __pyx_v_use_setstate = 1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":278
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_LOG_MESSAGE:
+- * return LogMessage()._init(<mpv_event_log_message*>data) # <<<<<<<<<<<<<<
+- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
+- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
++ /* "(tree fragment)":7
++ * state = (self.data, self.error, self.id, self.reply_userdata)
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
++ */
++ goto __pyx_L3;
++ }
++
++ /* "(tree fragment)":11
++ * use_setstate = True
++ * else:
++ * use_setstate = self.data is not None or self.reply_userdata is not None # <<<<<<<<<<<<<<
++ * if use_setstate:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
++ */
++ /*else*/ {
++ __pyx_t_4 = (__pyx_v_self->data != Py_None);
++ __pyx_t_6 = (__pyx_t_4 != 0);
++ if (!__pyx_t_6) {
++ } else {
++ __pyx_t_5 = __pyx_t_6;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_6 = (__pyx_v_self->reply_userdata != Py_None);
++ __pyx_t_4 = (__pyx_t_6 != 0);
++ __pyx_t_5 = __pyx_t_4;
++ __pyx_L4_bool_binop_done:;
++ __pyx_v_use_setstate = __pyx_t_5;
++ }
++ __pyx_L3:;
++
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = self.data is not None or self.reply_userdata is not None
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
++ * else:
++ */
++ __pyx_t_5 = (__pyx_v_use_setstate != 0);
++ if (__pyx_t_5) {
++
++ /* "(tree fragment)":13
++ * use_setstate = self.data is not None or self.reply_userdata is not None
++ * if use_setstate:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state # <<<<<<<<<<<<<<
++ * else:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_3;
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_228822053);
++ __Pyx_GIVEREF(__pyx_int_228822053);
++ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
++ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_2);
++ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
++ __pyx_t_2 = 0;
+ __pyx_t_3 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":277
+- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+- * return Property()._init(<mpv_event_property*>data)
+- * elif self.id == MPV_EVENT_LOG_MESSAGE: # <<<<<<<<<<<<<<
+- * return LogMessage()._init(<mpv_event_log_message*>data)
+- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = self.data is not None or self.reply_userdata is not None
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
++ * else:
+ */
+- break;
+- case MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":280
+- * return LogMessage()._init(<mpv_event_log_message*>data)
+- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
+- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data) # <<<<<<<<<<<<<<
+- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+- * climsg = <mpv_event_client_message*>data
++ /* "(tree fragment)":15
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
++ * else:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state) # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_Event__set_state(self, __pyx_state)
+ */
++ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch *)((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_t_3), ((struct mpv_event_script_input_dispatch *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_228822053);
++ __Pyx_GIVEREF(__pyx_int_228822053);
++ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
++ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
++ __pyx_t_1 = 0;
++ __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":279
+- * elif self.id == MPV_EVENT_LOG_MESSAGE:
+- * return LogMessage()._init(<mpv_event_log_message*>data)
+- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH: # <<<<<<<<<<<<<<
+- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+- break;
+- case MPV_EVENT_CLIENT_MESSAGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":282
+- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+- * climsg = <mpv_event_client_message*>data # <<<<<<<<<<<<<<
+- * args = []
+- * num_args = climsg.num_args
+- */
+- __pyx_v_climsg = ((struct mpv_event_client_message *)__pyx_v_data);
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_state);
++ __Pyx_XDECREF(__pyx_v__dict);
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":283
+- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+- * climsg = <mpv_event_client_message*>data
+- * args = [] # <<<<<<<<<<<<<<
+- * num_args = climsg.num_args
+- * for i in range(num_args):
++/* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Event__set_state(self, __pyx_state)
+ */
+- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_v_args = ((PyObject*)__pyx_t_2);
+- __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":284
+- * climsg = <mpv_event_client_message*>data
+- * args = []
+- * num_args = climsg.num_args # <<<<<<<<<<<<<<
+- * for i in range(num_args):
+- * arg = <char*>climsg.args[i]
+- */
+- __pyx_t_4 = __pyx_v_climsg->num_args;
+- __pyx_v_num_args = __pyx_t_4;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":285
+- * args = []
+- * num_args = climsg.num_args
+- * for i in range(num_args): # <<<<<<<<<<<<<<
+- * arg = <char*>climsg.args[i]
+- * arg = _strdec(arg)
+- */
+- __pyx_t_4 = __pyx_v_num_args;
+- __pyx_t_5 = __pyx_t_4;
+- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+- __pyx_v_i = __pyx_t_6;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":286
+- * num_args = climsg.num_args
+- * for i in range(num_args):
+- * arg = <char*>climsg.args[i] # <<<<<<<<<<<<<<
+- * arg = _strdec(arg)
+- * args.append(arg)
+- */
+- __pyx_t_2 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_2);
+- __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":287
+- * for i in range(num_args):
+- * arg = <char*>climsg.args[i]
+- * arg = _strdec(arg) # <<<<<<<<<<<<<<
+- * args.append(arg)
+- * return args
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strdec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_arg) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_arg);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_2);
+- __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":288
+- * arg = <char*>climsg.args[i]
+- * arg = _strdec(arg)
+- * args.append(arg) # <<<<<<<<<<<<<<
+- * return args
+- * elif self.id == MPV_EVENT_END_FILE:
+- */
+- __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
+- }
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":289
+- * arg = _strdec(arg)
+- * args.append(arg)
+- * return args # <<<<<<<<<<<<<<
+- * elif self.id == MPV_EVENT_END_FILE:
+- * return EndOfFileReached()._init(<mpv_event_end_file*>data)
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_args);
+- __pyx_r = __pyx_v_args;
+- goto __pyx_L0;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":281
+- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
+- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+- * elif self.id == MPV_EVENT_CLIENT_MESSAGE: # <<<<<<<<<<<<<<
+- * climsg = <mpv_event_client_message*>data
+- * args = []
+- */
+- break;
+- case MPV_EVENT_END_FILE:
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":291
+- * return args
+- * elif self.id == MPV_EVENT_END_FILE:
+- * return EndOfFileReached()._init(<mpv_event_end_file*>data) # <<<<<<<<<<<<<<
+- * return None
+- *
++ /* "(tree fragment)":17
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_Event__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_2), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":290
+- * args.append(arg)
+- * return args
+- * elif self.id == MPV_EVENT_END_FILE: # <<<<<<<<<<<<<<
+- * return EndOfFileReached()._init(<mpv_event_end_file*>data)
+- * return None
++ /* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Event__set_state(self, __pyx_state)
+ */
+- break;
+- default: break;
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":292
+- * elif self.id == MPV_EVENT_END_FILE:
+- * return EndOfFileReached()._init(<mpv_event_end_file*>data)
+- * return None # <<<<<<<<<<<<<<
+- *
+- * @property
+- */
+- __Pyx_XDECREF(__pyx_r);
++ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":270
+- * return _strdec(err_c)
++/* "vidcutter/libs/pympv/mpv.pyx":318
+ *
+- * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
+- * cdef void* data = event.data
+- * cdef mpv_event_client_message* climsg
++ *
++ * def _errors(fn): # <<<<<<<<<<<<<<
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
+ */
+
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_5_errors = {"_errors", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5_errors, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("_errors (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_4_errors(__pyx_self, ((PyObject *)__pyx_v_fn));
++
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event._data", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_args);
+- __Pyx_XDECREF(__pyx_v_arg);
+- __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":295
++/* "vidcutter/libs/pympv/mpv.pyx":319
+ *
+- * @property
+- * def name(self): # <<<<<<<<<<<<<<
+- * """mpv_event_name of the event id"""
+- * cdef const char* name_c
++ * def _errors(fn):
++ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
++ * v = fn(*k, **kw)
++ * if v < 0:
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped = {"wrapped", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_k = 0;
++ PyObject *__pyx_v_kw = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("wrapped (wrapper)", 0);
++ if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "wrapped", 1))) return NULL;
++ __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
++ __Pyx_GOTREF(__pyx_v_kw);
++ __Pyx_INCREF(__pyx_args);
++ __pyx_v_k = __pyx_args;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(__pyx_self, __pyx_v_k, __pyx_v_kw);
+
+ /* function exit code */
++ __Pyx_XDECREF(__pyx_v_k);
++ __Pyx_XDECREF(__pyx_v_kw);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- char const *__pyx_v_name_c;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_kw) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_outer_scope;
++ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_RefNannySetupContext("wrapped", 0);
++ __pyx_outer_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *) __Pyx_CyFunction_GetClosure(__pyx_self);
++ __pyx_cur_scope = __pyx_outer_scope;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":298
+- * """mpv_event_name of the event id"""
+- * cdef const char* name_c
+- * with nogil: # <<<<<<<<<<<<<<
+- * name_c = mpv_event_name(self.id)
+- * return _strdec(name_c)
++ /* "vidcutter/libs/pympv/mpv.pyx":320
++ * def _errors(fn):
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw) # <<<<<<<<<<<<<<
++ * if v < 0:
++ * raise MPVError(v)
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 320, __pyx_L1_error) }
++ __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_v = __pyx_t_2;
++ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":299
+- * cdef const char* name_c
+- * with nogil:
+- * name_c = mpv_event_name(self.id) # <<<<<<<<<<<<<<
+- * return _strdec(name_c)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":321
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
++ * if v < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(v)
++ * return wrapped
+ */
+- __pyx_v_name_c = mpv_event_name(__pyx_v_self->id);
+- }
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 321, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":298
+- * """mpv_event_name of the event id"""
+- * cdef const char* name_c
+- * with nogil: # <<<<<<<<<<<<<<
+- * name_c = mpv_event_name(self.id)
+- * return _strdec(name_c)
++ /* "vidcutter/libs/pympv/mpv.pyx":322
++ * v = fn(*k, **kw)
++ * if v < 0:
++ * raise MPVError(v) # <<<<<<<<<<<<<<
++ * return wrapped
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+- }
++ }
++ __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_v);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __PYX_ERR(0, 322, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":300
+- * with nogil:
+- * name_c = mpv_event_name(self.id)
+- * return _strdec(name_c) # <<<<<<<<<<<<<<
+- *
+- * cdef _init(self, mpv_event* event, ctx):
++ /* "vidcutter/libs/pympv/mpv.pyx":321
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
++ * if v < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(v)
++ * return wrapped
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+ }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":295
++ /* "vidcutter/libs/pympv/mpv.pyx":319
+ *
+- * @property
+- * def name(self): # <<<<<<<<<<<<<<
+- * """mpv_event_name of the event id"""
+- * cdef const char* name_c
++ * def _errors(fn):
++ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
++ * v = fn(*k, **kw)
++ * if v < 0:
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._errors.wrapped", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":302
+- * return _strdec(name_c)
++/* "vidcutter/libs/pympv/mpv.pyx":318
+ *
+- * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
+- * cdef uint64_t ctxid = <uint64_t>id(ctx)
+- * self.id = event.event_id
++ *
++ * def _errors(fn): # <<<<<<<<<<<<<<
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event, PyObject *__pyx_v_ctx) {
+- uint64_t __pyx_v_ctxid;
+- PyObject *__pyx_v_userdata = NULL;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
++ PyObject *__pyx_v_wrapped = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- uint64_t __pyx_t_2;
+- enum mpv_event_id __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- int __pyx_t_7;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_t_9;
+- int __pyx_t_10;
+- int __pyx_t_11;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_init", 0);
++ __Pyx_RefNannySetupContext("_errors", 0);
++ __pyx_cur_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(__pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, __pyx_empty_tuple, NULL);
++ if (unlikely(!__pyx_cur_scope)) {
++ __pyx_cur_scope = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)Py_None);
++ __Pyx_INCREF(Py_None);
++ __PYX_ERR(0, 318, __pyx_L1_error)
++ } else {
++ __Pyx_GOTREF(__pyx_cur_scope);
++ }
++ __pyx_cur_scope->__pyx_v_fn = __pyx_v_fn;
++ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn);
++ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":303
++ /* "vidcutter/libs/pympv/mpv.pyx":319
+ *
+- * cdef _init(self, mpv_event* event, ctx):
+- * cdef uint64_t ctxid = <uint64_t>id(ctx) # <<<<<<<<<<<<<<
+- * self.id = event.event_id
+- * self.data = self._data(event)
++ * def _errors(fn):
++ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
++ * v = fn(*k, **kw)
++ * if v < 0:
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
++ __pyx_v_wrapped = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":304
+- * cdef _init(self, mpv_event* event, ctx):
+- * cdef uint64_t ctxid = <uint64_t>id(ctx)
+- * self.id = event.event_id # <<<<<<<<<<<<<<
+- * self.data = self._data(event)
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
++ /* "vidcutter/libs/pympv/mpv.pyx":323
++ * if v < 0:
++ * raise MPVError(v)
++ * return wrapped # <<<<<<<<<<<<<<
++ *
++ *
+ */
+- __pyx_t_3 = __pyx_v_event->event_id;
+- __pyx_v_self->id = __pyx_t_3;
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_wrapped);
++ __pyx_r = __pyx_v_wrapped;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":305
+- * cdef uint64_t ctxid = <uint64_t>id(ctx)
+- * self.id = event.event_id
+- * self.data = self._data(event) # <<<<<<<<<<<<<<
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
++ /* "vidcutter/libs/pympv/mpv.pyx":318
++ *
++ *
++ * def _errors(fn): # <<<<<<<<<<<<<<
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = __pyx_t_1;
+- __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":306
+- * self.id = event.event_id
+- * self.data = self._data(event)
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None) # <<<<<<<<<<<<<<
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+- * userdata.remove()
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._errors", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_wrapped);
++ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":329
++ * code = None
++ *
++ * def __init__(self, e): # <<<<<<<<<<<<<<
++ * self.code = e
++ * cdef const char* err_c
+ */
+- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_6 = NULL;
+- __pyx_t_7 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- __pyx_t_7 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_5)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_self = 0;
++ PyObject *__pyx_v_e = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_8);
+- if (__pyx_t_6) {
+- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_e,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 329, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 329, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_None);
+- __pyx_t_4 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __pyx_v_self = values[0];
++ __pyx_v_e = values[1];
+ }
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __pyx_v_userdata = __pyx_t_1;
+- __pyx_t_1 = 0;
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(__pyx_self, __pyx_v_self, __pyx_v_e);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":307
+- * self.data = self._data(event)
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+- * userdata.remove()
+- * if not userdata.observed and userdata.counter <= 0:
+- */
+- __pyx_t_10 = (__pyx_v_userdata != Py_None);
+- __pyx_t_11 = (__pyx_t_10 != 0);
+- if (__pyx_t_11) {
+- } else {
+- __pyx_t_9 = __pyx_t_11;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_11 = ((__pyx_v_self->id != MPV_EVENT_PROPERTY_CHANGE) != 0);
+- __pyx_t_9 = __pyx_t_11;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_9) {
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":308
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+- * userdata.remove() # <<<<<<<<<<<<<<
+- * if not userdata.observed and userdata.counter <= 0:
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_e) {
++ char const *__pyx_v_err_c;
++ int __pyx_v_e_i;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ int __pyx_t_1;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__init__", 0);
++ __Pyx_INCREF(__pyx_v_e);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":309
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+- * userdata.remove()
+- * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- * if userdata is not None:
++ /* "vidcutter/libs/pympv/mpv.pyx":330
++ *
++ * def __init__(self, e):
++ * self.code = e # <<<<<<<<<<<<<<
++ * cdef const char* err_c
++ * cdef int e_i
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_10 = ((!__pyx_t_11) != 0);
+- if (__pyx_t_10) {
+- } else {
+- __pyx_t_9 = __pyx_t_10;
+- goto __pyx_L7_bool_binop_done;
+- }
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __pyx_t_9 = __pyx_t_10;
+- __pyx_L7_bool_binop_done:;
+- if (__pyx_t_9) {
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":310
+- * userdata.remove()
+- * if not userdata.observed and userdata.counter <= 0:
+- * del _reply_userdatas[ctxid][event.reply_userdata] # <<<<<<<<<<<<<<
+- * if userdata is not None:
+- * userdata = userdata.data
++ /* "vidcutter/libs/pympv/mpv.pyx":333
++ * cdef const char* err_c
++ * cdef int e_i
++ * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
++ * e_i = e
++ * with nogil:
+ */
+- __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_e);
++ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":309
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+- * userdata.remove()
+- * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- * if userdata is not None:
++ /* "vidcutter/libs/pympv/mpv.pyx":334
++ * cdef int e_i
++ * if not isinstance(e, basestring):
++ * e_i = e # <<<<<<<<<<<<<<
++ * with nogil:
++ * err_c = mpv_error_string(e_i)
+ */
+- }
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
++ __pyx_v_e_i = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":307
+- * self.data = self._data(event)
+- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+- * userdata.remove()
+- * if not userdata.observed and userdata.counter <= 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":335
++ * if not isinstance(e, basestring):
++ * e_i = e
++ * with nogil: # <<<<<<<<<<<<<<
++ * err_c = mpv_error_string(e_i)
++ * e = _strdec(err_c)
+ */
+- }
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":311
+- * if not userdata.observed and userdata.counter <= 0:
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- * if userdata is not None: # <<<<<<<<<<<<<<
+- * userdata = userdata.data
+- * self.reply_userdata = userdata
++ /* "vidcutter/libs/pympv/mpv.pyx":336
++ * e_i = e
++ * with nogil:
++ * err_c = mpv_error_string(e_i) # <<<<<<<<<<<<<<
++ * e = _strdec(err_c)
++ * Exception.__init__(self, e)
+ */
+- __pyx_t_9 = (__pyx_v_userdata != Py_None);
+- __pyx_t_10 = (__pyx_t_9 != 0);
+- if (__pyx_t_10) {
++ __pyx_v_err_c = mpv_error_string(__pyx_v_e_i);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":312
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- * if userdata is not None:
+- * userdata = userdata.data # <<<<<<<<<<<<<<
+- * self.reply_userdata = userdata
+- * self.error = event.error
++ /* "vidcutter/libs/pympv/mpv.pyx":335
++ * if not isinstance(e, basestring):
++ * e_i = e
++ * with nogil: # <<<<<<<<<<<<<<
++ * err_c = mpv_error_string(e_i)
++ * e = _strdec(err_c)
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF_SET(__pyx_v_userdata, __pyx_t_5);
+- __pyx_t_5 = 0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L6;
++ }
++ __pyx_L6:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":311
+- * if not userdata.observed and userdata.counter <= 0:
+- * del _reply_userdatas[ctxid][event.reply_userdata]
+- * if userdata is not None: # <<<<<<<<<<<<<<
+- * userdata = userdata.data
+- * self.reply_userdata = userdata
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":313
+- * if userdata is not None:
+- * userdata = userdata.data
+- * self.reply_userdata = userdata # <<<<<<<<<<<<<<
+- * self.error = event.error
+- * return self
++ /* "vidcutter/libs/pympv/mpv.pyx":337
++ * with nogil:
++ * err_c = mpv_error_string(e_i)
++ * e = _strdec(err_c) # <<<<<<<<<<<<<<
++ * Exception.__init__(self, e)
++ *
+ */
+- __Pyx_INCREF(__pyx_v_userdata);
+- __Pyx_GIVEREF(__pyx_v_userdata);
+- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+- __Pyx_DECREF(__pyx_v_self->reply_userdata);
+- __pyx_v_self->reply_userdata = __pyx_v_userdata;
++ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ }
++ }
++ __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_4);
++ __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":314
+- * userdata = userdata.data
+- * self.reply_userdata = userdata
+- * self.error = event.error # <<<<<<<<<<<<<<
+- * return self
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":333
++ * cdef const char* err_c
++ * cdef int e_i
++ * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
++ * e_i = e
++ * with nogil:
+ */
+- __pyx_t_7 = __pyx_v_event->error;
+- __pyx_v_self->error = __pyx_t_7;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":315
+- * self.reply_userdata = userdata
+- * self.error = event.error
+- * return self # <<<<<<<<<<<<<<
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":338
++ * err_c = mpv_error_string(e_i)
++ * e = _strdec(err_c)
++ * Exception.__init__(self, e) # <<<<<<<<<<<<<<
+ *
++ * class PyMPVError(Exception):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(((PyObject *)__pyx_v_self));
+- __pyx_r = ((PyObject *)__pyx_v_self);
+- goto __pyx_L0;
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_6 = NULL;
++ __pyx_t_3 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_6)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_6);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ __pyx_t_3 = 1;
++ }
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_5)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
++ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GOTREF(__pyx_t_4);
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
++ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GOTREF(__pyx_t_4);
++ } else
++ #endif
++ {
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (__pyx_t_6) {
++ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
++ }
++ __Pyx_INCREF(__pyx_v_self);
++ __Pyx_GIVEREF(__pyx_v_self);
++ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_3, __pyx_v_self);
++ __Pyx_INCREF(__pyx_v_e);
++ __Pyx_GIVEREF(__pyx_v_e);
++ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_3, __pyx_v_e);
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ }
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":302
+- * return _strdec(name_c)
++ /* "vidcutter/libs/pympv/mpv.pyx":329
++ * code = None
+ *
+- * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
+- * cdef uint64_t ctxid = <uint64_t>id(ctx)
+- * self.id = event.event_id
++ * def __init__(self, e): # <<<<<<<<<<<<<<
++ * self.code = e
++ * cdef const char* err_c
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_userdata);
++ __Pyx_XDECREF(__pyx_v_e);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":258
+- * cdef class Event(object):
+- * """Wraps: mpv_event"""
+- * cdef public mpv_event_id id # <<<<<<<<<<<<<<
+- * cdef public int error
+- * cdef public object data, reply_userdata
++/* "vidcutter/libs/pympv/mpv.pyx":347
++ *
++ * class _ReplyUserData(object):
++ * def __init__(self, data): # <<<<<<<<<<<<<<
++ * self.counter = 0
++ * self.data = data
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_self = 0;
++ PyObject *__pyx_v_data = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 347, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 347, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ }
++ __pyx_v_self = values[0];
++ __pyx_v_data = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 347, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(__pyx_self, __pyx_v_self, __pyx_v_data);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ __Pyx_RefNannySetupContext("__init__", 0);
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ /* "vidcutter/libs/pympv/mpv.pyx":348
++ * class _ReplyUserData(object):
++ * def __init__(self, data):
++ * self.counter = 0 # <<<<<<<<<<<<<<
++ * self.data = data
++ * self.observed = False
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":349
++ * def __init__(self, data):
++ * self.counter = 0
++ * self.data = data # <<<<<<<<<<<<<<
++ * self.observed = False
++ *
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- enum mpv_event_id __pyx_t_1;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error)
+- __pyx_v_self->id = __pyx_t_1;
++ /* "vidcutter/libs/pympv/mpv.pyx":350
++ * self.counter = 0
++ * self.data = data
++ * self.observed = False # <<<<<<<<<<<<<<
++ *
++ * def add(self):
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":347
++ *
++ * class _ReplyUserData(object):
++ * def __init__(self, data): # <<<<<<<<<<<<<<
++ * self.counter = 0
++ * self.data = data
++ */
+
+ /* function exit code */
+- __pyx_r = 0;
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
++ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":259
+- * """Wraps: mpv_event"""
+- * cdef public mpv_event_id id
+- * cdef public int error # <<<<<<<<<<<<<<
+- * cdef public object data, reply_userdata
++/* "vidcutter/libs/pympv/mpv.pyx":352
++ * self.observed = False
++ *
++ * def add(self): # <<<<<<<<<<<<<<
++ * self.counter += 1
+ *
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add = {"add", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("add (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
++ __Pyx_RefNannySetupContext("add", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":353
++ *
++ * def add(self):
++ * self.counter += 1 # <<<<<<<<<<<<<<
++ *
++ * def remove(self):
++ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":352
++ * self.observed = False
++ *
++ * def add(self): # <<<<<<<<<<<<<<
++ * self.counter += 1
++ *
++ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -7328,1181 +7931,1253 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __p
+ return __pyx_r;
+ }
+
++/* "vidcutter/libs/pympv/mpv.pyx":355
++ * self.counter += 1
++ *
++ * def remove(self): # <<<<<<<<<<<<<<
++ * self.counter -= 1
++ *
++ */
++
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove = {"remove", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ __Pyx_RefNannySetupContext("remove (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error)
+- __pyx_v_self->error = __pyx_t_1;
++ __Pyx_RefNannySetupContext("remove", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":356
++ *
++ * def remove(self):
++ * self.counter -= 1 # <<<<<<<<<<<<<<
++ *
++ *
++ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":355
++ * self.counter += 1
++ *
++ * def remove(self): # <<<<<<<<<<<<<<
++ * self.counter -= 1
++ *
++ */
+
+ /* function exit code */
+- __pyx_r = 0;
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":260
+- * cdef public mpv_event_id id
+- * cdef public int error
+- * cdef public object data, reply_userdata # <<<<<<<<<<<<<<
++/* "vidcutter/libs/pympv/mpv.pyx":370
+ *
+ * @property
++ * def api_version(self): # <<<<<<<<<<<<<<
++ * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
++ *
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":371
++ * @property
++ * def api_version(self):
++ * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION # <<<<<<<<<<<<<<
++ *
++ * @property
++ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->data);
+- __pyx_r = __pyx_v_self->data;
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_2);
++ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
++ __pyx_t_1 = 0;
++ __pyx_t_2 = 0;
++ __pyx_t_3 = 0;
++ __pyx_r = __pyx_t_4;
++ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
++ /* "vidcutter/libs/pympv/mpv.pyx":370
++ *
++ * @property
++ * def api_version(self): # <<<<<<<<<<<<<<
++ * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
++ *
++ */
++
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.api_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
++/* "vidcutter/libs/pympv/mpv.pyx":374
++ *
++ * @property
++ * def name(self): # <<<<<<<<<<<<<<
++ * """Unique name for every context created.
++ *
++ */
++
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ char const *__pyx_v_name;
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = __pyx_v_value;
+-
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__get__", 0);
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->data);
+- __Pyx_DECREF(__pyx_v_self->data);
+- __pyx_v_self->data = Py_None;
++ /* "vidcutter/libs/pympv/mpv.pyx":380
++ * """
++ * cdef const char* name
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * with nogil:
++ * name = mpv_client_name(self._ctx)
++ */
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 380, __pyx_L1_error)
++ }
++ }
++ #endif
+
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":381
++ * cdef const char* name
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * name = mpv_client_name(self._ctx)
++ * return _strdec(name)
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":382
++ * assert self._ctx
++ * with nogil:
++ * name = mpv_client_name(self._ctx) # <<<<<<<<<<<<<<
++ * return _strdec(name)
++ *
++ */
++ __pyx_v_name = mpv_client_name(__pyx_v_self->_ctx);
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":381
++ * cdef const char* name
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * name = mpv_client_name(self._ctx)
++ * return _strdec(name)
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":383
++ * with nogil:
++ * name = mpv_client_name(self._ctx)
++ * return _strdec(name) # <<<<<<<<<<<<<<
++ *
++ * @property
++ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_self->reply_userdata);
+- __pyx_r = __pyx_v_self->reply_userdata;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
++ /* "vidcutter/libs/pympv/mpv.pyx":374
++ *
++ * @property
++ * def name(self): # <<<<<<<<<<<<<<
++ * """Unique name for every context created.
++ *
++ */
++
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__set__", 0);
+- __Pyx_INCREF(__pyx_v_value);
+- __Pyx_GIVEREF(__pyx_v_value);
+- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+- __Pyx_DECREF(__pyx_v_self->reply_userdata);
+- __pyx_v_self->reply_userdata = __pyx_v_value;
+-
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__del__", 0);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+- __Pyx_DECREF(__pyx_v_self->reply_userdata);
+- __pyx_v_self->reply_userdata = Py_None;
+-
+- /* function exit code */
+- __pyx_r = 0;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++/* "vidcutter/libs/pympv/mpv.pyx":386
++ *
++ * @property
++ * def time(self): # <<<<<<<<<<<<<<
++ * """Internal mpv client time.
++ *
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
+- PyObject *__pyx_v_state = 0;
+- PyObject *__pyx_v__dict = 0;
+- int __pyx_v_use_setstate;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ int64_t __pyx_v_time;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "(tree fragment)":5
+- * cdef object _dict
+- * cdef bint use_setstate
+- * state = (self.data, self.error, self.id, self.reply_userdata) # <<<<<<<<<<<<<<
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_INCREF(__pyx_v_self->data);
+- __Pyx_GIVEREF(__pyx_v_self->data);
+- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->data);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_2);
+- PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
+- __Pyx_INCREF(__pyx_v_self->reply_userdata);
+- __Pyx_GIVEREF(__pyx_v_self->reply_userdata);
+- PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->reply_userdata);
+- __pyx_t_1 = 0;
+- __pyx_t_2 = 0;
+- __pyx_v_state = ((PyObject*)__pyx_t_3);
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":6
+- * cdef bint use_setstate
+- * state = (self.data, self.error, self.id, self.reply_userdata)
+- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
+- * if _dict is not None:
+- * state += (_dict,)
+- */
+- __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_v__dict = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":7
+- * state = (self.data, self.error, self.id, self.reply_userdata)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- __pyx_t_4 = (__pyx_v__dict != Py_None);
+- __pyx_t_5 = (__pyx_t_4 != 0);
+- if (__pyx_t_5) {
+-
+- /* "(tree fragment)":8
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- * state += (_dict,) # <<<<<<<<<<<<<<
+- * use_setstate = True
+- * else:
+- */
+- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_INCREF(__pyx_v__dict);
+- __Pyx_GIVEREF(__pyx_v__dict);
+- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
+- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
+- __pyx_t_2 = 0;
+-
+- /* "(tree fragment)":9
+- * if _dict is not None:
+- * state += (_dict,)
+- * use_setstate = True # <<<<<<<<<<<<<<
+- * else:
+- * use_setstate = self.data is not None or self.reply_userdata is not None
+- */
+- __pyx_v_use_setstate = 1;
+-
+- /* "(tree fragment)":7
+- * state = (self.data, self.error, self.id, self.reply_userdata)
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "(tree fragment)":11
+- * use_setstate = True
+- * else:
+- * use_setstate = self.data is not None or self.reply_userdata is not None # <<<<<<<<<<<<<<
+- * if use_setstate:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
++ /* "vidcutter/libs/pympv/mpv.pyx":394
++ * """
++ * cdef int64_t time
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * with nogil:
++ * time = mpv_get_time_us(self._ctx)
+ */
+- /*else*/ {
+- __pyx_t_4 = (__pyx_v_self->data != Py_None);
+- __pyx_t_6 = (__pyx_t_4 != 0);
+- if (!__pyx_t_6) {
+- } else {
+- __pyx_t_5 = __pyx_t_6;
+- goto __pyx_L4_bool_binop_done;
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 394, __pyx_L1_error)
+ }
+- __pyx_t_6 = (__pyx_v_self->reply_userdata != Py_None);
+- __pyx_t_4 = (__pyx_t_6 != 0);
+- __pyx_t_5 = __pyx_t_4;
+- __pyx_L4_bool_binop_done:;
+- __pyx_v_use_setstate = __pyx_t_5;
+ }
+- __pyx_L3:;
++ #endif
+
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.data is not None or self.reply_userdata is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":395
++ * cdef int64_t time
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * time = mpv_get_time_us(self._ctx)
++ * return time
+ */
+- __pyx_t_5 = (__pyx_v_use_setstate != 0);
+- if (__pyx_t_5) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "(tree fragment)":13
+- * use_setstate = self.data is not None or self.reply_userdata is not None
+- * if use_setstate:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state # <<<<<<<<<<<<<<
+- * else:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
++ /* "vidcutter/libs/pympv/mpv.pyx":396
++ * assert self._ctx
++ * with nogil:
++ * time = mpv_get_time_us(self._ctx) # <<<<<<<<<<<<<<
++ * return time
++ *
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_228822053);
+- __Pyx_GIVEREF(__pyx_int_228822053);
+- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_2);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
+- __pyx_t_2 = 0;
+- __pyx_t_3 = 0;
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_v_time = mpv_get_time_us(__pyx_v_self->_ctx);
++ }
+
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = self.data is not None or self.reply_userdata is not None
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":395
++ * cdef int64_t time
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * time = mpv_get_time_us(self._ctx)
++ * return time
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
+ }
+
+- /* "(tree fragment)":15
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
+- * else:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state) # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_Event__set_state(self, __pyx_state)
++ /* "vidcutter/libs/pympv/mpv.pyx":397
++ * with nogil:
++ * time = mpv_get_time_us(self._ctx)
++ * return time # <<<<<<<<<<<<<<
++ *
++ * # def suspend(self):
+ */
+- /*else*/ {
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_228822053);
+- __Pyx_GIVEREF(__pyx_int_228822053);
+- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
+- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
+- __pyx_t_1 = 0;
+- __pyx_t_3 = 0;
+- __pyx_r = __pyx_t_2;
+- __pyx_t_2 = 0;
+- goto __pyx_L0;
+- }
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++ /* "vidcutter/libs/pympv/mpv.pyx":386
++ *
++ * @property
++ * def time(self): # <<<<<<<<<<<<<<
++ * """Internal mpv client time.
++ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_state);
+- __Pyx_XDECREF(__pyx_v__dict);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Event__set_state(self, __pyx_state)
++/* "vidcutter/libs/pympv/mpv.pyx":412
++ *
++ * @_errors
++ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
++ * """Enable or disable a given event.
++ *
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_request_event[] = "Enable or disable a given event.\n\n Arguments:\n event - See Events\n enable - True to enable, False to disable\n\n Wraps: mpv_request_event\n ";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_event = 0;
++ PyObject *__pyx_v_enable = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __Pyx_RefNannySetupContext("request_event (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_event,&__pyx_n_s_enable,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enable)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 412, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ }
++ __pyx_v_event = values[0];
++ __pyx_v_enable = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_event, __pyx_v_enable);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable) {
++ int __pyx_v_enable_i;
++ int __pyx_v_err;
++ enum mpv_event_id __pyx_v_event_id;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
++ int __pyx_t_2;
++ enum mpv_event_id __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ __Pyx_RefNannySetupContext("request_event", 0);
+
+- /* "(tree fragment)":17
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_Event__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":421
++ * Wraps: mpv_request_event
++ * """
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * cdef int enable_i = 1 if enable else 0
++ * cdef int err
+ */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 421, __pyx_L1_error)
++ }
++ }
++ #endif
+
+- /* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Event__set_state(self, __pyx_state)
++ /* "vidcutter/libs/pympv/mpv.pyx":422
++ * """
++ * assert self._ctx
++ * cdef int enable_i = 1 if enable else 0 # <<<<<<<<<<<<<<
++ * cdef int err
++ * cdef mpv_event_id event_id = event
+ */
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
++ if (__pyx_t_2) {
++ __pyx_t_1 = 1;
++ } else {
++ __pyx_t_1 = 0;
++ }
++ __pyx_v_enable_i = __pyx_t_1;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":424
++ * cdef int enable_i = 1 if enable else 0
++ * cdef int err
++ * cdef mpv_event_id event_id = event # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_request_event(self._ctx, event_id, enable_i)
++ */
++ __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
++ __pyx_v_event_id = __pyx_t_3;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":318
++ /* "vidcutter/libs/pympv/mpv.pyx":425
++ * cdef int err
++ * cdef mpv_event_id event_id = event
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_request_event(self._ctx, event_id, enable_i)
++ * return err
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":426
++ * cdef mpv_event_id event_id = event
++ * with nogil:
++ * err = mpv_request_event(self._ctx, event_id, enable_i) # <<<<<<<<<<<<<<
++ * return err
+ *
++ */
++ __pyx_v_err = mpv_request_event(__pyx_v_self->_ctx, __pyx_v_event_id, __pyx_v_enable_i);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":425
++ * cdef int err
++ * cdef mpv_event_id event_id = event
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_request_event(self._ctx, event_id, enable_i)
++ * return err
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":427
++ * with nogil:
++ * err = mpv_request_event(self._ctx, event_id, enable_i)
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def _errors(fn): # <<<<<<<<<<<<<<
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
++ * @_errors
+ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_r = __pyx_t_4;
++ __pyx_t_4 = 0;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_5_errors = {"_errors", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5_errors, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("_errors (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_4_errors(__pyx_self, ((PyObject *)__pyx_v_fn));
++ /* "vidcutter/libs/pympv/mpv.pyx":412
++ *
++ * @_errors
++ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
++ * """Enable or disable a given event.
++ *
++ */
+
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":319
++/* "vidcutter/libs/pympv/mpv.pyx":430
+ *
+- * def _errors(fn):
+- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+- * v = fn(*k, **kw)
+- * if v < 0:
++ * @_errors
++ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_request_log_messages"""
++ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped = {"wrapped", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_k = 0;
+- PyObject *__pyx_v_kw = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_2set_log_level[] = "Wraps: mpv_request_log_messages";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("wrapped (wrapper)", 0);
+- if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "wrapped", 1))) return NULL;
+- if (unlikely(__pyx_kwds)) {
+- __pyx_v_kw = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kw)) return NULL;
+- __Pyx_GOTREF(__pyx_v_kw);
+- } else {
+- __pyx_v_kw = NULL;
+- }
+- __Pyx_INCREF(__pyx_args);
+- __pyx_v_k = __pyx_args;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(__pyx_self, __pyx_v_k, __pyx_v_kw);
++ __Pyx_RefNannySetupContext("set_log_level (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_loglevel));
+
+ /* function exit code */
+- __Pyx_XDECREF(__pyx_v_k);
+- __Pyx_XDECREF(__pyx_v_kw);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_kw) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_outer_scope;
+- PyObject *__pyx_v_v = NULL;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel) {
++ char const *__pyx_v_loglevel_c;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
++ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
++ char const *__pyx_t_4;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("wrapped", 0);
+- __pyx_outer_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *) __Pyx_CyFunction_GetClosure(__pyx_self);
+- __pyx_cur_scope = __pyx_outer_scope;
++ __Pyx_RefNannySetupContext("set_log_level", 0);
++ __Pyx_INCREF(__pyx_v_loglevel);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":320
+- * def _errors(fn):
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw) # <<<<<<<<<<<<<<
+- * if v < 0:
+- * raise MPVError(v)
++ /* "vidcutter/libs/pympv/mpv.pyx":432
++ * def set_log_level(self, loglevel):
++ * """Wraps: mpv_request_log_messages"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * loglevel = _strenc(loglevel)
++ * cdef const char* loglevel_c = loglevel
+ */
+- if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 320, __pyx_L1_error) }
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 432, __pyx_L1_error)
++ }
++ }
++ #endif
++
++ /* "vidcutter/libs/pympv/mpv.pyx":433
++ * """Wraps: mpv_request_log_messages"""
++ * assert self._ctx
++ * loglevel = _strenc(loglevel) # <<<<<<<<<<<<<<
++ * cdef const char* loglevel_c = loglevel
++ * cdef int err
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_loglevel) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loglevel);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_v = __pyx_t_1;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF_SET(__pyx_v_loglevel, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":321
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
+- * if v < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(v)
+- * return wrapped
++ /* "vidcutter/libs/pympv/mpv.pyx":434
++ * assert self._ctx
++ * loglevel = _strenc(loglevel)
++ * cdef const char* loglevel_c = loglevel # <<<<<<<<<<<<<<
++ * cdef int err
++ * with nogil:
+ */
+- __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 321, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (unlikely(__pyx_t_2)) {
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L1_error)
++ __pyx_v_loglevel_c = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":322
+- * v = fn(*k, **kw)
+- * if v < 0:
+- * raise MPVError(v) # <<<<<<<<<<<<<<
+- * return wrapped
++ /* "vidcutter/libs/pympv/mpv.pyx":436
++ * cdef const char* loglevel_c = loglevel
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_request_log_messages(self._ctx, loglevel_c)
++ * return err
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":437
++ * cdef int err
++ * with nogil:
++ * err = mpv_request_log_messages(self._ctx, loglevel_c) # <<<<<<<<<<<<<<
++ * return err
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
++ __pyx_v_err = mpv_request_log_messages(__pyx_v_self->_ctx, __pyx_v_loglevel_c);
+ }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_v);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 322, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":321
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
+- * if v < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(v)
+- * return wrapped
++ /* "vidcutter/libs/pympv/mpv.pyx":436
++ * cdef const char* loglevel_c = loglevel
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_request_log_messages(self._ctx, loglevel_c)
++ * return err
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":319
++ /* "vidcutter/libs/pympv/mpv.pyx":438
++ * with nogil:
++ * err = mpv_request_log_messages(self._ctx, loglevel_c)
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def _errors(fn):
+- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+- * v = fn(*k, **kw)
+- * if v < 0:
++ * @_errors
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":430
++ *
++ * @_errors
++ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_request_log_messages"""
++ * assert self._ctx
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._errors.wrapped", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_log_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_v);
++ __Pyx_XDECREF(__pyx_v_loglevel);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":318
+- *
++/* "vidcutter/libs/pympv/mpv.pyx":441
+ *
+- * def _errors(fn): # <<<<<<<<<<<<<<
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
++ * @_errors
++ * def load_config(self, filename): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_load_config_file"""
++ * assert self._ctx
+ */
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
+- PyObject *__pyx_v_wrapped = 0;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_4load_config[] = "Wraps: mpv_load_config_file";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("load_config (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_filename));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename) {
++ char const *__pyx_v__filename;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ char const *__pyx_t_4;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_errors", 0);
+- __pyx_cur_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(__pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, __pyx_empty_tuple, NULL);
+- if (unlikely(!__pyx_cur_scope)) {
+- __pyx_cur_scope = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)Py_None);
+- __Pyx_INCREF(Py_None);
+- __PYX_ERR(0, 318, __pyx_L1_error)
+- } else {
+- __Pyx_GOTREF(__pyx_cur_scope);
++ __Pyx_RefNannySetupContext("load_config", 0);
++ __Pyx_INCREF(__pyx_v_filename);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":443
++ * def load_config(self, filename):
++ * """Wraps: mpv_load_config_file"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * filename = _strenc(filename)
++ * cdef const char* _filename = filename
++ */
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 443, __pyx_L1_error)
++ }
+ }
+- __pyx_cur_scope->__pyx_v_fn = __pyx_v_fn;
+- __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn);
+- __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn);
++ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":319
+- *
+- * def _errors(fn):
+- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+- * v = fn(*k, **kw)
+- * if v < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":444
++ * """Wraps: mpv_load_config_file"""
++ * assert self._ctx
++ * filename = _strenc(filename) # <<<<<<<<<<<<<<
++ * cdef const char* _filename = filename
++ * cdef int err
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_wrapped = __pyx_t_1;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":323
+- * if v < 0:
+- * raise MPVError(v)
+- * return wrapped # <<<<<<<<<<<<<<
+- *
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":445
++ * assert self._ctx
++ * filename = _strenc(filename)
++ * cdef const char* _filename = filename # <<<<<<<<<<<<<<
++ * cdef int err
++ * with nogil:
++ */
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
++ __pyx_v__filename = __pyx_t_4;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":447
++ * cdef const char* _filename = filename
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_load_config_file(self._ctx, _filename)
++ * return err
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":448
++ * cdef int err
++ * with nogil:
++ * err = mpv_load_config_file(self._ctx, _filename) # <<<<<<<<<<<<<<
++ * return err
++ *
++ */
++ __pyx_v_err = mpv_load_config_file(__pyx_v_self->_ctx, __pyx_v__filename);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":447
++ * cdef const char* _filename = filename
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_load_config_file(self._ctx, _filename)
++ * return err
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":449
++ * with nogil:
++ * err = mpv_load_config_file(self._ctx, _filename)
++ * return err # <<<<<<<<<<<<<<
++ *
++ * def _format_for(self, value):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_wrapped);
+- __pyx_r = __pyx_v_wrapped;
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":318
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":441
+ *
+- * def _errors(fn): # <<<<<<<<<<<<<<
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
++ * @_errors
++ * def load_config(self, filename): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_load_config_file"""
++ * assert self._ctx
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._errors", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.load_config", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_wrapped);
+- __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
++ __Pyx_XDECREF(__pyx_v_filename);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":329
+- * code = None
++/* "vidcutter/libs/pympv/mpv.pyx":451
++ * return err
+ *
+- * def __init__(self, e): # <<<<<<<<<<<<<<
+- * self.code = e
+- * cdef const char* err_c
++ * def _format_for(self, value): # <<<<<<<<<<<<<<
++ * if isinstance(value, basestring):
++ * return MPV_FORMAT_STRING
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_self = 0;
+- PyObject *__pyx_v_e = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_e,0};
+- PyObject* values[2] = {0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 329, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 329, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- }
+- __pyx_v_self = values[0];
+- __pyx_v_e = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(__pyx_self, __pyx_v_self, __pyx_v_e);
++ __Pyx_RefNannySetupContext("_format_for (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_e) {
+- char const *__pyx_v_err_c;
+- int __pyx_v_e_i;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_4;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
+- __Pyx_INCREF(__pyx_v_e);
++ __Pyx_RefNannySetupContext("_format_for", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":330
++ /* "vidcutter/libs/pympv/mpv.pyx":452
+ *
+- * def __init__(self, e):
+- * self.code = e # <<<<<<<<<<<<<<
+- * cdef const char* err_c
+- * cdef int e_i
+- */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":333
+- * cdef const char* err_c
+- * cdef int e_i
+- * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
+- * e_i = e
+- * with nogil:
++ * def _format_for(self, value):
++ * if isinstance(value, basestring): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_STRING
++ * elif isinstance(value, bool):
+ */
+- __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_e);
+- __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
++ __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_value);
++ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":334
+- * cdef int e_i
+- * if not isinstance(e, basestring):
+- * e_i = e # <<<<<<<<<<<<<<
+- * with nogil:
+- * err_c = mpv_error_string(e_i)
++ /* "vidcutter/libs/pympv/mpv.pyx":453
++ * def _format_for(self, value):
++ * if isinstance(value, basestring):
++ * return MPV_FORMAT_STRING # <<<<<<<<<<<<<<
++ * elif isinstance(value, bool):
++ * return MPV_FORMAT_FLAG
+ */
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
+- __pyx_v_e_i = __pyx_t_3;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":335
+- * if not isinstance(e, basestring):
+- * e_i = e
+- * with nogil: # <<<<<<<<<<<<<<
+- * err_c = mpv_error_string(e_i)
+- * e = _strdec(err_c)
++ /* "vidcutter/libs/pympv/mpv.pyx":452
++ *
++ * def _format_for(self, value):
++ * if isinstance(value, basestring): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_STRING
++ * elif isinstance(value, bool):
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":336
+- * e_i = e
+- * with nogil:
+- * err_c = mpv_error_string(e_i) # <<<<<<<<<<<<<<
+- * e = _strdec(err_c)
+- * Exception.__init__(self, e)
++ /* "vidcutter/libs/pympv/mpv.pyx":454
++ * if isinstance(value, basestring):
++ * return MPV_FORMAT_STRING
++ * elif isinstance(value, bool): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_FLAG
++ * elif isinstance(value, int):
+ */
+- __pyx_v_err_c = mpv_error_string(__pyx_v_e_i);
+- }
++ __pyx_t_3 = ((PyObject*)&PyBool_Type);
++ __Pyx_INCREF(__pyx_t_3);
++ __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 454, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_1 = (__pyx_t_2 != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":335
+- * if not isinstance(e, basestring):
+- * e_i = e
+- * with nogil: # <<<<<<<<<<<<<<
+- * err_c = mpv_error_string(e_i)
+- * e = _strdec(err_c)
++ /* "vidcutter/libs/pympv/mpv.pyx":455
++ * return MPV_FORMAT_STRING
++ * elif isinstance(value, bool):
++ * return MPV_FORMAT_FLAG # <<<<<<<<<<<<<<
++ * elif isinstance(value, int):
++ * return MPV_FORMAT_INT64
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+- }
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":337
+- * with nogil:
+- * err_c = mpv_error_string(e_i)
+- * e = _strdec(err_c) # <<<<<<<<<<<<<<
+- * Exception.__init__(self, e)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":454
++ * if isinstance(value, basestring):
++ * return MPV_FORMAT_STRING
++ * elif isinstance(value, bool): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_FLAG
++ * elif isinstance(value, int):
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- }
+- }
+- __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_4);
+- __pyx_t_4 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":333
+- * cdef const char* err_c
+- * cdef int e_i
+- * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
+- * e_i = e
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":456
++ * elif isinstance(value, bool):
++ * return MPV_FORMAT_FLAG
++ * elif isinstance(value, int): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_INT64
++ * elif isinstance(value, float):
++ */
++ __pyx_t_1 = PyInt_Check(__pyx_v_value);
++ __pyx_t_2 = (__pyx_t_1 != 0);
++ if (__pyx_t_2) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":457
++ * return MPV_FORMAT_FLAG
++ * elif isinstance(value, int):
++ * return MPV_FORMAT_INT64 # <<<<<<<<<<<<<<
++ * elif isinstance(value, float):
++ * return MPV_FORMAT_DOUBLE
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":456
++ * elif isinstance(value, bool):
++ * return MPV_FORMAT_FLAG
++ * elif isinstance(value, int): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_INT64
++ * elif isinstance(value, float):
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":338
+- * err_c = mpv_error_string(e_i)
+- * e = _strdec(err_c)
+- * Exception.__init__(self, e) # <<<<<<<<<<<<<<
+- *
+- * class PyMPVError(Exception):
++ /* "vidcutter/libs/pympv/mpv.pyx":458
++ * elif isinstance(value, int):
++ * return MPV_FORMAT_INT64
++ * elif isinstance(value, float): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_DOUBLE
++ * elif isinstance(value, (tuple, list)):
++ */
++ __pyx_t_2 = PyFloat_Check(__pyx_v_value);
++ __pyx_t_1 = (__pyx_t_2 != 0);
++ if (__pyx_t_1) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":459
++ * return MPV_FORMAT_INT64
++ * elif isinstance(value, float):
++ * return MPV_FORMAT_DOUBLE # <<<<<<<<<<<<<<
++ * elif isinstance(value, (tuple, list)):
++ * return MPV_FORMAT_NODE_ARRAY
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":458
++ * elif isinstance(value, int):
++ * return MPV_FORMAT_INT64
++ * elif isinstance(value, float): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_DOUBLE
++ * elif isinstance(value, (tuple, list)):
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = NULL;
+- __pyx_t_3 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- __pyx_t_3 = 1;
+- }
+ }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_5)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
+- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_GOTREF(__pyx_t_4);
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
+- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_GOTREF(__pyx_t_4);
+- } else
+- #endif
+- {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (__pyx_t_6) {
+- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+- }
+- __Pyx_INCREF(__pyx_v_self);
+- __Pyx_GIVEREF(__pyx_v_self);
+- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_3, __pyx_v_self);
+- __Pyx_INCREF(__pyx_v_e);
+- __Pyx_GIVEREF(__pyx_v_e);
+- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_3, __pyx_v_e);
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":460
++ * elif isinstance(value, float):
++ * return MPV_FORMAT_DOUBLE
++ * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_NODE_ARRAY
++ * elif isinstance(value, dict):
++ */
++ __pyx_t_2 = PyTuple_Check(__pyx_v_value);
++ __pyx_t_4 = (__pyx_t_2 != 0);
++ if (!__pyx_t_4) {
++ } else {
++ __pyx_t_1 = __pyx_t_4;
++ goto __pyx_L4_bool_binop_done;
+ }
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_4 = PyList_Check(__pyx_v_value);
++ __pyx_t_2 = (__pyx_t_4 != 0);
++ __pyx_t_1 = __pyx_t_2;
++ __pyx_L4_bool_binop_done:;
++ __pyx_t_2 = (__pyx_t_1 != 0);
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":329
+- * code = None
+- *
+- * def __init__(self, e): # <<<<<<<<<<<<<<
+- * self.code = e
+- * cdef const char* err_c
++ /* "vidcutter/libs/pympv/mpv.pyx":461
++ * return MPV_FORMAT_DOUBLE
++ * elif isinstance(value, (tuple, list)):
++ * return MPV_FORMAT_NODE_ARRAY # <<<<<<<<<<<<<<
++ * elif isinstance(value, dict):
++ * return MPV_FORMAT_NODE_MAP
+ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_e);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":460
++ * elif isinstance(value, float):
++ * return MPV_FORMAT_DOUBLE
++ * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_NODE_ARRAY
++ * elif isinstance(value, dict):
++ */
++ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":347
+- *
+- * class _ReplyUserData(object):
+- * def __init__(self, data): # <<<<<<<<<<<<<<
+- * self.counter = 0
+- * self.data = data
++ /* "vidcutter/libs/pympv/mpv.pyx":462
++ * elif isinstance(value, (tuple, list)):
++ * return MPV_FORMAT_NODE_ARRAY
++ * elif isinstance(value, dict): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_NODE_MAP
++ * return MPV_FORMAT_NONE
+ */
++ __pyx_t_2 = PyDict_Check(__pyx_v_value);
++ __pyx_t_1 = (__pyx_t_2 != 0);
++ if (__pyx_t_1) {
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_self = 0;
+- PyObject *__pyx_v_data = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
+- PyObject* values[2] = {0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 347, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 347, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- }
+- __pyx_v_self = values[0];
+- __pyx_v_data = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 347, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(__pyx_self, __pyx_v_self, __pyx_v_data);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":348
+- * class _ReplyUserData(object):
+- * def __init__(self, data):
+- * self.counter = 0 # <<<<<<<<<<<<<<
+- * self.data = data
+- * self.observed = False
++ /* "vidcutter/libs/pympv/mpv.pyx":463
++ * return MPV_FORMAT_NODE_ARRAY
++ * elif isinstance(value, dict):
++ * return MPV_FORMAT_NODE_MAP # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_NONE
++ *
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":349
+- * def __init__(self, data):
+- * self.counter = 0
+- * self.data = data # <<<<<<<<<<<<<<
+- * self.observed = False
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":462
++ * elif isinstance(value, (tuple, list)):
++ * return MPV_FORMAT_NODE_ARRAY
++ * elif isinstance(value, dict): # <<<<<<<<<<<<<<
++ * return MPV_FORMAT_NODE_MAP
++ * return MPV_FORMAT_NONE
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":350
+- * self.counter = 0
+- * self.data = data
+- * self.observed = False # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":464
++ * elif isinstance(value, dict):
++ * return MPV_FORMAT_NODE_MAP
++ * return MPV_FORMAT_NONE # <<<<<<<<<<<<<<
+ *
+- * def add(self):
++ * cdef mpv_node_list* _prep_node_list(self, values):
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":347
++ /* "vidcutter/libs/pympv/mpv.pyx":451
++ * return err
+ *
+- * class _ReplyUserData(object):
+- * def __init__(self, data): # <<<<<<<<<<<<<<
+- * self.counter = 0
+- * self.data = data
++ * def _format_for(self, value): # <<<<<<<<<<<<<<
++ * if isinstance(value, basestring):
++ * return MPV_FORMAT_STRING
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context._format_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -8510,1160 +9185,1186 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":352
+- * self.observed = False
+- *
+- * def add(self): # <<<<<<<<<<<<<<
+- * self.counter += 1
++/* "vidcutter/libs/pympv/mpv.pyx":466
++ * return MPV_FORMAT_NONE
+ *
++ * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * cdef mpv_format format
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add = {"add", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("add (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(__pyx_self, ((PyObject *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
++static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_values) {
++ struct mpv_node __pyx_v_node;
++ enum mpv_format __pyx_v_format;
++ struct mpv_node_list *__pyx_v_node_list;
++ PyObject *__pyx_v_i = NULL;
++ PyObject *__pyx_v_value = NULL;
++ struct mpv_node_list *__pyx_r;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
++ Py_ssize_t __pyx_t_1;
++ int __pyx_t_2;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *(*__pyx_t_5)(PyObject *);
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
++ enum mpv_format __pyx_t_9;
++ Py_ssize_t __pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("add", 0);
++ __Pyx_RefNannySetupContext("_prep_node_list", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":353
+- *
+- * def add(self):
+- * self.counter += 1 # <<<<<<<<<<<<<<
+- *
+- * def remove(self):
++ /* "vidcutter/libs/pympv/mpv.pyx":469
++ * cdef mpv_node node
++ * cdef mpv_format format
++ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list)) # <<<<<<<<<<<<<<
++ * node_list.num = len(values)
++ * node_list.values = NULL
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_node_list = ((struct mpv_node_list *)malloc((sizeof(struct mpv_node_list))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":352
+- * self.observed = False
+- *
+- * def add(self): # <<<<<<<<<<<<<<
+- * self.counter += 1
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":470
++ * cdef mpv_format format
++ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
++ * node_list.num = len(values) # <<<<<<<<<<<<<<
++ * node_list.values = NULL
++ * node_list.keys = NULL
+ */
++ __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 470, __pyx_L1_error)
++ __pyx_v_node_list->num = __pyx_t_1;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":355
+- * self.counter += 1
+- *
+- * def remove(self): # <<<<<<<<<<<<<<
+- * self.counter -= 1
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":471
++ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
++ * node_list.num = len(values)
++ * node_list.values = NULL # <<<<<<<<<<<<<<
++ * node_list.keys = NULL
++ * if node_list.num:
+ */
++ __pyx_v_node_list->values = NULL;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove = {"remove", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("remove (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(__pyx_self, ((PyObject *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":472
++ * node_list.num = len(values)
++ * node_list.values = NULL
++ * node_list.keys = NULL # <<<<<<<<<<<<<<
++ * if node_list.num:
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ */
++ __pyx_v_node_list->keys = NULL;
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("remove", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":473
++ * node_list.values = NULL
++ * node_list.keys = NULL
++ * if node_list.num: # <<<<<<<<<<<<<<
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ * for i, value in enumerate(values):
++ */
++ __pyx_t_2 = (__pyx_v_node_list->num != 0);
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":356
+- *
+- * def remove(self):
+- * self.counter -= 1 # <<<<<<<<<<<<<<
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":474
++ * node_list.keys = NULL
++ * if node_list.num:
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node)) # <<<<<<<<<<<<<<
++ * for i, value in enumerate(values):
++ * format = self._format_for(value)
++ */
++ __pyx_v_node_list->values = ((struct mpv_node *)malloc((__pyx_v_node_list->num * (sizeof(struct mpv_node)))));
++
++ /* "vidcutter/libs/pympv/mpv.pyx":473
++ * node_list.values = NULL
++ * node_list.keys = NULL
++ * if node_list.num: # <<<<<<<<<<<<<<
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ * for i, value in enumerate(values):
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":475
++ * if node_list.num:
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ * for i, value in enumerate(values): # <<<<<<<<<<<<<<
++ * format = self._format_for(value)
++ * node = self._prep_native_value(value, format)
++ */
++ __Pyx_INCREF(__pyx_int_0);
++ __pyx_t_3 = __pyx_int_0;
++ if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
++ __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
++ __pyx_t_5 = NULL;
++ } else {
++ __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
++ }
++ for (;;) {
++ if (likely(!__pyx_t_5)) {
++ if (likely(PyList_CheckExact(__pyx_t_4))) {
++ if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
++ #else
++ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ #endif
++ } else {
++ if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
++ #else
++ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ #endif
++ }
++ } else {
++ __pyx_t_6 = __pyx_t_5(__pyx_t_4);
++ if (unlikely(!__pyx_t_6)) {
++ PyObject* exc_type = PyErr_Occurred();
++ if (exc_type) {
++ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
++ else __PYX_ERR(0, 475, __pyx_L1_error)
++ }
++ break;
++ }
++ __Pyx_GOTREF(__pyx_t_6);
++ }
++ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
++ __pyx_t_6 = 0;
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
++ __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_DECREF(__pyx_t_3);
++ __pyx_t_3 = __pyx_t_6;
++ __pyx_t_6 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":476
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ * for i, value in enumerate(values):
++ * format = self._format_for(value) # <<<<<<<<<<<<<<
++ * node = self._prep_native_value(value, format)
++ * node_list.values[i] = node
++ */
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 476, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
++ }
++ __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_v_format = __pyx_t_9;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":477
++ * for i, value in enumerate(values):
++ * format = self._format_for(value)
++ * node = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
++ * node_list.values[i] = node
++ * return node_list
++ */
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_6);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":478
++ * format = self._format_for(value)
++ * node = self._prep_native_value(value, format)
++ * node_list.values[i] = node # <<<<<<<<<<<<<<
++ * return node_list
+ *
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
++ (__pyx_v_node_list->values[__pyx_t_10]) = __pyx_v_node;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":355
+- * self.counter += 1
++ /* "vidcutter/libs/pympv/mpv.pyx":475
++ * if node_list.num:
++ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
++ * for i, value in enumerate(values): # <<<<<<<<<<<<<<
++ * format = self._format_for(value)
++ * node = self._prep_native_value(value, format)
++ */
++ }
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":479
++ * node = self._prep_native_value(value, format)
++ * node_list.values[i] = node
++ * return node_list # <<<<<<<<<<<<<<
+ *
+- * def remove(self): # <<<<<<<<<<<<<<
+- * self.counter -= 1
++ * cdef mpv_node_list* _prep_node_map(self, map):
++ */
++ __pyx_r = __pyx_v_node_list;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":466
++ * return MPV_FORMAT_NONE
+ *
++ * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * cdef mpv_format format
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_list", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF(__pyx_v_i);
++ __Pyx_XDECREF(__pyx_v_value);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":370
+- *
+- * @property
+- * def api_version(self): # <<<<<<<<<<<<<<
+- * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
++/* "vidcutter/libs/pympv/mpv.pyx":481
++ * return node_list
+ *
++ * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
++ * cdef char* ckey
++ * cdef mpv_node_list* list
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
++static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_map) {
++ char *__pyx_v_ckey;
++ struct mpv_node_list *__pyx_v_list;
++ PyObject *__pyx_v_keys = NULL;
++ PyObject *__pyx_v_i = NULL;
++ PyObject *__pyx_v_key = NULL;
++ struct mpv_node_list *__pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
++ Py_ssize_t __pyx_t_4;
++ int __pyx_t_5;
++ PyObject *(*__pyx_t_6)(PyObject *);
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
++ char *__pyx_t_9;
++ Py_ssize_t __pyx_t_10;
++ Py_ssize_t __pyx_t_11;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
++ __Pyx_RefNannySetupContext("_prep_node_map", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":371
+- * @property
+- * def api_version(self):
+- * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION # <<<<<<<<<<<<<<
+- *
+- * @property
++ /* "vidcutter/libs/pympv/mpv.pyx":484
++ * cdef char* ckey
++ * cdef mpv_node_list* list
++ * list = self._prep_node_list(map.values()) # <<<<<<<<<<<<<<
++ * keys = map.keys()
++ * if not len(keys):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_2);
+- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
+- __pyx_t_1 = 0;
+- __pyx_t_2 = 0;
+- __pyx_t_3 = 0;
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
+- goto __pyx_L0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":370
+- *
+- * @property
+- * def api_version(self): # <<<<<<<<<<<<<<
+- * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
+- *
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.api_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":374
+- *
+- * @property
+- * def name(self): # <<<<<<<<<<<<<<
+- * """Unique name for every context created.
+- *
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- char const *__pyx_v_name;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":380
+- * """
+- * cdef const char* name
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * with nogil:
+- * name = mpv_client_name(self._ctx)
+- */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 380, __pyx_L1_error)
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- #endif
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":381
+- * cdef const char* name
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * name = mpv_client_name(self._ctx)
+- * return _strdec(name)
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":382
+- * assert self._ctx
+- * with nogil:
+- * name = mpv_client_name(self._ctx) # <<<<<<<<<<<<<<
+- * return _strdec(name)
+- *
+- */
+- __pyx_v_name = mpv_client_name(__pyx_v_self->_ctx);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":381
+- * cdef const char* name
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * name = mpv_client_name(self._ctx)
+- * return _strdec(name)
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":383
+- * with nogil:
+- * name = mpv_client_name(self._ctx)
+- * return _strdec(name) # <<<<<<<<<<<<<<
+- *
+- * @property
++ /* "vidcutter/libs/pympv/mpv.pyx":485
++ * cdef mpv_node_list* list
++ * list = self._prep_node_list(map.values())
++ * keys = map.keys() # <<<<<<<<<<<<<<
++ * if not len(keys):
++ * return list
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_1;
++ __pyx_v_keys = __pyx_t_1;
+ __pyx_t_1 = 0;
+- goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":374
+- *
+- * @property
+- * def name(self): # <<<<<<<<<<<<<<
+- * """Unique name for every context created.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":486
++ * list = self._prep_node_list(map.values())
++ * keys = map.keys()
++ * if not len(keys): # <<<<<<<<<<<<<<
++ * return list
++ * list.keys = <char**>malloc(list.num)
+ */
++ __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 486, __pyx_L1_error)
++ __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
++ if (__pyx_t_5) {
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":386
+- *
+- * @property
+- * def time(self): # <<<<<<<<<<<<<<
+- * """Internal mpv client time.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":487
++ * keys = map.keys()
++ * if not len(keys):
++ * return list # <<<<<<<<<<<<<<
++ * list.keys = <char**>malloc(list.num)
++ * for i, key in enumerate(keys):
+ */
++ __pyx_r = __pyx_v_list;
++ goto __pyx_L0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":486
++ * list = self._prep_node_list(map.values())
++ * keys = map.keys()
++ * if not len(keys): # <<<<<<<<<<<<<<
++ * return list
++ * list.keys = <char**>malloc(list.num)
++ */
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":488
++ * if not len(keys):
++ * return list
++ * list.keys = <char**>malloc(list.num) # <<<<<<<<<<<<<<
++ * for i, key in enumerate(keys):
++ * key = _strenc(key)
++ */
++ __pyx_v_list->keys = ((char **)malloc(__pyx_v_list->num));
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- int64_t __pyx_v_time;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__get__", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":489
++ * return list
++ * list.keys = <char**>malloc(list.num)
++ * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
++ * key = _strenc(key)
++ * ckey = key
++ */
++ __Pyx_INCREF(__pyx_int_0);
++ __pyx_t_1 = __pyx_int_0;
++ if (likely(PyList_CheckExact(__pyx_v_keys)) || PyTuple_CheckExact(__pyx_v_keys)) {
++ __pyx_t_2 = __pyx_v_keys; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
++ __pyx_t_6 = NULL;
++ } else {
++ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
++ }
++ for (;;) {
++ if (likely(!__pyx_t_6)) {
++ if (likely(PyList_CheckExact(__pyx_t_2))) {
++ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
++ #else
++ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ #endif
++ } else {
++ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
++ #else
++ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ #endif
++ }
++ } else {
++ __pyx_t_3 = __pyx_t_6(__pyx_t_2);
++ if (unlikely(!__pyx_t_3)) {
++ PyObject* exc_type = PyErr_Occurred();
++ if (exc_type) {
++ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
++ else __PYX_ERR(0, 489, __pyx_L1_error)
++ }
++ break;
++ }
++ __Pyx_GOTREF(__pyx_t_3);
++ }
++ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
++ __pyx_t_3 = 0;
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
++ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_1);
++ __pyx_t_1 = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":394
+- * """
+- * cdef int64_t time
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * with nogil:
+- * time = mpv_get_time_us(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":490
++ * list.keys = <char**>malloc(list.num)
++ * for i, key in enumerate(keys):
++ * key = _strenc(key) # <<<<<<<<<<<<<<
++ * ckey = key
++ * list.keys[i] = <char*>malloc(len(key) + 1)
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 394, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
+ }
+- }
+- #endif
++ __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_key);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":395
+- * cdef int64_t time
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * time = mpv_get_time_us(self._ctx)
+- * return time
++ /* "vidcutter/libs/pympv/mpv.pyx":491
++ * for i, key in enumerate(keys):
++ * key = _strenc(key)
++ * ckey = key # <<<<<<<<<<<<<<
++ * list.keys[i] = <char*>malloc(len(key) + 1)
++ * strcpy(list.keys[i], ckey)
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L1_error)
++ __pyx_v_ckey = __pyx_t_9;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":396
+- * assert self._ctx
+- * with nogil:
+- * time = mpv_get_time_us(self._ctx) # <<<<<<<<<<<<<<
+- * return time
++ /* "vidcutter/libs/pympv/mpv.pyx":492
++ * key = _strenc(key)
++ * ckey = key
++ * list.keys[i] = <char*>malloc(len(key) + 1) # <<<<<<<<<<<<<<
++ * strcpy(list.keys[i], ckey)
++ * return list
++ */
++ __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 492, __pyx_L1_error)
++ __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L1_error)
++ (__pyx_v_list->keys[__pyx_t_11]) = ((char *)malloc((__pyx_t_10 + 1)));
++
++ /* "vidcutter/libs/pympv/mpv.pyx":493
++ * ckey = key
++ * list.keys[i] = <char*>malloc(len(key) + 1)
++ * strcpy(list.keys[i], ckey) # <<<<<<<<<<<<<<
++ * return list
+ *
+ */
+- __pyx_v_time = mpv_get_time_us(__pyx_v_self->_ctx);
+- }
++ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
++ (void)(strcpy((__pyx_v_list->keys[__pyx_t_10]), __pyx_v_ckey));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":395
+- * cdef int64_t time
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * time = mpv_get_time_us(self._ctx)
+- * return time
++ /* "vidcutter/libs/pympv/mpv.pyx":489
++ * return list
++ * list.keys = <char**>malloc(list.num)
++ * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
++ * key = _strenc(key)
++ * ckey = key
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+ }
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":397
+- * with nogil:
+- * time = mpv_get_time_us(self._ctx)
+- * return time # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":494
++ * list.keys[i] = <char*>malloc(len(key) + 1)
++ * strcpy(list.keys[i], ckey)
++ * return list # <<<<<<<<<<<<<<
+ *
+- * def suspend(self):
++ * cdef mpv_node _prep_native_value(self, value, format):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
++ __pyx_r = __pyx_v_list;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":386
+- *
+- * @property
+- * def time(self): # <<<<<<<<<<<<<<
+- * """Internal mpv client time.
++ /* "vidcutter/libs/pympv/mpv.pyx":481
++ * return node_list
+ *
++ * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
++ * cdef char* ckey
++ * cdef mpv_node_list* list
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_map", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF(__pyx_v_keys);
++ __Pyx_XDECREF(__pyx_v_i);
++ __Pyx_XDECREF(__pyx_v_key);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":399
+- * return time
++/* "vidcutter/libs/pympv/mpv.pyx":496
++ * return list
+ *
+- * def suspend(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_suspend"""
+- * assert self._ctx
++ * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * node.format = format
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1suspend(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_suspend[] = "Wraps: mpv_suspend";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1suspend(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("suspend (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_suspend(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_suspend(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
++static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format) {
++ struct mpv_node __pyx_v_node;
++ struct mpv_node __pyx_r;
+ __Pyx_RefNannyDeclarations
++ enum mpv_format __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_4;
++ PyObject *__pyx_t_5 = NULL;
++ Py_ssize_t __pyx_t_6;
++ char const *__pyx_t_7;
++ int __pyx_t_8;
++ int64_t __pyx_t_9;
++ double __pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("suspend", 0);
++ __Pyx_RefNannySetupContext("_prep_native_value", 0);
++ __Pyx_INCREF(__pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":401
+- * def suspend(self):
+- * """Wraps: mpv_suspend"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_suspend(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":498
++ * cdef mpv_node _prep_native_value(self, value, format):
++ * cdef mpv_node node
++ * node.format = format # <<<<<<<<<<<<<<
++ * if format == MPV_FORMAT_STRING:
++ * value = _strenc(value)
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 401, __pyx_L1_error)
+- }
+- }
+- #endif
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":402
+- * """Wraps: mpv_suspend"""
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_suspend(self._ctx)
+- *
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error)
++ __pyx_v_node.format = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":403
+- * assert self._ctx
+- * with nogil:
+- * mpv_suspend(self._ctx) # <<<<<<<<<<<<<<
+- *
+- * def resume(self):
++ /* "vidcutter/libs/pympv/mpv.pyx":499
++ * cdef mpv_node node
++ * node.format = format
++ * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * value = _strenc(value)
++ * node.u.string = <char*>malloc(len(value) + 1)
+ */
+- mpv_suspend(__pyx_v_self->_ctx);
+- }
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":402
+- * """Wraps: mpv_suspend"""
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_suspend(self._ctx)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":500
++ * node.format = format
++ * if format == MPV_FORMAT_STRING:
++ * value = _strenc(value) # <<<<<<<<<<<<<<
++ * node.u.string = <char*>malloc(len(value) + 1)
++ * strcpy(node.u.string, value)
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+- }
++ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":399
+- * return time
+- *
+- * def suspend(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_suspend"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":501
++ * if format == MPV_FORMAT_STRING:
++ * value = _strenc(value)
++ * node.u.string = <char*>malloc(len(value) + 1) # <<<<<<<<<<<<<<
++ * strcpy(node.u.string, value)
++ * elif format == MPV_FORMAT_FLAG:
+ */
++ __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 501, __pyx_L1_error)
++ __pyx_v_node.u.string = ((char *)malloc((__pyx_t_6 + 1)));
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.suspend", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":405
+- * mpv_suspend(self._ctx)
+- *
+- * def resume(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_resume"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":502
++ * value = _strenc(value)
++ * node.u.string = <char*>malloc(len(value) + 1)
++ * strcpy(node.u.string, value) # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_FLAG:
++ * node.u.flag = 1 if value else 0
+ */
++ __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
++ (void)(strcpy(__pyx_v_node.u.string, __pyx_t_7));
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3resume(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_2resume[] = "Wraps: mpv_resume";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3resume(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("resume (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_2resume(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":499
++ * cdef mpv_node node
++ * node.format = format
++ * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * value = _strenc(value)
++ * node.u.string = <char*>malloc(len(value) + 1)
++ */
++ goto __pyx_L3;
++ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2resume(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("resume", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":503
++ * node.u.string = <char*>malloc(len(value) + 1)
++ * strcpy(node.u.string, value)
++ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
++ * node.u.flag = 1 if value else 0
++ * elif format == MPV_FORMAT_INT64:
++ */
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":407
+- * def resume(self):
+- * """Wraps: mpv_resume"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_resume(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":504
++ * strcpy(node.u.string, value)
++ * elif format == MPV_FORMAT_FLAG:
++ * node.u.flag = 1 if value else 0 # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_INT64:
++ * node.u.int64 = value
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 407, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 504, __pyx_L1_error)
++ if (__pyx_t_4) {
++ __pyx_t_8 = 1;
++ } else {
++ __pyx_t_8 = 0;
+ }
++ __pyx_v_node.u.flag = __pyx_t_8;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":503
++ * node.u.string = <char*>malloc(len(value) + 1)
++ * strcpy(node.u.string, value)
++ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
++ * node.u.flag = 1 if value else 0
++ * elif format == MPV_FORMAT_INT64:
++ */
++ goto __pyx_L3;
+ }
+- #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":408
+- * """Wraps: mpv_resume"""
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_resume(self._ctx)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":505
++ * elif format == MPV_FORMAT_FLAG:
++ * node.u.flag = 1 if value else 0
++ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
++ * node.u.int64 = value
++ * elif format == MPV_FORMAT_DOUBLE:
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":409
+- * assert self._ctx
+- * with nogil:
+- * mpv_resume(self._ctx) # <<<<<<<<<<<<<<
+- *
+- * @_errors
++ /* "vidcutter/libs/pympv/mpv.pyx":506
++ * node.u.flag = 1 if value else 0
++ * elif format == MPV_FORMAT_INT64:
++ * node.u.int64 = value # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_DOUBLE:
++ * node.u.double_ = value
+ */
+- mpv_resume(__pyx_v_self->_ctx);
+- }
++ __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error)
++ __pyx_v_node.u.int64 = __pyx_t_9;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":408
+- * """Wraps: mpv_resume"""
+- * assert self._ctx
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_resume(self._ctx)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":505
++ * elif format == MPV_FORMAT_FLAG:
++ * node.u.flag = 1 if value else 0
++ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
++ * node.u.int64 = value
++ * elif format == MPV_FORMAT_DOUBLE:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
++ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":405
+- * mpv_suspend(self._ctx)
+- *
+- * def resume(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_resume"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":507
++ * elif format == MPV_FORMAT_INT64:
++ * node.u.int64 = value
++ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
++ * node.u.double_ = value
++ * elif format == MPV_FORMAT_NODE_ARRAY:
+ */
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (__pyx_t_4) {
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.resume", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":508
++ * node.u.int64 = value
++ * elif format == MPV_FORMAT_DOUBLE:
++ * node.u.double_ = value # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * node.u.list = self._prep_node_list(value)
++ */
++ __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
++ __pyx_v_node.u.double_ = __pyx_t_10;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":412
+- *
+- * @_errors
+- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+- * """Enable or disable a given event.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":507
++ * elif format == MPV_FORMAT_INT64:
++ * node.u.int64 = value
++ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
++ * node.u.double_ = value
++ * elif format == MPV_FORMAT_NODE_ARRAY:
+ */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_4request_event[] = "Enable or disable a given event.\n\n Arguments:\n event - See Events\n enable - True to enable, False to disable\n\n Wraps: mpv_request_event\n ";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_event = 0;
+- PyObject *__pyx_v_enable = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("request_event (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_event,&__pyx_n_s_enable,0};
+- PyObject* values[2] = {0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enable)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 412, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- }
+- __pyx_v_event = values[0];
+- __pyx_v_enable = values[1];
++ goto __pyx_L3;
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4request_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_event, __pyx_v_enable);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable) {
+- int __pyx_v_enable_i;
+- int __pyx_v_err;
+- enum mpv_event_id __pyx_v_event_id;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- int __pyx_t_2;
+- enum mpv_event_id __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("request_event", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":509
++ * elif format == MPV_FORMAT_DOUBLE:
++ * node.u.double_ = value
++ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
++ * node.u.list = self._prep_node_list(value)
++ * elif format == MPV_FORMAT_NODE_MAP:
++ */
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":421
+- * Wraps: mpv_request_event
+- * """
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef int enable_i = 1 if enable else 0
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":510
++ * node.u.double_ = value
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * node.u.list = self._prep_node_list(value) # <<<<<<<<<<<<<<
++ * elif format == MPV_FORMAT_NODE_MAP:
++ * node.u.list = self._prep_node_map(value)
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 421, __pyx_L1_error)
+- }
+- }
+- #endif
++ __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":422
+- * """
+- * assert self._ctx
+- * cdef int enable_i = 1 if enable else 0 # <<<<<<<<<<<<<<
+- * cdef int err
+- * cdef mpv_event_id event_id = event
++ /* "vidcutter/libs/pympv/mpv.pyx":509
++ * elif format == MPV_FORMAT_DOUBLE:
++ * node.u.double_ = value
++ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
++ * node.u.list = self._prep_node_list(value)
++ * elif format == MPV_FORMAT_NODE_MAP:
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
+- if (__pyx_t_2) {
+- __pyx_t_1 = 1;
+- } else {
+- __pyx_t_1 = 0;
++ goto __pyx_L3;
+ }
+- __pyx_v_enable_i = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":424
+- * cdef int enable_i = 1 if enable else 0
+- * cdef int err
+- * cdef mpv_event_id event_id = event # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_request_event(self._ctx, event_id, enable_i)
++ /* "vidcutter/libs/pympv/mpv.pyx":511
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * node.u.list = self._prep_node_list(value)
++ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * node.u.list = self._prep_node_map(value)
++ * else:
+ */
+- __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
+- __pyx_v_event_id = __pyx_t_3;
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":425
+- * cdef int err
+- * cdef mpv_event_id event_id = event
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_request_event(self._ctx, event_id, enable_i)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":512
++ * node.u.list = self._prep_node_list(value)
++ * elif format == MPV_FORMAT_NODE_MAP:
++ * node.u.list = self._prep_node_map(value) # <<<<<<<<<<<<<<
++ * else:
++ * node.format = MPV_FORMAT_NONE
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_map(__pyx_v_self, __pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":426
+- * cdef mpv_event_id event_id = event
+- * with nogil:
+- * err = mpv_request_event(self._ctx, event_id, enable_i) # <<<<<<<<<<<<<<
+- * return err
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":511
++ * elif format == MPV_FORMAT_NODE_ARRAY:
++ * node.u.list = self._prep_node_list(value)
++ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * node.u.list = self._prep_node_map(value)
++ * else:
+ */
+- __pyx_v_err = mpv_request_event(__pyx_v_self->_ctx, __pyx_v_event_id, __pyx_v_enable_i);
+- }
++ goto __pyx_L3;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":425
+- * cdef int err
+- * cdef mpv_event_id event_id = event
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_request_event(self._ctx, event_id, enable_i)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":514
++ * node.u.list = self._prep_node_map(value)
++ * else:
++ * node.format = MPV_FORMAT_NONE # <<<<<<<<<<<<<<
++ * return node
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
++ /*else*/ {
++ __pyx_v_node.format = MPV_FORMAT_NONE;
+ }
++ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":427
+- * with nogil:
+- * err = mpv_request_event(self._ctx, event_id, enable_i)
+- * return err # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":515
++ * else:
++ * node.format = MPV_FORMAT_NONE
++ * return node # <<<<<<<<<<<<<<
+ *
+- * @_errors
++ * cdef _free_native_value(self, mpv_node node):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
++ __pyx_r = __pyx_v_node;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":412
+- *
+- * @_errors
+- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+- * """Enable or disable a given event.
++ /* "vidcutter/libs/pympv/mpv.pyx":496
++ * return list
+ *
++ * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
++ * cdef mpv_node node
++ * node.format = format
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __Pyx_pretend_to_initialize(&__pyx_r);
+ __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF(__pyx_v_value);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":430
++/* "vidcutter/libs/pympv/mpv.pyx":517
++ * return node
+ *
+- * @_errors
+- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_request_log_messages"""
+- * assert self._ctx
++ * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
++ * for i in range(node.u.list.num):
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_6set_log_level[] = "Wraps: mpv_request_log_messages";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_log_level (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_6set_log_level(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_loglevel));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel) {
+- char const *__pyx_v_loglevel_c;
+- int __pyx_v_err;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, struct mpv_node __pyx_v_node) {
++ int __pyx_v_i;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- char const *__pyx_t_4;
++ int __pyx_t_1;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_5;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_log_level", 0);
+- __Pyx_INCREF(__pyx_v_loglevel);
++ __Pyx_RefNannySetupContext("_free_native_value", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":432
+- * def set_log_level(self, loglevel):
+- * """Wraps: mpv_request_log_messages"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * loglevel = _strenc(loglevel)
+- * cdef const char* loglevel_c = loglevel
++ /* "vidcutter/libs/pympv/mpv.pyx":518
++ *
++ * cdef _free_native_value(self, mpv_node node):
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
++ * for i in range(node.u.list.num):
++ * self._free_native_value(node.u.list.values[i])
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 432, __pyx_L1_error)
+- }
+- }
+- #endif
++ switch (__pyx_v_node.format) {
++ case MPV_FORMAT_NODE_ARRAY:
++ case MPV_FORMAT_NODE_MAP:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":433
+- * """Wraps: mpv_request_log_messages"""
+- * assert self._ctx
+- * loglevel = _strenc(loglevel) # <<<<<<<<<<<<<<
+- * cdef const char* loglevel_c = loglevel
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":519
++ * cdef _free_native_value(self, mpv_node node):
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
++ * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
++ * self._free_native_value(node.u.list.values[i])
++ * free(node.u.list.values)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ __pyx_t_1 = __pyx_v_node.u.list->num;
++ __pyx_t_2 = __pyx_t_1;
++ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
++ __pyx_v_i = __pyx_t_3;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":520
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
++ * for i in range(node.u.list.num):
++ * self._free_native_value(node.u.list.values[i]) # <<<<<<<<<<<<<<
++ * free(node.u.list.values)
++ * if node.format == MPV_FORMAT_NODE_MAP:
++ */
++ __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_loglevel) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loglevel);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF_SET(__pyx_v_loglevel, __pyx_t_1);
+- __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":434
+- * assert self._ctx
+- * loglevel = _strenc(loglevel)
+- * cdef const char* loglevel_c = loglevel # <<<<<<<<<<<<<<
+- * cdef int err
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":521
++ * for i in range(node.u.list.num):
++ * self._free_native_value(node.u.list.values[i])
++ * free(node.u.list.values) # <<<<<<<<<<<<<<
++ * if node.format == MPV_FORMAT_NODE_MAP:
++ * for i in range(node.u.list.num):
+ */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L1_error)
+- __pyx_v_loglevel_c = __pyx_t_4;
++ free(__pyx_v_node.u.list->values);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":436
+- * cdef const char* loglevel_c = loglevel
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_request_log_messages(self._ctx, loglevel_c)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":522
++ * self._free_native_value(node.u.list.values[i])
++ * free(node.u.list.values)
++ * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * for i in range(node.u.list.num):
++ * free(node.u.list.keys[i])
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_5 = ((__pyx_v_node.format == MPV_FORMAT_NODE_MAP) != 0);
++ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":437
+- * cdef int err
+- * with nogil:
+- * err = mpv_request_log_messages(self._ctx, loglevel_c) # <<<<<<<<<<<<<<
+- * return err
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":523
++ * free(node.u.list.values)
++ * if node.format == MPV_FORMAT_NODE_MAP:
++ * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
++ * free(node.u.list.keys[i])
++ * free(node.u.list.keys)
+ */
+- __pyx_v_err = mpv_request_log_messages(__pyx_v_self->_ctx, __pyx_v_loglevel_c);
+- }
++ __pyx_t_1 = __pyx_v_node.u.list->num;
++ __pyx_t_2 = __pyx_t_1;
++ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
++ __pyx_v_i = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":436
+- * cdef const char* loglevel_c = loglevel
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_request_log_messages(self._ctx, loglevel_c)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":524
++ * if node.format == MPV_FORMAT_NODE_MAP:
++ * for i in range(node.u.list.num):
++ * free(node.u.list.keys[i]) # <<<<<<<<<<<<<<
++ * free(node.u.list.keys)
++ * free(node.u.list)
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
++ free((__pyx_v_node.u.list->keys[__pyx_v_i]));
+ }
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":438
+- * with nogil:
+- * err = mpv_request_log_messages(self._ctx, loglevel_c)
+- * return err # <<<<<<<<<<<<<<
+- *
+- * @_errors
++ /* "vidcutter/libs/pympv/mpv.pyx":525
++ * for i in range(node.u.list.num):
++ * free(node.u.list.keys[i])
++ * free(node.u.list.keys) # <<<<<<<<<<<<<<
++ * free(node.u.list)
++ * elif node.format == MPV_FORMAT_STRING:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ free(__pyx_v_node.u.list->keys);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":430
+- *
+- * @_errors
+- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_request_log_messages"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":522
++ * self._free_native_value(node.u.list.values[i])
++ * free(node.u.list.values)
++ * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
++ * for i in range(node.u.list.num):
++ * free(node.u.list.keys[i])
+ */
++ }
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_log_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_loglevel);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":526
++ * free(node.u.list.keys[i])
++ * free(node.u.list.keys)
++ * free(node.u.list) # <<<<<<<<<<<<<<
++ * elif node.format == MPV_FORMAT_STRING:
++ * free(node.u.string)
++ */
++ free(__pyx_v_node.u.list);
+
+-/* "vidcutter/libs/pympv/mpv.pyx":441
++ /* "vidcutter/libs/pympv/mpv.pyx":518
+ *
+- * @_errors
+- * def load_config(self, filename): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_load_config_file"""
+- * assert self._ctx
++ * cdef _free_native_value(self, mpv_node node):
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
++ * for i in range(node.u.list.num):
++ * self._free_native_value(node.u.list.values[i])
+ */
++ break;
++ case MPV_FORMAT_STRING:
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_8load_config[] = "Wraps: mpv_load_config_file";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("load_config (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_filename));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename) {
+- char const *__pyx_v__filename;
++ /* "vidcutter/libs/pympv/mpv.pyx":528
++ * free(node.u.list)
++ * elif node.format == MPV_FORMAT_STRING:
++ * free(node.u.string) # <<<<<<<<<<<<<<
++ *
++ * def command(self, *cmdlist, asynchronous=False, data=None):
++ */
++ free(__pyx_v_node.u.string);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":527
++ * free(node.u.list.keys)
++ * free(node.u.list)
++ * elif node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
++ * free(node.u.string)
++ *
++ */
++ break;
++ default: break;
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":517
++ * return node
++ *
++ * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
++ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
++ * for i in range(node.u.list.num):
++ */
++
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context._free_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":530
++ * free(node.u.string)
++ *
++ * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
++ * """Send a command to mpv.
++ *
++ */
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_8command[] = "Send a command to mpv.\n\n Non-async success returns the command's response data, otherwise None\n\n Arguments:\n Accepts parameters as args\n\n Keyword Arguments:\n asynchronous: True will return right away, status comes in as MPV_EVENT_COMMAND_REPLY\n data: Only valid if async, gets sent back as reply_userdata in the Event\n\n Wraps: mpv_command_node and mpv_command_node_async\n ";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_asynchronous = 0;
++ PyObject *__pyx_v_data = 0;
++ PyObject *__pyx_v_cmdlist = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("command (wrapper)", 0);
++ if (PyTuple_GET_SIZE(__pyx_args) > 0) {
++ __pyx_v_cmdlist = PyTuple_GetSlice(__pyx_args, 0, PyTuple_GET_SIZE(__pyx_args));
++ if (unlikely(!__pyx_v_cmdlist)) {
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ }
++ __Pyx_GOTREF(__pyx_v_cmdlist);
++ } else {
++ __pyx_v_cmdlist = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
++ }
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
++ PyObject* values[2] = {0,0};
++ values[0] = ((PyObject *)Py_False);
++ values[1] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ default:
++ case 0: break;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ if (kw_args > 0 && likely(kw_args <= 2)) {
++ Py_ssize_t index;
++ for (index = 0; index < 2 && kw_args > 0; index++) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
++ if (value) { values[index] = value; kw_args--; }
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 530, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) < 0) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ }
++ __pyx_v_asynchronous = values[0];
++ __pyx_v_data = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 530, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_DECREF(__pyx_v_cmdlist); __pyx_v_cmdlist = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_asynchronous, __pyx_v_data, __pyx_v_cmdlist);
++
++ /* function exit code */
++ __Pyx_XDECREF(__pyx_v_cmdlist);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist) {
++ struct mpv_node __pyx_v_node;
++ struct mpv_node __pyx_v_noderesult;
+ int __pyx_v_err;
++ uint64_t __pyx_v_data_id;
++ PyObject *__pyx_v_result = NULL;
++ PyObject *__pyx_v_userdatas = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- char const *__pyx_t_4;
++ uint64_t __pyx_t_4;
++ int __pyx_t_5;
++ int __pyx_t_6;
++ int __pyx_t_7;
++ int __pyx_t_8;
++ char const *__pyx_t_9;
++ PyObject *__pyx_t_10 = NULL;
++ PyObject *__pyx_t_11 = NULL;
++ PyObject *__pyx_t_12 = NULL;
++ PyObject *__pyx_t_13 = NULL;
++ PyObject *__pyx_t_14 = NULL;
++ PyObject *__pyx_t_15 = NULL;
++ PyObject *__pyx_t_16 = NULL;
++ PyObject *__pyx_t_17 = NULL;
++ char const *__pyx_t_18;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("load_config", 0);
+- __Pyx_INCREF(__pyx_v_filename);
++ __Pyx_RefNannySetupContext("command", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":443
+- * def load_config(self, filename):
+- * """Wraps: mpv_load_config_file"""
++ /* "vidcutter/libs/pympv/mpv.pyx":544
++ * Wraps: mpv_command_node and mpv_command_node_async
++ * """
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * filename = _strenc(filename)
+- * cdef const char* _filename = filename
++ * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist))
++ * cdef mpv_node noderesult
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 443, __pyx_L1_error)
++ __PYX_ERR(0, 544, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":444
+- * """Wraps: mpv_load_config_file"""
++ /* "vidcutter/libs/pympv/mpv.pyx":545
++ * """
+ * assert self._ctx
+- * filename = _strenc(filename) # <<<<<<<<<<<<<<
+- * cdef const char* _filename = filename
++ * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist)) # <<<<<<<<<<<<<<
++ * cdef mpv_node noderesult
+ * cdef int err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+@@ -9672,679 +10373,724 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(struct __p
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename);
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_cmdlist) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cmdlist);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
+- __pyx_t_1 = 0;
++ __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_cmdlist, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":445
+- * assert self._ctx
+- * filename = _strenc(filename)
+- * cdef const char* _filename = filename # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":549
+ * cdef int err
+- * with nogil:
++ * cdef uint64_t data_id
++ * result = None # <<<<<<<<<<<<<<
++ * try:
++ * data_id = id(data)
+ */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
+- __pyx_v__filename = __pyx_t_4;
++ __Pyx_INCREF(Py_None);
++ __pyx_v_result = Py_None;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":447
+- * cdef const char* _filename = filename
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_load_config_file(self._ctx, _filename)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":550
++ * cdef uint64_t data_id
++ * result = None
++ * try: # <<<<<<<<<<<<<<
++ * data_id = id(data)
++ * if not asynchronous:
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":448
+- * cdef int err
+- * with nogil:
+- * err = mpv_load_config_file(self._ctx, _filename) # <<<<<<<<<<<<<<
+- * return err
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":551
++ * result = None
++ * try:
++ * data_id = id(data) # <<<<<<<<<<<<<<
++ * if not asynchronous:
++ * with nogil:
+ */
+- __pyx_v_err = mpv_load_config_file(__pyx_v_self->_ctx, __pyx_v__filename);
+- }
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L4_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_data_id = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":447
+- * cdef const char* _filename = filename
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_load_config_file(self._ctx, _filename)
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":552
++ * try:
++ * data_id = id(data)
++ * if not asynchronous: # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 552, __pyx_L4_error)
++ __pyx_t_6 = ((!__pyx_t_5) != 0);
++ if (__pyx_t_6) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":553
++ * data_id = id(data)
++ * if not asynchronous:
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
++ * try:
++ */
++ {
+ #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
+ #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":449
+- * with nogil:
+- * err = mpv_load_config_file(self._ctx, _filename)
+- * return err # <<<<<<<<<<<<<<
+- *
+- * def _format_for(self, value):
++ /* "vidcutter/libs/pympv/mpv.pyx":554
++ * if not asynchronous:
++ * with nogil:
++ * err = mpv_command_node(self._ctx, &node, &noderesult) # <<<<<<<<<<<<<<
++ * try:
++ * result = _convert_node_value(noderesult) if err >= 0 else None
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_v_err = mpv_command_node(__pyx_v_self->_ctx, (&__pyx_v_node), (&__pyx_v_noderesult));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":441
+- *
+- * @_errors
+- * def load_config(self, filename): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_load_config_file"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":553
++ * data_id = id(data)
++ * if not asynchronous:
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
++ * try:
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L9;
++ }
++ __pyx_L9:;
++ }
++ }
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.load_config", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_filename);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":451
+- * return err
+- *
+- * def _format_for(self, value): # <<<<<<<<<<<<<<
+- * if isinstance(value, basestring):
+- * return MPV_FORMAT_STRING
++ /* "vidcutter/libs/pympv/mpv.pyx":555
++ * with nogil:
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
++ * try: # <<<<<<<<<<<<<<
++ * result = _convert_node_value(noderesult) if err >= 0 else None
++ * finally:
+ */
++ /*try:*/ {
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("_format_for (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_10_format_for(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_value));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_t_4;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_format_for", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":452
+- *
+- * def _format_for(self, value):
+- * if isinstance(value, basestring): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_STRING
+- * elif isinstance(value, bool):
++ /* "vidcutter/libs/pympv/mpv.pyx":556
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
++ * try:
++ * result = _convert_node_value(noderesult) if err >= 0 else None # <<<<<<<<<<<<<<
++ * finally:
++ * with nogil:
+ */
+- __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_value);
+- __pyx_t_2 = (__pyx_t_1 != 0);
+- if (__pyx_t_2) {
++ if (((__pyx_v_err >= 0) != 0)) {
++ __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L11_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_1 = __pyx_t_2;
++ __pyx_t_2 = 0;
++ } else {
++ __Pyx_INCREF(Py_None);
++ __pyx_t_1 = Py_None;
++ }
++ __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
++ __pyx_t_1 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":453
+- * def _format_for(self, value):
+- * if isinstance(value, basestring):
+- * return MPV_FORMAT_STRING # <<<<<<<<<<<<<<
+- * elif isinstance(value, bool):
+- * return MPV_FORMAT_FLAG
++ /* "vidcutter/libs/pympv/mpv.pyx":558
++ * result = _convert_node_value(noderesult) if err >= 0 else None
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&noderesult)
++ * else:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":452
+- *
+- * def _format_for(self, value):
+- * if isinstance(value, basestring): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_STRING
+- * elif isinstance(value, bool):
++ /* "vidcutter/libs/pympv/mpv.pyx":559
++ * finally:
++ * with nogil:
++ * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
++ * else:
++ * userdatas = self.reply_userdata.get(data_id, None)
+ */
+- }
++ mpv_free_node_contents((&__pyx_v_noderesult));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":454
+- * if isinstance(value, basestring):
+- * return MPV_FORMAT_STRING
+- * elif isinstance(value, bool): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_FLAG
+- * elif isinstance(value, int):
++ /* "vidcutter/libs/pympv/mpv.pyx":558
++ * result = _convert_node_value(noderesult) if err >= 0 else None
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&noderesult)
++ * else:
+ */
+- __pyx_t_3 = ((PyObject*)&PyBool_Type);
+- __Pyx_INCREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 454, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_1 = (__pyx_t_2 != 0);
+- if (__pyx_t_1) {
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L15;
++ }
++ __pyx_L15:;
++ }
++ }
++ goto __pyx_L12;
++ }
++ __pyx_L11_error:;
++ /*exception exit:*/{
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
++ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
++ __Pyx_XGOTREF(__pyx_t_10);
++ __Pyx_XGOTREF(__pyx_t_11);
++ __Pyx_XGOTREF(__pyx_t_12);
++ __Pyx_XGOTREF(__pyx_t_13);
++ __Pyx_XGOTREF(__pyx_t_14);
++ __Pyx_XGOTREF(__pyx_t_15);
++ __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
++ {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":455
+- * return MPV_FORMAT_STRING
+- * elif isinstance(value, bool):
+- * return MPV_FORMAT_FLAG # <<<<<<<<<<<<<<
+- * elif isinstance(value, int):
+- * return MPV_FORMAT_INT64
++ /* "vidcutter/libs/pympv/mpv.pyx":559
++ * finally:
++ * with nogil:
++ * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
++ * else:
++ * userdatas = self.reply_userdata.get(data_id, None)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ mpv_free_node_contents((&__pyx_v_noderesult));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":454
+- * if isinstance(value, basestring):
+- * return MPV_FORMAT_STRING
+- * elif isinstance(value, bool): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_FLAG
+- * elif isinstance(value, int):
++ /* "vidcutter/libs/pympv/mpv.pyx":558
++ * result = _convert_node_value(noderesult) if err >= 0 else None
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&noderesult)
++ * else:
+ */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":456
+- * elif isinstance(value, bool):
+- * return MPV_FORMAT_FLAG
+- * elif isinstance(value, int): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_INT64
+- * elif isinstance(value, float):
+- */
+- __pyx_t_1 = PyInt_Check(__pyx_v_value);
+- __pyx_t_2 = (__pyx_t_1 != 0);
+- if (__pyx_t_2) {
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L20;
++ }
++ __pyx_L20:;
++ }
++ }
++ }
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_13);
++ __Pyx_XGIVEREF(__pyx_t_14);
++ __Pyx_XGIVEREF(__pyx_t_15);
++ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
++ }
++ __Pyx_XGIVEREF(__pyx_t_10);
++ __Pyx_XGIVEREF(__pyx_t_11);
++ __Pyx_XGIVEREF(__pyx_t_12);
++ __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
++ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
++ __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
++ goto __pyx_L4_error;
++ }
++ __pyx_L12:;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":457
+- * return MPV_FORMAT_FLAG
+- * elif isinstance(value, int):
+- * return MPV_FORMAT_INT64 # <<<<<<<<<<<<<<
+- * elif isinstance(value, float):
+- * return MPV_FORMAT_DOUBLE
++ /* "vidcutter/libs/pympv/mpv.pyx":552
++ * try:
++ * data_id = id(data)
++ * if not asynchronous: # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_command_node(self._ctx, &node, &noderesult)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ goto __pyx_L6;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":456
+- * elif isinstance(value, bool):
+- * return MPV_FORMAT_FLAG
+- * elif isinstance(value, int): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_INT64
+- * elif isinstance(value, float):
++ /* "vidcutter/libs/pympv/mpv.pyx":561
++ * mpv_free_node_contents(&noderesult)
++ * else:
++ * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
++ * if userdatas is None:
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+ */
+- }
++ /*else*/ {
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_16 = NULL;
++ __pyx_t_8 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_16)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_16);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ __pyx_t_8 = 1;
++ }
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_17);
++ if (__pyx_t_16) {
++ __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
++ }
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_8, __pyx_t_3);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_8, Py_None);
++ __pyx_t_3 = 0;
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
++ }
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_userdatas = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":458
+- * elif isinstance(value, int):
+- * return MPV_FORMAT_INT64
+- * elif isinstance(value, float): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_DOUBLE
+- * elif isinstance(value, (tuple, list)):
++ /* "vidcutter/libs/pympv/mpv.pyx":562
++ * else:
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
+ */
+- __pyx_t_2 = PyFloat_Check(__pyx_v_value);
+- __pyx_t_1 = (__pyx_t_2 != 0);
+- if (__pyx_t_1) {
++ __pyx_t_6 = (__pyx_v_userdatas == Py_None);
++ __pyx_t_5 = (__pyx_t_6 != 0);
++ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":459
+- * return MPV_FORMAT_INT64
+- * elif isinstance(value, float):
+- * return MPV_FORMAT_DOUBLE # <<<<<<<<<<<<<<
+- * elif isinstance(value, (tuple, list)):
+- * return MPV_FORMAT_NODE_ARRAY
++ /* "vidcutter/libs/pympv/mpv.pyx":563
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None:
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
++ * userdatas.add()
++ * with nogil:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_17 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_17)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_17);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_17, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
++ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 563, __pyx_L4_error)
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":458
+- * elif isinstance(value, int):
+- * return MPV_FORMAT_INT64
+- * elif isinstance(value, float): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_DOUBLE
+- * elif isinstance(value, (tuple, list)):
++ /* "vidcutter/libs/pympv/mpv.pyx":562
++ * else:
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
+ */
+- }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":460
+- * elif isinstance(value, float):
+- * return MPV_FORMAT_DOUBLE
+- * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_NODE_ARRAY
+- * elif isinstance(value, dict):
++ /* "vidcutter/libs/pympv/mpv.pyx":564
++ * if userdatas is None:
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add() # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_command_node_async(self._ctx, data_id, &node)
+ */
+- __pyx_t_2 = PyTuple_Check(__pyx_v_value);
+- __pyx_t_4 = (__pyx_t_2 != 0);
+- if (!__pyx_t_4) {
+- } else {
+- __pyx_t_1 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_4 = PyList_Check(__pyx_v_value);
+- __pyx_t_2 = (__pyx_t_4 != 0);
+- __pyx_t_1 = __pyx_t_2;
+- __pyx_L4_bool_binop_done:;
+- __pyx_t_2 = (__pyx_t_1 != 0);
+- if (__pyx_t_2) {
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_17 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_17)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_17);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":461
+- * return MPV_FORMAT_DOUBLE
+- * elif isinstance(value, (tuple, list)):
+- * return MPV_FORMAT_NODE_ARRAY # <<<<<<<<<<<<<<
+- * elif isinstance(value, dict):
+- * return MPV_FORMAT_NODE_MAP
++ /* "vidcutter/libs/pympv/mpv.pyx":565
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_command_node_async(self._ctx, data_id, &node)
++ * finally:
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":460
+- * elif isinstance(value, float):
+- * return MPV_FORMAT_DOUBLE
+- * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_NODE_ARRAY
+- * elif isinstance(value, dict):
++ /* "vidcutter/libs/pympv/mpv.pyx":566
++ * userdatas.add()
++ * with nogil:
++ * err = mpv_command_node_async(self._ctx, data_id, &node) # <<<<<<<<<<<<<<
++ * finally:
++ * self._free_native_value(node)
++ */
++ __pyx_v_err = mpv_command_node_async(__pyx_v_self->_ctx, __pyx_v_data_id, (&__pyx_v_node));
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":565
++ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_command_node_async(self._ctx, data_id, &node)
++ * finally:
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L24;
++ }
++ __pyx_L24:;
++ }
++ }
++ }
++ __pyx_L6:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":462
+- * elif isinstance(value, (tuple, list)):
+- * return MPV_FORMAT_NODE_ARRAY
+- * elif isinstance(value, dict): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_NODE_MAP
+- * return MPV_FORMAT_NONE
++ /* "vidcutter/libs/pympv/mpv.pyx":568
++ * err = mpv_command_node_async(self._ctx, data_id, &node)
++ * finally:
++ * self._free_native_value(node) # <<<<<<<<<<<<<<
++ * if err < 0:
++ * raise MPVError(err)
+ */
+- __pyx_t_2 = PyDict_Check(__pyx_v_value);
+- __pyx_t_1 = (__pyx_t_2 != 0);
+- if (__pyx_t_1) {
++ /*finally:*/ {
++ /*normal exit:*/{
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ goto __pyx_L5;
++ }
++ __pyx_L4_error:;
++ /*exception exit:*/{
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
++ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
++ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
++ __Pyx_XGOTREF(__pyx_t_15);
++ __Pyx_XGOTREF(__pyx_t_14);
++ __Pyx_XGOTREF(__pyx_t_13);
++ __Pyx_XGOTREF(__pyx_t_12);
++ __Pyx_XGOTREF(__pyx_t_11);
++ __Pyx_XGOTREF(__pyx_t_10);
++ __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
++ {
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L26_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_12);
++ __Pyx_XGIVEREF(__pyx_t_11);
++ __Pyx_XGIVEREF(__pyx_t_10);
++ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
++ }
++ __Pyx_XGIVEREF(__pyx_t_15);
++ __Pyx_XGIVEREF(__pyx_t_14);
++ __Pyx_XGIVEREF(__pyx_t_13);
++ __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
++ __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
++ __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_18;
++ goto __pyx_L1_error;
++ __pyx_L26_error:;
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_12);
++ __Pyx_XGIVEREF(__pyx_t_11);
++ __Pyx_XGIVEREF(__pyx_t_10);
++ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
++ }
++ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
++ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
++ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
++ __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
++ goto __pyx_L1_error;
++ }
++ __pyx_L5:;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":463
+- * return MPV_FORMAT_NODE_ARRAY
+- * elif isinstance(value, dict):
+- * return MPV_FORMAT_NODE_MAP # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_NONE
++ /* "vidcutter/libs/pympv/mpv.pyx":569
++ * finally:
++ * self._free_native_value(node)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * return result
++ */
++ __pyx_t_5 = ((__pyx_v_err < 0) != 0);
++ if (unlikely(__pyx_t_5)) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":570
++ * self._free_native_value(node)
++ * if err < 0:
++ * raise MPVError(err) # <<<<<<<<<<<<<<
++ * return result
+ *
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 570, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_17);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(0, 570, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":462
+- * elif isinstance(value, (tuple, list)):
+- * return MPV_FORMAT_NODE_ARRAY
+- * elif isinstance(value, dict): # <<<<<<<<<<<<<<
+- * return MPV_FORMAT_NODE_MAP
+- * return MPV_FORMAT_NONE
++ /* "vidcutter/libs/pympv/mpv.pyx":569
++ * finally:
++ * self._free_native_value(node)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * return result
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":464
+- * elif isinstance(value, dict):
+- * return MPV_FORMAT_NODE_MAP
+- * return MPV_FORMAT_NONE # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":571
++ * if err < 0:
++ * raise MPVError(err)
++ * return result # <<<<<<<<<<<<<<
+ *
+- * cdef mpv_node_list* _prep_node_list(self, values):
++ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
++ __Pyx_INCREF(__pyx_v_result);
++ __pyx_r = __pyx_v_result;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":451
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":530
++ * free(node.u.string)
++ *
++ * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
++ * """Send a command to mpv.
+ *
+- * def _format_for(self, value): # <<<<<<<<<<<<<<
+- * if isinstance(value, basestring):
+- * return MPV_FORMAT_STRING
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context._format_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_16);
++ __Pyx_XDECREF(__pyx_t_17);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_result);
++ __Pyx_XDECREF(__pyx_v_userdatas);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":466
+- * return MPV_FORMAT_NONE
++/* "vidcutter/libs/pympv/mpv.pyx":574
++ *
++ * @_errors
++ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Gets the value of a property asynchronously.
+ *
+- * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * cdef mpv_format format
+ */
+
+-static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_values) {
+- struct mpv_node __pyx_v_node;
+- enum mpv_format __pyx_v_format;
+- struct mpv_node_list *__pyx_v_node_list;
+- PyObject *__pyx_v_i = NULL;
+- PyObject *__pyx_v_value = NULL;
+- struct mpv_node_list *__pyx_r;
+- __Pyx_RefNannyDeclarations
+- Py_ssize_t __pyx_t_1;
+- int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *(*__pyx_t_5)(PyObject *);
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- enum mpv_format __pyx_t_9;
+- Py_ssize_t __pyx_t_10;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_10get_property_async[] = "Gets the value of a property asynchronously.\n\n Arguments:\n prop: Property to get the value of.\n\n Keyword arguments:\n data: Value to be passed into the reply_userdata of the response event.\n Wraps: mpv_get_property_async";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_prop = 0;
++ PyObject *__pyx_v_data = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_prep_node_list", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":469
+- * cdef mpv_node node
+- * cdef mpv_format format
+- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list)) # <<<<<<<<<<<<<<
+- * node_list.num = len(values)
+- * node_list.values = NULL
+- */
+- __pyx_v_node_list = ((struct mpv_node_list *)malloc((sizeof(struct mpv_node_list))));
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":470
+- * cdef mpv_format format
+- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
+- * node_list.num = len(values) # <<<<<<<<<<<<<<
+- * node_list.values = NULL
+- * node_list.keys = NULL
+- */
+- __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 470, __pyx_L1_error)
+- __pyx_v_node_list->num = __pyx_t_1;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":471
+- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
+- * node_list.num = len(values)
+- * node_list.values = NULL # <<<<<<<<<<<<<<
+- * node_list.keys = NULL
+- * if node_list.num:
+- */
+- __pyx_v_node_list->values = NULL;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":472
+- * node_list.num = len(values)
+- * node_list.values = NULL
+- * node_list.keys = NULL # <<<<<<<<<<<<<<
+- * if node_list.num:
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- */
+- __pyx_v_node_list->keys = NULL;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":473
+- * node_list.values = NULL
+- * node_list.keys = NULL
+- * if node_list.num: # <<<<<<<<<<<<<<
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- * for i, value in enumerate(values):
+- */
+- __pyx_t_2 = (__pyx_v_node_list->num != 0);
+- if (__pyx_t_2) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":474
+- * node_list.keys = NULL
+- * if node_list.num:
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node)) # <<<<<<<<<<<<<<
+- * for i, value in enumerate(values):
+- * format = self._format_for(value)
+- */
+- __pyx_v_node_list->values = ((struct mpv_node *)malloc((__pyx_v_node_list->num * (sizeof(struct mpv_node)))));
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":473
+- * node_list.values = NULL
+- * node_list.keys = NULL
+- * if node_list.num: # <<<<<<<<<<<<<<
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- * for i, value in enumerate(values):
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":475
+- * if node_list.num:
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- * for i, value in enumerate(values): # <<<<<<<<<<<<<<
+- * format = self._format_for(value)
+- * node = self._prep_native_value(value, format)
+- */
+- __Pyx_INCREF(__pyx_int_0);
+- __pyx_t_3 = __pyx_int_0;
+- if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
+- __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
+- __pyx_t_5 = NULL;
+- } else {
+- __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
+- }
+- for (;;) {
+- if (likely(!__pyx_t_5)) {
+- if (likely(PyList_CheckExact(__pyx_t_4))) {
+- if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
+- #else
+- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- #endif
+- } else {
+- if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
+- #else
+- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- #endif
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("get_property_async (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
++ PyObject* values[2] = {0,0};
++ values[1] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
+ }
+- } else {
+- __pyx_t_6 = __pyx_t_5(__pyx_t_4);
+- if (unlikely(!__pyx_t_6)) {
+- PyObject* exc_type = PyErr_Occurred();
+- if (exc_type) {
+- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 475, __pyx_L1_error)
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
++ if (value) { values[1] = value; kw_args--; }
+ }
+- break;
+ }
+- __Pyx_GOTREF(__pyx_t_6);
+- }
+- __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
+- __pyx_t_6 = 0;
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+- __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_3);
+- __pyx_t_3 = __pyx_t_6;
+- __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":476
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- * for i, value in enumerate(values):
+- * format = self._format_for(value) # <<<<<<<<<<<<<<
+- * node = self._prep_native_value(value, format)
+- * node_list.values[i] = node
+- */
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 476, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 574, __pyx_L3_error)
++ }
++ } else {
++ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ break;
++ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+- __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __pyx_v_format = __pyx_t_9;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":477
+- * for i, value in enumerate(values):
+- * format = self._format_for(value)
+- * node = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+- * node_list.values[i] = node
+- * return node_list
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_6);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":478
+- * format = self._format_for(value)
+- * node = self._prep_native_value(value, format)
+- * node_list.values[i] = node # <<<<<<<<<<<<<<
+- * return node_list
+- *
+- */
+- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
+- (__pyx_v_node_list->values[__pyx_t_10]) = __pyx_v_node;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":475
+- * if node_list.num:
+- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+- * for i, value in enumerate(values): # <<<<<<<<<<<<<<
+- * format = self._format_for(value)
+- * node = self._prep_native_value(value, format)
+- */
++ __pyx_v_prop = values[0];
++ __pyx_v_data = values[1];
+ }
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":479
+- * node = self._prep_native_value(value, format)
+- * node_list.values[i] = node
+- * return node_list # <<<<<<<<<<<<<<
+- *
+- * cdef mpv_node_list* _prep_node_map(self, map):
+- */
+- __pyx_r = __pyx_v_node_list;
+- goto __pyx_L0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":466
+- * return MPV_FORMAT_NONE
+- *
+- * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * cdef mpv_format format
+- */
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 574, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
+
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_list", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_i);
+- __Pyx_XDECREF(__pyx_v_value);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":481
+- * return node_list
+- *
+- * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
+- * cdef char* ckey
+- * cdef mpv_node_list* list
+- */
+-
+-static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_map) {
+- char *__pyx_v_ckey;
+- struct mpv_node_list *__pyx_v_list;
+- PyObject *__pyx_v_keys = NULL;
+- PyObject *__pyx_v_i = NULL;
+- PyObject *__pyx_v_key = NULL;
+- struct mpv_node_list *__pyx_r;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
++ uint64_t __pyx_v_id_data;
++ PyObject *__pyx_v_userdatas = NULL;
++ char const *__pyx_v_prop_c;
++ int __pyx_v_err;
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- Py_ssize_t __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *(*__pyx_t_6)(PyObject *);
++ Py_hash_t __pyx_t_4;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- char *__pyx_t_9;
+- Py_ssize_t __pyx_t_10;
+- Py_ssize_t __pyx_t_11;
++ int __pyx_t_8;
++ int __pyx_t_9;
++ char const *__pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_prep_node_map", 0);
++ __Pyx_RefNannySetupContext("get_property_async", 0);
++ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":484
+- * cdef char* ckey
+- * cdef mpv_node_list* list
+- * list = self._prep_node_list(map.values()) # <<<<<<<<<<<<<<
+- * keys = map.keys()
+- * if not len(keys):
++ /* "vidcutter/libs/pympv/mpv.pyx":583
++ * data: Value to be passed into the reply_userdata of the response event.
++ * Wraps: mpv_get_property_async"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * prop = _strenc(prop)
++ * cdef uint64_t id_data = <uint64_t>hash(data)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 583, __pyx_L1_error)
++ }
++ }
++ #endif
++
++ /* "vidcutter/libs/pympv/mpv.pyx":584
++ * Wraps: mpv_get_property_async"""
++ * assert self._ctx
++ * prop = _strenc(prop) # <<<<<<<<<<<<<<
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+@@ -10353,223 +11099,234 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":485
+- * cdef mpv_node_list* list
+- * list = self._prep_node_list(map.values())
+- * keys = map.keys() # <<<<<<<<<<<<<<
+- * if not len(keys):
+- * return list
++ /* "vidcutter/libs/pympv/mpv.pyx":585
++ * assert self._ctx
++ * prop = _strenc(prop)
++ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
++ __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 585, __pyx_L1_error)
++ __pyx_v_id_data = ((uint64_t)__pyx_t_4);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":586
++ * prop = _strenc(prop)
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_5 = NULL;
++ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
++ __pyx_t_6 = 1;
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (__pyx_t_5) {
++ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
++ }
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
++ __pyx_t_3 = 0;
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_keys = __pyx_t_1;
++ __pyx_v_userdatas = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":486
+- * list = self._prep_node_list(map.values())
+- * keys = map.keys()
+- * if not len(keys): # <<<<<<<<<<<<<<
+- * return list
+- * list.keys = <char**>malloc(list.num)
++ /* "vidcutter/libs/pympv/mpv.pyx":587
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
+ */
+- __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 486, __pyx_L1_error)
+- __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
+- if (__pyx_t_5) {
++ __pyx_t_8 = (__pyx_v_userdatas == Py_None);
++ __pyx_t_9 = (__pyx_t_8 != 0);
++ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":487
+- * keys = map.keys()
+- * if not len(keys):
+- * return list # <<<<<<<<<<<<<<
+- * list.keys = <char**>malloc(list.num)
+- * for i, key in enumerate(keys):
++ /* "vidcutter/libs/pympv/mpv.pyx":588
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
++ * userdatas.add()
++ * cdef const char* prop_c = prop
+ */
+- __pyx_r = __pyx_v_list;
+- goto __pyx_L0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 588, __pyx_L1_error)
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":486
+- * list = self._prep_node_list(map.values())
+- * keys = map.keys()
+- * if not len(keys): # <<<<<<<<<<<<<<
+- * return list
+- * list.keys = <char**>malloc(list.num)
++ /* "vidcutter/libs/pympv/mpv.pyx":587
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":488
+- * if not len(keys):
+- * return list
+- * list.keys = <char**>malloc(list.num) # <<<<<<<<<<<<<<
+- * for i, key in enumerate(keys):
+- * key = _strenc(key)
++ /* "vidcutter/libs/pympv/mpv.pyx":589
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.add() # <<<<<<<<<<<<<<
++ * cdef const char* prop_c = prop
++ * with nogil:
+ */
+- __pyx_v_list->keys = ((char **)malloc(__pyx_v_list->num));
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":489
+- * return list
+- * list.keys = <char**>malloc(list.num)
+- * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
+- * key = _strenc(key)
+- * ckey = key
++ /* "vidcutter/libs/pympv/mpv.pyx":590
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_get_property_async(
+ */
+- __Pyx_INCREF(__pyx_int_0);
+- __pyx_t_1 = __pyx_int_0;
+- if (likely(PyList_CheckExact(__pyx_v_keys)) || PyTuple_CheckExact(__pyx_v_keys)) {
+- __pyx_t_2 = __pyx_v_keys; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+- __pyx_t_6 = NULL;
+- } else {
+- __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
+- }
+- for (;;) {
+- if (likely(!__pyx_t_6)) {
+- if (likely(PyList_CheckExact(__pyx_t_2))) {
+- if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
+- #else
+- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- #endif
+- } else {
+- if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
+- #else
+- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- #endif
+- }
+- } else {
+- __pyx_t_3 = __pyx_t_6(__pyx_t_2);
+- if (unlikely(!__pyx_t_3)) {
+- PyObject* exc_type = PyErr_Occurred();
+- if (exc_type) {
+- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 489, __pyx_L1_error)
+- }
+- break;
+- }
+- __Pyx_GOTREF(__pyx_t_3);
+- }
+- __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
+- __pyx_t_3 = 0;
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+- __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_1);
+- __pyx_t_1 = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":490
+- * list.keys = <char**>malloc(list.num)
+- * for i, key in enumerate(keys):
+- * key = _strenc(key) # <<<<<<<<<<<<<<
+- * ckey = key
+- * list.keys[i] = <char*>malloc(len(key) + 1)
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_key);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
+- __pyx_t_3 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":491
+- * for i, key in enumerate(keys):
+- * key = _strenc(key)
+- * ckey = key # <<<<<<<<<<<<<<
+- * list.keys[i] = <char*>malloc(len(key) + 1)
+- * strcpy(list.keys[i], ckey)
+- */
+- __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L1_error)
+- __pyx_v_ckey = __pyx_t_9;
++ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 590, __pyx_L1_error)
++ __pyx_v_prop_c = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":492
+- * key = _strenc(key)
+- * ckey = key
+- * list.keys[i] = <char*>malloc(len(key) + 1) # <<<<<<<<<<<<<<
+- * strcpy(list.keys[i], ckey)
+- * return list
++ /* "vidcutter/libs/pympv/mpv.pyx":591
++ * userdatas.add()
++ * cdef const char* prop_c = prop
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_get_property_async(
++ * self._ctx,
+ */
+- __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 492, __pyx_L1_error)
+- __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L1_error)
+- (__pyx_v_list->keys[__pyx_t_11]) = ((char *)malloc((__pyx_t_10 + 1)));
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":493
+- * ckey = key
+- * list.keys[i] = <char*>malloc(len(key) + 1)
+- * strcpy(list.keys[i], ckey) # <<<<<<<<<<<<<<
+- * return list
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":592
++ * cdef const char* prop_c = prop
++ * with nogil:
++ * err = mpv_get_property_async( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * id_data,
+ */
+- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
+- (void)(strcpy((__pyx_v_list->keys[__pyx_t_10]), __pyx_v_ckey));
++ __pyx_v_err = mpv_get_property_async(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_prop_c, MPV_FORMAT_NODE);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":489
+- * return list
+- * list.keys = <char**>malloc(list.num)
+- * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
+- * key = _strenc(key)
+- * ckey = key
++ /* "vidcutter/libs/pympv/mpv.pyx":591
++ * userdatas.add()
++ * cdef const char* prop_c = prop
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_get_property_async(
++ * self._ctx,
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L6;
++ }
++ __pyx_L6:;
++ }
+ }
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":494
+- * list.keys[i] = <char*>malloc(len(key) + 1)
+- * strcpy(list.keys[i], ckey)
+- * return list # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":598
++ * MPV_FORMAT_NODE,
++ * )
++ * return err # <<<<<<<<<<<<<<
+ *
+- * cdef mpv_node _prep_native_value(self, value, format):
++ * def try_get_property_async(self, prop, data=None, default=None):
+ */
+- __pyx_r = __pyx_v_list;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":481
+- * return node_list
++ /* "vidcutter/libs/pympv/mpv.pyx":574
++ *
++ * @_errors
++ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Gets the value of a property asynchronously.
+ *
+- * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
+- * cdef char* ckey
+- * cdef mpv_node_list* list
+ */
+
+ /* function exit code */
+@@ -10577,618 +11334,539 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_map", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_r = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_keys);
+- __Pyx_XDECREF(__pyx_v_i);
+- __Pyx_XDECREF(__pyx_v_key);
++ __Pyx_XDECREF(__pyx_v_userdatas);
++ __Pyx_XDECREF(__pyx_v_prop);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":496
+- * return list
++/* "vidcutter/libs/pympv/mpv.pyx":600
++ * return err
+ *
+- * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * node.format = format
++ * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
++ * try:
++ * return self.get_property_async(prop, data=data)
+ */
+
+-static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format) {
+- struct mpv_node __pyx_v_node;
+- struct mpv_node __pyx_r;
+- __Pyx_RefNannyDeclarations
+- enum mpv_format __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_t_4;
+- PyObject *__pyx_t_5 = NULL;
+- Py_ssize_t __pyx_t_6;
+- char const *__pyx_t_7;
+- int __pyx_t_8;
+- int64_t __pyx_t_9;
+- double __pyx_t_10;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_prop = 0;
++ PyObject *__pyx_v_data = 0;
++ PyObject *__pyx_v_default = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_prep_native_value", 0);
+- __Pyx_INCREF(__pyx_v_value);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":498
+- * cdef mpv_node _prep_native_value(self, value, format):
+- * cdef mpv_node node
+- * node.format = format # <<<<<<<<<<<<<<
+- * if format == MPV_FORMAT_STRING:
+- * value = _strenc(value)
+- */
+- __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error)
+- __pyx_v_node.format = __pyx_t_1;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":499
+- * cdef mpv_node node
+- * node.format = format
+- * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * value = _strenc(value)
+- * node.u.string = <char*>malloc(len(value) + 1)
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__pyx_t_4) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":500
+- * node.format = format
+- * if format == MPV_FORMAT_STRING:
+- * value = _strenc(value) # <<<<<<<<<<<<<<
+- * node.u.string = <char*>malloc(len(value) + 1)
+- * strcpy(node.u.string, value)
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
+- __pyx_t_3 = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("try_get_property_async (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,&__pyx_n_s_default,0};
++ PyObject* values[3] = {0,0,0};
++ values[1] = ((PyObject *)Py_None);
++ values[2] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
++ if (value) { values[1] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
++ if (value) { values[2] = value; kw_args--; }
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 600, __pyx_L3_error)
++ }
++ } else {
++ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ }
++ __pyx_v_prop = values[0];
++ __pyx_v_data = values[1];
++ __pyx_v_default = values[2];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 600, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data, __pyx_v_default);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":501
+- * if format == MPV_FORMAT_STRING:
+- * value = _strenc(value)
+- * node.u.string = <char*>malloc(len(value) + 1) # <<<<<<<<<<<<<<
+- * strcpy(node.u.string, value)
+- * elif format == MPV_FORMAT_FLAG:
+- */
+- __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 501, __pyx_L1_error)
+- __pyx_v_node.u.string = ((char *)malloc((__pyx_t_6 + 1)));
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":502
+- * value = _strenc(value)
+- * node.u.string = <char*>malloc(len(value) + 1)
+- * strcpy(node.u.string, value) # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_FLAG:
+- * node.u.flag = 1 if value else 0
+- */
+- __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
+- (void)(strcpy(__pyx_v_node.u.string, __pyx_t_7));
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_t_8;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("try_get_property_async", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":499
+- * cdef mpv_node node
+- * node.format = format
+- * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * value = _strenc(value)
+- * node.u.string = <char*>malloc(len(value) + 1)
++ /* "vidcutter/libs/pympv/mpv.pyx":601
++ *
++ * def try_get_property_async(self, prop, data=None, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property_async(prop, data=data)
++ * except MPVError:
+ */
+- goto __pyx_L3;
+- }
++ {
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
++ __Pyx_XGOTREF(__pyx_t_1);
++ __Pyx_XGOTREF(__pyx_t_2);
++ __Pyx_XGOTREF(__pyx_t_3);
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":503
+- * node.u.string = <char*>malloc(len(value) + 1)
+- * strcpy(node.u.string, value)
+- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+- * node.u.flag = 1 if value else 0
+- * elif format == MPV_FORMAT_INT64:
++ /* "vidcutter/libs/pympv/mpv.pyx":602
++ * def try_get_property_async(self, prop, data=None, default=None):
++ * try:
++ * return self.get_property_async(prop, data=data) # <<<<<<<<<<<<<<
++ * except MPVError:
++ * return default
+ */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (__pyx_t_4) {
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_INCREF(__pyx_v_prop);
++ __Pyx_GIVEREF(__pyx_v_prop);
++ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_prop);
++ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 602, __pyx_L3_error)
++ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_r = __pyx_t_7;
++ __pyx_t_7 = 0;
++ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":504
+- * strcpy(node.u.string, value)
+- * elif format == MPV_FORMAT_FLAG:
+- * node.u.flag = 1 if value else 0 # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_INT64:
+- * node.u.int64 = value
++ /* "vidcutter/libs/pympv/mpv.pyx":601
++ *
++ * def try_get_property_async(self, prop, data=None, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property_async(prop, data=data)
++ * except MPVError:
+ */
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 504, __pyx_L1_error)
+- if (__pyx_t_4) {
+- __pyx_t_8 = 1;
+- } else {
+- __pyx_t_8 = 0;
+ }
+- __pyx_v_node.u.flag = __pyx_t_8;
++ __pyx_L3_error:;
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":503
+- * node.u.string = <char*>malloc(len(value) + 1)
+- * strcpy(node.u.string, value)
+- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+- * node.u.flag = 1 if value else 0
+- * elif format == MPV_FORMAT_INT64:
++ /* "vidcutter/libs/pympv/mpv.pyx":603
++ * try:
++ * return self.get_property_async(prop, data=data)
++ * except MPVError: # <<<<<<<<<<<<<<
++ * return default
++ *
+ */
+- goto __pyx_L3;
+- }
++ __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5);
++ __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
++ if (__pyx_t_8) {
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 603, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":505
+- * elif format == MPV_FORMAT_FLAG:
+- * node.u.flag = 1 if value else 0
+- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+- * node.u.int64 = value
+- * elif format == MPV_FORMAT_DOUBLE:
++ /* "vidcutter/libs/pympv/mpv.pyx":604
++ * return self.get_property_async(prop, data=data)
++ * except MPVError:
++ * return default # <<<<<<<<<<<<<<
++ *
++ * def try_get_property(self, prop, default=None):
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__pyx_t_4) {
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_default);
++ __pyx_r = __pyx_v_default;
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ goto __pyx_L6_except_return;
++ }
++ goto __pyx_L5_except_error;
++ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":506
+- * node.u.flag = 1 if value else 0
+- * elif format == MPV_FORMAT_INT64:
+- * node.u.int64 = value # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_DOUBLE:
+- * node.u.double_ = value
++ /* "vidcutter/libs/pympv/mpv.pyx":601
++ *
++ * def try_get_property_async(self, prop, data=None, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property_async(prop, data=data)
++ * except MPVError:
+ */
+- __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error)
+- __pyx_v_node.u.int64 = __pyx_t_9;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":505
+- * elif format == MPV_FORMAT_FLAG:
+- * node.u.flag = 1 if value else 0
+- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+- * node.u.int64 = value
+- * elif format == MPV_FORMAT_DOUBLE:
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":507
+- * elif format == MPV_FORMAT_INT64:
+- * node.u.int64 = value
+- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+- * node.u.double_ = value
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (__pyx_t_4) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":508
+- * node.u.int64 = value
+- * elif format == MPV_FORMAT_DOUBLE:
+- * node.u.double_ = value # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * node.u.list = self._prep_node_list(value)
+- */
+- __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
+- __pyx_v_node.u.double_ = __pyx_t_10;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":507
+- * elif format == MPV_FORMAT_INT64:
+- * node.u.int64 = value
+- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+- * node.u.double_ = value
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":509
+- * elif format == MPV_FORMAT_DOUBLE:
+- * node.u.double_ = value
+- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+- * node.u.list = self._prep_node_list(value)
+- * elif format == MPV_FORMAT_NODE_MAP:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__pyx_t_4) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":510
+- * node.u.double_ = value
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * node.u.list = self._prep_node_list(value) # <<<<<<<<<<<<<<
+- * elif format == MPV_FORMAT_NODE_MAP:
+- * node.u.list = self._prep_node_map(value)
+- */
+- __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_v_value);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":509
+- * elif format == MPV_FORMAT_DOUBLE:
+- * node.u.double_ = value
+- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+- * node.u.list = self._prep_node_list(value)
+- * elif format == MPV_FORMAT_NODE_MAP:
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":511
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * node.u.list = self._prep_node_list(value)
+- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * node.u.list = self._prep_node_map(value)
+- * else:
+- */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (__pyx_t_4) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":512
+- * node.u.list = self._prep_node_list(value)
+- * elif format == MPV_FORMAT_NODE_MAP:
+- * node.u.list = self._prep_node_map(value) # <<<<<<<<<<<<<<
+- * else:
+- * node.format = MPV_FORMAT_NONE
+- */
+- __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_map(__pyx_v_self, __pyx_v_value);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":511
+- * elif format == MPV_FORMAT_NODE_ARRAY:
+- * node.u.list = self._prep_node_list(value)
+- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * node.u.list = self._prep_node_map(value)
+- * else:
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":514
+- * node.u.list = self._prep_node_map(value)
+- * else:
+- * node.format = MPV_FORMAT_NONE # <<<<<<<<<<<<<<
+- * return node
+- *
+- */
+- /*else*/ {
+- __pyx_v_node.format = MPV_FORMAT_NONE;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L1_error;
++ __pyx_L7_try_return:;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L0;
++ __pyx_L6_except_return:;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L0;
+ }
+- __pyx_L3:;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":515
+- * else:
+- * node.format = MPV_FORMAT_NONE
+- * return node # <<<<<<<<<<<<<<
+- *
+- * cdef _free_native_value(self, mpv_node node):
+- */
+- __pyx_r = __pyx_v_node;
+- goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":496
+- * return list
++ /* "vidcutter/libs/pympv/mpv.pyx":600
++ * return err
+ *
+- * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
+- * cdef mpv_node node
+- * node.format = format
++ * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
++ * try:
++ * return self.get_property_async(prop, data=data)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __Pyx_pretend_to_initialize(&__pyx_r);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_value);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":517
+- * return node
++/* "vidcutter/libs/pympv/mpv.pyx":606
++ * return default
+ *
+- * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+- * for i in range(node.u.list.num):
++ * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
++ * try:
++ * return self.get_property(prop)
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, struct mpv_node __pyx_v_node) {
+- int __pyx_v_i;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_prop = 0;
++ PyObject *__pyx_v_default = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_free_native_value", 0);
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("try_get_property (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_default,0};
++ PyObject* values[2] = {0,0};
++ values[1] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
++ if (value) { values[1] = value; kw_args--; }
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 606, __pyx_L3_error)
++ }
++ } else {
++ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ }
++ __pyx_v_prop = values[0];
++ __pyx_v_default = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_default);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":518
+- *
+- * cdef _free_native_value(self, mpv_node node):
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
+- * for i in range(node.u.list.num):
+- * self._free_native_value(node.u.list.values[i])
+- */
+- switch (__pyx_v_node.format) {
+- case MPV_FORMAT_NODE_ARRAY:
+- case MPV_FORMAT_NODE_MAP:
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":519
+- * cdef _free_native_value(self, mpv_node node):
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+- * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
+- * self._free_native_value(node.u.list.values[i])
+- * free(node.u.list.values)
+- */
+- __pyx_t_1 = __pyx_v_node.u.list->num;
+- __pyx_t_2 = __pyx_t_1;
+- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+- __pyx_v_i = __pyx_t_3;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":520
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+- * for i in range(node.u.list.num):
+- * self._free_native_value(node.u.list.values[i]) # <<<<<<<<<<<<<<
+- * free(node.u.list.values)
+- * if node.format == MPV_FORMAT_NODE_MAP:
+- */
+- __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":521
+- * for i in range(node.u.list.num):
+- * self._free_native_value(node.u.list.values[i])
+- * free(node.u.list.values) # <<<<<<<<<<<<<<
+- * if node.format == MPV_FORMAT_NODE_MAP:
+- * for i in range(node.u.list.num):
+- */
+- free(__pyx_v_node.u.list->values);
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":522
+- * self._free_native_value(node.u.list.values[i])
+- * free(node.u.list.values)
+- * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * for i in range(node.u.list.num):
+- * free(node.u.list.keys[i])
+- */
+- __pyx_t_5 = ((__pyx_v_node.format == MPV_FORMAT_NODE_MAP) != 0);
+- if (__pyx_t_5) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_t_8;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("try_get_property", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":523
+- * free(node.u.list.values)
+- * if node.format == MPV_FORMAT_NODE_MAP:
+- * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
+- * free(node.u.list.keys[i])
+- * free(node.u.list.keys)
++ /* "vidcutter/libs/pympv/mpv.pyx":607
++ *
++ * def try_get_property(self, prop, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property(prop)
++ * except MPVError:
+ */
+- __pyx_t_1 = __pyx_v_node.u.list->num;
+- __pyx_t_2 = __pyx_t_1;
+- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+- __pyx_v_i = __pyx_t_3;
++ {
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
++ __Pyx_XGOTREF(__pyx_t_1);
++ __Pyx_XGOTREF(__pyx_t_2);
++ __Pyx_XGOTREF(__pyx_t_3);
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":524
+- * if node.format == MPV_FORMAT_NODE_MAP:
+- * for i in range(node.u.list.num):
+- * free(node.u.list.keys[i]) # <<<<<<<<<<<<<<
+- * free(node.u.list.keys)
+- * free(node.u.list)
++ /* "vidcutter/libs/pympv/mpv.pyx":608
++ * def try_get_property(self, prop, default=None):
++ * try:
++ * return self.get_property(prop) # <<<<<<<<<<<<<<
++ * except MPVError:
++ * return default
+ */
+- free((__pyx_v_node.u.list->keys[__pyx_v_i]));
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_6 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_6)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_6);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ }
+ }
++ __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_prop);
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __pyx_r = __pyx_t_4;
++ __pyx_t_4 = 0;
++ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":525
+- * for i in range(node.u.list.num):
+- * free(node.u.list.keys[i])
+- * free(node.u.list.keys) # <<<<<<<<<<<<<<
+- * free(node.u.list)
+- * elif node.format == MPV_FORMAT_STRING:
+- */
+- free(__pyx_v_node.u.list->keys);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":522
+- * self._free_native_value(node.u.list.values[i])
+- * free(node.u.list.values)
+- * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+- * for i in range(node.u.list.num):
+- * free(node.u.list.keys[i])
++ /* "vidcutter/libs/pympv/mpv.pyx":607
++ *
++ * def try_get_property(self, prop, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property(prop)
++ * except MPVError:
+ */
+ }
++ __pyx_L3_error:;
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":526
+- * free(node.u.list.keys[i])
+- * free(node.u.list.keys)
+- * free(node.u.list) # <<<<<<<<<<<<<<
+- * elif node.format == MPV_FORMAT_STRING:
+- * free(node.u.string)
+- */
+- free(__pyx_v_node.u.list);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":518
++ /* "vidcutter/libs/pympv/mpv.pyx":609
++ * try:
++ * return self.get_property(prop)
++ * except MPVError: # <<<<<<<<<<<<<<
++ * return default
+ *
+- * cdef _free_native_value(self, mpv_node node):
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
+- * for i in range(node.u.list.num):
+- * self._free_native_value(node.u.list.values[i])
+ */
+- break;
+- case MPV_FORMAT_STRING:
++ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
++ __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
++ if (__pyx_t_8) {
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 609, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_GOTREF(__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":528
+- * free(node.u.list)
+- * elif node.format == MPV_FORMAT_STRING:
+- * free(node.u.string) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":610
++ * return self.get_property(prop)
++ * except MPVError:
++ * return default # <<<<<<<<<<<<<<
+ *
+- * def command(self, *cmdlist, asynchronous=False, data=None):
++ * def get_property(self, prop):
+ */
+- free(__pyx_v_node.u.string);
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_default);
++ __pyx_r = __pyx_v_default;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ goto __pyx_L6_except_return;
++ }
++ goto __pyx_L5_except_error;
++ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":527
+- * free(node.u.list.keys)
+- * free(node.u.list)
+- * elif node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+- * free(node.u.string)
++ /* "vidcutter/libs/pympv/mpv.pyx":607
+ *
++ * def try_get_property(self, prop, default=None):
++ * try: # <<<<<<<<<<<<<<
++ * return self.get_property(prop)
++ * except MPVError:
+ */
+- break;
+- default: break;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L1_error;
++ __pyx_L7_try_return:;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L0;
++ __pyx_L6_except_return:;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":517
+- * return node
++ /* "vidcutter/libs/pympv/mpv.pyx":606
++ * return default
+ *
+- * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
+- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+- * for i in range(node.u.list.num):
++ * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
++ * try:
++ * return self.get_property(prop)
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context._free_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":530
+- * free(node.u.string)
+- *
+- * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+- * """Send a command to mpv.
++/* "vidcutter/libs/pympv/mpv.pyx":612
++ * return default
+ *
++ * def get_property(self, prop): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_get_property"""
++ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_12command[] = "Send a command to mpv.\n\n Non-async success returns the command's response data, otherwise None\n\n Arguments:\n Accepts parameters as args\n\n Keyword Arguments:\n asynchronous: True will return right away, status comes in as MPV_EVENT_COMMAND_REPLY\n data: Only valid if async, gets sent back as reply_userdata in the Event\n\n Wraps: mpv_command_node and mpv_command_node_async\n ";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_asynchronous = 0;
+- PyObject *__pyx_v_data = 0;
+- PyObject *__pyx_v_cmdlist = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_16get_property[] = "Wraps: mpv_get_property";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("command (wrapper)", 0);
+- if (PyTuple_GET_SIZE(__pyx_args) > 0) {
+- __pyx_v_cmdlist = PyTuple_GetSlice(__pyx_args, 0, PyTuple_GET_SIZE(__pyx_args));
+- if (unlikely(!__pyx_v_cmdlist)) {
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- }
+- __Pyx_GOTREF(__pyx_v_cmdlist);
+- } else {
+- __pyx_v_cmdlist = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+- }
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
+- PyObject* values[2] = {0,0};
+- values[0] = ((PyObject *)Py_False);
+- values[1] = ((PyObject *)Py_None);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- default:
+- case 0: break;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- if (kw_args > 0 && likely(kw_args <= 2)) {
+- Py_ssize_t index;
+- for (index = 0; index < 2 && kw_args > 0; index++) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
+- if (value) { values[index] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 530, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) < 0) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- }
+- __pyx_v_asynchronous = values[0];
+- __pyx_v_data = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 530, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_DECREF(__pyx_v_cmdlist); __pyx_v_cmdlist = 0;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_asynchronous, __pyx_v_data, __pyx_v_cmdlist);
++ __Pyx_RefNannySetupContext("get_property (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_prop));
+
+ /* function exit code */
+- __Pyx_XDECREF(__pyx_v_cmdlist);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist) {
+- struct mpv_node __pyx_v_node;
+- struct mpv_node __pyx_v_noderesult;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop) {
++ struct mpv_node __pyx_v_result;
++ char const *__pyx_v_prop_c;
+ int __pyx_v_err;
+- uint64_t __pyx_v_data_id;
+- PyObject *__pyx_v_result = NULL;
+- PyObject *__pyx_v_userdatas = NULL;
++ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- uint64_t __pyx_t_4;
++ char const *__pyx_t_4;
+ int __pyx_t_5;
+- int __pyx_t_6;
++ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ int __pyx_t_8;
+ char const *__pyx_t_9;
+@@ -11198,41 +11876,39 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+- PyObject *__pyx_t_16 = NULL;
+- PyObject *__pyx_t_17 = NULL;
+- char const *__pyx_t_18;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("command", 0);
++ __Pyx_RefNannySetupContext("get_property", 0);
++ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":544
+- * Wraps: mpv_command_node and mpv_command_node_async
+- * """
++ /* "vidcutter/libs/pympv/mpv.pyx":614
++ * def get_property(self, prop):
++ * """Wraps: mpv_get_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist))
+- * cdef mpv_node noderesult
++ * cdef mpv_node result
++ * prop = _strenc(prop)
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 544, __pyx_L1_error)
++ __PYX_ERR(0, 614, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":545
+- * """
++ /* "vidcutter/libs/pympv/mpv.pyx":616
+ * assert self._ctx
+- * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist)) # <<<<<<<<<<<<<<
+- * cdef mpv_node noderesult
++ * cdef mpv_node result
++ * prop = _strenc(prop) # <<<<<<<<<<<<<<
++ * cdef const char* prop_c = prop
+ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+@@ -11241,625 +11917,332 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_cmdlist) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cmdlist);
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_cmdlist, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":549
++ /* "vidcutter/libs/pympv/mpv.pyx":617
++ * cdef mpv_node result
++ * prop = _strenc(prop)
++ * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
+ * cdef int err
+- * cdef uint64_t data_id
+- * result = None # <<<<<<<<<<<<<<
+- * try:
+- * data_id = id(data)
+- */
+- __Pyx_INCREF(Py_None);
+- __pyx_v_result = Py_None;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":550
+- * cdef uint64_t data_id
+- * result = None
+- * try: # <<<<<<<<<<<<<<
+- * data_id = id(data)
+- * if not asynchronous:
++ * with nogil:
+ */
+- /*try:*/ {
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error)
++ __pyx_v_prop_c = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":551
+- * result = None
+- * try:
+- * data_id = id(data) # <<<<<<<<<<<<<<
+- * if not asynchronous:
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":619
++ * cdef const char* prop_c = prop
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_get_property(
++ * self._ctx,
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L4_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_data_id = __pyx_t_4;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":552
+- * try:
+- * data_id = id(data)
+- * if not asynchronous: # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
++ /* "vidcutter/libs/pympv/mpv.pyx":620
++ * cdef int err
++ * with nogil:
++ * err = mpv_get_property( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * prop_c,
+ */
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 552, __pyx_L4_error)
+- __pyx_t_6 = ((!__pyx_t_5) != 0);
+- if (__pyx_t_6) {
++ __pyx_v_err = mpv_get_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_result));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":553
+- * data_id = id(data)
+- * if not asynchronous:
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
+- * try:
++ /* "vidcutter/libs/pympv/mpv.pyx":619
++ * cdef const char* prop_c = prop
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_get_property(
++ * self._ctx,
+ */
+- {
++ /*finally:*/ {
++ /*normal exit:*/{
+ #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
+ #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":554
+- * if not asynchronous:
+- * with nogil:
+- * err = mpv_command_node(self._ctx, &node, &noderesult) # <<<<<<<<<<<<<<
+- * try:
+- * result = _convert_node_value(noderesult) if err >= 0 else None
+- */
+- __pyx_v_err = mpv_command_node(__pyx_v_self->_ctx, (&__pyx_v_node), (&__pyx_v_noderesult));
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":553
+- * data_id = id(data)
+- * if not asynchronous:
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
+- * try:
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L9;
+- }
+- __pyx_L9:;
+- }
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
+ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":555
+- * with nogil:
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
+- * try: # <<<<<<<<<<<<<<
+- * result = _convert_node_value(noderesult) if err >= 0 else None
+- * finally:
++ /* "vidcutter/libs/pympv/mpv.pyx":626
++ * &result,
++ * )
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * try:
+ */
+- /*try:*/ {
++ __pyx_t_5 = ((__pyx_v_err < 0) != 0);
++ if (unlikely(__pyx_t_5)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":556
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
+- * try:
+- * result = _convert_node_value(noderesult) if err >= 0 else None # <<<<<<<<<<<<<<
+- * finally:
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":627
++ * )
++ * if err < 0:
++ * raise MPVError(err) # <<<<<<<<<<<<<<
++ * try:
++ * v = _convert_node_value(result)
+ */
+- if (((__pyx_v_err >= 0) != 0)) {
+- __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L11_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __pyx_t_2;
+- __pyx_t_2 = 0;
+- } else {
+- __Pyx_INCREF(Py_None);
+- __pyx_t_1 = Py_None;
+- }
+- __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
+- __pyx_t_1 = 0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_6 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_6)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_6);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
++ }
++ __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(0, 627, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
+- * result = _convert_node_value(noderesult) if err >= 0 else None
+- * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&noderesult)
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":626
++ * &result,
++ * )
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * try:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":559
+- * finally:
+- * with nogil:
+- * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
+- * else:
+- * userdatas = self.reply_userdata.get(data_id, None)
++ /* "vidcutter/libs/pympv/mpv.pyx":628
++ * if err < 0:
++ * raise MPVError(err)
++ * try: # <<<<<<<<<<<<<<
++ * v = _convert_node_value(result)
++ * finally:
+ */
+- mpv_free_node_contents((&__pyx_v_noderesult));
+- }
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
+- * result = _convert_node_value(noderesult) if err >= 0 else None
+- * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&noderesult)
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":629
++ * raise MPVError(err)
++ * try:
++ * v = _convert_node_value(result) # <<<<<<<<<<<<<<
++ * finally:
++ * with nogil:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L15;
+- }
+- __pyx_L15:;
+- }
+- }
+- goto __pyx_L12;
+- }
+- __pyx_L11_error:;
+- /*exception exit:*/{
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
+- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+- __Pyx_XGOTREF(__pyx_t_10);
+- __Pyx_XGOTREF(__pyx_t_11);
+- __Pyx_XGOTREF(__pyx_t_12);
+- __Pyx_XGOTREF(__pyx_t_13);
+- __Pyx_XGOTREF(__pyx_t_14);
+- __Pyx_XGOTREF(__pyx_t_15);
+- __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
+- {
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L8_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_v = __pyx_t_1;
++ __pyx_t_1 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":559
+- * finally:
+- * with nogil:
+- * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
+- * else:
+- * userdatas = self.reply_userdata.get(data_id, None)
++ /* "vidcutter/libs/pympv/mpv.pyx":631
++ * v = _convert_node_value(result)
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&result)
++ * return v
+ */
+- mpv_free_node_contents((&__pyx_v_noderesult));
+- }
++ /*finally:*/ {
++ /*normal exit:*/{
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
+- * result = _convert_node_value(noderesult) if err >= 0 else None
+- * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&noderesult)
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":632
++ * finally:
++ * with nogil:
++ * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
++ * return v
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L20;
+- }
+- __pyx_L20:;
+- }
+- }
+- }
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_13);
+- __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_XGIVEREF(__pyx_t_15);
+- __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
++ mpv_free_node_contents((&__pyx_v_result));
+ }
+- __Pyx_XGIVEREF(__pyx_t_10);
+- __Pyx_XGIVEREF(__pyx_t_11);
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
+- __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
+- goto __pyx_L4_error;
+- }
+- __pyx_L12:;
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":552
+- * try:
+- * data_id = id(data)
+- * if not asynchronous: # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_command_node(self._ctx, &node, &noderesult)
++ /* "vidcutter/libs/pympv/mpv.pyx":631
++ * v = _convert_node_value(result)
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&result)
++ * return v
+ */
+- goto __pyx_L6;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L12;
++ }
++ __pyx_L12:;
++ }
++ }
++ goto __pyx_L9;
+ }
++ __pyx_L8_error:;
++ /*exception exit:*/{
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
++ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
++ __Pyx_XGOTREF(__pyx_t_10);
++ __Pyx_XGOTREF(__pyx_t_11);
++ __Pyx_XGOTREF(__pyx_t_12);
++ __Pyx_XGOTREF(__pyx_t_13);
++ __Pyx_XGOTREF(__pyx_t_14);
++ __Pyx_XGOTREF(__pyx_t_15);
++ __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
++ {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":561
+- * mpv_free_node_contents(&noderesult)
+- * else:
+- * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
+- * if userdatas is None:
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
++ /* "vidcutter/libs/pympv/mpv.pyx":632
++ * finally:
++ * with nogil:
++ * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
++ * return v
++ *
+ */
+- /*else*/ {
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_16 = NULL;
+- __pyx_t_8 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_16)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_16);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- __pyx_t_8 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- {
+- __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_17);
+- if (__pyx_t_16) {
+- __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
+- }
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_8, __pyx_t_3);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_8, Py_None);
+- __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+- }
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_userdatas = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":562
+- * else:
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- */
+- __pyx_t_6 = (__pyx_v_userdatas == Py_None);
+- __pyx_t_5 = (__pyx_t_6 != 0);
+- if (__pyx_t_5) {
++ mpv_free_node_contents((&__pyx_v_result));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":563
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None:
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+- * userdatas.add()
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":631
++ * v = _convert_node_value(result)
++ * finally:
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_free_node_contents(&result)
++ * return v
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_17 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_17)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_17);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L17;
++ }
++ __pyx_L17:;
++ }
+ }
+- __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_17, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 563, __pyx_L4_error)
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":562
+- * else:
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- */
+ }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":564
+- * if userdatas is None:
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add() # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_command_node_async(self._ctx, data_id, &node)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_17 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_17)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_17);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_13);
++ __Pyx_XGIVEREF(__pyx_t_14);
++ __Pyx_XGIVEREF(__pyx_t_15);
++ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+ }
+- __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XGIVEREF(__pyx_t_10);
++ __Pyx_XGIVEREF(__pyx_t_11);
++ __Pyx_XGIVEREF(__pyx_t_12);
++ __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
++ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
++ __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
++ goto __pyx_L1_error;
++ }
++ __pyx_L9:;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":565
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_command_node_async(self._ctx, data_id, &node)
+- * finally:
++ /* "vidcutter/libs/pympv/mpv.pyx":633
++ * with nogil:
++ * mpv_free_node_contents(&result)
++ * return v # <<<<<<<<<<<<<<
++ *
++ * @_errors
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v_v);
++ __pyx_r = __pyx_v_v;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":566
+- * userdatas.add()
+- * with nogil:
+- * err = mpv_command_node_async(self._ctx, data_id, &node) # <<<<<<<<<<<<<<
+- * finally:
+- * self._free_native_value(node)
++ /* "vidcutter/libs/pympv/mpv.pyx":612
++ * return default
++ *
++ * def get_property(self, prop): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_get_property"""
++ * assert self._ctx
+ */
+- __pyx_v_err = mpv_command_node_async(__pyx_v_self->_ctx, __pyx_v_data_id, (&__pyx_v_node));
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":565
+- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_command_node_async(self._ctx, data_id, &node)
+- * finally:
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L24;
+- }
+- __pyx_L24:;
+- }
+- }
+- }
+- __pyx_L6:;
+- }
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_v);
++ __Pyx_XDECREF(__pyx_v_prop);
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":568
+- * err = mpv_command_node_async(self._ctx, data_id, &node)
+- * finally:
+- * self._free_native_value(node) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- goto __pyx_L5;
+- }
+- __pyx_L4_error:;
+- /*exception exit:*/{
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
+- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
+- __Pyx_XGOTREF(__pyx_t_15);
+- __Pyx_XGOTREF(__pyx_t_14);
+- __Pyx_XGOTREF(__pyx_t_13);
+- __Pyx_XGOTREF(__pyx_t_12);
+- __Pyx_XGOTREF(__pyx_t_11);
+- __Pyx_XGOTREF(__pyx_t_10);
+- __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
+- {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L26_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- }
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_XGIVEREF(__pyx_t_11);
+- __Pyx_XGIVEREF(__pyx_t_10);
+- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
+- }
+- __Pyx_XGIVEREF(__pyx_t_15);
+- __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_XGIVEREF(__pyx_t_13);
+- __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
+- __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
+- __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_18;
+- goto __pyx_L1_error;
+- __pyx_L26_error:;
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_XGIVEREF(__pyx_t_11);
+- __Pyx_XGIVEREF(__pyx_t_10);
+- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
+- }
+- __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+- __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+- __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+- __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
+- goto __pyx_L1_error;
+- }
+- __pyx_L5:;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":569
+- * finally:
+- * self._free_native_value(node)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * return result
+- */
+- __pyx_t_5 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_5)) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":570
+- * self._free_native_value(node)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- * return result
+- *
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 570, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_17);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 570, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":569
+- * finally:
+- * self._free_native_value(node)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * return result
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":571
+- * if err < 0:
+- * raise MPVError(err)
+- * return result # <<<<<<<<<<<<<<
+- *
+- * @_errors
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_result);
+- __pyx_r = __pyx_v_result;
+- goto __pyx_L0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":530
+- * free(node.u.string)
+- *
+- * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+- * """Send a command to mpv.
+- *
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_16);
+- __Pyx_XDECREF(__pyx_t_17);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_result);
+- __Pyx_XDECREF(__pyx_v_userdatas);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":574
+- *
+- * @_errors
+- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Gets the value of a property asynchronously.
+- *
++/* "vidcutter/libs/pympv/mpv.pyx":636
++ *
++ * @_errors
++ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
++ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_14get_property_async[] = "Gets the value of a property asynchronously.\n\n Arguments:\n prop: Property to get the value of.\n\n Keyword arguments:\n data: Value to be passed into the reply_userdata of the response event.\n Wraps: mpv_get_property_async";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_18set_property[] = "Wraps: mpv_set_property and mpv_set_property_async";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_prop = 0;
++ PyObject *__pyx_v_value = 0;
++ PyObject *__pyx_v_asynchronous = 0;
+ PyObject *__pyx_v_data = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("get_property_async (wrapper)", 0);
++ __Pyx_RefNannySetupContext("set_property (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
+- PyObject* values[2] = {0,0};
+- values[1] = ((PyObject *)Py_None);
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
++ PyObject* values[4] = {0,0,0,0};
++ values[1] = ((PyObject *)Py_True);
++ values[2] = ((PyObject *)Py_False);
++ values[3] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
++ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
++ CYTHON_FALLTHROUGH;
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+@@ -11875,15 +12258,31 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(Py
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
+ if (value) { values[1] = value; kw_args--; }
+ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_asynchronous);
++ if (value) { values[2] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 3:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
++ if (value) { values[3] = value; kw_args--; }
++ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 574, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 636, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
++ CYTHON_FALLTHROUGH;
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+@@ -11892,70 +12291,83 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(Py
+ }
+ }
+ __pyx_v_prop = values[0];
+- __pyx_v_data = values[1];
++ __pyx_v_value = values[1];
++ __pyx_v_asynchronous = values[2];
++ __pyx_v_data = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 574, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value, __pyx_v_asynchronous, __pyx_v_data);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
+- uint64_t __pyx_v_id_data;
+- PyObject *__pyx_v_userdatas = NULL;
+- char const *__pyx_v_prop_c;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data) {
++ enum mpv_format __pyx_v_format;
++ struct mpv_node __pyx_v_v;
+ int __pyx_v_err;
++ uint64_t __pyx_v_data_id;
++ char const *__pyx_v_prop_c;
++ PyObject *__pyx_v_userdatas = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- Py_hash_t __pyx_t_4;
+- PyObject *__pyx_t_5 = NULL;
++ enum mpv_format __pyx_t_4;
++ char const *__pyx_t_5;
+ int __pyx_t_6;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+- int __pyx_t_9;
+- char const *__pyx_t_10;
++ int __pyx_t_7;
++ Py_hash_t __pyx_t_8;
++ PyObject *__pyx_t_9 = NULL;
++ int __pyx_t_10;
++ PyObject *__pyx_t_11 = NULL;
++ int __pyx_t_12;
++ char const *__pyx_t_13;
++ PyObject *__pyx_t_14 = NULL;
++ PyObject *__pyx_t_15 = NULL;
++ PyObject *__pyx_t_16 = NULL;
++ PyObject *__pyx_t_17 = NULL;
++ PyObject *__pyx_t_18 = NULL;
++ PyObject *__pyx_t_19 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("get_property_async", 0);
++ __Pyx_RefNannySetupContext("set_property", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":583
+- * data: Value to be passed into the reply_userdata of the response event.
+- * Wraps: mpv_get_property_async"""
++ /* "vidcutter/libs/pympv/mpv.pyx":638
++ * def set_property(self, prop, value=True, asynchronous=False, data=None):
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+ * prop = _strenc(prop)
+- * cdef uint64_t id_data = <uint64_t>hash(data)
++ * cdef mpv_format format = self._format_for(value)
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 583, __pyx_L1_error)
++ __PYX_ERR(0, 638, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":584
+- * Wraps: mpv_get_property_async"""
++ /* "vidcutter/libs/pympv/mpv.pyx":639
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ * assert self._ctx
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
++ * cdef mpv_format format = self._format_for(value)
++ * cdef mpv_node v = self._prep_native_value(value, format)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -11969,523 +12381,480 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(st
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":585
++ /* "vidcutter/libs/pympv/mpv.pyx":640
+ * assert self._ctx
+ * prop = _strenc(prop)
+- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None:
+- */
+- __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 585, __pyx_L1_error)
+- __pyx_v_id_data = ((uint64_t)__pyx_t_4);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":586
+- * prop = _strenc(prop)
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
++ * cdef mpv_node v = self._prep_native_value(value, format)
++ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_5 = NULL;
+- __pyx_t_6 = 0;
++ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+- __pyx_t_6 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (__pyx_t_5) {
+- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+- __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_userdatas = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":587
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- */
+- __pyx_t_8 = (__pyx_v_userdatas == Py_None);
+- __pyx_t_9 = (__pyx_t_8 != 0);
+- if (__pyx_t_9) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":588
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+- * userdatas.add()
+- * cdef const char* prop_c = prop
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 588, __pyx_L1_error)
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":587
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- */
+- }
++ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_format = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":589
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.add() # <<<<<<<<<<<<<<
+- * cdef const char* prop_c = prop
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":641
++ * prop = _strenc(prop)
++ * cdef mpv_format format = self._format_for(value)
++ * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
++ * cdef int err
++ * cdef uint64_t data_id
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":590
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_get_property_async(
++ /* "vidcutter/libs/pympv/mpv.pyx":645
++ * cdef uint64_t data_id
++ * cdef const char* prop_c
++ * try: # <<<<<<<<<<<<<<
++ * prop_c = prop
++ * if not asynchronous:
+ */
+- __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 590, __pyx_L1_error)
+- __pyx_v_prop_c = __pyx_t_10;
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":591
+- * userdatas.add()
+- * cdef const char* prop_c = prop
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_get_property_async(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":646
++ * cdef const char* prop_c
++ * try:
++ * prop_c = prop # <<<<<<<<<<<<<<
++ * if not asynchronous:
++ * with nogil:
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 646, __pyx_L4_error)
++ __pyx_v_prop_c = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":592
+- * cdef const char* prop_c = prop
+- * with nogil:
+- * err = mpv_get_property_async( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * id_data,
++ /* "vidcutter/libs/pympv/mpv.pyx":647
++ * try:
++ * prop_c = prop
++ * if not asynchronous: # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_set_property(
+ */
+- __pyx_v_err = mpv_get_property_async(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_prop_c, MPV_FORMAT_NODE);
+- }
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 647, __pyx_L4_error)
++ __pyx_t_7 = ((!__pyx_t_6) != 0);
++ if (__pyx_t_7) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":591
+- * userdatas.add()
+- * cdef const char* prop_c = prop
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_get_property_async(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":648
++ * prop_c = prop
++ * if not asynchronous:
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_property(
++ * self._ctx,
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
++ {
+ #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
+ #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+- }
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":598
+- * MPV_FORMAT_NODE,
+- * )
+- * return err # <<<<<<<<<<<<<<
+- *
+- * def try_get_property_async(self, prop, data=None, default=None):
++ /* "vidcutter/libs/pympv/mpv.pyx":649
++ * if not asynchronous:
++ * with nogil:
++ * err = mpv_set_property( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * prop_c,
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_v_err = mpv_set_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":574
+- *
+- * @_errors
+- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Gets the value of a property asynchronously.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":648
++ * prop_c = prop
++ * if not asynchronous:
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_property(
++ * self._ctx,
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L9;
++ }
++ __pyx_L9:;
++ }
++ }
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_userdatas);
+- __Pyx_XDECREF(__pyx_v_prop);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":655
++ * &v
++ * )
++ * return err # <<<<<<<<<<<<<<
++ * data_id = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(data_id, None)
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L3_return;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":600
+- * return err
+- *
+- * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":647
+ * try:
+- * return self.get_property_async(prop, data=data)
++ * prop_c = prop
++ * if not asynchronous: # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_set_property(
+ */
++ }
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_prop = 0;
+- PyObject *__pyx_v_data = 0;
+- PyObject *__pyx_v_default = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("try_get_property_async (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,&__pyx_n_s_default,0};
+- PyObject* values[3] = {0,0,0};
+- values[1] = ((PyObject *)Py_None);
+- values[2] = ((PyObject *)Py_None);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
+- if (value) { values[1] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
+- if (value) { values[2] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 600, __pyx_L3_error)
++ /* "vidcutter/libs/pympv/mpv.pyx":656
++ * )
++ * return err
++ * data_id = <uint64_t>hash(data) # <<<<<<<<<<<<<<
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None:
++ */
++ __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 656, __pyx_L4_error)
++ __pyx_v_data_id = ((uint64_t)__pyx_t_8);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":657
++ * return err
++ * data_id = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
++ * if userdatas is None:
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_9 = NULL;
++ __pyx_t_10 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_9)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_9);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ __pyx_t_10 = 1;
+ }
+- } else {
+- switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- break;
+- default: goto __pyx_L5_argtuple_error;
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_11);
++ if (__pyx_t_9) {
++ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
++ __Pyx_GIVEREF(__pyx_t_3);
++ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, Py_None);
++ __pyx_t_3 = 0;
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+- __pyx_v_prop = values[0];
+- __pyx_v_data = values[1];
+- __pyx_v_default = values[2];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 600, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_16try_get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data, __pyx_v_default);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_userdatas = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("try_get_property_async", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":658
++ * data_id = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ */
++ __pyx_t_7 = (__pyx_v_userdatas == Py_None);
++ __pyx_t_6 = (__pyx_t_7 != 0);
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
+- *
+- * def try_get_property_async(self, prop, data=None, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property_async(prop, data=data)
+- * except MPVError:
++ /* "vidcutter/libs/pympv/mpv.pyx":659
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None:
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
++ * userdatas.add()
++ * with nogil:
+ */
+- {
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+- __Pyx_XGOTREF(__pyx_t_1);
+- __Pyx_XGOTREF(__pyx_t_2);
+- __Pyx_XGOTREF(__pyx_t_3);
+- /*try:*/ {
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_11 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_11)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_11);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
++ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 659, __pyx_L4_error)
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":602
+- * def try_get_property_async(self, prop, data=None, default=None):
+- * try:
+- * return self.get_property_async(prop, data=data) # <<<<<<<<<<<<<<
+- * except MPVError:
+- * return default
++ /* "vidcutter/libs/pympv/mpv.pyx":658
++ * data_id = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(data_id, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_INCREF(__pyx_v_prop);
+- __Pyx_GIVEREF(__pyx_v_prop);
+- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_prop);
+- __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 602, __pyx_L3_error)
+- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __pyx_r = __pyx_t_7;
+- __pyx_t_7 = 0;
+- goto __pyx_L7_try_return;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
+- *
+- * def try_get_property_async(self, prop, data=None, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property_async(prop, data=data)
+- * except MPVError:
++ /* "vidcutter/libs/pympv/mpv.pyx":660
++ * if userdatas is None:
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add() # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_set_property_async(
+ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_11 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_11)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_11);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
+ }
+- __pyx_L3_error:;
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L4_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":603
+- * try:
+- * return self.get_property_async(prop, data=data)
+- * except MPVError: # <<<<<<<<<<<<<<
+- * return default
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":661
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_property_async(
++ * self._ctx,
+ */
+- __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+- __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
+- if (__pyx_t_8) {
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 603, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_GOTREF(__pyx_t_7);
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":604
+- * return self.get_property_async(prop, data=data)
+- * except MPVError:
+- * return default # <<<<<<<<<<<<<<
+- *
+- * def try_get_property(self, prop, default=None):
++ /* "vidcutter/libs/pympv/mpv.pyx":662
++ * userdatas.add()
++ * with nogil:
++ * err = mpv_set_property_async( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * data_id,
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_default);
+- __pyx_r = __pyx_v_default;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- goto __pyx_L6_except_return;
++ __pyx_v_err = mpv_set_property_async(__pyx_v_self->_ctx, __pyx_v_data_id, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":661
++ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
++ * userdatas.add()
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_property_async(
++ * self._ctx,
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L13;
++ }
++ __pyx_L13:;
++ }
+ }
+- goto __pyx_L5_except_error;
+- __pyx_L5_except_error:;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
++ /* "vidcutter/libs/pympv/mpv.pyx":670
++ * )
++ * finally:
++ * self._free_native_value(v) # <<<<<<<<<<<<<<
++ * return err
+ *
+- * def try_get_property_async(self, prop, data=None, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property_async(prop, data=data)
+- * except MPVError:
+ */
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L1_error;
+- __pyx_L7_try_return:;
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L0;
+- __pyx_L6_except_return:;
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ goto __pyx_L5;
++ }
++ __pyx_L4_error:;
++ /*exception exit:*/{
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
++ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
++ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
++ __Pyx_XGOTREF(__pyx_t_14);
++ __Pyx_XGOTREF(__pyx_t_15);
++ __Pyx_XGOTREF(__pyx_t_16);
++ __Pyx_XGOTREF(__pyx_t_17);
++ __Pyx_XGOTREF(__pyx_t_18);
++ __Pyx_XGOTREF(__pyx_t_19);
++ __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
++ {
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L15_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_17);
++ __Pyx_XGIVEREF(__pyx_t_18);
++ __Pyx_XGIVEREF(__pyx_t_19);
++ __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
++ }
++ __Pyx_XGIVEREF(__pyx_t_14);
++ __Pyx_XGIVEREF(__pyx_t_15);
++ __Pyx_XGIVEREF(__pyx_t_16);
++ __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
++ __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
++ __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
++ goto __pyx_L1_error;
++ __pyx_L15_error:;
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_17);
++ __Pyx_XGIVEREF(__pyx_t_18);
++ __Pyx_XGIVEREF(__pyx_t_19);
++ __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
++ }
++ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
++ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
++ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
++ __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
++ goto __pyx_L1_error;
++ }
++ __pyx_L3_return: {
++ __pyx_t_19 = __pyx_r;
++ __pyx_r = 0;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_19;
++ __pyx_t_19 = 0;
++ goto __pyx_L0;
++ }
++ __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":600
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":671
++ * finally:
++ * self._free_native_value(v)
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
+- * try:
+- * return self.get_property_async(prop, data=data)
++ * @_errors
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":636
++ *
++ * @_errors
++ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
++ * assert self._ctx
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_9);
++ __Pyx_XDECREF(__pyx_t_11);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF(__pyx_v_userdatas);
++ __Pyx_XDECREF(__pyx_v_prop);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":606
+- * return default
++/* "vidcutter/libs/pympv/mpv.pyx":674
+ *
+- * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
+- * try:
+- * return self.get_property(prop)
++ * @_errors
++ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_option"""
++ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_20set_option[] = "Wraps: mpv_set_option";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_prop = 0;
+- PyObject *__pyx_v_default = 0;
++ PyObject *__pyx_v_value = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("try_get_property (wrapper)", 0);
++ __Pyx_RefNannySetupContext("set_option (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_default,0};
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,0};
+ PyObject* values[2] = {0,0};
+- values[1] = ((PyObject *)Py_None);
++ values[1] = ((PyObject *)Py_True);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+@@ -12505,12 +12874,12 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyOb
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 606, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 674, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -12522,258 +12891,74 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyOb
+ }
+ }
+ __pyx_v_prop = values[0];
+- __pyx_v_default = values[1];
++ __pyx_v_value = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 674, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_18try_get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_default);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("try_get_property", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":607
+- *
+- * def try_get_property(self, prop, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property(prop)
+- * except MPVError:
+- */
+- {
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+- __Pyx_XGOTREF(__pyx_t_1);
+- __Pyx_XGOTREF(__pyx_t_2);
+- __Pyx_XGOTREF(__pyx_t_3);
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":608
+- * def try_get_property(self, prop, default=None):
+- * try:
+- * return self.get_property(prop) # <<<<<<<<<<<<<<
+- * except MPVError:
+- * return default
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- }
+- }
+- __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_prop);
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
+- goto __pyx_L7_try_return;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":607
+- *
+- * def try_get_property(self, prop, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property(prop)
+- * except MPVError:
+- */
+- }
+- __pyx_L3_error:;
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":609
+- * try:
+- * return self.get_property(prop)
+- * except MPVError: # <<<<<<<<<<<<<<
+- * return default
+- *
+- */
+- __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+- __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
+- if (__pyx_t_8) {
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 609, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GOTREF(__pyx_t_4);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":610
+- * return self.get_property(prop)
+- * except MPVError:
+- * return default # <<<<<<<<<<<<<<
+- *
+- * def get_property(self, prop):
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_default);
+- __pyx_r = __pyx_v_default;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- goto __pyx_L6_except_return;
+- }
+- goto __pyx_L5_except_error;
+- __pyx_L5_except_error:;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":607
+- *
+- * def try_get_property(self, prop, default=None):
+- * try: # <<<<<<<<<<<<<<
+- * return self.get_property(prop)
+- * except MPVError:
+- */
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L1_error;
+- __pyx_L7_try_return:;
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L0;
+- __pyx_L6_except_return:;
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L0;
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":606
+- * return default
+- *
+- * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
+- * try:
+- * return self.get_property(prop)
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":612
+- * return default
+- *
+- * def get_property(self, prop): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_get_property"""
+- * assert self._ctx
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_20get_property[] = "Wraps: mpv_get_property";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("get_property (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_prop));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop) {
+- struct mpv_node __pyx_v_result;
+- char const *__pyx_v_prop_c;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value) {
++ enum mpv_format __pyx_v_format;
++ struct mpv_node __pyx_v_v;
+ int __pyx_v_err;
+- PyObject *__pyx_v_v = NULL;
++ char const *__pyx_v_prop_c;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+- char const *__pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
++ enum mpv_format __pyx_t_4;
++ char const *__pyx_t_5;
++ int __pyx_t_6;
+ int __pyx_t_7;
+- int __pyx_t_8;
+- char const *__pyx_t_9;
++ char const *__pyx_t_8;
++ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+- PyObject *__pyx_t_15 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("get_property", 0);
++ __Pyx_RefNannySetupContext("set_option", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":614
+- * def get_property(self, prop):
+- * """Wraps: mpv_get_property"""
++ /* "vidcutter/libs/pympv/mpv.pyx":676
++ * def set_option(self, prop, value=True):
++ * """Wraps: mpv_set_option"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef mpv_node result
+ * prop = _strenc(prop)
++ * cdef mpv_format format = self._format_for(value)
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 614, __pyx_L1_error)
++ __PYX_ERR(0, 676, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":616
++ /* "vidcutter/libs/pympv/mpv.pyx":677
++ * """Wraps: mpv_set_option"""
+ * assert self._ctx
+- * cdef mpv_node result
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+- * cdef const char* prop_c = prop
+- * cdef int err
++ * cdef mpv_format format = self._format_for(value)
++ * cdef mpv_node v = self._prep_native_value(value, format)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -12787,275 +12972,200 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":617
+- * cdef mpv_node result
++ /* "vidcutter/libs/pympv/mpv.pyx":678
++ * assert self._ctx
+ * prop = _strenc(prop)
+- * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
+- * cdef int err
+- * with nogil:
+- */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error)
+- __pyx_v_prop_c = __pyx_t_4;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":619
+- * cdef const char* prop_c = prop
++ * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
++ * cdef mpv_node v = self._prep_native_value(value, format)
+ * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_get_property(
+- * self._ctx,
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_format = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":620
++ /* "vidcutter/libs/pympv/mpv.pyx":679
++ * prop = _strenc(prop)
++ * cdef mpv_format format = self._format_for(value)
++ * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+ * cdef int err
+- * with nogil:
+- * err = mpv_get_property( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * prop_c,
++ * cdef const char* prop_c
+ */
+- __pyx_v_err = mpv_get_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_result));
+- }
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":619
+- * cdef const char* prop_c = prop
++ /* "vidcutter/libs/pympv/mpv.pyx":682
+ * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_get_property(
+- * self._ctx,
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":626
+- * &result,
+- * )
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * try:
++ * cdef const char* prop_c
++ * try: # <<<<<<<<<<<<<<
++ * prop_c = prop
++ * with nogil:
+ */
+- __pyx_t_5 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_5)) {
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":627
+- * )
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":683
++ * cdef const char* prop_c
+ * try:
+- * v = _convert_node_value(result)
++ * prop_c = prop # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_set_option(
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_6 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 627, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L4_error)
++ __pyx_v_prop_c = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":626
+- * &result,
+- * )
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":684
+ * try:
++ * prop_c = prop
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_option(
++ * self._ctx,
+ */
+- }
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":628
+- * if err < 0:
+- * raise MPVError(err)
+- * try: # <<<<<<<<<<<<<<
+- * v = _convert_node_value(result)
+- * finally:
++ /* "vidcutter/libs/pympv/mpv.pyx":685
++ * prop_c = prop
++ * with nogil:
++ * err = mpv_set_option( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * prop_c,
+ */
+- /*try:*/ {
++ __pyx_v_err = mpv_set_option(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":629
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":684
+ * try:
+- * v = _convert_node_value(result) # <<<<<<<<<<<<<<
+- * finally:
+- * with nogil:
++ * prop_c = prop
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_set_option(
++ * self._ctx,
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L8_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_v = __pyx_t_1;
+- __pyx_t_1 = 0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L8;
++ }
++ __pyx_L8:;
++ }
++ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":631
+- * v = _convert_node_value(result)
++ /* "vidcutter/libs/pympv/mpv.pyx":692
++ * )
+ * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&result)
+- * return v
++ * self._free_native_value(v) # <<<<<<<<<<<<<<
++ * return err
++ *
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":632
+- * finally:
+- * with nogil:
+- * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
+- * return v
+- *
+- */
+- mpv_free_node_contents((&__pyx_v_result));
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":631
+- * v = _convert_node_value(result)
+- * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&result)
+- * return v
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L12;
+- }
+- __pyx_L12:;
+- }
+- }
+- goto __pyx_L9;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ goto __pyx_L5;
+ }
+- __pyx_L8_error:;
++ __pyx_L4_error:;
+ /*exception exit:*/{
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
++ __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
+- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
++ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
++ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
++ __Pyx_XGOTREF(__pyx_t_9);
+ __Pyx_XGOTREF(__pyx_t_10);
+ __Pyx_XGOTREF(__pyx_t_11);
+ __Pyx_XGOTREF(__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_14);
+- __Pyx_XGOTREF(__pyx_t_15);
+- __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
++ __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
+ {
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":632
+- * finally:
+- * with nogil:
+- * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
+- * return v
+- *
+- */
+- mpv_free_node_contents((&__pyx_v_result));
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":631
+- * v = _convert_node_value(result)
+- * finally:
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_free_node_contents(&result)
+- * return v
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L17;
+- }
+- __pyx_L17:;
+- }
+- }
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L10_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_XGIVEREF(__pyx_t_15);
+- __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
++ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+ }
++ __Pyx_XGIVEREF(__pyx_t_9);
+ __Pyx_XGIVEREF(__pyx_t_10);
+ __Pyx_XGIVEREF(__pyx_t_11);
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
+- __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
++ __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
++ __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
++ __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
++ goto __pyx_L1_error;
++ __pyx_L10_error:;
++ if (PY_MAJOR_VERSION >= 3) {
++ __Pyx_XGIVEREF(__pyx_t_12);
++ __Pyx_XGIVEREF(__pyx_t_13);
++ __Pyx_XGIVEREF(__pyx_t_14);
++ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
++ }
++ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
++ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
++ __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+ goto __pyx_L1_error;
+ }
+- __pyx_L9:;
++ __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":633
+- * with nogil:
+- * mpv_free_node_contents(&result)
+- * return v # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":693
++ * finally:
++ * self._free_native_value(v)
++ * return err # <<<<<<<<<<<<<<
+ *
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v_v);
+- __pyx_r = __pyx_v_v;
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":612
+- * return default
++ /* "vidcutter/libs/pympv/mpv.pyx":674
+ *
+- * def get_property(self, prop): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_get_property"""
++ * @_errors
++ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_option"""
+ * assert self._ctx
+ */
+
+@@ -13064,1047 +13174,798 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct _
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XDECREF(__pyx_v_prop);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":636
++/* "vidcutter/libs/pympv/mpv.pyx":696
+ *
+ * @_errors
+- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
++ * def initialize(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_initialize"""
+ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_22set_property[] = "Wraps: mpv_set_property and mpv_set_property_async";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_prop = 0;
+- PyObject *__pyx_v_value = 0;
+- PyObject *__pyx_v_asynchronous = 0;
+- PyObject *__pyx_v_data = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_22initialize[] = "Wraps: mpv_initialize";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_property (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
+- PyObject* values[4] = {0,0,0,0};
+- values[1] = ((PyObject *)Py_True);
+- values[2] = ((PyObject *)Py_False);
+- values[3] = ((PyObject *)Py_None);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+- CYTHON_FALLTHROUGH;
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
+- if (value) { values[1] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_asynchronous);
+- if (value) { values[2] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 3:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
+- if (value) { values[3] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 636, __pyx_L3_error)
+- }
+- } else {
+- switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+- CYTHON_FALLTHROUGH;
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- }
+- __pyx_v_prop = values[0];
+- __pyx_v_value = values[1];
+- __pyx_v_asynchronous = values[2];
+- __pyx_v_data = values[3];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_22set_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value, __pyx_v_asynchronous, __pyx_v_data);
++ __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data) {
+- enum mpv_format __pyx_v_format;
+- struct mpv_node __pyx_v_v;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+ int __pyx_v_err;
+- uint64_t __pyx_v_data_id;
+- char const *__pyx_v_prop_c;
+- PyObject *__pyx_v_userdatas = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- enum mpv_format __pyx_t_4;
+- char const *__pyx_t_5;
+- int __pyx_t_6;
+- int __pyx_t_7;
+- Py_hash_t __pyx_t_8;
+- PyObject *__pyx_t_9 = NULL;
+- int __pyx_t_10;
+- PyObject *__pyx_t_11 = NULL;
+- int __pyx_t_12;
+- char const *__pyx_t_13;
+- PyObject *__pyx_t_14 = NULL;
+- PyObject *__pyx_t_15 = NULL;
+- PyObject *__pyx_t_16 = NULL;
+- PyObject *__pyx_t_17 = NULL;
+- PyObject *__pyx_t_18 = NULL;
+- PyObject *__pyx_t_19 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_property", 0);
+- __Pyx_INCREF(__pyx_v_prop);
++ __Pyx_RefNannySetupContext("initialize", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":638
+- * def set_property(self, prop, value=True, asynchronous=False, data=None):
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
++ /* "vidcutter/libs/pympv/mpv.pyx":698
++ * def initialize(self):
++ * """Wraps: mpv_initialize"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value)
++ * cdef int err
++ * with nogil:
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 638, __pyx_L1_error)
++ __PYX_ERR(0, 698, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":639
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
++ /* "vidcutter/libs/pympv/mpv.pyx":700
+ * assert self._ctx
+- * prop = _strenc(prop) # <<<<<<<<<<<<<<
+- * cdef mpv_format format = self._format_for(value)
+- * cdef mpv_node v = self._prep_native_value(value, format)
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_initialize(self._ctx)
++ * return err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+- __pyx_t_1 = 0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":640
+- * assert self._ctx
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
+- * cdef mpv_node v = self._prep_native_value(value, format)
++ /* "vidcutter/libs/pympv/mpv.pyx":701
+ * cdef int err
++ * with nogil:
++ * err = mpv_initialize(self._ctx) # <<<<<<<<<<<<<<
++ * return err
++ *
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_format = __pyx_t_4;
++ __pyx_v_err = mpv_initialize(__pyx_v_self->_ctx);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":641
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value)
+- * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":700
++ * assert self._ctx
+ * cdef int err
+- * cdef uint64_t data_id
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":645
+- * cdef uint64_t data_id
+- * cdef const char* prop_c
+- * try: # <<<<<<<<<<<<<<
+- * prop_c = prop
+- * if not asynchronous:
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_initialize(self._ctx)
++ * return err
+ */
+- /*try:*/ {
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":646
+- * cdef const char* prop_c
+- * try:
+- * prop_c = prop # <<<<<<<<<<<<<<
+- * if not asynchronous:
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":702
++ * with nogil:
++ * err = mpv_initialize(self._ctx)
++ * return err # <<<<<<<<<<<<<<
++ *
++ * def wait_event(self, timeout=None):
+ */
+- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 646, __pyx_L4_error)
+- __pyx_v_prop_c = __pyx_t_5;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":647
+- * try:
+- * prop_c = prop
+- * if not asynchronous: # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_set_property(
++ /* "vidcutter/libs/pympv/mpv.pyx":696
++ *
++ * @_errors
++ * def initialize(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_initialize"""
++ * assert self._ctx
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 647, __pyx_L4_error)
+- __pyx_t_7 = ((!__pyx_t_6) != 0);
+- if (__pyx_t_7) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":648
+- * prop_c = prop
+- * if not asynchronous:
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_property(
+- * self._ctx,
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":649
+- * if not asynchronous:
+- * with nogil:
+- * err = mpv_set_property( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * prop_c,
++/* "vidcutter/libs/pympv/mpv.pyx":704
++ * return err
++ *
++ * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_wait_event"""
++ * assert self._ctx
+ */
+- __pyx_v_err = mpv_set_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":648
+- * prop_c = prop
+- * if not asynchronous:
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_property(
+- * self._ctx,
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L9;
+- }
+- __pyx_L9:;
+- }
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_24wait_event[] = "Wraps: mpv_wait_event";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_timeout = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("wait_event (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};
++ PyObject* values[1] = {0};
++ values[0] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout);
++ if (value) { values[0] = value; kw_args--; }
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 704, __pyx_L3_error)
++ }
++ } else {
++ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
+ }
++ }
++ __pyx_v_timeout = values[0];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 704, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_timeout);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":655
+- * &v
+- * )
+- * return err # <<<<<<<<<<<<<<
+- * data_id = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(data_id, None)
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L3_return;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":647
+- * try:
+- * prop_c = prop
+- * if not asynchronous: # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_set_property(
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout) {
++ double __pyx_v_timeout_d;
++ struct mpv_event *__pyx_v_event;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ double __pyx_t_1;
++ int __pyx_t_2;
++ double __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("wait_event", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":706
++ * def wait_event(self, timeout=None):
++ * """Wraps: mpv_wait_event"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * cdef double timeout_d = timeout if timeout is not None else -1
++ * cdef mpv_event* event
+ */
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 706, __pyx_L1_error)
+ }
++ }
++ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":656
+- * )
+- * return err
+- * data_id = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None:
++ /* "vidcutter/libs/pympv/mpv.pyx":707
++ * """Wraps: mpv_wait_event"""
++ * assert self._ctx
++ * cdef double timeout_d = timeout if timeout is not None else -1 # <<<<<<<<<<<<<<
++ * cdef mpv_event* event
++ * with nogil:
+ */
+- __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 656, __pyx_L4_error)
+- __pyx_v_data_id = ((uint64_t)__pyx_t_8);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":657
+- * return err
+- * data_id = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
+- * if userdatas is None:
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_9 = NULL;
+- __pyx_t_10 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_9)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_9);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- __pyx_t_10 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- } else
+- #endif
+- {
+- __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_11);
+- if (__pyx_t_9) {
+- __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
+- }
+- __Pyx_GIVEREF(__pyx_t_3);
+- PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, Py_None);
+- __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+- }
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_userdatas = __pyx_t_1;
+- __pyx_t_1 = 0;
++ __pyx_t_2 = (__pyx_v_timeout != Py_None);
++ if ((__pyx_t_2 != 0)) {
++ __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
++ __pyx_t_1 = __pyx_t_3;
++ } else {
++ __pyx_t_1 = -1.0;
++ }
++ __pyx_v_timeout_d = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":658
+- * data_id = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
++ /* "vidcutter/libs/pympv/mpv.pyx":709
++ * cdef double timeout_d = timeout if timeout is not None else -1
++ * cdef mpv_event* event
++ * with nogil: # <<<<<<<<<<<<<<
++ * event = mpv_wait_event(self._ctx, timeout_d)
++ * return Event()._init(event, self)
+ */
+- __pyx_t_7 = (__pyx_v_userdatas == Py_None);
+- __pyx_t_6 = (__pyx_t_7 != 0);
+- if (__pyx_t_6) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":659
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None:
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+- * userdatas.add()
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":710
++ * cdef mpv_event* event
++ * with nogil:
++ * event = mpv_wait_event(self._ctx, timeout_d) # <<<<<<<<<<<<<<
++ * return Event()._init(event, self)
++ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_11 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_11)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_11);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++ __pyx_v_event = mpv_wait_event(__pyx_v_self->_ctx, __pyx_v_timeout_d);
+ }
+- __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 659, __pyx_L4_error)
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":658
+- * data_id = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(data_id, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- */
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":660
+- * if userdatas is None:
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add() # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_set_property_async(
++ /* "vidcutter/libs/pympv/mpv.pyx":709
++ * cdef double timeout_d = timeout if timeout is not None else -1
++ * cdef mpv_event* event
++ * with nogil: # <<<<<<<<<<<<<<
++ * event = mpv_wait_event(self._ctx, timeout_d)
++ * return Event()._init(event, self)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_11 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_11)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_11);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
+ }
+- }
+- __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L4_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":661
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_property_async(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":711
++ * with nogil:
++ * event = mpv_wait_event(self._ctx, timeout_d)
++ * return Event()._init(event, self) # <<<<<<<<<<<<<<
++ *
++ * def wakeup(self):
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_r = __pyx_t_5;
++ __pyx_t_5 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":662
+- * userdatas.add()
+- * with nogil:
+- * err = mpv_set_property_async( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * data_id,
++ /* "vidcutter/libs/pympv/mpv.pyx":704
++ * return err
++ *
++ * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_wait_event"""
++ * assert self._ctx
+ */
+- __pyx_v_err = mpv_set_property_async(__pyx_v_self->_ctx, __pyx_v_data_id, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":661
+- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+- * userdatas.add()
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_property_async(
+- * self._ctx,
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L13;
+- }
+- __pyx_L13:;
+- }
+- }
+- }
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":670
+- * )
+- * finally:
+- * self._free_native_value(v) # <<<<<<<<<<<<<<
+- * return err
++/* "vidcutter/libs/pympv/mpv.pyx":713
++ * return Event()._init(event, self)
+ *
++ * def wakeup(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_wakeup"""
++ * assert self._ctx
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- goto __pyx_L5;
+- }
+- __pyx_L4_error:;
+- /*exception exit:*/{
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
+- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
+- __Pyx_XGOTREF(__pyx_t_14);
+- __Pyx_XGOTREF(__pyx_t_15);
+- __Pyx_XGOTREF(__pyx_t_16);
+- __Pyx_XGOTREF(__pyx_t_17);
+- __Pyx_XGOTREF(__pyx_t_18);
+- __Pyx_XGOTREF(__pyx_t_19);
+- __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
+- {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L15_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- }
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_17);
+- __Pyx_XGIVEREF(__pyx_t_18);
+- __Pyx_XGIVEREF(__pyx_t_19);
+- __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
+- }
+- __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_XGIVEREF(__pyx_t_15);
+- __Pyx_XGIVEREF(__pyx_t_16);
+- __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
+- __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
+- __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
+- goto __pyx_L1_error;
+- __pyx_L15_error:;
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_17);
+- __Pyx_XGIVEREF(__pyx_t_18);
+- __Pyx_XGIVEREF(__pyx_t_19);
+- __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
+- }
+- __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+- __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+- __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
+- goto __pyx_L1_error;
+- }
+- __pyx_L3_return: {
+- __pyx_t_19 = __pyx_r;
+- __pyx_r = 0;
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_19;
+- __pyx_t_19 = 0;
+- goto __pyx_L0;
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_26wakeup[] = "Wraps: mpv_wakeup";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("wakeup (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("wakeup", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":715
++ * def wakeup(self):
++ * """Wraps: mpv_wakeup"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_wakeup(self._ctx)
++ */
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 715, __pyx_L1_error)
+ }
+- __pyx_L5:;
+ }
++ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":671
+- * finally:
+- * self._free_native_value(v)
+- * return err # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":716
++ * """Wraps: mpv_wakeup"""
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_wakeup(self._ctx)
+ *
+- * @_errors
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":636
++ /* "vidcutter/libs/pympv/mpv.pyx":717
++ * assert self._ctx
++ * with nogil:
++ * mpv_wakeup(self._ctx) # <<<<<<<<<<<<<<
+ *
+- * @_errors
+- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
++ * def set_wakeup_callback(self, callback):
++ */
++ mpv_wakeup(__pyx_v_self->_ctx);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":716
++ * """Wraps: mpv_wakeup"""
++ * assert self._ctx
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_wakeup(self._ctx)
++ *
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":713
++ * return Event()._init(event, self)
++ *
++ * def wakeup(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_wakeup"""
+ * assert self._ctx
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_9);
+- __Pyx_XDECREF(__pyx_t_11);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wakeup", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_userdatas);
+- __Pyx_XDECREF(__pyx_v_prop);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":674
++/* "vidcutter/libs/pympv/mpv.pyx":719
++ * mpv_wakeup(self._ctx)
+ *
+- * @_errors
+- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_option"""
++ * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_wakeup_callback"""
+ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_24set_option[] = "Wraps: mpv_set_option";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_prop = 0;
+- PyObject *__pyx_v_value = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback[] = "Wraps: mpv_set_wakeup_callback";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_option (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,0};
+- PyObject* values[2] = {0,0};
+- values[1] = ((PyObject *)Py_True);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
+- if (value) { values[1] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 674, __pyx_L3_error)
+- }
+- } else {
+- switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- }
+- __pyx_v_prop = values[0];
+- __pyx_v_value = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 674, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_24set_option(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value);
++ __Pyx_RefNannySetupContext("set_wakeup_callback (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value) {
+- enum mpv_format __pyx_v_format;
+- struct mpv_node __pyx_v_v;
+- int __pyx_v_err;
+- char const *__pyx_v_prop_c;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback) {
++ uint64_t __pyx_v_name;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
++ uint64_t __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+- enum mpv_format __pyx_t_4;
+- char const *__pyx_t_5;
+- int __pyx_t_6;
+- int __pyx_t_7;
+- char const *__pyx_t_8;
+- PyObject *__pyx_t_9 = NULL;
+- PyObject *__pyx_t_10 = NULL;
+- PyObject *__pyx_t_11 = NULL;
+- PyObject *__pyx_t_12 = NULL;
+- PyObject *__pyx_t_13 = NULL;
+- PyObject *__pyx_t_14 = NULL;
++ PyObject *__pyx_t_4 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_option", 0);
+- __Pyx_INCREF(__pyx_v_prop);
++ __Pyx_RefNannySetupContext("set_wakeup_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":676
+- * def set_option(self, prop, value=True):
+- * """Wraps: mpv_set_option"""
++ /* "vidcutter/libs/pympv/mpv.pyx":721
++ * def set_wakeup_callback(self, callback):
++ * """Wraps: mpv_set_wakeup_callback"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value)
++ * cdef uint64_t name = <uint64_t>id(self)
++ * self.callback = callback
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 676, __pyx_L1_error)
++ __PYX_ERR(0, 721, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":677
+- * """Wraps: mpv_set_option"""
++ /* "vidcutter/libs/pympv/mpv.pyx":722
++ * """Wraps: mpv_set_wakeup_callback"""
+ * assert self._ctx
+- * prop = _strenc(prop) # <<<<<<<<<<<<<<
+- * cdef mpv_format format = self._format_for(value)
+- * cdef mpv_node v = self._prep_native_value(value, format)
++ * cdef uint64_t name = <uint64_t>id(self) # <<<<<<<<<<<<<<
++ * self.callback = callback
++ * self.callbackthread.set(callback)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+- __pyx_t_1 = 0;
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_name = ((uint64_t)__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":678
++ /* "vidcutter/libs/pympv/mpv.pyx":723
+ * assert self._ctx
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
+- * cdef mpv_node v = self._prep_native_value(value, format)
+- * cdef int err
++ * cdef uint64_t name = <uint64_t>id(self)
++ * self.callback = callback # <<<<<<<<<<<<<<
++ * self.callbackthread.set(callback)
++ * with nogil:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(__pyx_v_callback);
++ __Pyx_GIVEREF(__pyx_v_callback);
++ __Pyx_GOTREF(__pyx_v_self->callback);
++ __Pyx_DECREF(__pyx_v_self->callback);
++ __pyx_v_self->callback = __pyx_v_callback;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":724
++ * cdef uint64_t name = <uint64_t>id(self)
++ * self.callback = callback
++ * self.callbackthread.set(callback) # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++ */
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callback);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_format = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":679
+- * prop = _strenc(prop)
+- * cdef mpv_format format = self._format_for(value)
+- * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+- * cdef int err
+- * cdef const char* prop_c
++ /* "vidcutter/libs/pympv/mpv.pyx":725
++ * self.callback = callback
++ * self.callbackthread.set(callback)
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++ *
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":682
+- * cdef int err
+- * cdef const char* prop_c
+- * try: # <<<<<<<<<<<<<<
+- * prop_c = prop
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":726
++ * self.callbackthread.set(callback)
++ * with nogil:
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name) # <<<<<<<<<<<<<<
++ *
++ * def get_wakeup_pipe(self):
+ */
+- /*try:*/ {
++ mpv_set_wakeup_callback(__pyx_v_self->_ctx, __pyx_f_9vidcutter_4libs_3mpv__c_callback, ((void *)__pyx_v_name));
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":683
+- * cdef const char* prop_c
+- * try:
+- * prop_c = prop # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_set_option(
++ /* "vidcutter/libs/pympv/mpv.pyx":725
++ * self.callback = callback
++ * self.callbackthread.set(callback)
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++ *
+ */
+- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L4_error)
+- __pyx_v_prop_c = __pyx_t_5;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":684
+- * try:
+- * prop_c = prop
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_option(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":719
++ * mpv_wakeup(self._ctx)
++ *
++ * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_wakeup_callback"""
++ * assert self._ctx
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":685
+- * prop_c = prop
+- * with nogil:
+- * err = mpv_set_option( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * prop_c,
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_wakeup_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":728
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++ *
++ * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_get_wakeup_pipe"""
++ * assert self._ctx
+ */
+- __pyx_v_err = mpv_set_option(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":684
+- * try:
+- * prop_c = prop
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_set_option(
+- * self._ctx,
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe[] = "Wraps: mpv_get_wakeup_pipe";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("get_wakeup_pipe (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ int __pyx_v_pipe;
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("get_wakeup_pipe", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":730
++ * def get_wakeup_pipe(self):
++ * """Wraps: mpv_get_wakeup_pipe"""
++ * assert self._ctx # <<<<<<<<<<<<<<
++ * cdef int pipe
++ * with nogil:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L8;
+- }
+- __pyx_L8:;
+- }
++ #ifndef CYTHON_WITHOUT_ASSERTIONS
++ if (unlikely(!Py_OptimizeFlag)) {
++ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
++ PyErr_SetNone(PyExc_AssertionError);
++ __PYX_ERR(0, 730, __pyx_L1_error)
+ }
+ }
++ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":692
+- * )
+- * finally:
+- * self._free_native_value(v) # <<<<<<<<<<<<<<
+- * return err
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":732
++ * assert self._ctx
++ * cdef int pipe
++ * with nogil: # <<<<<<<<<<<<<<
++ * pipe = mpv_get_wakeup_pipe(self._ctx)
++ * return pipe
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- goto __pyx_L5;
+- }
+- __pyx_L4_error:;
+- /*exception exit:*/{
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
+- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
+- __Pyx_XGOTREF(__pyx_t_9);
+- __Pyx_XGOTREF(__pyx_t_10);
+- __Pyx_XGOTREF(__pyx_t_11);
+- __Pyx_XGOTREF(__pyx_t_12);
+- __Pyx_XGOTREF(__pyx_t_13);
+- __Pyx_XGOTREF(__pyx_t_14);
+- __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
+- {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L10_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- }
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_XGIVEREF(__pyx_t_13);
+- __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":733
++ * cdef int pipe
++ * with nogil:
++ * pipe = mpv_get_wakeup_pipe(self._ctx) # <<<<<<<<<<<<<<
++ * return pipe
++ *
++ */
++ __pyx_v_pipe = mpv_get_wakeup_pipe(__pyx_v_self->_ctx);
+ }
+- __Pyx_XGIVEREF(__pyx_t_9);
+- __Pyx_XGIVEREF(__pyx_t_10);
+- __Pyx_XGIVEREF(__pyx_t_11);
+- __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
+- __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+- __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
+- goto __pyx_L1_error;
+- __pyx_L10_error:;
+- if (PY_MAJOR_VERSION >= 3) {
+- __Pyx_XGIVEREF(__pyx_t_12);
+- __Pyx_XGIVEREF(__pyx_t_13);
+- __Pyx_XGIVEREF(__pyx_t_14);
+- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":732
++ * assert self._ctx
++ * cdef int pipe
++ * with nogil: # <<<<<<<<<<<<<<
++ * pipe = mpv_get_wakeup_pipe(self._ctx)
++ * return pipe
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
+ }
+- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
+- goto __pyx_L1_error;
+- }
+- __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":693
+- * finally:
+- * self._free_native_value(v)
+- * return err # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":734
++ * with nogil:
++ * pipe = mpv_get_wakeup_pipe(self._ctx)
++ * return pipe # <<<<<<<<<<<<<<
+ *
+- * @_errors
++ * def __cinit__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":674
++ /* "vidcutter/libs/pympv/mpv.pyx":728
++ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+ *
+- * @_errors
+- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_option"""
++ * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_get_wakeup_pipe"""
+ * assert self._ctx
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_wakeup_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_prop);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":696
++/* "vidcutter/libs/pympv/mpv.pyx":736
++ * return pipe
+ *
+- * @_errors
+- * def initialize(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_initialize"""
+- * assert self._ctx
++ * def __cinit__(self): # <<<<<<<<<<<<<<
++ * cdef uint64_t ctxid = <uint64_t>id(self)
++ * with nogil:
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_26initialize[] = "Wraps: mpv_initialize";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
++static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_33__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_33__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
++ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
++ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
++ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- int __pyx_v_err;
+- PyObject *__pyx_r = NULL;
++static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ uint64_t __pyx_v_ctxid;
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
++ uint64_t __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("initialize", 0);
++ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":698
+- * def initialize(self):
+- * """Wraps: mpv_initialize"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":737
++ *
++ * def __cinit__(self):
++ * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
+ * with nogil:
++ * self._ctx = mpv_create()
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 698, __pyx_L1_error)
+- }
+- }
+- #endif
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":700
+- * assert self._ctx
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":738
++ * def __cinit__(self):
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_initialize(self._ctx)
+- * return err
++ * self._ctx = mpv_create()
++ * if not self._ctx:
+ */
+ {
+ #ifdef WITH_THREAD
+@@ -14114,22 +13975,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __p
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":701
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":739
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil:
+- * err = mpv_initialize(self._ctx) # <<<<<<<<<<<<<<
+- * return err
+- *
++ * self._ctx = mpv_create() # <<<<<<<<<<<<<<
++ * if not self._ctx:
++ * raise MPVError("Context creation error")
+ */
+- __pyx_v_err = mpv_initialize(__pyx_v_self->_ctx);
++ __pyx_v_self->_ctx = mpv_create();
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":700
+- * assert self._ctx
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":738
++ * def __cinit__(self):
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_initialize(self._ctx)
+- * return err
++ * self._ctx = mpv_create()
++ * if not self._ctx:
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+@@ -14143,66 +14004,200 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __p
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":702
++ /* "vidcutter/libs/pympv/mpv.pyx":740
+ * with nogil:
+- * err = mpv_initialize(self._ctx)
+- * return err # <<<<<<<<<<<<<<
+- *
+- * def wait_event(self, timeout=None):
++ * self._ctx = mpv_create()
++ * if not self._ctx: # <<<<<<<<<<<<<<
++ * raise MPVError("Context creation error")
++ * self.callbackthread = CallbackThread()
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __pyx_t_3 = ((!(__pyx_v_self->_ctx != 0)) != 0);
++ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":696
+- *
+- * @_errors
+- * def initialize(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_initialize"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":741
++ * self._ctx = mpv_create()
++ * if not self._ctx:
++ * raise MPVError("Context creation error") # <<<<<<<<<<<<<<
++ * self.callbackthread = CallbackThread()
++ * _callbacks[ctxid] = self.callbackthread
+ */
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Context_creation_error) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Context_creation_error);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(0, 741, __pyx_L1_error)
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ /* "vidcutter/libs/pympv/mpv.pyx":740
++ * with nogil:
++ * self._ctx = mpv_create()
++ * if not self._ctx: # <<<<<<<<<<<<<<
++ * raise MPVError("Context creation error")
++ * self.callbackthread = CallbackThread()
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":742
++ * if not self._ctx:
++ * raise MPVError("Context creation error")
++ * self.callbackthread = CallbackThread() # <<<<<<<<<<<<<<
++ * _callbacks[ctxid] = self.callbackthread
++ * self.reply_userdata = dict()
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->callbackthread);
++ __Pyx_DECREF(__pyx_v_self->callbackthread);
++ __pyx_v_self->callbackthread = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":743
++ * raise MPVError("Context creation error")
++ * self.callbackthread = CallbackThread()
++ * _callbacks[ctxid] = self.callbackthread # <<<<<<<<<<<<<<
++ * self.reply_userdata = dict()
++ * _reply_userdatas[ctxid] = self.reply_userdata
++ */
++ __pyx_t_1 = __pyx_v_self->callbackthread;
++ __Pyx_INCREF(__pyx_t_1);
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":744
++ * self.callbackthread = CallbackThread()
++ * _callbacks[ctxid] = self.callbackthread
++ * self.reply_userdata = dict() # <<<<<<<<<<<<<<
++ * _reply_userdatas[ctxid] = self.reply_userdata
++ * self.callbackthread.start()
++ */
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
++ __Pyx_DECREF(__pyx_v_self->reply_userdata);
++ __pyx_v_self->reply_userdata = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":745
++ * _callbacks[ctxid] = self.callbackthread
++ * self.reply_userdata = dict()
++ * _reply_userdatas[ctxid] = self.reply_userdata # <<<<<<<<<<<<<<
++ * self.callbackthread.start()
++ *
++ */
++ __pyx_t_1 = __pyx_v_self->reply_userdata;
++ __Pyx_INCREF(__pyx_t_1);
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":746
++ * self.reply_userdata = dict()
++ * _reply_userdatas[ctxid] = self.reply_userdata
++ * self.callbackthread.start() # <<<<<<<<<<<<<<
++ *
++ * @_errors
++ */
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":736
++ * return pipe
++ *
++ * def __cinit__(self): # <<<<<<<<<<<<<<
++ * cdef uint64_t ctxid = <uint64_t>id(self)
++ * with nogil:
++ */
++
++ /* function exit code */
++ __pyx_r = 0;
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = -1;
++ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":704
+- * return err
++/* "vidcutter/libs/pympv/mpv.pyx":749
+ *
+- * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_wait_event"""
++ * @_errors
++ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_observe_property"""
+ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_28wait_event[] = "Wraps: mpv_wait_event";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_timeout = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_34observe_property[] = "Wraps: mpv_observe_property";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_prop = 0;
++ PyObject *__pyx_v_data = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("wait_event (wrapper)", 0);
++ __Pyx_RefNannySetupContext("observe_property (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};
+- PyObject* values[1] = {0};
+- values[0] = ((PyObject *)Py_None);
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
++ PyObject* values[2] = {0,0};
++ values[1] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+@@ -14211,117 +14206,291 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event(PyObject *
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout);
+- if (value) { values[0] = value; kw_args--; }
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
++ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 704, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 749, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+- case 0: break;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+- __pyx_v_timeout = values[0];
++ __pyx_v_prop = values[0];
++ __pyx_v_data = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 704, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 749, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_timeout);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout) {
+- double __pyx_v_timeout_d;
+- struct mpv_event *__pyx_v_event;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
++ uint64_t __pyx_v_id_data;
++ PyObject *__pyx_v_userdatas = NULL;
++ char *__pyx_v_propc;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- double __pyx_t_1;
+- int __pyx_t_2;
+- double __pyx_t_3;
++ Py_hash_t __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_t_8;
++ int __pyx_t_9;
++ char *__pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("wait_event", 0);
++ __Pyx_RefNannySetupContext("observe_property", 0);
++ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":706
+- * def wait_event(self, timeout=None):
+- * """Wraps: mpv_wait_event"""
++ /* "vidcutter/libs/pympv/mpv.pyx":751
++ * def observe_property(self, prop, data=None):
++ * """Wraps: mpv_observe_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef double timeout_d = timeout if timeout is not None else -1
+- * cdef mpv_event* event
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * id_data = <uint64_t>hash(data)
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 706, __pyx_L1_error)
++ __PYX_ERR(0, 751, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":707
+- * """Wraps: mpv_wait_event"""
++ /* "vidcutter/libs/pympv/mpv.pyx":752
++ * """Wraps: mpv_observe_property"""
+ * assert self._ctx
+- * cdef double timeout_d = timeout if timeout is not None else -1 # <<<<<<<<<<<<<<
+- * cdef mpv_event* event
+- * with nogil:
++ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
++ * id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
+ */
+- __pyx_t_2 = (__pyx_v_timeout != Py_None);
+- if ((__pyx_t_2 != 0)) {
+- __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
+- __pyx_t_1 = __pyx_t_3;
+- } else {
+- __pyx_t_1 = -1.0;
+- }
+- __pyx_v_timeout_d = __pyx_t_1;
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
++ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":709
+- * cdef double timeout_d = timeout if timeout is not None else -1
+- * cdef mpv_event* event
+- * with nogil: # <<<<<<<<<<<<<<
+- * event = mpv_wait_event(self._ctx, timeout_d)
+- * return Event()._init(event, self)
++ /* "vidcutter/libs/pympv/mpv.pyx":753
++ * assert self._ctx
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None:
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 753, __pyx_L1_error)
++ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":710
+- * cdef mpv_event* event
+- * with nogil:
+- * event = mpv_wait_event(self._ctx, timeout_d) # <<<<<<<<<<<<<<
+- * return Event()._init(event, self)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":754
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ */
+- __pyx_v_event = mpv_wait_event(__pyx_v_self->_ctx, __pyx_v_timeout_d);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":709
+- * cdef double timeout_d = timeout if timeout is not None else -1
+- * cdef mpv_event* event
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ __pyx_t_6 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ __pyx_t_6 = 1;
++ }
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_3)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
++ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
++ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (__pyx_t_5) {
++ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
++ }
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
++ __pyx_t_4 = 0;
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ }
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_v_userdatas = __pyx_t_2;
++ __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":755
++ * id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.observed = True
++ */
++ __pyx_t_8 = (__pyx_v_userdatas == Py_None);
++ __pyx_t_9 = (__pyx_t_8 != 0);
++ if (__pyx_t_9) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":756
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
++ * userdatas.observed = True
++ * prop = _strenc(prop)
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
++ }
++ __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
++ __Pyx_INCREF(__pyx_t_2);
++ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":755
++ * id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is None: # <<<<<<<<<<<<<<
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.observed = True
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":757
++ * if userdatas is None:
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.observed = True # <<<<<<<<<<<<<<
++ * prop = _strenc(prop)
++ * cdef char* propc = prop
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":758
++ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ * userdatas.observed = True
++ * prop = _strenc(prop) # <<<<<<<<<<<<<<
++ * cdef char* propc = prop
++ * cdef int err
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
++ }
++ __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_prop);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_2);
++ __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":759
++ * userdatas.observed = True
++ * prop = _strenc(prop)
++ * cdef char* propc = prop # <<<<<<<<<<<<<<
++ * cdef int err
++ * with nogil:
++ */
++ __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
++ __pyx_v_propc = __pyx_t_10;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":761
++ * cdef char* propc = prop
++ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+- * event = mpv_wait_event(self._ctx, timeout_d)
+- * return Event()._init(event, self)
++ * err = mpv_observe_property(
++ * self._ctx,
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":762
++ * cdef int err
++ * with nogil:
++ * err = mpv_observe_property( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * id_data,
++ */
++ __pyx_v_err = mpv_observe_property(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_propc, MPV_FORMAT_NODE);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":761
++ * cdef char* propc = prop
++ * cdef int err
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_observe_property(
++ * self._ctx,
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+@@ -14329,101 +14498,248 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(struct __p
+ __Pyx_FastGIL_Forget();
+ Py_BLOCK_THREADS
+ #endif
+- goto __pyx_L5;
++ goto __pyx_L6;
+ }
+- __pyx_L5:;
++ __pyx_L6:;
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":711
+- * with nogil:
+- * event = mpv_wait_event(self._ctx, timeout_d)
+- * return Event()._init(event, self) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":768
++ * MPV_FORMAT_NODE,
++ * )
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def wakeup(self):
++ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_r = __pyx_t_5;
+- __pyx_t_5 = 0;
++ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_r = __pyx_t_2;
++ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":704
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":749
+ *
+- * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_wait_event"""
++ * @_errors
++ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_observe_property"""
+ * assert self._ctx
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_userdatas);
++ __Pyx_XDECREF(__pyx_v_prop);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":713
+- * return Event()._init(event, self)
++/* "vidcutter/libs/pympv/mpv.pyx":771
+ *
+- * def wakeup(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_wakeup"""
++ * @_errors
++ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_30wakeup[] = "Wraps: mpv_wakeup";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_37unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
++static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_36unobserve_property[] = "Wraps: mpv_unobserve_property";
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_37unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("wakeup (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("unobserve_property (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_data));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data) {
++ uint64_t __pyx_v_id_data;
++ PyObject *__pyx_v_userdatas = NULL;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
++ Py_hash_t __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_t_8;
++ int __pyx_t_9;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("wakeup", 0);
++ __Pyx_RefNannySetupContext("unobserve_property", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":715
+- * def wakeup(self):
+- * """Wraps: mpv_wakeup"""
++ /* "vidcutter/libs/pympv/mpv.pyx":773
++ * def unobserve_property(self, data):
++ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_wakeup(self._ctx)
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 715, __pyx_L1_error)
++ __PYX_ERR(0, 773, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":716
+- * """Wraps: mpv_wakeup"""
++ /* "vidcutter/libs/pympv/mpv.pyx":774
++ * """Wraps: mpv_unobserve_property"""
++ * assert self._ctx
++ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is not None:
++ */
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
++ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":775
+ * assert self._ctx
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
++ * if userdatas is not None:
++ * userdatas.observed = False
++ */
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ __pyx_t_6 = 0;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ __pyx_t_6 = 1;
++ }
++ }
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(__pyx_t_3)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
++ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
++ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
++ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else
++ #endif
++ {
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (__pyx_t_5) {
++ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
++ }
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
++ __pyx_t_4 = 0;
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ }
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_v_userdatas = __pyx_t_2;
++ __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":776
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is not None: # <<<<<<<<<<<<<<
++ * userdatas.observed = False
++ * if userdatas.counter <= 0:
++ */
++ __pyx_t_8 = (__pyx_v_userdatas != Py_None);
++ __pyx_t_9 = (__pyx_t_8 != 0);
++ if (__pyx_t_9) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":777
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is not None:
++ * userdatas.observed = False # <<<<<<<<<<<<<<
++ * if userdatas.counter <= 0:
++ * del self.reply_userdata[id_data]
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":778
++ * if userdatas is not None:
++ * userdatas.observed = False
++ * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
++ * del self.reply_userdata[id_data]
++ * cdef int err
++ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (__pyx_t_9) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":779
++ * userdatas.observed = False
++ * if userdatas.counter <= 0:
++ * del self.reply_userdata[id_data] # <<<<<<<<<<<<<<
++ * cdef int err
++ * with nogil:
++ */
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 779, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":778
++ * if userdatas is not None:
++ * userdatas.observed = False
++ * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
++ * del self.reply_userdata[id_data]
++ * cdef int err
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":776
++ * cdef uint64_t id_data = <uint64_t>hash(data)
++ * userdatas = self.reply_userdata.get(id_data, None)
++ * if userdatas is not None: # <<<<<<<<<<<<<<
++ * userdatas.observed = False
++ * if userdatas.counter <= 0:
++ */
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":781
++ * del self.reply_userdata[id_data]
++ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+- * mpv_wakeup(self._ctx)
+- *
++ * err = mpv_unobserve_property(
++ * self._ctx,
+ */
+ {
+ #ifdef WITH_THREAD
+@@ -14433,22 +14749,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":717
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":782
++ * cdef int err
+ * with nogil:
+- * mpv_wakeup(self._ctx) # <<<<<<<<<<<<<<
+- *
+- * def set_wakeup_callback(self, callback):
++ * err = mpv_unobserve_property( # <<<<<<<<<<<<<<
++ * self._ctx,
++ * id_data,
+ */
+- mpv_wakeup(__pyx_v_self->_ctx);
++ __pyx_v_err = mpv_unobserve_property(__pyx_v_self->_ctx, __pyx_v_id_data);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":716
+- * """Wraps: mpv_wakeup"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":781
++ * del self.reply_userdata[id_data]
++ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+- * mpv_wakeup(self._ctx)
+- *
++ * err = mpv_unobserve_property(
++ * self._ctx,
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+@@ -14456,141 +14772,134 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_o
+ __Pyx_FastGIL_Forget();
+ Py_BLOCK_THREADS
+ #endif
+- goto __pyx_L5;
++ goto __pyx_L7;
+ }
+- __pyx_L5:;
++ __pyx_L7:;
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":713
+- * return Event()._init(event, self)
++ /* "vidcutter/libs/pympv/mpv.pyx":786
++ * id_data,
++ * )
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def wakeup(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_wakeup"""
++ * def shutdown(self):
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":771
++ *
++ * @_errors
++ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wakeup", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.unobserve_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_userdatas);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":719
+- * mpv_wakeup(self._ctx)
++/* "vidcutter/libs/pympv/mpv.pyx":788
++ * return err
+ *
+- * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_wakeup_callback"""
+- * assert self._ctx
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * if self._ctx == NULL:
++ * return
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_33set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback[] = "Wraps: mpv_set_wakeup_callback";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_33set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_wakeup_callback (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
++ __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback) {
+- uint64_t __pyx_v_name;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ uint64_t __pyx_v_ctxid;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- uint64_t __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ uint64_t __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_wakeup_callback", 0);
++ __Pyx_RefNannySetupContext("shutdown", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":721
+- * def set_wakeup_callback(self, callback):
+- * """Wraps: mpv_set_wakeup_callback"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef uint64_t name = <uint64_t>id(self)
+- * self.callback = callback
++ /* "vidcutter/libs/pympv/mpv.pyx":789
++ *
++ * def shutdown(self):
++ * if self._ctx == NULL: # <<<<<<<<<<<<<<
++ * return
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 721, __pyx_L1_error)
+- }
+- }
+- #endif
++ __pyx_t_1 = ((__pyx_v_self->_ctx == NULL) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":722
+- * """Wraps: mpv_set_wakeup_callback"""
+- * assert self._ctx
+- * cdef uint64_t name = <uint64_t>id(self) # <<<<<<<<<<<<<<
+- * self.callback = callback
+- * self.callbackthread.set(callback)
+- */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_name = ((uint64_t)__pyx_t_2);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":723
+- * assert self._ctx
+- * cdef uint64_t name = <uint64_t>id(self)
+- * self.callback = callback # <<<<<<<<<<<<<<
+- * self.callbackthread.set(callback)
++ /* "vidcutter/libs/pympv/mpv.pyx":790
++ * def shutdown(self):
++ * if self._ctx == NULL:
++ * return # <<<<<<<<<<<<<<
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil:
+ */
+- __Pyx_INCREF(__pyx_v_callback);
+- __Pyx_GIVEREF(__pyx_v_callback);
+- __Pyx_GOTREF(__pyx_v_self->callback);
+- __Pyx_DECREF(__pyx_v_self->callback);
+- __pyx_v_self->callback = __pyx_v_callback;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":724
+- * cdef uint64_t name = <uint64_t>id(self)
+- * self.callback = callback
+- * self.callbackthread.set(callback) # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++ /* "vidcutter/libs/pympv/mpv.pyx":789
++ *
++ * def shutdown(self):
++ * if self._ctx == NULL: # <<<<<<<<<<<<<<
++ * return
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+ }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callback);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":725
+- * self.callback = callback
+- * self.callbackthread.set(callback)
++ /* "vidcutter/libs/pympv/mpv.pyx":791
++ * if self._ctx == NULL:
++ * return
++ * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_terminate_destroy(self._ctx)
++ */
++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_ctxid = ((uint64_t)__pyx_t_3);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":792
++ * return
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+- *
++ * mpv_terminate_destroy(self._ctx)
++ * self.callbackthread.shutdown()
+ */
+ {
+ #ifdef WITH_THREAD
+@@ -14600,22 +14909,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(s
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":726
+- * self.callbackthread.set(callback)
++ /* "vidcutter/libs/pympv/mpv.pyx":793
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil:
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name) # <<<<<<<<<<<<<<
+- *
+- * def get_wakeup_pipe(self):
++ * mpv_terminate_destroy(self._ctx) # <<<<<<<<<<<<<<
++ * self.callbackthread.shutdown()
++ * del _callbacks[ctxid]
+ */
+- mpv_set_wakeup_callback(__pyx_v_self->_ctx, __pyx_f_9vidcutter_4libs_3mpv__c_callback, ((void *)__pyx_v_name));
++ mpv_terminate_destroy(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":725
+- * self.callback = callback
+- * self.callbackthread.set(callback)
++ /* "vidcutter/libs/pympv/mpv.pyx":792
++ * return
++ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+- *
++ * mpv_terminate_destroy(self._ctx)
++ * self.callbackthread.shutdown()
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+@@ -14623,28 +14932,107 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(s
+ __Pyx_FastGIL_Forget();
+ Py_BLOCK_THREADS
+ #endif
+- goto __pyx_L5;
++ goto __pyx_L6;
+ }
+- __pyx_L5:;
++ __pyx_L6:;
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":719
+- * mpv_wakeup(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":794
++ * with nogil:
++ * mpv_terminate_destroy(self._ctx)
++ * self.callbackthread.shutdown() # <<<<<<<<<<<<<<
++ * del _callbacks[ctxid]
++ * del _reply_userdatas[ctxid]
++ */
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
++ }
++ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":795
++ * mpv_terminate_destroy(self._ctx)
++ * self.callbackthread.shutdown()
++ * del _callbacks[ctxid] # <<<<<<<<<<<<<<
++ * del _reply_userdatas[ctxid]
++ * self.callback = None
++ */
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":796
++ * self.callbackthread.shutdown()
++ * del _callbacks[ctxid]
++ * del _reply_userdatas[ctxid] # <<<<<<<<<<<<<<
++ * self.callback = None
++ * self.reply_userdata = None
++ */
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 796, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":797
++ * del _callbacks[ctxid]
++ * del _reply_userdatas[ctxid]
++ * self.callback = None # <<<<<<<<<<<<<<
++ * self.reply_userdata = None
++ * self._ctx = NULL
++ */
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->callback);
++ __Pyx_DECREF(__pyx_v_self->callback);
++ __pyx_v_self->callback = Py_None;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":798
++ * del _reply_userdatas[ctxid]
++ * self.callback = None
++ * self.reply_userdata = None # <<<<<<<<<<<<<<
++ * self._ctx = NULL
+ *
+- * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_wakeup_callback"""
+- * assert self._ctx
++ */
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
++ __Pyx_DECREF(__pyx_v_self->reply_userdata);
++ __pyx_v_self->reply_userdata = Py_None;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":799
++ * self.callback = None
++ * self.reply_userdata = None
++ * self._ctx = NULL # <<<<<<<<<<<<<<
++ *
++ * # def opengl_cb_api(self):
++ */
++ __pyx_v_self->_ctx = NULL;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":788
++ * return err
++ *
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * if self._ctx == NULL:
++ * return
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_wakeup_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -14652,374 +15040,403 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(s
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":728
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
++/* "vidcutter/libs/pympv/mpv.pyx":813
++ * # return ctx
++ *
++ * def __dealloc__(self): # <<<<<<<<<<<<<<
++ * self.shutdown()
+ *
+- * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_get_wakeup_pipe"""
+- * assert self._ctx
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe[] = "Wraps: mpv_get_wakeup_pipe";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
++static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_41__dealloc__(PyObject *__pyx_v_self); /*proto*/
++static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_41__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("get_wakeup_pipe (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
++ __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- int __pyx_v_pipe;
+- PyObject *__pyx_r = NULL;
++static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("get_wakeup_pipe", 0);
++ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":730
+- * def get_wakeup_pipe(self):
+- * """Wraps: mpv_get_wakeup_pipe"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef int pipe
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":814
++ *
++ * def __dealloc__(self):
++ * self.shutdown() # <<<<<<<<<<<<<<
++ *
++ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 730, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- #endif
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":732
+- * assert self._ctx
+- * cdef int pipe
+- * with nogil: # <<<<<<<<<<<<<<
+- * pipe = mpv_get_wakeup_pipe(self._ctx)
+- * return pipe
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":733
+- * cdef int pipe
+- * with nogil:
+- * pipe = mpv_get_wakeup_pipe(self._ctx) # <<<<<<<<<<<<<<
+- * return pipe
++ /* "vidcutter/libs/pympv/mpv.pyx":813
++ * # return ctx
++ *
++ * def __dealloc__(self): # <<<<<<<<<<<<<<
++ * self.shutdown()
+ *
+ */
+- __pyx_v_pipe = mpv_get_wakeup_pipe(__pyx_v_self->_ctx);
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":732
+- * assert self._ctx
+- * cdef int pipe
+- * with nogil: # <<<<<<<<<<<<<<
+- * pipe = mpv_get_wakeup_pipe(self._ctx)
+- * return pipe
++ /* function exit code */
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_L0:;
++ __Pyx_RefNannyFinishContext();
++}
++
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":734
+- * with nogil:
+- * pipe = mpv_get_wakeup_pipe(self._ctx)
+- * return pipe # <<<<<<<<<<<<<<
+- *
+- * def __cinit__(self):
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_42__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(1, 2, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":728
+- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+- *
+- * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_get_wakeup_pipe"""
+- * assert self._ctx
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_wakeup_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+- __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":736
+- * return pipe
+- *
+- * def __cinit__(self): # <<<<<<<<<<<<<<
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil:
++/* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_37__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_37__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- int __pyx_r;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+- if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+- if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- uint64_t __pyx_v_ctxid;
+- int __pyx_r;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- uint64_t __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__cinit__", 0);
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":737
+- *
+- * def __cinit__(self):
+- * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
+- * with nogil:
+- * self._ctx = mpv_create()
++ /* "(tree fragment)":4
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
++ __PYX_ERR(1, 4, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":738
+- * def __cinit__(self):
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil: # <<<<<<<<<<<<<<
+- * self._ctx = mpv_create()
+- * if not self._ctx:
++ /* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":739
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil:
+- * self._ctx = mpv_create() # <<<<<<<<<<<<<<
+- * if not self._ctx:
+- * raise MPVError("Context creation error")
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":816
++ * self.shutdown()
++ *
++ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
++ * return <void *><intptr_t>(<object>ctx)(name)
++ *
+ */
+- __pyx_v_self->_ctx = mpv_create();
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":738
+- * def __cinit__(self):
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil: # <<<<<<<<<<<<<<
+- * self._ctx = mpv_create()
+- * if not self._ctx:
++static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx, char const *__pyx_v_name) {
++ void *__pyx_r;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ intptr_t __pyx_t_5;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ #ifdef WITH_THREAD
++ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
++ #endif
++ __Pyx_RefNannySetupContext("_c_getprocaddress", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":817
++ *
++ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
++ * return <void *><intptr_t>(<object>ctx)(name) # <<<<<<<<<<<<<<
++ *
++ * cdef void _c_updatecb(void *ctx) with gil:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
++ __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
++ __pyx_t_3 = ((PyObject *)__pyx_v_ctx); __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
+ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_r = ((void *)((intptr_t)__pyx_t_5));
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":740
+- * with nogil:
+- * self._ctx = mpv_create()
+- * if not self._ctx: # <<<<<<<<<<<<<<
+- * raise MPVError("Context creation error")
+- * self.callbackthread = CallbackThread()
++ /* "vidcutter/libs/pympv/mpv.pyx":816
++ * self.shutdown()
++ *
++ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
++ * return <void *><intptr_t>(<object>ctx)(name)
++ *
+ */
+- __pyx_t_3 = ((!(__pyx_v_self->_ctx != 0)) != 0);
+- if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":741
+- * self._ctx = mpv_create()
+- * if not self._ctx:
+- * raise MPVError("Context creation error") # <<<<<<<<<<<<<<
+- * self.callbackthread = CallbackThread()
+- * _callbacks[ctxid] = self.callbackthread
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Context_creation_error) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Context_creation_error);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 741, __pyx_L1_error)
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_getprocaddress", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_RefNannyFinishContext();
++ #ifdef WITH_THREAD
++ __Pyx_PyGILState_Release(__pyx_gilstate_save);
++ #endif
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":740
+- * with nogil:
+- * self._ctx = mpv_create()
+- * if not self._ctx: # <<<<<<<<<<<<<<
+- * raise MPVError("Context creation error")
+- * self.callbackthread = CallbackThread()
++/* "vidcutter/libs/pympv/mpv.pyx":819
++ * return <void *><intptr_t>(<object>ctx)(name)
++ *
++ * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
++ * (<object>ctx)()
++ *
+ */
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":742
+- * if not self._ctx:
+- * raise MPVError("Context creation error")
+- * self.callbackthread = CallbackThread() # <<<<<<<<<<<<<<
+- * _callbacks[ctxid] = self.callbackthread
+- * self.reply_userdata = dict()
++static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ #ifdef WITH_THREAD
++ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
++ #endif
++ __Pyx_RefNannySetupContext("_c_updatecb", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":820
++ *
++ * cdef void _c_updatecb(void *ctx) with gil:
++ * (<object>ctx)() # <<<<<<<<<<<<<<
++ *
++ * # cdef class OpenGLContext(object):
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
++ __pyx_t_2 = ((PyObject *)__pyx_v_ctx); __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->callbackthread);
+- __Pyx_DECREF(__pyx_v_self->callbackthread);
+- __pyx_v_self->callbackthread = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":743
+- * raise MPVError("Context creation error")
+- * self.callbackthread = CallbackThread()
+- * _callbacks[ctxid] = self.callbackthread # <<<<<<<<<<<<<<
+- * self.reply_userdata = dict()
+- * _reply_userdatas[ctxid] = self.reply_userdata
+- */
+- __pyx_t_1 = __pyx_v_self->callbackthread;
+- __Pyx_INCREF(__pyx_t_1);
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":744
+- * self.callbackthread = CallbackThread()
+- * _callbacks[ctxid] = self.callbackthread
+- * self.reply_userdata = dict() # <<<<<<<<<<<<<<
+- * _reply_userdatas[ctxid] = self.reply_userdata
+- * self.callbackthread.start()
++ /* "vidcutter/libs/pympv/mpv.pyx":819
++ * return <void *><intptr_t>(<object>ctx)(name)
++ *
++ * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
++ * (<object>ctx)()
++ *
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+- __Pyx_DECREF(__pyx_v_self->reply_userdata);
+- __pyx_v_self->reply_userdata = __pyx_t_1;
+- __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":745
+- * _callbacks[ctxid] = self.callbackthread
+- * self.reply_userdata = dict()
+- * _reply_userdatas[ctxid] = self.reply_userdata # <<<<<<<<<<<<<<
+- * self.callbackthread.start()
++ /* function exit code */
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_updatecb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_L0:;
++ __Pyx_RefNannyFinishContext();
++ #ifdef WITH_THREAD
++ __Pyx_PyGILState_Release(__pyx_gilstate_save);
++ #endif
++}
++
++/* "vidcutter/libs/pympv/mpv.pyx":886
++ * object owned
+ *
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * self.owned = []
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ */
+- __pyx_t_1 = __pyx_v_self->reply_userdata;
+- __Pyx_INCREF(__pyx_t_1);
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":746
+- * self.reply_userdata = dict()
+- * _reply_userdatas[ctxid] = self.reply_userdata
+- * self.callbackthread.start() # <<<<<<<<<<<<<<
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
++ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
++ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__init__", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":887
++ *
++ * def __init__(self):
++ * self.owned = [] # <<<<<<<<<<<<<<
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+- * @_errors
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->owned);
++ __Pyx_DECREF(__pyx_v_self->owned);
++ __pyx_v_self->owned = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":736
+- * return pipe
++ /* "vidcutter/libs/pympv/mpv.pyx":888
++ * def __init__(self):
++ * self.owned = []
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
+ *
+- * def __cinit__(self): # <<<<<<<<<<<<<<
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil:
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
++ */
++ (__pyx_v_self->params[0]).type = MPV_RENDER_PARAM_INVALID;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":886
++ * object owned
++ *
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * self.owned = []
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ */
+
+ /* function exit code */
+@@ -15027,1094 +15444,479 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(struct __pyx_obj_
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":749
++/* "vidcutter/libs/pympv/mpv.pyx":890
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+- * @_errors
+- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_observe_property"""
+- * assert self._ctx
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS:
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_38observe_property[] = "Wraps: mpv_observe_property";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_prop = 0;
+- PyObject *__pyx_v_data = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("observe_property (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
+- PyObject* values[2] = {0,0};
+- values[1] = ((PyObject *)Py_None);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
+- if (value) { values[1] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 749, __pyx_L3_error)
+- }
+- } else {
+- switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- }
+- __pyx_v_prop = values[0];
+- __pyx_v_data = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 749, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_38observe_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
+- uint64_t __pyx_v_id_data;
+- PyObject *__pyx_v_userdatas = NULL;
+- char *__pyx_v_propc;
+- int __pyx_v_err;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, void *__pyx_v_p, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args) {
++ int __pyx_v_owned = ((int)0);
++ PyObject *__pyx_v_count = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- Py_hash_t __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_1 = NULL;
++ Py_ssize_t __pyx_t_2;
++ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+- int __pyx_t_9;
+- char *__pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("observe_property", 0);
+- __Pyx_INCREF(__pyx_v_prop);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":751
+- * def observe_property(self, prop, data=None):
+- * """Wraps: mpv_observe_property"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * id_data = <uint64_t>hash(data)
+- */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 751, __pyx_L1_error)
++ __Pyx_RefNannySetupContext("add_voidp", 0);
++ if (__pyx_optional_args) {
++ if (__pyx_optional_args->__pyx_n > 0) {
++ __pyx_v_owned = __pyx_optional_args->owned;
+ }
+ }
+- #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":752
+- * """Wraps: mpv_observe_property"""
+- * assert self._ctx
+- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+- * id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
++ /* "vidcutter/libs/pympv/mpv.pyx":891
++ *
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
++ * count = len(self.owned) # <<<<<<<<<<<<<<
++ * if count >= MAX_RENDER_PARAMS:
++ * if owned:
+ */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
+- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
++ __pyx_t_1 = __pyx_v_self->owned;
++ __Pyx_INCREF(__pyx_t_1);
++ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 891, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_count = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":753
+- * assert self._ctx
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None:
++ /* "vidcutter/libs/pympv/mpv.pyx":892
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
++ * if owned:
++ * free(p)
+ */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 753, __pyx_L1_error)
+- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
++ __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":754
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
++ /* "vidcutter/libs/pympv/mpv.pyx":893
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS:
++ * if owned: # <<<<<<<<<<<<<<
++ * free(p)
++ * raise PyMPVError("RenderParams overflow")
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- __pyx_t_6 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- __pyx_t_6 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_3)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
+- {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (__pyx_t_5) {
+- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+- }
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+- __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- }
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_v_userdatas = __pyx_t_2;
+- __pyx_t_2 = 0;
++ __pyx_t_3 = (__pyx_v_owned != 0);
++ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":755
+- * id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.observed = True
++ /* "vidcutter/libs/pympv/mpv.pyx":894
++ * if count >= MAX_RENDER_PARAMS:
++ * if owned:
++ * free(p) # <<<<<<<<<<<<<<
++ * raise PyMPVError("RenderParams overflow")
++ *
+ */
+- __pyx_t_8 = (__pyx_v_userdatas == Py_None);
+- __pyx_t_9 = (__pyx_t_8 != 0);
+- if (__pyx_t_9) {
++ free(__pyx_v_p);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":756
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+- * userdatas.observed = True
+- * prop = _strenc(prop)
++ /* "vidcutter/libs/pympv/mpv.pyx":893
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS:
++ * if owned: # <<<<<<<<<<<<<<
++ * free(p)
++ * raise PyMPVError("RenderParams overflow")
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+ }
+- __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
+- __Pyx_INCREF(__pyx_t_2);
+- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":755
+- * id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is None: # <<<<<<<<<<<<<<
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.observed = True
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":757
+- * if userdatas is None:
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.observed = True # <<<<<<<<<<<<<<
+- * prop = _strenc(prop)
+- * cdef char* propc = prop
+- */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":758
+- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+- * userdatas.observed = True
+- * prop = _strenc(prop) # <<<<<<<<<<<<<<
+- * cdef char* propc = prop
+- * cdef int err
++ /* "vidcutter/libs/pympv/mpv.pyx":895
++ * if owned:
++ * free(p)
++ * raise PyMPVError("RenderParams overflow") # <<<<<<<<<<<<<<
++ *
++ * self.params[count].type = t
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
+ }
+- }
+- __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_prop);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_2);
+- __pyx_t_2 = 0;
++ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_RenderParams_overflow) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_RenderParams_overflow);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(0, 895, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":759
+- * userdatas.observed = True
+- * prop = _strenc(prop)
+- * cdef char* propc = prop # <<<<<<<<<<<<<<
+- * cdef int err
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":892
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
++ * if owned:
++ * free(p)
+ */
+- __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
+- __pyx_v_propc = __pyx_t_10;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":761
+- * cdef char* propc = prop
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_observe_property(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":897
++ * raise PyMPVError("RenderParams overflow")
++ *
++ * self.params[count].type = t # <<<<<<<<<<<<<<
++ * self.params[count].data = p
++ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error)
++ (__pyx_v_self->params[__pyx_t_2]).type = __pyx_v_t;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":762
+- * cdef int err
+- * with nogil:
+- * err = mpv_observe_property( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * id_data,
++ /* "vidcutter/libs/pympv/mpv.pyx":898
++ *
++ * self.params[count].type = t
++ * self.params[count].data = p # <<<<<<<<<<<<<<
++ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
++ * self.owned.append(owned)
+ */
+- __pyx_v_err = mpv_observe_property(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_propc, MPV_FORMAT_NODE);
+- }
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error)
++ (__pyx_v_self->params[__pyx_t_2]).data = __pyx_v_p;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":761
+- * cdef char* propc = prop
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_observe_property(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":899
++ * self.params[count].type = t
++ * self.params[count].data = p
++ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
++ * self.owned.append(owned)
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+- }
++ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ (__pyx_v_self->params[__pyx_t_2]).type = MPV_RENDER_PARAM_INVALID;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":768
+- * MPV_FORMAT_NODE,
+- * )
+- * return err # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":900
++ * self.params[count].data = p
++ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
++ * self.owned.append(owned) # <<<<<<<<<<<<<<
+ *
+- * @_errors
++ * cdef add_int(self, mpv_render_param_type t, int val):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_r = __pyx_t_2;
+- __pyx_t_2 = 0;
+- goto __pyx_L0;
++ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 900, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":749
++ /* "vidcutter/libs/pympv/mpv.pyx":890
++ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+- * @_errors
+- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_observe_property"""
+- * assert self._ctx
++ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
++ * count = len(self.owned)
++ * if count >= MAX_RENDER_PARAMS:
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_voidp", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_userdatas);
+- __Pyx_XDECREF(__pyx_v_prop);
++ __Pyx_XDECREF(__pyx_v_count);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":771
++/* "vidcutter/libs/pympv/mpv.pyx":902
++ * self.owned.append(owned)
+ *
+- * @_errors
+- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_unobserve_property"""
+- * assert self._ctx
++ * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
++ * cdef int *p = <int *>malloc(sizeof(int))
++ * p[0] = val
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_41unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
+-static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_40unobserve_property[] = "Wraps: mpv_unobserve_property";
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_41unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("unobserve_property (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_40unobserve_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_data));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_40unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data) {
+- uint64_t __pyx_v_id_data;
+- PyObject *__pyx_v_userdatas = NULL;
+- int __pyx_v_err;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, int __pyx_v_val) {
++ int *__pyx_v_p;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- Py_hash_t __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_t_8;
+- int __pyx_t_9;
++ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("unobserve_property", 0);
++ __Pyx_RefNannySetupContext("add_int", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":773
+- * def unobserve_property(self, data):
+- * """Wraps: mpv_unobserve_property"""
+- * assert self._ctx # <<<<<<<<<<<<<<
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
++ /* "vidcutter/libs/pympv/mpv.pyx":903
++ *
++ * cdef add_int(self, mpv_render_param_type t, int val):
++ * cdef int *p = <int *>malloc(sizeof(int)) # <<<<<<<<<<<<<<
++ * p[0] = val
++ * self.add_voidp(t, p)
+ */
+- #ifndef CYTHON_WITHOUT_ASSERTIONS
+- if (unlikely(!Py_OptimizeFlag)) {
+- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+- PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 773, __pyx_L1_error)
+- }
+- }
+- #endif
++ __pyx_v_p = ((int *)malloc((sizeof(int))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":774
+- * """Wraps: mpv_unobserve_property"""
+- * assert self._ctx
+- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is not None:
+- */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
+- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":775
+- * assert self._ctx
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+- * if userdatas is not None:
+- * userdatas.observed = False
+- */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- __pyx_t_6 = 0;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- __pyx_t_6 = 1;
+- }
+- }
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(__pyx_t_3)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else
+- #endif
+- {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (__pyx_t_5) {
+- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+- }
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+- __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- }
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_v_userdatas = __pyx_t_2;
+- __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":776
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is not None: # <<<<<<<<<<<<<<
+- * userdatas.observed = False
+- * if userdatas.counter <= 0:
+- */
+- __pyx_t_8 = (__pyx_v_userdatas != Py_None);
+- __pyx_t_9 = (__pyx_t_8 != 0);
+- if (__pyx_t_9) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":777
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is not None:
+- * userdatas.observed = False # <<<<<<<<<<<<<<
+- * if userdatas.counter <= 0:
+- * del self.reply_userdata[id_data]
+- */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":778
+- * if userdatas is not None:
+- * userdatas.observed = False
+- * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
+- * del self.reply_userdata[id_data]
+- * cdef int err
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 778, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__pyx_t_9) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":779
+- * userdatas.observed = False
+- * if userdatas.counter <= 0:
+- * del self.reply_userdata[id_data] # <<<<<<<<<<<<<<
+- * cdef int err
+- * with nogil:
+- */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 779, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":778
+- * if userdatas is not None:
+- * userdatas.observed = False
+- * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
+- * del self.reply_userdata[id_data]
+- * cdef int err
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":776
+- * cdef uint64_t id_data = <uint64_t>hash(data)
+- * userdatas = self.reply_userdata.get(id_data, None)
+- * if userdatas is not None: # <<<<<<<<<<<<<<
+- * userdatas.observed = False
+- * if userdatas.counter <= 0:
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":781
+- * del self.reply_userdata[id_data]
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_unobserve_property(
+- * self._ctx,
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":782
+- * cdef int err
+- * with nogil:
+- * err = mpv_unobserve_property( # <<<<<<<<<<<<<<
+- * self._ctx,
+- * id_data,
+- */
+- __pyx_v_err = mpv_unobserve_property(__pyx_v_self->_ctx, __pyx_v_id_data);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":781
+- * del self.reply_userdata[id_data]
+- * cdef int err
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_unobserve_property(
+- * self._ctx,
++ /* "vidcutter/libs/pympv/mpv.pyx":904
++ * cdef add_int(self, mpv_render_param_type t, int val):
++ * cdef int *p = <int *>malloc(sizeof(int))
++ * p[0] = val # <<<<<<<<<<<<<<
++ * self.add_voidp(t, p)
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L7;
+- }
+- __pyx_L7:;
+- }
+- }
++ (__pyx_v_p[0]) = __pyx_v_val;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":786
+- * id_data,
+- * )
+- * return err # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":905
++ * cdef int *p = <int *>malloc(sizeof(int))
++ * p[0] = val
++ * self.add_voidp(t, p) # <<<<<<<<<<<<<<
+ *
+- * def shutdown(self):
++ * cdef add_string(self, mpv_render_param_type t, char *s):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":771
++ /* "vidcutter/libs/pympv/mpv.pyx":902
++ * self.owned.append(owned)
+ *
+- * @_errors
+- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_unobserve_property"""
+- * assert self._ctx
++ * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
++ * cdef int *p = <int *>malloc(sizeof(int))
++ * p[0] = val
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.unobserve_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_userdatas);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":788
+- * return err
++/* "vidcutter/libs/pympv/mpv.pyx":907
++ * self.add_voidp(t, p)
+ *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * if self._ctx == NULL:
+- * return
++ * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
++ * cdef char *p = <char *>malloc(strlen(s) + 1)
++ * strcpy(p, s)
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_42shutdown(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- uint64_t __pyx_v_ctxid;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, char *__pyx_v_s) {
++ char *__pyx_v_p;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- uint64_t __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("shutdown", 0);
++ __Pyx_RefNannySetupContext("add_string", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":789
++ /* "vidcutter/libs/pympv/mpv.pyx":908
+ *
+- * def shutdown(self):
+- * if self._ctx == NULL: # <<<<<<<<<<<<<<
+- * return
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- */
+- __pyx_t_1 = ((__pyx_v_self->_ctx == NULL) != 0);
+- if (__pyx_t_1) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":790
+- * def shutdown(self):
+- * if self._ctx == NULL:
+- * return # <<<<<<<<<<<<<<
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil:
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":789
+- *
+- * def shutdown(self):
+- * if self._ctx == NULL: # <<<<<<<<<<<<<<
+- * return
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":791
+- * if self._ctx == NULL:
+- * return
+- * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_terminate_destroy(self._ctx)
+- */
+- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_ctxid = ((uint64_t)__pyx_t_3);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":792
+- * return
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_terminate_destroy(self._ctx)
+- * self.callbackthread.shutdown()
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":793
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil:
+- * mpv_terminate_destroy(self._ctx) # <<<<<<<<<<<<<<
+- * self.callbackthread.shutdown()
+- * del _callbacks[ctxid]
+- */
+- mpv_terminate_destroy(__pyx_v_self->_ctx);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":792
+- * return
+- * cdef uint64_t ctxid = <uint64_t>id(self)
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_terminate_destroy(self._ctx)
+- * self.callbackthread.shutdown()
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":794
+- * with nogil:
+- * mpv_terminate_destroy(self._ctx)
+- * self.callbackthread.shutdown() # <<<<<<<<<<<<<<
+- * del _callbacks[ctxid]
+- * del _reply_userdatas[ctxid]
+- */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":795
+- * mpv_terminate_destroy(self._ctx)
+- * self.callbackthread.shutdown()
+- * del _callbacks[ctxid] # <<<<<<<<<<<<<<
+- * del _reply_userdatas[ctxid]
+- * self.callback = None
+- */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":796
+- * self.callbackthread.shutdown()
+- * del _callbacks[ctxid]
+- * del _reply_userdatas[ctxid] # <<<<<<<<<<<<<<
+- * self.callback = None
+- * self.reply_userdata = None
+- */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 796, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":797
+- * del _callbacks[ctxid]
+- * del _reply_userdatas[ctxid]
+- * self.callback = None # <<<<<<<<<<<<<<
+- * self.reply_userdata = None
+- * self._ctx = NULL
++ * cdef add_string(self, mpv_render_param_type t, char *s):
++ * cdef char *p = <char *>malloc(strlen(s) + 1) # <<<<<<<<<<<<<<
++ * strcpy(p, s)
++ * self.add_voidp(t, p)
+ */
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->callback);
+- __Pyx_DECREF(__pyx_v_self->callback);
+- __pyx_v_self->callback = Py_None;
++ __pyx_v_p = ((char *)malloc((strlen(__pyx_v_s) + 1)));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":798
+- * del _reply_userdatas[ctxid]
+- * self.callback = None
+- * self.reply_userdata = None # <<<<<<<<<<<<<<
+- * self._ctx = NULL
++ /* "vidcutter/libs/pympv/mpv.pyx":909
++ * cdef add_string(self, mpv_render_param_type t, char *s):
++ * cdef char *p = <char *>malloc(strlen(s) + 1)
++ * strcpy(p, s) # <<<<<<<<<<<<<<
++ * self.add_voidp(t, p)
+ *
+ */
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+- __Pyx_DECREF(__pyx_v_self->reply_userdata);
+- __pyx_v_self->reply_userdata = Py_None;
++ (void)(strcpy(__pyx_v_p, __pyx_v_s));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":799
+- * self.callback = None
+- * self.reply_userdata = None
+- * self._ctx = NULL # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":910
++ * cdef char *p = <char *>malloc(strlen(s) + 1)
++ * strcpy(p, s)
++ * self.add_voidp(t, p) # <<<<<<<<<<<<<<
+ *
+- * def opengl_cb_api(self):
++ * def __dealloc__(self):
+ */
+- __pyx_v_self->_ctx = NULL;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":788
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":907
++ * self.add_voidp(t, p)
+ *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * if self._ctx == NULL:
+- * return
++ * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
++ * cdef char *p = <char *>malloc(strlen(s) + 1)
++ * strcpy(p, s)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":801
+- * self._ctx = NULL
+- *
+- * def opengl_cb_api(self): # <<<<<<<<<<<<<<
+- * cdef void *cb
++/* "vidcutter/libs/pympv/mpv.pyx":912
++ * self.add_voidp(t, p)
+ *
++ * def __dealloc__(self): # <<<<<<<<<<<<<<
++ * for i, j in enumerate(self.owned):
++ * if j:
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45opengl_cb_api(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45opengl_cb_api(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
++static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
++static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("opengl_cb_api (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_44opengl_cb_api(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
++ __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44opengl_cb_api(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- void *__pyx_v__ctx;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_ctx = NULL;
+- PyObject *__pyx_r = NULL;
++static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
++ PyObject *__pyx_v_i = NULL;
++ PyObject *__pyx_v_j = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
++ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
++ Py_ssize_t __pyx_t_3;
++ PyObject *(*__pyx_t_4)(PyObject *);
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
++ Py_ssize_t __pyx_t_7;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("opengl_cb_api", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":804
+- * cdef void *cb
+- *
+- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB) # <<<<<<<<<<<<<<
+- * if not _ctx:
+- * raise MPVError("OpenGL API not available")
+- */
+- __pyx_v__ctx = mpv_get_sub_api(__pyx_v_self->_ctx, MPV_SUB_API_OPENGL_CB);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":805
+- *
+- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
+- * if not _ctx: # <<<<<<<<<<<<<<
+- * raise MPVError("OpenGL API not available")
+- *
+- */
+- __pyx_t_1 = ((!(__pyx_v__ctx != 0)) != 0);
+- if (unlikely(__pyx_t_1)) {
++ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":806
+- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
+- * if not _ctx:
+- * raise MPVError("OpenGL API not available") # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":913
+ *
+- * ctx = OpenGLContext()
++ * def __dealloc__(self):
++ * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
++ * if j:
++ * free(self.params[i].data)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 806, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_INCREF(__pyx_int_0);
++ __pyx_t_1 = __pyx_int_0;
++ if (likely(PyList_CheckExact(__pyx_v_self->owned)) || PyTuple_CheckExact(__pyx_v_self->owned)) {
++ __pyx_t_2 = __pyx_v_self->owned; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_OpenGL_API_not_available) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_OpenGL_API_not_available);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error)
++ } else {
++ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 806, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":805
+- *
+- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
+- * if not _ctx: # <<<<<<<<<<<<<<
+- * raise MPVError("OpenGL API not available")
+- *
+- */
++ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error)
+ }
++ for (;;) {
++ if (likely(!__pyx_t_4)) {
++ if (likely(PyList_CheckExact(__pyx_t_2))) {
++ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
++ #else
++ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ #endif
++ } else {
++ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
++ #else
++ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ #endif
++ }
++ } else {
++ __pyx_t_5 = __pyx_t_4(__pyx_t_2);
++ if (unlikely(!__pyx_t_5)) {
++ PyObject* exc_type = PyErr_Occurred();
++ if (exc_type) {
++ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
++ else __PYX_ERR(0, 913, __pyx_L1_error)
++ }
++ break;
++ }
++ __Pyx_GOTREF(__pyx_t_5);
++ }
++ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_5);
++ __pyx_t_5 = 0;
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
++ __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_1);
++ __pyx_t_1 = __pyx_t_5;
++ __pyx_t_5 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":808
+- * raise MPVError("OpenGL API not available")
+- *
+- * ctx = OpenGLContext() # <<<<<<<<<<<<<<
+- * ctx._ctx = <mpv_opengl_cb_context*>_ctx
+- *
+- */
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_OpenGLContext)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_v_ctx = ((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_t_2);
+- __pyx_t_2 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":809
+- *
+- * ctx = OpenGLContext()
+- * ctx._ctx = <mpv_opengl_cb_context*>_ctx # <<<<<<<<<<<<<<
+- *
+- * return ctx
+- */
+- __pyx_v_ctx->_ctx = ((struct mpv_opengl_cb_context *)__pyx_v__ctx);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":811
+- * ctx._ctx = <mpv_opengl_cb_context*>_ctx
+- *
+- * return ctx # <<<<<<<<<<<<<<
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":914
+ * def __dealloc__(self):
++ * for i, j in enumerate(self.owned):
++ * if j: # <<<<<<<<<<<<<<
++ * free(self.params[i].data)
++ *
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
+- __pyx_r = ((PyObject *)__pyx_v_ctx);
+- goto __pyx_L0;
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 914, __pyx_L1_error)
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":801
+- * self._ctx = NULL
+- *
+- * def opengl_cb_api(self): # <<<<<<<<<<<<<<
+- * cdef void *cb
++ /* "vidcutter/libs/pympv/mpv.pyx":915
++ * for i, j in enumerate(self.owned):
++ * if j:
++ * free(self.params[i].data) # <<<<<<<<<<<<<<
+ *
++ * cdef void *get_pointer(const char *name, object obj):
+ */
++ __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
++ free((__pyx_v_self->params[__pyx_t_7]).data);
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.opengl_cb_api", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF((PyObject *)__pyx_v_ctx);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":813
+- * return ctx
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.shutdown()
++ /* "vidcutter/libs/pympv/mpv.pyx":914
++ * def __dealloc__(self):
++ * for i, j in enumerate(self.owned):
++ * if j: # <<<<<<<<<<<<<<
++ * free(self.params[i].data)
+ *
+ */
++ }
+
+-/* Python wrapper */
+-static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_47__dealloc__(PyObject *__pyx_v_self); /*proto*/
+-static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_47__dealloc__(PyObject *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+- __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+-}
+-
+-static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__dealloc__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":814
++ /* "vidcutter/libs/pympv/mpv.pyx":913
+ *
+ * def __dealloc__(self):
+- * self.shutdown() # <<<<<<<<<<<<<<
+- *
+- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
++ * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
++ * if j:
++ * free(self.params[i].data)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":813
+- * return ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":912
++ * self.add_voidp(t, p)
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.shutdown()
+- *
++ * for i, j in enumerate(self.owned):
++ * if j:
+ */
+
+ /* function exit code */
+@@ -16122,32 +15924,34 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(struct __pyx_o
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv._RenderParams.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_i);
++ __Pyx_XDECREF(__pyx_v_j);
+ __Pyx_RefNannyFinishContext();
+ }
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_49__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_49__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+@@ -16158,11 +15962,11 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYT
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
++ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+@@ -16170,14 +15974,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYT
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+@@ -16186,25 +15990,25 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYT
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_51__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_51__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+@@ -16214,11 +16018,11 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(C
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
++ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+@@ -16226,2675 +16030,2187 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(C
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":816
+- * self.shutdown()
+- *
+- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
+- * return <void *><intptr_t>(<object>ctx)(name)
++/* "vidcutter/libs/pympv/mpv.pyx":917
++ * free(self.params[i].data)
+ *
++ * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
++ * cdef void *p
++ * if PyCapsule_IsValid(obj, name):
+ */
+
+-static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx, char const *__pyx_v_name) {
++static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name, PyObject *__pyx_v_obj) {
++ void *__pyx_v_p;
+ void *__pyx_r;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_1;
++ void *__pyx_t_2;
++ int __pyx_t_3;
++ int __pyx_t_4;
+ intptr_t __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
++ PyObject *__pyx_t_9 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- #ifdef WITH_THREAD
+- PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
+- #endif
+- __Pyx_RefNannySetupContext("_c_getprocaddress", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":817
+- *
+- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
+- * return <void *><intptr_t>(<object>ctx)(name) # <<<<<<<<<<<<<<
+- *
+- * cdef void _c_updatecb(void *ctx) with gil:
+- */
+- __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
+- __pyx_t_3 = ((PyObject *)__pyx_v_ctx); __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_r = ((void *)((intptr_t)__pyx_t_5));
+- goto __pyx_L0;
++ __Pyx_RefNannySetupContext("get_pointer", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":816
+- * self.shutdown()
+- *
+- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
+- * return <void *><intptr_t>(<object>ctx)(name)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":919
++ * cdef void *get_pointer(const char *name, object obj):
++ * cdef void *p
++ * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
++ * p = PyCapsule_GetPointer(obj, name)
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+ */
++ __pyx_t_1 = (PyCapsule_IsValid(__pyx_v_obj, __pyx_v_name) != 0);
++ if (__pyx_t_1) {
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_getprocaddress", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+- #ifdef WITH_THREAD
+- __Pyx_PyGILState_Release(__pyx_gilstate_save);
+- #endif
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":920
++ * cdef void *p
++ * if PyCapsule_IsValid(obj, name):
++ * p = PyCapsule_GetPointer(obj, name) # <<<<<<<<<<<<<<
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
++ * p = <void *><intptr_t>obj
++ */
++ __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error)
++ __pyx_v_p = __pyx_t_2;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":819
+- * return <void *><intptr_t>(<object>ctx)(name)
+- *
+- * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
+- * (<object>ctx)()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":919
++ * cdef void *get_pointer(const char *name, object obj):
++ * cdef void *p
++ * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
++ * p = PyCapsule_GetPointer(obj, name)
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+ */
++ goto __pyx_L3;
++ }
+
+-static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- #ifdef WITH_THREAD
+- PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
+- #endif
+- __Pyx_RefNannySetupContext("_c_updatecb", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":921
++ * if PyCapsule_IsValid(obj, name):
++ * p = PyCapsule_GetPointer(obj, name)
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
++ * p = <void *><intptr_t>obj
++ * else:
++ */
++ __pyx_t_3 = PyInt_Check(__pyx_v_obj);
++ __pyx_t_4 = (__pyx_t_3 != 0);
++ if (!__pyx_t_4) {
++ } else {
++ __pyx_t_1 = __pyx_t_4;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_4 = PyLong_Check(__pyx_v_obj);
++ __pyx_t_3 = (__pyx_t_4 != 0);
++ if (__pyx_t_3) {
++ } else {
++ __pyx_t_1 = __pyx_t_3;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
++ __pyx_t_1 = __pyx_t_3;
++ __pyx_L4_bool_binop_done:;
++ if (likely(__pyx_t_1)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":820
+- *
+- * cdef void _c_updatecb(void *ctx) with gil:
+- * (<object>ctx)() # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":922
++ * p = PyCapsule_GetPointer(obj, name)
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
++ * p = <void *><intptr_t>obj # <<<<<<<<<<<<<<
++ * else:
++ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
++ */
++ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
++ __pyx_v_p = ((void *)((intptr_t)__pyx_t_5));
++
++ /* "vidcutter/libs/pympv/mpv.pyx":921
++ * if PyCapsule_IsValid(obj, name):
++ * p = PyCapsule_GetPointer(obj, name)
++ * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
++ * p = <void *><intptr_t>obj
++ * else:
++ */
++ goto __pyx_L3;
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":924
++ * p = <void *><intptr_t>obj
++ * else:
++ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj) # <<<<<<<<<<<<<<
++ * return p
+ *
+- * cdef class OpenGLContext(object):
+ */
+- __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
+- __pyx_t_2 = ((PyObject *)__pyx_v_ctx); __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ /*else*/ {
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_8);
++ __pyx_t_9 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_9)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_9);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
+ }
++ __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
++ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 924, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __PYX_ERR(0, 924, __pyx_L1_error)
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":819
+- * return <void *><intptr_t>(<object>ctx)(name)
+- *
+- * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
+- * (<object>ctx)()
++ /* "vidcutter/libs/pympv/mpv.pyx":925
++ * else:
++ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
++ * return p # <<<<<<<<<<<<<<
+ *
++ * @cython.internal
+ */
+-
+- /* function exit code */
++ __pyx_r = __pyx_v_p;
+ goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_updatecb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+- #ifdef WITH_THREAD
+- __Pyx_PyGILState_Release(__pyx_gilstate_save);
+- #endif
+-}
+
+-/* "vidcutter/libs/pympv/mpv.pyx":828
+- * object update_cb
++ /* "vidcutter/libs/pympv/mpv.pyx":917
++ * free(self.params[i].data)
+ *
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * self.inited = False
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
++ * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
++ * cdef void *p
++ * if PyCapsule_IsValid(obj, name):
+ */
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+- if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
+-
+ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_XDECREF(__pyx_t_9);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.get_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_r = 0;
++ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
+- int __pyx_r;
++/* "vidcutter/libs/pympv/mpv.pyx":929
++ * @cython.internal
++ * cdef class RenderFrameInfo(object):
++ * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
++ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ */
++
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, struct mpv_render_frame_info *__pyx_v_info) {
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
++ int __pyx_t_2;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
++ __Pyx_RefNannySetupContext("_from_struct", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":829
+- *
+- * def __init__(self):
+- * self.inited = False # <<<<<<<<<<<<<<
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":930
++ * cdef class RenderFrameInfo(object):
++ * cdef _from_struct(self, mpv_render_frame_info *info):
++ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT) # <<<<<<<<<<<<<<
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+ */
+- __pyx_v_self->inited = 0;
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":830
+- * def __init__(self):
+- * self.inited = False
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning) # <<<<<<<<<<<<<<
+- *
+- * def init_gl(self, exts, get_proc_address):
++ /* "vidcutter/libs/pympv/mpv.pyx":931
++ * cdef _from_struct(self, mpv_render_frame_info *info):
++ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW) # <<<<<<<<<<<<<<
++ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
++ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 931, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":828
+- * object update_cb
+- *
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * self.inited = False
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
++ /* "vidcutter/libs/pympv/mpv.pyx":932
++ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT) # <<<<<<<<<<<<<<
++ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
++ * self.target_time = info[0].target_time
+ */
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* function exit code */
+- __pyx_r = 0;
+- goto __pyx_L0;
++ /* "vidcutter/libs/pympv/mpv.pyx":933
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
++ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC) # <<<<<<<<<<<<<<
++ * self.target_time = info[0].target_time
++ * return self
++ */
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":934
++ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
++ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
++ * self.target_time = info[0].target_time # <<<<<<<<<<<<<<
++ * return self
++ *
++ */
++ __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":935
++ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
++ * self.target_time = info[0].target_time
++ * return self # <<<<<<<<<<<<<<
++ *
++ * cdef class RenderContext(object):
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(((PyObject *)__pyx_v_self));
++ __pyx_r = ((PyObject *)__pyx_v_self);
++ goto __pyx_L0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":929
++ * @cython.internal
++ * cdef class RenderFrameInfo(object):
++ * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
++ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
++ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ */
++
++ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo._from_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":832
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
+- *
+- * def init_gl(self, exts, get_proc_address): # <<<<<<<<<<<<<<
+- * exts = _strenc(exts) if exts is not None else None
+- * cdef char* extsc = NULL
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_3init_gl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_3init_gl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_exts = 0;
+- PyObject *__pyx_v_get_proc_address = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("init_gl (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exts,&__pyx_n_s_get_proc_address,0};
+- PyObject* values[2] = {0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exts)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("init_gl", 1, 2, 2, 1); __PYX_ERR(0, 832, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "init_gl") < 0)) __PYX_ERR(0, 832, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- }
+- __pyx_v_exts = values[0];
+- __pyx_v_get_proc_address = values[1];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("init_gl", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 832, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.init_gl", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_2init_gl(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), __pyx_v_exts, __pyx_v_get_proc_address);
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_2init_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_exts, PyObject *__pyx_v_get_proc_address) {
+- char *__pyx_v_extsc;
+- int __pyx_v_err;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self) {
++ PyObject *__pyx_v_state = 0;
++ PyObject *__pyx_v__dict = 0;
++ int __pyx_v_use_setstate;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- char *__pyx_t_7;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("init_gl", 0);
+- __Pyx_INCREF(__pyx_v_exts);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":833
+- *
+- * def init_gl(self, exts, get_proc_address):
+- * exts = _strenc(exts) if exts is not None else None # <<<<<<<<<<<<<<
+- * cdef char* extsc = NULL
+- * if exts is not None:
+- */
+- __pyx_t_2 = (__pyx_v_exts != Py_None);
+- if ((__pyx_t_2 != 0)) {
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_strenc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_exts) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exts);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_1 = __pyx_t_3;
+- __pyx_t_3 = 0;
+- } else {
+- __Pyx_INCREF(Py_None);
+- __pyx_t_1 = Py_None;
+- }
+- __Pyx_DECREF_SET(__pyx_v_exts, __pyx_t_1);
+- __pyx_t_1 = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":834
+- * def init_gl(self, exts, get_proc_address):
+- * exts = _strenc(exts) if exts is not None else None
+- * cdef char* extsc = NULL # <<<<<<<<<<<<<<
+- * if exts is not None:
+- * extsc = exts
++ /* "(tree fragment)":5
++ * cdef object _dict
++ * cdef bint use_setstate
++ * state = () # <<<<<<<<<<<<<<
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
+ */
+- __pyx_v_extsc = NULL;
++ __Pyx_INCREF(__pyx_empty_tuple);
++ __pyx_v_state = __pyx_empty_tuple;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":835
+- * exts = _strenc(exts) if exts is not None else None
+- * cdef char* extsc = NULL
+- * if exts is not None: # <<<<<<<<<<<<<<
+- * extsc = exts
+- * with nogil:
++ /* "(tree fragment)":6
++ * cdef bint use_setstate
++ * state = ()
++ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
++ * if _dict is not None:
++ * state += (_dict,)
+ */
+- __pyx_t_2 = (__pyx_v_exts != Py_None);
+- __pyx_t_6 = (__pyx_t_2 != 0);
+- if (__pyx_t_6) {
++ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v__dict = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":836
+- * cdef char* extsc = NULL
+- * if exts is not None:
+- * extsc = exts # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
++ /* "(tree fragment)":7
++ * state = ()
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
+ */
+- __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_exts); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 836, __pyx_L1_error)
+- __pyx_v_extsc = __pyx_t_7;
++ __pyx_t_2 = (__pyx_v__dict != Py_None);
++ __pyx_t_3 = (__pyx_t_2 != 0);
++ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":835
+- * exts = _strenc(exts) if exts is not None else None
+- * cdef char* extsc = NULL
+- * if exts is not None: # <<<<<<<<<<<<<<
+- * extsc = exts
+- * with nogil:
++ /* "(tree fragment)":8
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None:
++ * state += (_dict,) # <<<<<<<<<<<<<<
++ * use_setstate = True
++ * else:
+ */
+- }
++ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_INCREF(__pyx_v__dict);
++ __Pyx_GIVEREF(__pyx_v__dict);
++ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
++ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
++ __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":837
+- * if exts is not None:
+- * extsc = exts
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
+- * <void *>get_proc_address)
++ /* "(tree fragment)":9
++ * if _dict is not None:
++ * state += (_dict,)
++ * use_setstate = True # <<<<<<<<<<<<<<
++ * else:
++ * use_setstate = False
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_v_use_setstate = 1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":838
+- * extsc = exts
+- * with nogil:
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress, # <<<<<<<<<<<<<<
+- * <void *>get_proc_address)
+- * if err < 0:
++ /* "(tree fragment)":7
++ * state = ()
++ * _dict = getattr(self, '__dict__', None)
++ * if _dict is not None: # <<<<<<<<<<<<<<
++ * state += (_dict,)
++ * use_setstate = True
+ */
+- __pyx_v_err = mpv_opengl_cb_init_gl(__pyx_v_self->_ctx, __pyx_v_extsc, (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress), ((void *)__pyx_v_get_proc_address));
+- }
++ goto __pyx_L3;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":837
+- * if exts is not None:
+- * extsc = exts
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
+- * <void *>get_proc_address)
++ /* "(tree fragment)":11
++ * use_setstate = True
++ * else:
++ * use_setstate = False # <<<<<<<<<<<<<<
++ * if use_setstate:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
++ /*else*/ {
++ __pyx_v_use_setstate = 0;
+ }
++ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":840
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
+- * <void *>get_proc_address)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- *
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = False
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
++ * else:
+ */
+- __pyx_t_6 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_6)) {
++ __pyx_t_3 = (__pyx_v_use_setstate != 0);
++ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":841
+- * <void *>get_proc_address)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- *
+- * self.inited = True
++ /* "(tree fragment)":13
++ * use_setstate = False
++ * if use_setstate:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<<
++ * else:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
++ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 841, __pyx_L1_error)
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_222419149);
++ __Pyx_GIVEREF(__pyx_int_222419149);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
++ __Pyx_INCREF(Py_None);
++ __Pyx_GIVEREF(Py_None);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
++ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
++ __pyx_t_4 = 0;
++ __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_5;
++ __pyx_t_5 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":840
+- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
+- * <void *>get_proc_address)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- *
++ /* "(tree fragment)":12
++ * else:
++ * use_setstate = False
++ * if use_setstate: # <<<<<<<<<<<<<<
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
++ * else:
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":843
+- * raise MPVError(err)
+- *
+- * self.inited = True # <<<<<<<<<<<<<<
+- *
+- * def set_update_callback(self, cb):
++ /* "(tree fragment)":15
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
++ * else:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
+ */
+- __pyx_v_self->inited = 1;
++ /*else*/ {
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
++ __Pyx_INCREF(__pyx_int_222419149);
++ __Pyx_GIVEREF(__pyx_int_222419149);
++ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
++ __Pyx_INCREF(__pyx_v_state);
++ __Pyx_GIVEREF(__pyx_v_state);
++ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
++ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_5);
++ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
++ __pyx_t_5 = 0;
++ __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_4;
++ __pyx_t_4 = 0;
++ goto __pyx_L0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":832
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
+- *
+- * def init_gl(self, exts, get_proc_address): # <<<<<<<<<<<<<<
+- * exts = _strenc(exts) if exts is not None else None
+- * cdef char* extsc = NULL
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * cdef tuple state
++ * cdef object _dict
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.init_gl", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_exts);
++ __Pyx_XDECREF(__pyx_v_state);
++ __Pyx_XDECREF(__pyx_v__dict);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":845
+- * self.inited = True
+- *
+- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+- * self.update_cb = cb
+- * with nogil:
++/* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_5set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_5set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_update_callback (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_4set_update_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), ((PyObject *)__pyx_v_cb));
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_4set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_cb) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_update_callback", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":846
+- *
+- * def set_update_callback(self, cb):
+- * self.update_cb = cb # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- */
+- __Pyx_INCREF(__pyx_v_cb);
+- __Pyx_GIVEREF(__pyx_v_cb);
+- __Pyx_GOTREF(__pyx_v_self->update_cb);
+- __Pyx_DECREF(__pyx_v_self->update_cb);
+- __pyx_v_self->update_cb = __pyx_v_cb;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":847
+- * def set_update_callback(self, cb):
+- * self.update_cb = cb
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- *
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":848
+- * self.update_cb = cb
+- * with nogil:
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
+- *
+- * def draw(self, fbo, w, h):
+- */
+- mpv_opengl_cb_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
+- }
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":847
+- * def set_update_callback(self, cb):
+- * self.update_cb = cb
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- *
++ /* "(tree fragment)":17
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
++ * def __setstate_cython__(self, __pyx_state):
++ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":845
+- * self.inited = True
+- *
+- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+- * self.update_cb = cb
+- * with nogil:
++ /* "(tree fragment)":16
++ * else:
++ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":850
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++/* "vidcutter/libs/pympv/mpv.pyx":950
++ * bint inited
+ *
+- * def draw(self, fbo, w, h): # <<<<<<<<<<<<<<
+- * cdef:
+- * int fboc = fbo
++ * def __init__(self, mpv, # <<<<<<<<<<<<<<
++ * api_type,
++ * opengl_init_params=None,
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_7draw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_7draw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_fbo = 0;
+- PyObject *__pyx_v_w = 0;
+- PyObject *__pyx_v_h = 0;
++static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_mpv = 0;
++ PyObject *__pyx_v_api_type = 0;
++ PyObject *__pyx_v_opengl_init_params = 0;
++ PyObject *__pyx_v_advanced_control = 0;
++ PyObject *__pyx_v_x11_display = 0;
++ PyObject *__pyx_v_wl_display = 0;
++ PyObject *__pyx_v_drm_display = 0;
++ PyObject *__pyx_v_drm_osd_size = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("draw (wrapper)", 0);
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fbo,&__pyx_n_s_w,&__pyx_n_s_h,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fbo)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("draw", 1, 3, 3, 1); __PYX_ERR(0, 850, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("draw", 1, 3, 3, 2); __PYX_ERR(0, 850, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 850, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v_fbo = values[0];
+- __pyx_v_w = values[1];
+- __pyx_v_h = values[2];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("draw", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 850, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_6draw(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), __pyx_v_fbo, __pyx_v_w, __pyx_v_h);
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_api_type,&__pyx_n_s_opengl_init_params,&__pyx_n_s_advanced_control,&__pyx_n_s_x11_display,&__pyx_n_s_wl_display,&__pyx_n_s_drm_display,&__pyx_n_s_drm_osd_size,0};
++ PyObject* values[8] = {0,0,0,0,0,0,0,0};
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_6draw(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_fbo, PyObject *__pyx_v_w, PyObject *__pyx_v_h) {
+- int __pyx_v_fboc;
+- int __pyx_v_wc;
+- int __pyx_v_hc;
+- int __pyx_v_err;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("draw", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":852
+- * def draw(self, fbo, w, h):
+- * cdef:
+- * int fboc = fbo # <<<<<<<<<<<<<<
+- * int wc = w
+- * int hc = h
++ /* "vidcutter/libs/pympv/mpv.pyx":952
++ * def __init__(self, mpv,
++ * api_type,
++ * opengl_init_params=None, # <<<<<<<<<<<<<<
++ * advanced_control=False,
++ * x11_display=None,
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_fbo); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L1_error)
+- __pyx_v_fboc = __pyx_t_1;
++ values[2] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":853
+- * cdef:
+- * int fboc = fbo
+- * int wc = w # <<<<<<<<<<<<<<
+- * int hc = h
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":953
++ * api_type,
++ * opengl_init_params=None,
++ * advanced_control=False, # <<<<<<<<<<<<<<
++ * x11_display=None,
++ * wl_display=None,
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_w); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 853, __pyx_L1_error)
+- __pyx_v_wc = __pyx_t_1;
++ values[3] = ((PyObject *)Py_False);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":854
+- * int fboc = fbo
+- * int wc = w
+- * int hc = h # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
++ /* "vidcutter/libs/pympv/mpv.pyx":954
++ * opengl_init_params=None,
++ * advanced_control=False,
++ * x11_display=None, # <<<<<<<<<<<<<<
++ * wl_display=None,
++ * drm_display=None,
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_h); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L1_error)
+- __pyx_v_hc = __pyx_t_1;
++ values[4] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":855
+- * int wc = w
+- * int hc = h
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":955
++ * advanced_control=False,
++ * x11_display=None,
++ * wl_display=None, # <<<<<<<<<<<<<<
++ * drm_display=None,
++ * drm_osd_size=None
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ values[5] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":856
+- * int hc = h
+- * with nogil:
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":956
++ * x11_display=None,
++ * wl_display=None,
++ * drm_display=None, # <<<<<<<<<<<<<<
++ * drm_osd_size=None
++ * ):
+ */
+- __pyx_v_err = mpv_opengl_cb_draw(__pyx_v_self->_ctx, __pyx_v_fboc, __pyx_v_wc, __pyx_v_hc);
+- }
++ values[6] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":855
+- * int wc = w
+- * int hc = h
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":957
++ * wl_display=None,
++ * drm_display=None,
++ * drm_osd_size=None # <<<<<<<<<<<<<<
++ * ):
++ *
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
++ values[7] = ((PyObject *)Py_None);
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
++ CYTHON_FALLTHROUGH;
++ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
++ CYTHON_FALLTHROUGH;
++ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
++ CYTHON_FALLTHROUGH;
++ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
++ CYTHON_FALLTHROUGH;
++ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
++ CYTHON_FALLTHROUGH;
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_api_type)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 950, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_init_params);
++ if (value) { values[2] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 3:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advanced_control);
++ if (value) { values[3] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 4:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x11_display);
++ if (value) { values[4] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 5:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wl_display);
++ if (value) { values[5] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 6:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_display);
++ if (value) { values[6] = value; kw_args--; }
++ }
++ CYTHON_FALLTHROUGH;
++ case 7:
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_osd_size);
++ if (value) { values[7] = value; kw_args--; }
+ }
+- __pyx_L5:;
+ }
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":857
+- * with nogil:
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- *
+- */
+- __pyx_t_2 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_2)) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":858
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- *
+- * def report_flip(self, time):
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 858, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 950, __pyx_L3_error)
++ }
++ } else {
++ switch (PyTuple_GET_SIZE(__pyx_args)) {
++ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
++ CYTHON_FALLTHROUGH;
++ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
++ CYTHON_FALLTHROUGH;
++ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
++ CYTHON_FALLTHROUGH;
++ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
++ CYTHON_FALLTHROUGH;
++ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
++ CYTHON_FALLTHROUGH;
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ break;
++ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+- __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 858, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(0, 858, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":857
+- * with nogil:
+- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- *
+- */
++ __pyx_v_mpv = values[0];
++ __pyx_v_api_type = values[1];
++ __pyx_v_opengl_init_params = values[2];
++ __pyx_v_advanced_control = values[3];
++ __pyx_v_x11_display = values[4];
++ __pyx_v_wl_display = values[5];
++ __pyx_v_drm_display = values[6];
++ __pyx_v_drm_osd_size = values[7];
+ }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":850
+- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- *
+- * def draw(self, fbo, w, h): # <<<<<<<<<<<<<<
+- * cdef:
+- * int fboc = fbo
+- */
+-
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 950, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ return -1;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_api_type, __pyx_v_opengl_init_params, __pyx_v_advanced_control, __pyx_v_x11_display, __pyx_v_wl_display, __pyx_v_drm_display, __pyx_v_drm_osd_size);
+
+-/* "vidcutter/libs/pympv/mpv.pyx":860
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":950
++ * bint inited
+ *
+- * def report_flip(self, time): # <<<<<<<<<<<<<<
+- * cdef int64_t ctime = time
+- * with nogil:
++ * def __init__(self, mpv, # <<<<<<<<<<<<<<
++ * api_type,
++ * opengl_init_params=None,
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_9report_flip(PyObject *__pyx_v_self, PyObject *__pyx_v_time); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_9report_flip(PyObject *__pyx_v_self, PyObject *__pyx_v_time) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("report_flip (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_8report_flip(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), ((PyObject *)__pyx_v_time));
+-
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_8report_flip(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_time) {
+- int64_t __pyx_v_ctime;
+- int __pyx_v_err;
+- PyObject *__pyx_r = NULL;
++static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_api_type, PyObject *__pyx_v_opengl_init_params, PyObject *__pyx_v_advanced_control, PyObject *__pyx_v_x11_display, PyObject *__pyx_v_wl_display, PyObject *__pyx_v_drm_display, PyObject *__pyx_v_drm_osd_size) {
++ struct mpv_opengl_init_params __pyx_v_gl_params;
++ struct mpv_opengl_drm_params __pyx_v_drm_params;
++ struct mpv_opengl_drm_osd_size __pyx_v__drm_osd_size;
++ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_params = NULL;
++ PyObject *__pyx_v_arp = NULL;
++ int __pyx_v_err;
++ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+- int64_t __pyx_t_1;
+- int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
++ int __pyx_t_6;
++ int __pyx_t_7;
++ char const *__pyx_t_8;
++ PyObject *(*__pyx_t_9)(PyObject *);
++ int __pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("report_flip", 0);
++ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":861
++ /* "vidcutter/libs/pympv/mpv.pyx":965
++ * mpv_opengl_drm_osd_size _drm_osd_size
+ *
+- * def report_flip(self, time):
+- * cdef int64_t ctime = time # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
++ * self._mpv = mpv # <<<<<<<<<<<<<<
++ *
++ * memset(&gl_params, 0, sizeof(gl_params))
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_time); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L1_error)
+- __pyx_v_ctime = __pyx_t_1;
++ if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 965, __pyx_L1_error)
++ __pyx_t_1 = __pyx_v_mpv;
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v_self->_mpv);
++ __Pyx_DECREF(((PyObject *)__pyx_v_self->_mpv));
++ __pyx_v_self->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":862
+- * def report_flip(self, time):
+- * cdef int64_t ctime = time
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":967
++ * self._mpv = mpv
++ *
++ * memset(&gl_params, 0, sizeof(gl_params)) # <<<<<<<<<<<<<<
++ * memset(&drm_params, 0, sizeof(drm_params))
++ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ (void)(memset((&__pyx_v_gl_params), 0, (sizeof(__pyx_v_gl_params))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":863
+- * cdef int64_t ctime = time
+- * with nogil:
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":968
++ *
++ * memset(&gl_params, 0, sizeof(gl_params))
++ * memset(&drm_params, 0, sizeof(drm_params)) # <<<<<<<<<<<<<<
++ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
++ *
+ */
+- __pyx_v_err = mpv_opengl_cb_report_flip(__pyx_v_self->_ctx, __pyx_v_ctime);
+- }
++ (void)(memset((&__pyx_v_drm_params), 0, (sizeof(__pyx_v_drm_params))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":862
+- * def report_flip(self, time):
+- * cdef int64_t ctime = time
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":969
++ * memset(&gl_params, 0, sizeof(gl_params))
++ * memset(&drm_params, 0, sizeof(drm_params))
++ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size)) # <<<<<<<<<<<<<<
++ *
++ * params = _RenderParams()
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ (void)(memset((&__pyx_v__drm_osd_size), 0, (sizeof(__pyx_v__drm_osd_size))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":864
+- * with nogil:
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":971
++ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
++ *
++ * params = _RenderParams() # <<<<<<<<<<<<<<
+ *
++ * if api_type == self.API_OPENGL:
+ */
+- __pyx_t_2 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_2)) {
++ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":865
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":973
++ * params = _RenderParams()
++ *
++ * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
++ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
++ * else:
++ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (likely(__pyx_t_3)) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":974
++ *
++ * if api_type == self.API_OPENGL:
++ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL) # <<<<<<<<<<<<<<
++ * else:
++ * raise PyMPVError("Unknown api_type %r" % api_type)
++ */
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":973
++ * params = _RenderParams()
++ *
++ * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
++ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
++ * else:
++ */
++ goto __pyx_L3;
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":976
++ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
++ * else:
++ * raise PyMPVError("Unknown api_type %r" % api_type) # <<<<<<<<<<<<<<
+ *
+- * def uninit_gl(self):
++ * if opengl_init_params is not None:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L1_error)
++ /*else*/ {
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 865, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_6);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
++ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
++ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+- __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(0, 865, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __PYX_ERR(0, 976, __pyx_L1_error)
++ }
++ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":864
+- * with nogil:
+- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":978
++ * raise PyMPVError("Unknown api_type %r" % api_type)
+ *
++ * if opengl_init_params is not None: # <<<<<<<<<<<<<<
++ * self._get_proc_address = opengl_init_params["get_proc_address"]
++ * gl_params.get_proc_address = &_c_getprocaddress
+ */
+- }
++ __pyx_t_3 = (__pyx_v_opengl_init_params != Py_None);
++ __pyx_t_6 = (__pyx_t_3 != 0);
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":860
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":979
+ *
+- * def report_flip(self, time): # <<<<<<<<<<<<<<
+- * cdef int64_t ctime = time
+- * with nogil:
++ * if opengl_init_params is not None:
++ * self._get_proc_address = opengl_init_params["get_proc_address"] # <<<<<<<<<<<<<<
++ * gl_params.get_proc_address = &_c_getprocaddress
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+ */
++ __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_GIVEREF(__pyx_t_2);
++ __Pyx_GOTREF(__pyx_v_self->_get_proc_address);
++ __Pyx_DECREF(__pyx_v_self->_get_proc_address);
++ __pyx_v_self->_get_proc_address = __pyx_t_2;
++ __pyx_t_2 = 0;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.report_flip", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":980
++ * if opengl_init_params is not None:
++ * self._get_proc_address = opengl_init_params["get_proc_address"]
++ * gl_params.get_proc_address = &_c_getprocaddress # <<<<<<<<<<<<<<
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ */
++ __pyx_v_gl_params.get_proc_address = (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress);
+
+-/* "vidcutter/libs/pympv/mpv.pyx":867
+- * raise MPVError(err)
+- *
+- * def uninit_gl(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
++ /* "vidcutter/libs/pympv/mpv.pyx":981
++ * self._get_proc_address = opengl_init_params["get_proc_address"]
++ * gl_params.get_proc_address = &_c_getprocaddress
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ * if advanced_control:
+ */
++ __pyx_v_gl_params.get_proc_address_ctx = ((void *)__pyx_v_self->_get_proc_address);
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_11uninit_gl(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_11uninit_gl(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("uninit_gl (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_10uninit_gl(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
++ /* "vidcutter/libs/pympv/mpv.pyx":982
++ * gl_params.get_proc_address = &_c_getprocaddress
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params) # <<<<<<<<<<<<<<
++ * if advanced_control:
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ */
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":978
++ * raise PyMPVError("Unknown api_type %r" % api_type)
++ *
++ * if opengl_init_params is not None: # <<<<<<<<<<<<<<
++ * self._get_proc_address = opengl_init_params["get_proc_address"]
++ * gl_params.get_proc_address = &_c_getprocaddress
++ */
++ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_10uninit_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
+- int __pyx_v_err;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("uninit_gl", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":868
+- *
+- * def uninit_gl(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":983
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ * if advanced_control: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ * if x11_display:
+ */
+- __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
+- if (__pyx_t_1) {
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 983, __pyx_L1_error)
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":869
+- * def uninit_gl(self):
+- * if not self.inited:
+- * return # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":984
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ * if advanced_control:
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1) # <<<<<<<<<<<<<<
++ * if x11_display:
++ * self._x11_display = x11_display
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":868
+- *
+- * def uninit_gl(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":983
++ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ * if advanced_control: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ * if x11_display:
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":870
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":985
++ * if advanced_control:
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ * if x11_display: # <<<<<<<<<<<<<<
++ * self._x11_display = x11_display
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":871
+- * return
+- * with nogil:
+- * err = mpv_opengl_cb_uninit_gl(self._ctx) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":986
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ * if x11_display:
++ * self._x11_display = x11_display # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ * if wl_display:
+ */
+- __pyx_v_err = mpv_opengl_cb_uninit_gl(__pyx_v_self->_ctx);
+- }
++ __Pyx_INCREF(__pyx_v_x11_display);
++ __Pyx_GIVEREF(__pyx_v_x11_display);
++ __Pyx_GOTREF(__pyx_v_self->_x11_display);
++ __Pyx_DECREF(__pyx_v_self->_x11_display);
++ __pyx_v_self->_x11_display = __pyx_v_x11_display;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":870
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
+- * if err < 0:
++ /* "vidcutter/libs/pympv/mpv.pyx":987
++ * if x11_display:
++ * self._x11_display = x11_display
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display)) # <<<<<<<<<<<<<<
++ * if wl_display:
++ * self._wl_display = wl_display
++ */
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":985
++ * if advanced_control:
++ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ * if x11_display: # <<<<<<<<<<<<<<
++ * self._x11_display = x11_display
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":872
+- * with nogil:
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * self.inited = False
++ /* "vidcutter/libs/pympv/mpv.pyx":988
++ * self._x11_display = x11_display
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ * if wl_display: # <<<<<<<<<<<<<<
++ * self._wl_display = wl_display
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ */
+- __pyx_t_1 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_1)) {
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":873
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- * self.inited = False
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":989
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ * if wl_display:
++ * self._wl_display = wl_display # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ * if drm_display:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 873, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error)
++ __Pyx_INCREF(__pyx_v_wl_display);
++ __Pyx_GIVEREF(__pyx_v_wl_display);
++ __Pyx_GOTREF(__pyx_v_self->_wl_display);
++ __Pyx_DECREF(__pyx_v_self->_wl_display);
++ __pyx_v_self->_wl_display = __pyx_v_wl_display;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":990
++ * if wl_display:
++ * self._wl_display = wl_display
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display)) # <<<<<<<<<<<<<<
++ * if drm_display:
++ * drm_params.fd = drm_display.get("fd", -1)
++ */
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 873, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":872
+- * with nogil:
+- * err = mpv_opengl_cb_uninit_gl(self._ctx)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * self.inited = False
++ /* "vidcutter/libs/pympv/mpv.pyx":988
++ * self._x11_display = x11_display
++ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ * if wl_display: # <<<<<<<<<<<<<<
++ * self._wl_display = wl_display
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":874
+- * if err < 0:
+- * raise MPVError(err)
+- * self.inited = False # <<<<<<<<<<<<<<
+- *
+- * def __dealloc__(self):
++ /* "vidcutter/libs/pympv/mpv.pyx":991
++ * self._wl_display = wl_display
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ * if drm_display: # <<<<<<<<<<<<<<
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ */
+- __pyx_v_self->inited = 0;
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 991, __pyx_L1_error)
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":867
+- * raise MPVError(err)
+- *
+- * def uninit_gl(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
++ /* "vidcutter/libs/pympv/mpv.pyx":992
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ * if drm_display:
++ * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_drm_params.fd = __pyx_t_7;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.uninit_gl", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":876
+- * self.inited = False
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.uninit_gl()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":993
++ * if drm_display:
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None)
+ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 993, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_drm_params.crtc_id = __pyx_t_7;
+
+-/* Python wrapper */
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_13__dealloc__(PyObject *__pyx_v_self); /*proto*/
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_13__dealloc__(PyObject *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+- __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_12__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+-}
+-
+-static void __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_12__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__dealloc__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":877
+- *
+- * def __dealloc__(self):
+- * self.uninit_gl() # <<<<<<<<<<<<<<
+- *
+- * DEF MAX_RENDER_PARAMS = 32
++ /* "vidcutter/libs/pympv/mpv.pyx":994
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
++ * arp = drm_display.get("atomic_request_ptr", None)
++ * if arp is not None:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uninit_gl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_drm_params.connector_id = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":876
+- * self.inited = False
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.uninit_gl()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":995
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
++ * if arp is not None:
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ */
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_arp = __pyx_t_2;
++ __pyx_t_2 = 0;
+
+- /* function exit code */
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.OpenGLContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+-}
+-
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ /* "vidcutter/libs/pympv/mpv.pyx":996
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None)
++ * if arp is not None: # <<<<<<<<<<<<<<
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ */
++ __pyx_t_6 = (__pyx_v_arp != Py_None);
++ __pyx_t_3 = (__pyx_t_6 != 0);
++ if (__pyx_t_3) {
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_14__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":997
++ * arp = drm_display.get("atomic_request_ptr", None)
++ * if arp is not None:
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*") # <<<<<<<<<<<<<<
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 2, __pyx_L1_error)
++ __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L1_error)
++ __pyx_v_drm_params.atomic_request_ptr = ((struct _drmModeAtomicReq **)__pyx_f_9vidcutter_4libs_3mpv_get_pointer(__pyx_t_8, __pyx_kp_s_drmModeAtomicReq));
+
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ /* "vidcutter/libs/pympv/mpv.pyx":996
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None)
++ * if arp is not None: # <<<<<<<<<<<<<<
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ */
++ }
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":998
++ * if arp is not None:
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
++ * if drm_osd_size:
+ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v_drm_params.render_fd = __pyx_t_7;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_16__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":999
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params) # <<<<<<<<<<<<<<
++ * if drm_osd_size:
++ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 4, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":991
++ * self._wl_display = wl_display
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ * if drm_display: # <<<<<<<<<<<<<<
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ */
++ }
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":886
+- * object owned
+- *
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * self.owned = []
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID
++ /* "vidcutter/libs/pympv/mpv.pyx":1000
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
++ * if drm_osd_size: # <<<<<<<<<<<<<<
++ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ */
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1000, __pyx_L1_error)
++ if (__pyx_t_3) {
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+- if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":887
+- *
+- * def __init__(self):
+- * self.owned = [] # <<<<<<<<<<<<<<
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID
++ /* "vidcutter/libs/pympv/mpv.pyx":1001
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
++ * if drm_osd_size:
++ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ *
+ */
+- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->owned);
+- __Pyx_DECREF(__pyx_v_self->owned);
+- __pyx_v_self->owned = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":888
+- * def __init__(self):
+- * self.owned = []
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
+- *
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+- */
+- (__pyx_v_self->params[0]).type = MPV_RENDER_PARAM_INVALID;
++ if ((likely(PyTuple_CheckExact(__pyx_v_drm_osd_size))) || (PyList_CheckExact(__pyx_v_drm_osd_size))) {
++ PyObject* sequence = __pyx_v_drm_osd_size;
++ Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
++ if (unlikely(size != 2)) {
++ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
++ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
++ __PYX_ERR(0, 1001, __pyx_L1_error)
++ }
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ if (likely(PyTuple_CheckExact(sequence))) {
++ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
++ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
++ } else {
++ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
++ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
++ }
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(__pyx_t_2);
++ #else
++ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ #endif
++ } else {
++ Py_ssize_t index = -1;
++ __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
++ index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
++ __Pyx_GOTREF(__pyx_t_1);
++ index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
++ __Pyx_GOTREF(__pyx_t_2);
++ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_9 = NULL;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ goto __pyx_L12_unpacking_done;
++ __pyx_L11_unpacking_failed:;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_9 = NULL;
++ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
++ __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_L12_unpacking_done:;
++ }
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v__drm_osd_size.width = __pyx_t_7;
++ __pyx_v__drm_osd_size.height = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":886
+- * object owned
++ /* "vidcutter/libs/pympv/mpv.pyx":1002
++ * if drm_osd_size:
++ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size) # <<<<<<<<<<<<<<
+ *
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * self.owned = []
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID
++ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+ */
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* function exit code */
+- __pyx_r = 0;
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":890
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID
+- *
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS:
++ /* "vidcutter/libs/pympv/mpv.pyx":1000
++ * drm_params.render_fd = drm_display.get("render_fd", -1)
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
++ * if drm_osd_size: # <<<<<<<<<<<<<<
++ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ */
+-
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, void *__pyx_v_p, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args) {
+- int __pyx_v_owned = ((int)0);
+- PyObject *__pyx_v_count = NULL;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- Py_ssize_t __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("add_voidp", 0);
+- if (__pyx_optional_args) {
+- if (__pyx_optional_args->__pyx_n > 0) {
+- __pyx_v_owned = __pyx_optional_args->owned;
+- }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":891
++ /* "vidcutter/libs/pympv/mpv.pyx":1004
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ *
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+- * count = len(self.owned) # <<<<<<<<<<<<<<
+- * if count >= MAX_RENDER_PARAMS:
+- * if owned:
+- */
+- __pyx_t_1 = __pyx_v_self->owned;
+- __Pyx_INCREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 891, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_count = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":892
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
+- * if owned:
+- * free(p)
+- */
+- __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (__pyx_t_3) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":893
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS:
+- * if owned: # <<<<<<<<<<<<<<
+- * free(p)
+- * raise PyMPVError("RenderParams overflow")
++ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params) # <<<<<<<<<<<<<<
++ * if err < 0:
++ * raise MPVError(err)
+ */
+- __pyx_t_3 = (__pyx_v_owned != 0);
+- if (__pyx_t_3) {
++ __pyx_v_err = mpv_render_context_create((&__pyx_v_self->_ctx), __pyx_v_self->_mpv->_ctx, __pyx_v_params->params);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":894
+- * if count >= MAX_RENDER_PARAMS:
+- * if owned:
+- * free(p) # <<<<<<<<<<<<<<
+- * raise PyMPVError("RenderParams overflow")
++ /* "vidcutter/libs/pympv/mpv.pyx":1005
+ *
++ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * self.inited = True
+ */
+- free(__pyx_v_p);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":893
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS:
+- * if owned: # <<<<<<<<<<<<<<
+- * free(p)
+- * raise PyMPVError("RenderParams overflow")
+- */
+- }
++ __pyx_t_3 = ((__pyx_v_err < 0) != 0);
++ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":895
+- * if owned:
+- * free(p)
+- * raise PyMPVError("RenderParams overflow") # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1006
++ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
++ * if err < 0:
++ * raise MPVError(err) # <<<<<<<<<<<<<<
++ * self.inited = True
+ *
+- * self.params[count].type = t
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
++ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_RenderParams_overflow) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_RenderParams_overflow);
++ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 895, __pyx_L1_error)
++ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __PYX_ERR(0, 1006, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":892
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
+- * if owned:
+- * free(p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1005
++ *
++ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
++ * self.inited = True
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":897
+- * raise PyMPVError("RenderParams overflow")
++ /* "vidcutter/libs/pympv/mpv.pyx":1007
++ * if err < 0:
++ * raise MPVError(err)
++ * self.inited = True # <<<<<<<<<<<<<<
+ *
+- * self.params[count].type = t # <<<<<<<<<<<<<<
+- * self.params[count].data = p
+- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
++ * @_errors
+ */
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error)
+- (__pyx_v_self->params[__pyx_t_2]).type = __pyx_v_t;
++ __pyx_v_self->inited = 1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":898
++ /* "vidcutter/libs/pympv/mpv.pyx":950
++ * bint inited
+ *
+- * self.params[count].type = t
+- * self.params[count].data = p # <<<<<<<<<<<<<<
+- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+- * self.owned.append(owned)
+- */
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error)
+- (__pyx_v_self->params[__pyx_t_2]).data = __pyx_v_p;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":899
+- * self.params[count].type = t
+- * self.params[count].data = p
+- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
+- * self.owned.append(owned)
+- *
+- */
+- __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- (__pyx_v_self->params[__pyx_t_2]).type = MPV_RENDER_PARAM_INVALID;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":900
+- * self.params[count].data = p
+- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+- * self.owned.append(owned) # <<<<<<<<<<<<<<
+- *
+- * cdef add_int(self, mpv_render_param_type t, int val):
+- */
+- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 900, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":890
+- * self.params[0].type = MPV_RENDER_PARAM_INVALID
+- *
+- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
+- * count = len(self.owned)
+- * if count >= MAX_RENDER_PARAMS:
++ * def __init__(self, mpv, # <<<<<<<<<<<<<<
++ * api_type,
++ * opengl_init_params=None,
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_voidp", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = -1;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_count);
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF((PyObject *)__pyx_v_params);
++ __Pyx_XDECREF(__pyx_v_arp);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":902
+- * self.owned.append(owned)
++/* "vidcutter/libs/pympv/mpv.pyx":1010
+ *
+- * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
+- * cdef int *p = <int *>malloc(sizeof(int))
+- * p[0] = val
++ * @_errors
++ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
+ */
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, int __pyx_v_val) {
+- int *__pyx_v_p;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("set_icc_profile (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_icc_blob));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
++ struct mpv_render_param __pyx_v_param;
++ struct mpv_byte_array __pyx_v_val;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
++ int __pyx_t_2;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ char *__pyx_t_6;
++ Py_ssize_t __pyx_t_7;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("add_int", 0);
++ __Pyx_RefNannySetupContext("set_icc_profile", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":903
++ /* "vidcutter/libs/pympv/mpv.pyx":1016
++ * int err
+ *
+- * cdef add_int(self, mpv_render_param_type t, int val):
+- * cdef int *p = <int *>malloc(sizeof(int)) # <<<<<<<<<<<<<<
+- * p[0] = val
+- * self.add_voidp(t, p)
++ * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
++ * raise PyMPVError("icc_blob should be a bytes instance")
++ * val.data = <void *><char *>icc_blob
+ */
+- __pyx_v_p = ((int *)malloc((sizeof(int))));
++ __pyx_t_1 = PyBytes_Check(__pyx_v_icc_blob);
++ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
++ if (unlikely(__pyx_t_2)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":904
+- * cdef add_int(self, mpv_render_param_type t, int val):
+- * cdef int *p = <int *>malloc(sizeof(int))
+- * p[0] = val # <<<<<<<<<<<<<<
+- * self.add_voidp(t, p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1017
+ *
++ * if not isinstance(icc_blob, bytes):
++ * raise PyMPVError("icc_blob should be a bytes instance") # <<<<<<<<<<<<<<
++ * val.data = <void *><char *>icc_blob
++ * val.size = len(icc_blob)
+ */
+- (__pyx_v_p[0]) = __pyx_v_val;
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_icc_blob_should_be_a_bytes_insta) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_icc_blob_should_be_a_bytes_insta);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(0, 1017, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":905
+- * cdef int *p = <int *>malloc(sizeof(int))
+- * p[0] = val
+- * self.add_voidp(t, p) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1016
++ * int err
+ *
+- * cdef add_string(self, mpv_render_param_type t, char *s):
++ * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
++ * raise PyMPVError("icc_blob should be a bytes instance")
++ * val.data = <void *><char *>icc_blob
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":902
+- * self.owned.append(owned)
++ /* "vidcutter/libs/pympv/mpv.pyx":1018
++ * if not isinstance(icc_blob, bytes):
++ * raise PyMPVError("icc_blob should be a bytes instance")
++ * val.data = <void *><char *>icc_blob # <<<<<<<<<<<<<<
++ * val.size = len(icc_blob)
+ *
+- * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
+- * cdef int *p = <int *>malloc(sizeof(int))
+- * p[0] = val
+ */
++ __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
++ __pyx_v_val.data = ((void *)((char *)__pyx_t_6));
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":907
+- * self.add_voidp(t, p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1019
++ * raise PyMPVError("icc_blob should be a bytes instance")
++ * val.data = <void *><char *>icc_blob
++ * val.size = len(icc_blob) # <<<<<<<<<<<<<<
+ *
+- * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
+- * cdef char *p = <char *>malloc(strlen(s) + 1)
+- * strcpy(p, s)
++ * param.type = MPV_RENDER_PARAM_ICC_PROFILE
+ */
++ __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1019, __pyx_L1_error)
++ __pyx_v_val.size = __pyx_t_7;
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, char *__pyx_v_s) {
+- char *__pyx_v_p;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("add_string", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":908
++ /* "vidcutter/libs/pympv/mpv.pyx":1021
++ * val.size = len(icc_blob)
++ *
++ * param.type = MPV_RENDER_PARAM_ICC_PROFILE # <<<<<<<<<<<<<<
++ * param.data = &val
+ *
+- * cdef add_string(self, mpv_render_param_type t, char *s):
+- * cdef char *p = <char *>malloc(strlen(s) + 1) # <<<<<<<<<<<<<<
+- * strcpy(p, s)
+- * self.add_voidp(t, p)
+ */
+- __pyx_v_p = ((char *)malloc((strlen(__pyx_v_s) + 1)));
++ __pyx_v_param.type = MPV_RENDER_PARAM_ICC_PROFILE;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":909
+- * cdef add_string(self, mpv_render_param_type t, char *s):
+- * cdef char *p = <char *>malloc(strlen(s) + 1)
+- * strcpy(p, s) # <<<<<<<<<<<<<<
+- * self.add_voidp(t, p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1022
++ *
++ * param.type = MPV_RENDER_PARAM_ICC_PROFILE
++ * param.data = &val # <<<<<<<<<<<<<<
+ *
++ * with nogil:
+ */
+- (void)(strcpy(__pyx_v_p, __pyx_v_s));
++ __pyx_v_param.data = (&__pyx_v_val);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":910
+- * cdef char *p = <char *>malloc(strlen(s) + 1)
+- * strcpy(p, s)
+- * self.add_voidp(t, p) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1024
++ * param.data = &val
+ *
+- * def __dealloc__(self):
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":907
+- * self.add_voidp(t, p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1025
++ *
++ * with nogil:
++ * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
++ * return err
+ *
+- * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
+- * cdef char *p = <char *>malloc(strlen(s) + 1)
+- * strcpy(p, s)
+ */
++ __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
++ }
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":912
+- * self.add_voidp(t, p)
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * for i, j in enumerate(self.owned):
+- * if j:
+- */
+-
+-/* Python wrapper */
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+- __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+-}
+-
+-static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
+- PyObject *__pyx_v_i = NULL;
+- PyObject *__pyx_v_j = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- Py_ssize_t __pyx_t_3;
+- PyObject *(*__pyx_t_4)(PyObject *);
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- Py_ssize_t __pyx_t_7;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__dealloc__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":913
++ /* "vidcutter/libs/pympv/mpv.pyx":1024
++ * param.data = &val
+ *
+- * def __dealloc__(self):
+- * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
+- * if j:
+- * free(self.params[i].data)
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err
+ */
+- __Pyx_INCREF(__pyx_int_0);
+- __pyx_t_1 = __pyx_int_0;
+- if (likely(PyList_CheckExact(__pyx_v_self->owned)) || PyTuple_CheckExact(__pyx_v_self->owned)) {
+- __pyx_t_2 = __pyx_v_self->owned; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+- __pyx_t_4 = NULL;
+- } else {
+- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error)
+- }
+- for (;;) {
+- if (likely(!__pyx_t_4)) {
+- if (likely(PyList_CheckExact(__pyx_t_2))) {
+- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
+- #else
+- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- #endif
+- } else {
+- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
+- #else
+- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- #endif
+- }
+- } else {
+- __pyx_t_5 = __pyx_t_4(__pyx_t_2);
+- if (unlikely(!__pyx_t_5)) {
+- PyObject* exc_type = PyErr_Occurred();
+- if (exc_type) {
+- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 913, __pyx_L1_error)
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L6;
+ }
+- break;
++ __pyx_L6:;
+ }
+- __Pyx_GOTREF(__pyx_t_5);
+- }
+- __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_5);
+- __pyx_t_5 = 0;
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+- __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_1);
+- __pyx_t_1 = __pyx_t_5;
+- __pyx_t_5 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":914
+- * def __dealloc__(self):
+- * for i, j in enumerate(self.owned):
+- * if j: # <<<<<<<<<<<<<<
+- * free(self.params[i].data)
+- *
+- */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 914, __pyx_L1_error)
+- if (__pyx_t_6) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":915
+- * for i, j in enumerate(self.owned):
+- * if j:
+- * free(self.params[i].data) # <<<<<<<<<<<<<<
+- *
+- * cdef void *get_pointer(const char *name, object obj):
+- */
+- __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
+- free((__pyx_v_self->params[__pyx_t_7]).data);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":914
+- * def __dealloc__(self):
+- * for i, j in enumerate(self.owned):
+- * if j: # <<<<<<<<<<<<<<
+- * free(self.params[i].data)
+- *
+- */
+- }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":913
++ /* "vidcutter/libs/pympv/mpv.pyx":1026
++ * with nogil:
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err # <<<<<<<<<<<<<<
+ *
+- * def __dealloc__(self):
+- * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
+- * if j:
+- * free(self.params[i].data)
++ * @_errors
+ */
+- }
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":912
+- * self.add_voidp(t, p)
++ /* "vidcutter/libs/pympv/mpv.pyx":1010
+ *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * for i, j in enumerate(self.owned):
+- * if j:
++ * @_errors
++ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
+ */
+
+ /* function exit code */
+- goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv._RenderParams.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_icc_profile", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_i);
+- __Pyx_XDECREF(__pyx_v_j);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
+ }
+
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++/* "vidcutter/libs/pympv/mpv.pyx":1029
++ *
++ * @_errors
++ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("set_ambient_light (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_lux));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_lux) {
++ struct mpv_render_param __pyx_v_param;
++ int __pyx_v_val;
++ int __pyx_v_err;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++ __Pyx_RefNannySetupContext("set_ambient_light", 0);
+
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":1035
++ * int err
++ *
++ * val = lux # <<<<<<<<<<<<<<
++ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
++ * param.data = &val
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 2, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
++ __pyx_v_val = __pyx_t_1;
+
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ /* "vidcutter/libs/pympv/mpv.pyx":1036
++ *
++ * val = lux
++ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT # <<<<<<<<<<<<<<
++ * param.data = &val
++ *
+ */
++ __pyx_v_param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT;
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":1037
++ * val = lux
++ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
++ * param.data = &val # <<<<<<<<<<<<<<
++ *
++ * with nogil:
+ */
++ __pyx_v_param.data = (&__pyx_v_val);
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ /* "vidcutter/libs/pympv/mpv.pyx":1039
++ * param.data = &val
++ *
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err
++ */
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":1040
++ *
++ * with nogil:
++ * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
++ * return err
++ *
++ */
++ __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
++ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ /* "vidcutter/libs/pympv/mpv.pyx":1039
++ * param.data = &val
++ *
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+- /* "(tree fragment)":4
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1041
++ * with nogil:
++ * err = mpv_render_context_set_parameter(self._ctx, param)
++ * return err # <<<<<<<<<<<<<<
++ *
++ * def get_next_frame_info(self):
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_r = __pyx_t_2;
++ __pyx_t_2 = 0;
++ goto __pyx_L0;
+
+- /* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
++ /* "vidcutter/libs/pympv/mpv.pyx":1029
++ *
++ * @_errors
++ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_ambient_light", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
++ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":917
+- * free(self.params[i].data)
++/* "vidcutter/libs/pympv/mpv.pyx":1043
++ * return err
+ *
+- * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
+- * cdef void *p
+- * if PyCapsule_IsValid(obj, name):
++ * def get_next_frame_info(self): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_frame_info info
+ */
+
+-static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name, PyObject *__pyx_v_obj) {
+- void *__pyx_v_p;
+- void *__pyx_r;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("get_next_frame_info (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++ struct mpv_render_frame_info __pyx_v_info;
++ struct mpv_render_param __pyx_v_param;
++ int __pyx_v_err;
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+- void *__pyx_t_2;
+- int __pyx_t_3;
+- int __pyx_t_4;
+- intptr_t __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- PyObject *__pyx_t_9 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("get_pointer", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":919
+- * cdef void *get_pointer(const char *name, object obj):
+- * cdef void *p
+- * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
+- * p = PyCapsule_GetPointer(obj, name)
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+- */
+- __pyx_t_1 = (PyCapsule_IsValid(__pyx_v_obj, __pyx_v_name) != 0);
+- if (__pyx_t_1) {
++ __Pyx_RefNannySetupContext("get_next_frame_info", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":920
+- * cdef void *p
+- * if PyCapsule_IsValid(obj, name):
+- * p = PyCapsule_GetPointer(obj, name) # <<<<<<<<<<<<<<
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+- * p = <void *><intptr_t>obj
++ /* "vidcutter/libs/pympv/mpv.pyx":1048
++ * mpv_render_param param
++ *
++ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO # <<<<<<<<<<<<<<
++ * param.data = &info
++ * with nogil:
+ */
+- __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error)
+- __pyx_v_p = __pyx_t_2;
++ __pyx_v_param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":919
+- * cdef void *get_pointer(const char *name, object obj):
+- * cdef void *p
+- * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
+- * p = PyCapsule_GetPointer(obj, name)
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
++ /* "vidcutter/libs/pympv/mpv.pyx":1049
++ *
++ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
++ * param.data = &info # <<<<<<<<<<<<<<
++ * with nogil:
++ * err = mpv_render_context_get_info(self._ctx, param)
+ */
+- goto __pyx_L3;
+- }
++ __pyx_v_param.data = (&__pyx_v_info);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":921
+- * if PyCapsule_IsValid(obj, name):
+- * p = PyCapsule_GetPointer(obj, name)
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
+- * p = <void *><intptr_t>obj
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":1050
++ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
++ * param.data = &info
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_get_info(self._ctx, param)
++ * if err < 0:
+ */
+- __pyx_t_3 = PyInt_Check(__pyx_v_obj);
+- __pyx_t_4 = (__pyx_t_3 != 0);
+- if (!__pyx_t_4) {
+- } else {
+- __pyx_t_1 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_4 = PyLong_Check(__pyx_v_obj);
+- __pyx_t_3 = (__pyx_t_4 != 0);
+- if (__pyx_t_3) {
+- } else {
+- __pyx_t_1 = __pyx_t_3;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
+- __pyx_t_1 = __pyx_t_3;
+- __pyx_L4_bool_binop_done:;
+- if (likely(__pyx_t_1)) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":922
+- * p = PyCapsule_GetPointer(obj, name)
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+- * p = <void *><intptr_t>obj # <<<<<<<<<<<<<<
+- * else:
+- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
++ /* "vidcutter/libs/pympv/mpv.pyx":1051
++ * param.data = &info
++ * with nogil:
++ * err = mpv_render_context_get_info(self._ctx, param) # <<<<<<<<<<<<<<
++ * if err < 0:
++ * raise MPVError(err)
+ */
+- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
+- __pyx_v_p = ((void *)((intptr_t)__pyx_t_5));
++ __pyx_v_err = mpv_render_context_get_info(__pyx_v_self->_ctx, __pyx_v_param);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":921
+- * if PyCapsule_IsValid(obj, name):
+- * p = PyCapsule_GetPointer(obj, name)
+- * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
+- * p = <void *><intptr_t>obj
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":1050
++ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
++ * param.data = &info
++ * with nogil: # <<<<<<<<<<<<<<
++ * err = mpv_render_context_get_info(self._ctx, param)
++ * if err < 0:
+ */
+- goto __pyx_L3;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":924
+- * p = <void *><intptr_t>obj
+- * else:
+- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj) # <<<<<<<<<<<<<<
+- * return p
++ /* "vidcutter/libs/pympv/mpv.pyx":1052
++ * with nogil:
++ * err = mpv_render_context_get_info(self._ctx, param)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
+ *
+ */
+- /*else*/ {
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_8);
+- __pyx_t_9 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_9)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_9);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
+- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 924, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __PYX_ERR(0, 924, __pyx_L1_error)
+- }
+- __pyx_L3:;
++ __pyx_t_1 = ((__pyx_v_err < 0) != 0);
++ if (unlikely(__pyx_t_1)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":925
+- * else:
+- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
+- * return p # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1053
++ * err = mpv_render_context_get_info(self._ctx, param)
++ * if err < 0:
++ * raise MPVError(err) # <<<<<<<<<<<<<<
+ *
+- * @cython.internal
++ * return RenderFrameInfo()._from_struct(&info)
+ */
+- __pyx_r = __pyx_v_p;
+- goto __pyx_L0;
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
++ }
++ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __PYX_ERR(0, 1053, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":917
+- * free(self.params[i].data)
++ /* "vidcutter/libs/pympv/mpv.pyx":1052
++ * with nogil:
++ * err = mpv_render_context_get_info(self._ctx, param)
++ * if err < 0: # <<<<<<<<<<<<<<
++ * raise MPVError(err)
+ *
+- * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
+- * cdef void *p
+- * if PyCapsule_IsValid(obj, name):
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_XDECREF(__pyx_t_9);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.get_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":929
+- * @cython.internal
+- * cdef class RenderFrameInfo(object):
+- * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
+- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+- */
+-
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, struct mpv_render_frame_info *__pyx_v_info) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("_from_struct", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":930
+- * cdef class RenderFrameInfo(object):
+- * cdef _from_struct(self, mpv_render_frame_info *info):
+- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT) # <<<<<<<<<<<<<<
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":931
+- * cdef _from_struct(self, mpv_render_frame_info *info):
+- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW) # <<<<<<<<<<<<<<
+- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 931, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":932
+- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT) # <<<<<<<<<<<<<<
+- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+- * self.target_time = info[0].target_time
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":933
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC) # <<<<<<<<<<<<<<
+- * self.target_time = info[0].target_time
+- * return self
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":934
+- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+- * self.target_time = info[0].target_time # <<<<<<<<<<<<<<
+- * return self
++ /* "vidcutter/libs/pympv/mpv.pyx":1055
++ * raise MPVError(err)
+ *
+- */
+- __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":935
+- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+- * self.target_time = info[0].target_time
+- * return self # <<<<<<<<<<<<<<
++ * return RenderFrameInfo()._from_struct(&info) # <<<<<<<<<<<<<<
+ *
+- * cdef class RenderContext(object):
++ * def set_update_callback(self, cb):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(((PyObject *)__pyx_v_self));
+- __pyx_r = ((PyObject *)__pyx_v_self);
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_r = __pyx_t_3;
++ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":929
+- * @cython.internal
+- * cdef class RenderFrameInfo(object):
+- * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
+- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
++ /* "vidcutter/libs/pympv/mpv.pyx":1043
++ * return err
++ *
++ * def get_next_frame_info(self): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_frame_info info
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo._from_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.get_next_frame_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++/* "vidcutter/libs/pympv/mpv.pyx":1057
++ * return RenderFrameInfo()._from_struct(&info)
++ *
++ * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("set_update_callback (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_cb));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self) {
+- PyObject *__pyx_v_state = 0;
+- PyObject *__pyx_v__dict = 0;
+- int __pyx_v_use_setstate;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_cb) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+-
+- /* "(tree fragment)":5
+- * cdef object _dict
+- * cdef bint use_setstate
+- * state = () # <<<<<<<<<<<<<<
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- */
+- __Pyx_INCREF(__pyx_empty_tuple);
+- __pyx_v_state = __pyx_empty_tuple;
+-
+- /* "(tree fragment)":6
+- * cdef bint use_setstate
+- * state = ()
+- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
+- * if _dict is not None:
+- * state += (_dict,)
+- */
+- __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v__dict = __pyx_t_1;
+- __pyx_t_1 = 0;
+-
+- /* "(tree fragment)":7
+- * state = ()
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- __pyx_t_2 = (__pyx_v__dict != Py_None);
+- __pyx_t_3 = (__pyx_t_2 != 0);
+- if (__pyx_t_3) {
+-
+- /* "(tree fragment)":8
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None:
+- * state += (_dict,) # <<<<<<<<<<<<<<
+- * use_setstate = True
+- * else:
+- */
+- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_v__dict);
+- __Pyx_GIVEREF(__pyx_v__dict);
+- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
+- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
+- __pyx_t_4 = 0;
+-
+- /* "(tree fragment)":9
+- * if _dict is not None:
+- * state += (_dict,)
+- * use_setstate = True # <<<<<<<<<<<<<<
+- * else:
+- * use_setstate = False
+- */
+- __pyx_v_use_setstate = 1;
+-
+- /* "(tree fragment)":7
+- * state = ()
+- * _dict = getattr(self, '__dict__', None)
+- * if _dict is not None: # <<<<<<<<<<<<<<
+- * state += (_dict,)
+- * use_setstate = True
+- */
+- goto __pyx_L3;
+- }
+-
+- /* "(tree fragment)":11
+- * use_setstate = True
+- * else:
+- * use_setstate = False # <<<<<<<<<<<<<<
+- * if use_setstate:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
+- */
+- /*else*/ {
+- __pyx_v_use_setstate = 0;
+- }
+- __pyx_L3:;
++ __Pyx_RefNannySetupContext("set_update_callback", 0);
+
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = False
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":1058
++ *
++ * def set_update_callback(self, cb):
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++ * self.update_cb = cb
+ */
+- __pyx_t_3 = (__pyx_v_use_setstate != 0);
+- if (__pyx_t_3) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "(tree fragment)":13
+- * use_setstate = False
+- * if use_setstate:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<<
+- * else:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
++ /* "vidcutter/libs/pympv/mpv.pyx":1059
++ * def set_update_callback(self, cb):
++ * with nogil:
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
++ * self.update_cb = cb
++ *
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_222419149);
+- __Pyx_GIVEREF(__pyx_int_222419149);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
+- __Pyx_INCREF(Py_None);
+- __Pyx_GIVEREF(Py_None);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+- __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
+- __pyx_t_4 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_5;
+- __pyx_t_5 = 0;
+- goto __pyx_L0;
++ mpv_render_context_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
++ }
+
+- /* "(tree fragment)":12
+- * else:
+- * use_setstate = False
+- * if use_setstate: # <<<<<<<<<<<<<<
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":1058
++ *
++ * def set_update_callback(self, cb):
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++ * self.update_cb = cb
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
+ }
+
+- /* "(tree fragment)":15
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
+- * else:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
++ /* "vidcutter/libs/pympv/mpv.pyx":1060
++ * with nogil:
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++ * self.update_cb = cb # <<<<<<<<<<<<<<
++ *
++ * def update(self):
+ */
+- /*else*/ {
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
+- __Pyx_INCREF(__pyx_int_222419149);
+- __Pyx_GIVEREF(__pyx_int_222419149);
+- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
+- __Pyx_INCREF(__pyx_v_state);
+- __Pyx_GIVEREF(__pyx_v_state);
+- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
+- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_5);
+- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+- __pyx_t_5 = 0;
+- __pyx_t_1 = 0;
+- __pyx_r = __pyx_t_4;
+- __pyx_t_4 = 0;
+- goto __pyx_L0;
+- }
++ __Pyx_INCREF(__pyx_v_cb);
++ __Pyx_GIVEREF(__pyx_v_cb);
++ __Pyx_GOTREF(__pyx_v_self->update_cb);
++ __Pyx_DECREF(__pyx_v_self->update_cb);
++ __pyx_v_self->update_cb = __pyx_v_cb;
+
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * cdef tuple state
+- * cdef object _dict
++ /* "vidcutter/libs/pympv/mpv.pyx":1057
++ * return RenderFrameInfo()._from_struct(&info)
++ *
++ * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+ */
+
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_state);
+- __Pyx_XDECREF(__pyx_v__dict);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
++/* "vidcutter/libs/pympv/mpv.pyx":1062
++ * self.update_cb = cb
++ *
++ * def update(self): # <<<<<<<<<<<<<<
++ * cdef uint64_t ret
++ * with nogil:
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ __Pyx_RefNannySetupContext("update (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++ uint64_t __pyx_v_ret;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ __Pyx_RefNannySetupContext("update", 0);
+
+- /* "(tree fragment)":17
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
+- * def __setstate_cython__(self, __pyx_state):
+- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1064
++ * def update(self):
++ * cdef uint64_t ret
++ * with nogil: # <<<<<<<<<<<<<<
++ * ret = mpv_render_context_update(self._ctx)
++ * return ret
+ */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1065
++ * cdef uint64_t ret
++ * with nogil:
++ * ret = mpv_render_context_update(self._ctx) # <<<<<<<<<<<<<<
++ * return ret
++ *
++ */
++ __pyx_v_ret = mpv_render_context_update(__pyx_v_self->_ctx);
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1064
++ * def update(self):
++ * cdef uint64_t ret
++ * with nogil: # <<<<<<<<<<<<<<
++ * ret = mpv_render_context_update(self._ctx)
++ * return ret
++ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1066
++ * with nogil:
++ * ret = mpv_render_context_update(self._ctx)
++ * return ret # <<<<<<<<<<<<<<
++ *
++ * @_errors
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "(tree fragment)":16
+- * else:
+- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
++ /* "vidcutter/libs/pympv/mpv.pyx":1062
++ * self.update_cb = cb
++ *
++ * def update(self): # <<<<<<<<<<<<<<
++ * cdef uint64_t ret
++ * with nogil:
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+@@ -18902,98 +18218,80 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cy
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":950
+- * bint inited
++/* "vidcutter/libs/pympv/mpv.pyx":1069
+ *
+- * def __init__(self, mpv, # <<<<<<<<<<<<<<
+- * api_type,
+- * opengl_init_params=None,
++ * @_errors
++ * def render(self, # <<<<<<<<<<<<<<
++ * opengl_fbo=None,
++ * flip_y=False,
+ */
+
+ /* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_mpv = 0;
+- PyObject *__pyx_v_api_type = 0;
+- PyObject *__pyx_v_opengl_init_params = 0;
+- PyObject *__pyx_v_advanced_control = 0;
+- PyObject *__pyx_v_x11_display = 0;
+- PyObject *__pyx_v_wl_display = 0;
+- PyObject *__pyx_v_drm_display = 0;
+- PyObject *__pyx_v_drm_osd_size = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_opengl_fbo = 0;
++ PyObject *__pyx_v_flip_y = 0;
++ PyObject *__pyx_v_depth = 0;
++ PyObject *__pyx_v_block_for_target_time = 0;
++ PyObject *__pyx_v_skip_rendering = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- int __pyx_r;
++ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
++ __Pyx_RefNannySetupContext("render (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_api_type,&__pyx_n_s_opengl_init_params,&__pyx_n_s_advanced_control,&__pyx_n_s_x11_display,&__pyx_n_s_wl_display,&__pyx_n_s_drm_display,&__pyx_n_s_drm_osd_size,0};
+- PyObject* values[8] = {0,0,0,0,0,0,0,0};
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":952
+- * def __init__(self, mpv,
+- * api_type,
+- * opengl_init_params=None, # <<<<<<<<<<<<<<
+- * advanced_control=False,
+- * x11_display=None,
+- */
+- values[2] = ((PyObject *)Py_None);
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_opengl_fbo,&__pyx_n_s_flip_y,&__pyx_n_s_depth,&__pyx_n_s_block_for_target_time,&__pyx_n_s_skip_rendering,0};
++ PyObject* values[5] = {0,0,0,0,0};
+
+- /* "vidcutter/libs/pympv/mpv.pyx":953
+- * api_type,
+- * opengl_init_params=None,
+- * advanced_control=False, # <<<<<<<<<<<<<<
+- * x11_display=None,
+- * wl_display=None,
++ /* "vidcutter/libs/pympv/mpv.pyx":1070
++ * @_errors
++ * def render(self,
++ * opengl_fbo=None, # <<<<<<<<<<<<<<
++ * flip_y=False,
++ * depth=None,
+ */
+- values[3] = ((PyObject *)Py_False);
++ values[0] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":954
+- * opengl_init_params=None,
+- * advanced_control=False,
+- * x11_display=None, # <<<<<<<<<<<<<<
+- * wl_display=None,
+- * drm_display=None,
++ /* "vidcutter/libs/pympv/mpv.pyx":1071
++ * def render(self,
++ * opengl_fbo=None,
++ * flip_y=False, # <<<<<<<<<<<<<<
++ * depth=None,
++ * block_for_target_time=True,
+ */
+- values[4] = ((PyObject *)Py_None);
++ values[1] = ((PyObject *)Py_False);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":955
+- * advanced_control=False,
+- * x11_display=None,
+- * wl_display=None, # <<<<<<<<<<<<<<
+- * drm_display=None,
+- * drm_osd_size=None
++ /* "vidcutter/libs/pympv/mpv.pyx":1072
++ * opengl_fbo=None,
++ * flip_y=False,
++ * depth=None, # <<<<<<<<<<<<<<
++ * block_for_target_time=True,
++ * skip_rendering=False):
+ */
+- values[5] = ((PyObject *)Py_None);
++ values[2] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":956
+- * x11_display=None,
+- * wl_display=None,
+- * drm_display=None, # <<<<<<<<<<<<<<
+- * drm_osd_size=None
+- * ):
++ /* "vidcutter/libs/pympv/mpv.pyx":1073
++ * flip_y=False,
++ * depth=None,
++ * block_for_target_time=True, # <<<<<<<<<<<<<<
++ * skip_rendering=False):
++ *
+ */
+- values[6] = ((PyObject *)Py_None);
++ values[3] = ((PyObject *)Py_True);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":957
+- * wl_display=None,
+- * drm_display=None,
+- * drm_osd_size=None # <<<<<<<<<<<<<<
+- * ):
++ /* "vidcutter/libs/pympv/mpv.pyx":1074
++ * depth=None,
++ * block_for_target_time=True,
++ * skip_rendering=False): # <<<<<<<<<<<<<<
+ *
++ * cdef:
+ */
+- values[7] = ((PyObject *)Py_None);
++ values[4] = ((PyObject *)Py_False);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+- case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+- CYTHON_FALLTHROUGH;
+- case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+- CYTHON_FALLTHROUGH;
+- case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+- CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+@@ -19010,62 +18308,40 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_fbo);
++ if (value) { values[0] = value; kw_args--; }
++ }
+ CYTHON_FALLTHROUGH;
+ case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_api_type)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 950, __pyx_L3_error)
++ if (kw_args > 0) {
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flip_y);
++ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_init_params);
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_depth);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advanced_control);
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_block_for_target_time);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x11_display);
++ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_rendering);
+ if (value) { values[4] = value; kw_args--; }
+ }
+- CYTHON_FALLTHROUGH;
+- case 5:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wl_display);
+- if (value) { values[5] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 6:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_display);
+- if (value) { values[6] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 7:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_osd_size);
+- if (value) { values[7] = value; kw_args--; }
+- }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 950, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1069, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
+- CYTHON_FALLTHROUGH;
+- case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
+- CYTHON_FALLTHROUGH;
+- case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+- CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+@@ -19073,36 +18349,35 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- break;
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+- __pyx_v_mpv = values[0];
+- __pyx_v_api_type = values[1];
+- __pyx_v_opengl_init_params = values[2];
+- __pyx_v_advanced_control = values[3];
+- __pyx_v_x11_display = values[4];
+- __pyx_v_wl_display = values[5];
+- __pyx_v_drm_display = values[6];
+- __pyx_v_drm_osd_size = values[7];
+- }
+- goto __pyx_L4_argument_unpacking_done;
++ __pyx_v_opengl_fbo = values[0];
++ __pyx_v_flip_y = values[1];
++ __pyx_v_depth = values[2];
++ __pyx_v_block_for_target_time = values[3];
++ __pyx_v_skip_rendering = values[4];
++ }
++ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 950, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1069, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+- return -1;
++ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_api_type, __pyx_v_opengl_init_params, __pyx_v_advanced_control, __pyx_v_x11_display, __pyx_v_wl_display, __pyx_v_drm_display, __pyx_v_drm_osd_size);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_opengl_fbo, __pyx_v_flip_y, __pyx_v_depth, __pyx_v_block_for_target_time, __pyx_v_skip_rendering);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":950
+- * bint inited
++ /* "vidcutter/libs/pympv/mpv.pyx":1069
+ *
+- * def __init__(self, mpv, # <<<<<<<<<<<<<<
+- * api_type,
+- * opengl_init_params=None,
++ * @_errors
++ * def render(self, # <<<<<<<<<<<<<<
++ * opengl_fbo=None,
++ * flip_y=False,
+ */
+
+ /* function exit code */
+@@ -19110,786 +18385,626 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_api_type, PyObject *__pyx_v_opengl_init_params, PyObject *__pyx_v_advanced_control, PyObject *__pyx_v_x11_display, PyObject *__pyx_v_wl_display, PyObject *__pyx_v_drm_display, PyObject *__pyx_v_drm_osd_size) {
+- struct mpv_opengl_init_params __pyx_v_gl_params;
+- struct mpv_opengl_drm_params __pyx_v_drm_params;
+- struct mpv_opengl_drm_osd_size __pyx_v__drm_osd_size;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_opengl_fbo, PyObject *__pyx_v_flip_y, PyObject *__pyx_v_depth, PyObject *__pyx_v_block_for_target_time, PyObject *__pyx_v_skip_rendering) {
++ struct mpv_opengl_fbo __pyx_v_fbo;
+ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_params = NULL;
+- PyObject *__pyx_v_arp = NULL;
+- int __pyx_v_err;
+- int __pyx_r;
++ int __pyx_v_ret;
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
++ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_5;
+ int __pyx_t_6;
+- int __pyx_t_7;
+- char const *__pyx_t_8;
+- PyObject *(*__pyx_t_9)(PyObject *);
+- int __pyx_t_10;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
++ __Pyx_RefNannySetupContext("render", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":965
+- * mpv_opengl_drm_osd_size _drm_osd_size
++ /* "vidcutter/libs/pympv/mpv.pyx":1079
++ * mpv_opengl_fbo fbo
+ *
+- * self._mpv = mpv # <<<<<<<<<<<<<<
++ * params = _RenderParams() # <<<<<<<<<<<<<<
+ *
+- * memset(&gl_params, 0, sizeof(gl_params))
++ * if opengl_fbo:
+ */
+- if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 965, __pyx_L1_error)
+- __pyx_t_1 = __pyx_v_mpv;
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v_self->_mpv);
+- __Pyx_DECREF(((PyObject *)__pyx_v_self->_mpv));
+- __pyx_v_self->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_t_1);
++ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":967
+- * self._mpv = mpv
++ /* "vidcutter/libs/pympv/mpv.pyx":1081
++ * params = _RenderParams()
+ *
+- * memset(&gl_params, 0, sizeof(gl_params)) # <<<<<<<<<<<<<<
+- * memset(&drm_params, 0, sizeof(drm_params))
+- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
++ * if opengl_fbo: # <<<<<<<<<<<<<<
++ * memset(&fbo, 0, sizeof(fbo))
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ */
+- (void)(memset((&__pyx_v_gl_params), 0, (sizeof(__pyx_v_gl_params))));
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":968
+- *
+- * memset(&gl_params, 0, sizeof(gl_params))
+- * memset(&drm_params, 0, sizeof(drm_params)) # <<<<<<<<<<<<<<
+- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
++ /* "vidcutter/libs/pympv/mpv.pyx":1082
+ *
++ * if opengl_fbo:
++ * memset(&fbo, 0, sizeof(fbo)) # <<<<<<<<<<<<<<
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
++ * fbo.w = opengl_fbo["w"]
+ */
+- (void)(memset((&__pyx_v_drm_params), 0, (sizeof(__pyx_v_drm_params))));
++ (void)(memset((&__pyx_v_fbo), 0, (sizeof(__pyx_v_fbo))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":969
+- * memset(&gl_params, 0, sizeof(gl_params))
+- * memset(&drm_params, 0, sizeof(drm_params))
+- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size)) # <<<<<<<<<<<<<<
+- *
+- * params = _RenderParams()
++ /* "vidcutter/libs/pympv/mpv.pyx":1083
++ * if opengl_fbo:
++ * memset(&fbo, 0, sizeof(fbo))
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
++ * fbo.w = opengl_fbo["w"]
++ * fbo.h = opengl_fbo["h"]
+ */
+- (void)(memset((&__pyx_v__drm_osd_size), 0, (sizeof(__pyx_v__drm_osd_size))));
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ if (!__pyx_t_2) {
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ } else {
++ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_t_3 = __pyx_t_5;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_3 = 0;
++ __pyx_L4_bool_binop_done:;
++ __pyx_v_fbo.fbo = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":971
+- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
+- *
+- * params = _RenderParams() # <<<<<<<<<<<<<<
+- *
+- * if api_type == self.API_OPENGL:
++ /* "vidcutter/libs/pympv/mpv.pyx":1084
++ * memset(&fbo, 0, sizeof(fbo))
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
++ * fbo.w = opengl_fbo["w"] # <<<<<<<<<<<<<<
++ * fbo.h = opengl_fbo["h"]
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
+- __pyx_t_1 = 0;
++ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_v_fbo.w = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":973
+- * params = _RenderParams()
+- *
+- * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
+- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
+- * else:
++ /* "vidcutter/libs/pympv/mpv.pyx":1085
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
++ * fbo.w = opengl_fbo["w"]
++ * fbo.h = opengl_fbo["h"] # <<<<<<<<<<<<<<
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (likely(__pyx_t_3)) {
++ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_v_fbo.h = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":974
+- *
+- * if api_type == self.API_OPENGL:
+- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL) # <<<<<<<<<<<<<<
+- * else:
+- * raise PyMPVError("Unknown api_type %r" % api_type)
++ /* "vidcutter/libs/pympv/mpv.pyx":1086
++ * fbo.w = opengl_fbo["w"]
++ * fbo.h = opengl_fbo["h"]
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
++ * if flip_y:
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ if (!__pyx_t_2) {
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ } else {
++ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_t_3 = __pyx_t_5;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ goto __pyx_L6_bool_binop_done;
++ }
++ __pyx_t_3 = 0;
++ __pyx_L6_bool_binop_done:;
++ __pyx_v_fbo.internal_format = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":973
++ /* "vidcutter/libs/pympv/mpv.pyx":1087
++ * fbo.h = opengl_fbo["h"]
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo) # <<<<<<<<<<<<<<
++ * if flip_y:
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ */
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1081
+ * params = _RenderParams()
+ *
+- * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
+- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
+- * else:
++ * if opengl_fbo: # <<<<<<<<<<<<<<
++ * memset(&fbo, 0, sizeof(fbo))
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ */
+- goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":976
+- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
+- * else:
+- * raise PyMPVError("Unknown api_type %r" % api_type) # <<<<<<<<<<<<<<
+- *
+- * if opengl_init_params is not None:
++ /* "vidcutter/libs/pympv/mpv.pyx":1088
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
++ * if flip_y: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ * if depth is not None:
+ */
+- /*else*/ {
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
++ if (__pyx_t_2) {
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1089
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
++ * if flip_y:
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1) # <<<<<<<<<<<<<<
++ * if depth is not None:
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ */
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_1, function);
+- }
+- }
+- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 976, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1088
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
++ * if flip_y: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ * if depth is not None:
++ */
+ }
+- __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":978
+- * raise PyMPVError("Unknown api_type %r" % api_type)
+- *
+- * if opengl_init_params is not None: # <<<<<<<<<<<<<<
+- * self._get_proc_address = opengl_init_params["get_proc_address"]
+- * gl_params.get_proc_address = &_c_getprocaddress
++ /* "vidcutter/libs/pympv/mpv.pyx":1090
++ * if flip_y:
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ * if depth is not None: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ * if not block_for_target_time:
+ */
+- __pyx_t_3 = (__pyx_v_opengl_init_params != Py_None);
+- __pyx_t_6 = (__pyx_t_3 != 0);
++ __pyx_t_2 = (__pyx_v_depth != Py_None);
++ __pyx_t_6 = (__pyx_t_2 != 0);
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":979
+- *
+- * if opengl_init_params is not None:
+- * self._get_proc_address = opengl_init_params["get_proc_address"] # <<<<<<<<<<<<<<
+- * gl_params.get_proc_address = &_c_getprocaddress
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
++ /* "vidcutter/libs/pympv/mpv.pyx":1091
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ * if depth is not None:
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth) # <<<<<<<<<<<<<<
++ * if not block_for_target_time:
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ */
+- __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GIVEREF(__pyx_t_2);
+- __Pyx_GOTREF(__pyx_v_self->_get_proc_address);
+- __Pyx_DECREF(__pyx_v_self->_get_proc_address);
+- __pyx_v_self->_get_proc_address = __pyx_t_2;
+- __pyx_t_2 = 0;
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":980
+- * if opengl_init_params is not None:
+- * self._get_proc_address = opengl_init_params["get_proc_address"]
+- * gl_params.get_proc_address = &_c_getprocaddress # <<<<<<<<<<<<<<
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
++ /* "vidcutter/libs/pympv/mpv.pyx":1090
++ * if flip_y:
++ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
++ * if depth is not None: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ * if not block_for_target_time:
+ */
+- __pyx_v_gl_params.get_proc_address = (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":981
+- * self._get_proc_address = opengl_init_params["get_proc_address"]
+- * gl_params.get_proc_address = &_c_getprocaddress
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+- * if advanced_control:
++ /* "vidcutter/libs/pympv/mpv.pyx":1092
++ * if depth is not None:
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ * if not block_for_target_time: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ * if skip_rendering:
+ */
+- __pyx_v_gl_params.get_proc_address_ctx = ((void *)__pyx_v_self->_get_proc_address);
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
++ __pyx_t_2 = ((!__pyx_t_6) != 0);
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":982
+- * gl_params.get_proc_address = &_c_getprocaddress
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params) # <<<<<<<<<<<<<<
+- * if advanced_control:
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
++ /* "vidcutter/libs/pympv/mpv.pyx":1093
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ * if not block_for_target_time:
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0) # <<<<<<<<<<<<<<
++ * if skip_rendering:
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":978
+- * raise PyMPVError("Unknown api_type %r" % api_type)
+- *
+- * if opengl_init_params is not None: # <<<<<<<<<<<<<<
+- * self._get_proc_address = opengl_init_params["get_proc_address"]
+- * gl_params.get_proc_address = &_c_getprocaddress
++ /* "vidcutter/libs/pympv/mpv.pyx":1092
++ * if depth is not None:
++ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
++ * if not block_for_target_time: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ * if skip_rendering:
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":983
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+- * if advanced_control: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+- * if x11_display:
++ /* "vidcutter/libs/pympv/mpv.pyx":1094
++ * if not block_for_target_time:
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ * if skip_rendering: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
++ *
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 983, __pyx_L1_error)
+- if (__pyx_t_6) {
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
++ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":984
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+- * if advanced_control:
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1) # <<<<<<<<<<<<<<
+- * if x11_display:
+- * self._x11_display = x11_display
++ /* "vidcutter/libs/pympv/mpv.pyx":1095
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ * if skip_rendering:
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1) # <<<<<<<<<<<<<<
++ *
++ * with nogil:
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":983
+- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+- * if advanced_control: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+- * if x11_display:
++ /* "vidcutter/libs/pympv/mpv.pyx":1094
++ * if not block_for_target_time:
++ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ * if skip_rendering: # <<<<<<<<<<<<<<
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
++ *
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":985
+- * if advanced_control:
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+- * if x11_display: # <<<<<<<<<<<<<<
+- * self._x11_display = x11_display
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ /* "vidcutter/libs/pympv/mpv.pyx":1097
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
++ *
++ * with nogil: # <<<<<<<<<<<<<<
++ * ret = mpv_render_context_render(self._ctx, params.params)
++ * return ret
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
+- if (__pyx_t_6) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":986
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+- * if x11_display:
+- * self._x11_display = x11_display # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+- * if wl_display:
++ /* "vidcutter/libs/pympv/mpv.pyx":1098
++ *
++ * with nogil:
++ * ret = mpv_render_context_render(self._ctx, params.params) # <<<<<<<<<<<<<<
++ * return ret
++ *
+ */
+- __Pyx_INCREF(__pyx_v_x11_display);
+- __Pyx_GIVEREF(__pyx_v_x11_display);
+- __Pyx_GOTREF(__pyx_v_self->_x11_display);
+- __Pyx_DECREF(__pyx_v_self->_x11_display);
+- __pyx_v_self->_x11_display = __pyx_v_x11_display;
++ __pyx_v_ret = mpv_render_context_render(__pyx_v_self->_ctx, __pyx_v_params->params);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":987
+- * if x11_display:
+- * self._x11_display = x11_display
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display)) # <<<<<<<<<<<<<<
+- * if wl_display:
+- * self._wl_display = wl_display
++ /* "vidcutter/libs/pympv/mpv.pyx":1097
++ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
++ *
++ * with nogil: # <<<<<<<<<<<<<<
++ * ret = mpv_render_context_render(self._ctx, params.params)
++ * return ret
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L14;
++ }
++ __pyx_L14:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":985
+- * if advanced_control:
+- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+- * if x11_display: # <<<<<<<<<<<<<<
+- * self._x11_display = x11_display
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
++ /* "vidcutter/libs/pympv/mpv.pyx":1099
++ * with nogil:
++ * ret = mpv_render_context_render(self._ctx, params.params)
++ * return ret # <<<<<<<<<<<<<<
++ *
++ * def report_swap(self):
+ */
+- }
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_r = __pyx_t_1;
++ __pyx_t_1 = 0;
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":988
+- * self._x11_display = x11_display
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+- * if wl_display: # <<<<<<<<<<<<<<
+- * self._wl_display = wl_display
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ /* "vidcutter/libs/pympv/mpv.pyx":1069
++ *
++ * @_errors
++ * def render(self, # <<<<<<<<<<<<<<
++ * opengl_fbo=None,
++ * flip_y=False,
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
+- if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":989
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+- * if wl_display:
+- * self._wl_display = wl_display # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- * if drm_display:
+- */
+- __Pyx_INCREF(__pyx_v_wl_display);
+- __Pyx_GIVEREF(__pyx_v_wl_display);
+- __Pyx_GOTREF(__pyx_v_self->_wl_display);
+- __Pyx_DECREF(__pyx_v_self->_wl_display);
+- __pyx_v_self->_wl_display = __pyx_v_wl_display;
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF((PyObject *)__pyx_v_params);
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":990
+- * if wl_display:
+- * self._wl_display = wl_display
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display)) # <<<<<<<<<<<<<<
+- * if drm_display:
+- * drm_params.fd = drm_display.get("fd", -1)
++/* "vidcutter/libs/pympv/mpv.pyx":1101
++ * return ret
++ *
++ * def report_swap(self): # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_report_swap(self._ctx)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":988
+- * self._x11_display = x11_display
+- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+- * if wl_display: # <<<<<<<<<<<<<<
+- * self._wl_display = wl_display
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- */
+- }
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("report_swap (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":991
+- * self._wl_display = wl_display
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- * if drm_display: # <<<<<<<<<<<<<<
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 991, __pyx_L1_error)
+- if (__pyx_t_6) {
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":992
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- * if drm_display:
+- * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_drm_params.fd = __pyx_t_7;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("report_swap", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":993
+- * if drm_display:
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None)
++ /* "vidcutter/libs/pympv/mpv.pyx":1102
++ *
++ * def report_swap(self):
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_report_swap(self._ctx)
++ *
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 993, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_drm_params.crtc_id = __pyx_t_7;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":994
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
+- * arp = drm_display.get("atomic_request_ptr", None)
+- * if arp is not None:
++ /* "vidcutter/libs/pympv/mpv.pyx":1103
++ * def report_swap(self):
++ * with nogil:
++ * mpv_render_context_report_swap(self._ctx) # <<<<<<<<<<<<<<
++ *
++ * def free(self):
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_drm_params.connector_id = __pyx_t_7;
++ mpv_render_context_report_swap(__pyx_v_self->_ctx);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":995
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
+- * if arp is not None:
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ /* "vidcutter/libs/pympv/mpv.pyx":1102
++ *
++ * def report_swap(self):
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_report_swap(self._ctx)
++ *
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_arp = __pyx_t_2;
+- __pyx_t_2 = 0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L5;
++ }
++ __pyx_L5:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":996
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None)
+- * if arp is not None: # <<<<<<<<<<<<<<
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
++ /* "vidcutter/libs/pympv/mpv.pyx":1101
++ * return ret
++ *
++ * def report_swap(self): # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_report_swap(self._ctx)
+ */
+- __pyx_t_6 = (__pyx_v_arp != Py_None);
+- __pyx_t_3 = (__pyx_t_6 != 0);
+- if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":997
+- * arp = drm_display.get("atomic_request_ptr", None)
+- * if arp is not None:
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*") # <<<<<<<<<<<<<<
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- */
+- __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L1_error)
+- __pyx_v_drm_params.atomic_request_ptr = ((struct _drmModeAtomicReq **)__pyx_f_9vidcutter_4libs_3mpv_get_pointer(__pyx_t_8, __pyx_kp_s_drmModeAtomicReq));
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":996
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None)
+- * if arp is not None: # <<<<<<<<<<<<<<
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
++/* "vidcutter/libs/pympv/mpv.pyx":1105
++ * mpv_render_context_report_swap(self._ctx)
++ *
++ * def free(self): # <<<<<<<<<<<<<<
++ * if not self.inited:
++ * return
+ */
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":998
+- * if arp is not None:
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- * if drm_osd_size:
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v_drm_params.render_fd = __pyx_t_7;
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("free (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":999
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params) # <<<<<<<<<<<<<<
+- * if drm_osd_size:
+- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+- */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":991
+- * self._wl_display = wl_display
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- * if drm_display: # <<<<<<<<<<<<<<
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- */
+- }
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ int __pyx_t_1;
++ __Pyx_RefNannySetupContext("free", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1000
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- * if drm_osd_size: # <<<<<<<<<<<<<<
+- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+- */
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1000, __pyx_L1_error)
+- if (__pyx_t_3) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1001
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- * if drm_osd_size:
+- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+- *
+- */
+- if ((likely(PyTuple_CheckExact(__pyx_v_drm_osd_size))) || (PyList_CheckExact(__pyx_v_drm_osd_size))) {
+- PyObject* sequence = __pyx_v_drm_osd_size;
+- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
+- if (unlikely(size != 2)) {
+- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+- __PYX_ERR(0, 1001, __pyx_L1_error)
+- }
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- if (likely(PyTuple_CheckExact(sequence))) {
+- __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+- __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+- } else {
+- __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+- __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+- }
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_t_2);
+- #else
+- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- #endif
+- } else {
+- Py_ssize_t index = -1;
+- __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
+- index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
+- __Pyx_GOTREF(__pyx_t_1);
+- index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
+- __Pyx_GOTREF(__pyx_t_2);
+- if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __pyx_t_9 = NULL;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- goto __pyx_L12_unpacking_done;
+- __pyx_L11_unpacking_failed:;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_9 = NULL;
+- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+- __PYX_ERR(0, 1001, __pyx_L1_error)
+- __pyx_L12_unpacking_done:;
+- }
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v__drm_osd_size.width = __pyx_t_7;
+- __pyx_v__drm_osd_size.height = __pyx_t_10;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1002
+- * if drm_osd_size:
+- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1106
+ *
+- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
++ * def free(self):
++ * if not self.inited: # <<<<<<<<<<<<<<
++ * return
++ * with nogil:
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1000
+- * drm_params.render_fd = drm_display.get("render_fd", -1)
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- * if drm_osd_size: # <<<<<<<<<<<<<<
+- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
++ /* "vidcutter/libs/pympv/mpv.pyx":1107
++ * def free(self):
++ * if not self.inited:
++ * return # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_free(self._ctx)
+ */
+- }
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1004
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
++ /* "vidcutter/libs/pympv/mpv.pyx":1106
+ *
+- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
++ * def free(self):
++ * if not self.inited: # <<<<<<<<<<<<<<
++ * return
++ * with nogil:
+ */
+- __pyx_v_err = mpv_render_context_create((&__pyx_v_self->_ctx), __pyx_v_self->_mpv->_ctx, __pyx_v_params->params);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1005
+- *
+- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * self.inited = True
++ /* "vidcutter/libs/pympv/mpv.pyx":1108
++ * if not self.inited:
++ * return
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False
+ */
+- __pyx_t_3 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_3)) {
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1006
+- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- * self.inited = True
++ /* "vidcutter/libs/pympv/mpv.pyx":1109
++ * return
++ * with nogil:
++ * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
++ * self.inited = False
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_1, function);
++ mpv_render_context_free(__pyx_v_self->_ctx);
+ }
+- }
+- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 1006, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1005
+- *
+- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
+- * self.inited = True
++ /* "vidcutter/libs/pympv/mpv.pyx":1108
++ * if not self.inited:
++ * return
++ * with nogil: # <<<<<<<<<<<<<<
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False
+ */
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L6;
++ }
++ __pyx_L6:;
++ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1007
+- * if err < 0:
+- * raise MPVError(err)
+- * self.inited = True # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1110
++ * with nogil:
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False # <<<<<<<<<<<<<<
+ *
+- * @_errors
++ * def close(self):
+ */
+- __pyx_v_self->inited = 1;
++ __pyx_v_self->inited = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":950
+- * bint inited
++ /* "vidcutter/libs/pympv/mpv.pyx":1105
++ * mpv_render_context_report_swap(self._ctx)
+ *
+- * def __init__(self, mpv, # <<<<<<<<<<<<<<
+- * api_type,
+- * opengl_init_params=None,
++ * def free(self): # <<<<<<<<<<<<<<
++ * if not self.inited:
++ * return
+ */
+
+ /* function exit code */
+- __pyx_r = 0;
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+- __Pyx_XDECREF((PyObject *)__pyx_v_params);
+- __Pyx_XDECREF(__pyx_v_arp);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1010
++/* "vidcutter/libs/pympv/mpv.pyx":1112
++ * self.inited = False
+ *
+- * @_errors
+- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
++ * def close(self): # <<<<<<<<<<<<<<
++ * if not self.inited:
++ * return
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_icc_profile (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_icc_blob));
++ __Pyx_RefNannySetupContext("close (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
+- struct mpv_render_param __pyx_v_param;
+- struct mpv_byte_array __pyx_v_val;
+- int __pyx_v_err;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+- int __pyx_t_2;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- char *__pyx_t_6;
+- Py_ssize_t __pyx_t_7;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_icc_profile", 0);
++ __Pyx_RefNannySetupContext("close", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1016
+- * int err
++ /* "vidcutter/libs/pympv/mpv.pyx":1113
+ *
+- * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
+- * raise PyMPVError("icc_blob should be a bytes instance")
+- * val.data = <void *><char *>icc_blob
+- */
+- __pyx_t_1 = PyBytes_Check(__pyx_v_icc_blob);
+- __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
+- if (unlikely(__pyx_t_2)) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1017
+- *
+- * if not isinstance(icc_blob, bytes):
+- * raise PyMPVError("icc_blob should be a bytes instance") # <<<<<<<<<<<<<<
+- * val.data = <void *><char *>icc_blob
+- * val.size = len(icc_blob)
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_icc_blob_should_be_a_bytes_insta) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_icc_blob_should_be_a_bytes_insta);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(0, 1017, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1016
+- * int err
+- *
+- * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
+- * raise PyMPVError("icc_blob should be a bytes instance")
+- * val.data = <void *><char *>icc_blob
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1018
+- * if not isinstance(icc_blob, bytes):
+- * raise PyMPVError("icc_blob should be a bytes instance")
+- * val.data = <void *><char *>icc_blob # <<<<<<<<<<<<<<
+- * val.size = len(icc_blob)
+- *
+- */
+- __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
+- __pyx_v_val.data = ((void *)((char *)__pyx_t_6));
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1019
+- * raise PyMPVError("icc_blob should be a bytes instance")
+- * val.data = <void *><char *>icc_blob
+- * val.size = len(icc_blob) # <<<<<<<<<<<<<<
+- *
+- * param.type = MPV_RENDER_PARAM_ICC_PROFILE
++ * def close(self):
++ * if not self.inited: # <<<<<<<<<<<<<<
++ * return
++ * with nogil:
+ */
+- __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1019, __pyx_L1_error)
+- __pyx_v_val.size = __pyx_t_7;
++ __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1021
+- * val.size = len(icc_blob)
+- *
+- * param.type = MPV_RENDER_PARAM_ICC_PROFILE # <<<<<<<<<<<<<<
+- * param.data = &val
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1114
++ * def close(self):
++ * if not self.inited:
++ * return # <<<<<<<<<<<<<<
++ * with nogil:
++ * mpv_render_context_free(self._ctx)
+ */
+- __pyx_v_param.type = MPV_RENDER_PARAM_ICC_PROFILE;
++ __Pyx_XDECREF(__pyx_r);
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1022
+- *
+- * param.type = MPV_RENDER_PARAM_ICC_PROFILE
+- * param.data = &val # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1113
+ *
++ * def close(self):
++ * if not self.inited: # <<<<<<<<<<<<<<
++ * return
+ * with nogil:
+ */
+- __pyx_v_param.data = (&__pyx_v_val);
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1024
+- * param.data = &val
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1115
++ * if not self.inited:
++ * return
+ * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False
+ */
+ {
+ #ifdef WITH_THREAD
+@@ -19899,22 +19014,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1025
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1116
++ * return
+ * with nogil:
+- * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
+- * return err
++ * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
++ * self.inited = False
+ *
+ */
+- __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
++ mpv_render_context_free(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1024
+- * param.data = &val
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1115
++ * if not self.inited:
++ * return
+ * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+@@ -19928,1485 +19043,1505 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1026
++ /* "vidcutter/libs/pympv/mpv.pyx":1117
+ * with nogil:
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err # <<<<<<<<<<<<<<
++ * mpv_render_context_free(self._ctx)
++ * self.inited = False # <<<<<<<<<<<<<<
+ *
+- * @_errors
++ * def __dealloc__(self):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __pyx_v_self->inited = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1010
++ /* "vidcutter/libs/pympv/mpv.pyx":1112
++ * self.inited = False
+ *
+- * @_errors
+- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
++ * def close(self): # <<<<<<<<<<<<<<
++ * if not self.inited:
++ * return
+ */
+
+ /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_icc_profile", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1029
++/* "vidcutter/libs/pympv/mpv.pyx":1119
++ * self.inited = False
++ *
++ * def __dealloc__(self): # <<<<<<<<<<<<<<
++ * self.close()
+ *
+- * @_errors
+- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux) {
+- PyObject *__pyx_r = 0;
++static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self); /*proto*/
++static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_ambient_light (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_lux));
++ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
++ __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_lux) {
+- struct mpv_render_param __pyx_v_param;
+- int __pyx_v_val;
+- int __pyx_v_err;
+- PyObject *__pyx_r = NULL;
++static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
++ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set_ambient_light", 0);
++ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1035
+- * int err
++ /* "vidcutter/libs/pympv/mpv.pyx":1120
+ *
+- * val = lux # <<<<<<<<<<<<<<
+- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
+- * param.data = &val
++ * def __dealloc__(self):
++ * self.close() # <<<<<<<<<<<<<<
++ *
++ * cdef class OpenGLRenderContext(RenderContext):
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
+- __pyx_v_val = __pyx_t_1;
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1036
++ /* "vidcutter/libs/pympv/mpv.pyx":1119
++ * self.inited = False
+ *
+- * val = lux
+- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT # <<<<<<<<<<<<<<
+- * param.data = &val
++ * def __dealloc__(self): # <<<<<<<<<<<<<<
++ * self.close()
+ *
+ */
+- __pyx_v_param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1037
+- * val = lux
+- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
+- * param.data = &val # <<<<<<<<<<<<<<
+- *
+- * with nogil:
+- */
+- __pyx_v_param.data = (&__pyx_v_val);
++ /* function exit code */
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv.RenderContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __pyx_L0:;
++ __Pyx_RefNannyFinishContext();
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1039
+- * param.data = &val
+- *
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1040
+- *
+- * with nogil:
+- * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
+- * return err
+- *
+- */
+- __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
+- }
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1039
+- * param.data = &val
+- *
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1041
+- * with nogil:
+- * err = mpv_render_context_set_parameter(self._ctx, param)
+- * return err # <<<<<<<<<<<<<<
+- *
+- * def get_next_frame_info(self):
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_r = __pyx_t_2;
+- __pyx_t_2 = 0;
+- goto __pyx_L0;
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(1, 2, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1029
+- *
+- * @_errors
+- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_ambient_light", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+- __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1043
+- * return err
+- *
+- * def get_next_frame_info(self): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_frame_info info
++/* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("get_next_frame_info (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+- struct mpv_render_frame_info __pyx_v_info;
+- struct mpv_render_param __pyx_v_param;
+- int __pyx_v_err;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("get_next_frame_info", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1048
+- * mpv_render_param param
+- *
+- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO # <<<<<<<<<<<<<<
+- * param.data = &info
+- * with nogil:
+- */
+- __pyx_v_param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1049
+- *
+- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+- * param.data = &info # <<<<<<<<<<<<<<
+- * with nogil:
+- * err = mpv_render_context_get_info(self._ctx, param)
+- */
+- __pyx_v_param.data = (&__pyx_v_info);
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1050
+- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+- * param.data = &info
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_get_info(self._ctx, param)
+- * if err < 0:
++ /* "(tree fragment)":4
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(1, 4, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1051
+- * param.data = &info
+- * with nogil:
+- * err = mpv_render_context_get_info(self._ctx, param) # <<<<<<<<<<<<<<
+- * if err < 0:
+- * raise MPVError(err)
++ /* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+- __pyx_v_err = mpv_render_context_get_info(__pyx_v_self->_ctx, __pyx_v_param);
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1050
+- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+- * param.data = &info
+- * with nogil: # <<<<<<<<<<<<<<
+- * err = mpv_render_context_get_info(self._ctx, param)
+- * if err < 0:
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ /* function exit code */
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1052
+- * with nogil:
+- * err = mpv_render_context_get_info(self._ctx, param)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
++/* "vidcutter/libs/pympv/mpv.pyx":1123
+ *
++ * cdef class OpenGLRenderContext(RenderContext):
++ * def __init__(self, mpv, # <<<<<<<<<<<<<<
++ * get_proc_address,
++ * *args, **kwargs):
+ */
+- __pyx_t_1 = ((__pyx_v_err < 0) != 0);
+- if (unlikely(__pyx_t_1)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1053
+- * err = mpv_render_context_get_info(self._ctx, param)
+- * if err < 0:
+- * raise MPVError(err) # <<<<<<<<<<<<<<
+- *
+- * return RenderFrameInfo()._from_struct(&info)
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
++/* Python wrapper */
++static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_mpv = 0;
++ PyObject *__pyx_v_get_proc_address = 0;
++ PyObject *__pyx_v_args = 0;
++ PyObject *__pyx_v_kwargs = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
++ __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
++ __Pyx_GOTREF(__pyx_v_kwargs);
++ if (PyTuple_GET_SIZE(__pyx_args) > 2) {
++ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
++ if (unlikely(!__pyx_v_args)) {
++ __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
++ __Pyx_RefNannyFinishContext();
++ return -1;
+ }
+- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 1053, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_v_args);
++ } else {
++ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
++ }
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_get_proc_address,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ default:
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1123, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1123, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ }
++ __pyx_v_mpv = values[0];
++ __pyx_v_get_proc_address = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1123, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
++ __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return -1;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_get_proc_address, __pyx_v_args, __pyx_v_kwargs);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1052
+- * with nogil:
+- * err = mpv_render_context_get_info(self._ctx, param)
+- * if err < 0: # <<<<<<<<<<<<<<
+- * raise MPVError(err)
++ /* function exit code */
++ __Pyx_XDECREF(__pyx_v_args);
++ __Pyx_XDECREF(__pyx_v_kwargs);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_get_proc_address, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
++ PyObject *__pyx_v_init_params = NULL;
++ int __pyx_r;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__init__", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1127
++ * *args, **kwargs):
++ * init_params = {
++ * "get_proc_address": get_proc_address # <<<<<<<<<<<<<<
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
++ */
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1127, __pyx_L1_error)
++ __pyx_v_init_params = ((PyObject*)__pyx_t_1);
++ __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1129
++ * "get_proc_address": get_proc_address
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
++ * init_params, *args, **kwargs)
+ *
+ */
+- }
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1055
+- * raise MPVError(err)
++ /* "vidcutter/libs/pympv/mpv.pyx":1130
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
++ * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
+ *
+- * return RenderFrameInfo()._from_struct(&info) # <<<<<<<<<<<<<<
++ * class CallbackThread(Thread):
++ */
++ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_INCREF(((PyObject *)__pyx_v_self));
++ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
++ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
++ __Pyx_INCREF(__pyx_v_mpv);
++ __Pyx_GIVEREF(__pyx_v_mpv);
++ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_mpv);
++ __Pyx_GIVEREF(__pyx_t_2);
++ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
++ __Pyx_INCREF(__pyx_v_init_params);
++ __Pyx_GIVEREF(__pyx_v_init_params);
++ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_init_params);
++ __pyx_t_2 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1129
++ * "get_proc_address": get_proc_address
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
++ * init_params, *args, **kwargs)
+ *
+- * def set_update_callback(self, cb):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1130
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
++ * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
++ *
++ * class CallbackThread(Thread):
++ */
++ __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1129
++ * "get_proc_address": get_proc_address
++ * }
++ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
++ * init_params, *args, **kwargs)
++ *
++ */
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_r = __pyx_t_3;
+- __pyx_t_3 = 0;
+- goto __pyx_L0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1043
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":1123
+ *
+- * def get_next_frame_info(self): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_frame_info info
++ * cdef class OpenGLRenderContext(RenderContext):
++ * def __init__(self, mpv, # <<<<<<<<<<<<<<
++ * get_proc_address,
++ * *args, **kwargs):
+ */
+
+ /* function exit code */
++ __pyx_r = 0;
++ goto __pyx_L0;
+ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.get_next_frame_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = -1;
+ __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_XDECREF(__pyx_v_init_params);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1057
+- * return RenderFrameInfo()._from_struct(&info)
+- *
+- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++/* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_update_callback (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_cb));
++ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_cb) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set_update_callback", 0);
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1058
+- *
+- * def set_update_callback(self, cb):
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- * self.update_cb = cb
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(1, 2, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1059
+- * def set_update_callback(self, cb):
+- * with nogil:
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
+- * self.update_cb = cb
+- *
+- */
+- mpv_render_context_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1058
+- *
+- * def set_update_callback(self, cb):
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- * self.update_cb = cb
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1060
+- * with nogil:
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+- * self.update_cb = cb # <<<<<<<<<<<<<<
+- *
+- * def update(self):
+- */
+- __Pyx_INCREF(__pyx_v_cb);
+- __Pyx_GIVEREF(__pyx_v_cb);
+- __Pyx_GOTREF(__pyx_v_self->update_cb);
+- __Pyx_DECREF(__pyx_v_self->update_cb);
+- __pyx_v_self->update_cb = __pyx_v_cb;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1057
+- * return RenderFrameInfo()._from_struct(&info)
+- *
+- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++ /* "(tree fragment)":1
++ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1062
+- * self.update_cb = cb
+- *
+- * def update(self): # <<<<<<<<<<<<<<
+- * cdef uint64_t ret
+- * with nogil:
++/* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("update (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+- uint64_t __pyx_v_ret;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("update", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1064
+- * def update(self):
+- * cdef uint64_t ret
+- * with nogil: # <<<<<<<<<<<<<<
+- * ret = mpv_render_context_update(self._ctx)
+- * return ret
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1065
+- * cdef uint64_t ret
+- * with nogil:
+- * ret = mpv_render_context_update(self._ctx) # <<<<<<<<<<<<<<
+- * return ret
+- *
+- */
+- __pyx_v_ret = mpv_render_context_update(__pyx_v_self->_ctx);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1064
+- * def update(self):
+- * cdef uint64_t ret
+- * with nogil: # <<<<<<<<<<<<<<
+- * ret = mpv_render_context_update(self._ctx)
+- * return ret
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
+- }
+- __pyx_L5:;
+- }
+- }
++ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1066
+- * with nogil:
+- * ret = mpv_render_context_update(self._ctx)
+- * return ret # <<<<<<<<<<<<<<
+- *
+- * @_errors
++ /* "(tree fragment)":4
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __PYX_ERR(1, 4, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1062
+- * self.update_cb = cb
+- *
+- * def update(self): # <<<<<<<<<<<<<<
+- * cdef uint64_t ret
+- * with nogil:
++ /* "(tree fragment)":3
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+- __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1069
++/* "vidcutter/libs/pympv/mpv.pyx":1133
+ *
+- * @_errors
+- * def render(self, # <<<<<<<<<<<<<<
+- * opengl_fbo=None,
+- * flip_y=False,
++ * class CallbackThread(Thread):
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * Thread.__init__(self)
++ * self.daemon = True
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_opengl_fbo = 0;
+- PyObject *__pyx_v_flip_y = 0;
+- PyObject *__pyx_v_depth = 0;
+- PyObject *__pyx_v_block_for_target_time = 0;
+- PyObject *__pyx_v_skip_rendering = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__ = {"__init__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("render (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_opengl_fbo,&__pyx_n_s_flip_y,&__pyx_n_s_depth,&__pyx_n_s_block_for_target_time,&__pyx_n_s_skip_rendering,0};
+- PyObject* values[5] = {0,0,0,0,0};
++ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1070
+- * @_errors
+- * def render(self,
+- * opengl_fbo=None, # <<<<<<<<<<<<<<
+- * flip_y=False,
+- * depth=None,
+- */
+- values[0] = ((PyObject *)Py_None);
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1071
+- * def render(self,
+- * opengl_fbo=None,
+- * flip_y=False, # <<<<<<<<<<<<<<
+- * depth=None,
+- * block_for_target_time=True,
+- */
+- values[1] = ((PyObject *)Py_False);
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1072
+- * opengl_fbo=None,
+- * flip_y=False,
+- * depth=None, # <<<<<<<<<<<<<<
+- * block_for_target_time=True,
+- * skip_rendering=False):
++ /* "vidcutter/libs/pympv/mpv.pyx":1134
++ * class CallbackThread(Thread):
++ * def __init__(self):
++ * Thread.__init__(self) # <<<<<<<<<<<<<<
++ * self.daemon = True
++ * self.lock = Semaphore()
+ */
+- values[2] = ((PyObject *)Py_None);
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_2)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_2);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self);
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1073
+- * flip_y=False,
+- * depth=None,
+- * block_for_target_time=True, # <<<<<<<<<<<<<<
+- * skip_rendering=False):
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1135
++ * def __init__(self):
++ * Thread.__init__(self)
++ * self.daemon = True # <<<<<<<<<<<<<<
++ * self.lock = Semaphore()
++ * self.lock.acquire(True)
+ */
+- values[3] = ((PyObject *)Py_True);
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1074
+- * depth=None,
+- * block_for_target_time=True,
+- * skip_rendering=False): # <<<<<<<<<<<<<<
+- *
+- * cdef:
++ /* "vidcutter/libs/pympv/mpv.pyx":1136
++ * Thread.__init__(self)
++ * self.daemon = True
++ * self.lock = Semaphore() # <<<<<<<<<<<<<<
++ * self.lock.acquire(True)
++ * self.callback = None
+ */
+- values[4] = ((PyObject *)Py_False);
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+- CYTHON_FALLTHROUGH;
+- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+- CYTHON_FALLTHROUGH;
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_fbo);
+- if (value) { values[0] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flip_y);
+- if (value) { values[1] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_depth);
+- if (value) { values[2] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 3:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_block_for_target_time);
+- if (value) { values[3] = value; kw_args--; }
+- }
+- CYTHON_FALLTHROUGH;
+- case 4:
+- if (kw_args > 0) {
+- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_rendering);
+- if (value) { values[4] = value; kw_args--; }
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1069, __pyx_L3_error)
+- }
+- } else {
+- switch (PyTuple_GET_SIZE(__pyx_args)) {
+- case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+- CYTHON_FALLTHROUGH;
+- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+- CYTHON_FALLTHROUGH;
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_2)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_2);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+- __pyx_v_opengl_fbo = values[0];
+- __pyx_v_flip_y = values[1];
+- __pyx_v_depth = values[2];
+- __pyx_v_block_for_target_time = values[3];
+- __pyx_v_skip_rendering = values[4];
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1069, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1137
++ * self.daemon = True
++ * self.lock = Semaphore()
++ * self.lock.acquire(True) # <<<<<<<<<<<<<<
++ * self.callback = None
++ * self.isshutdown = False
++ */
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_True);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1138
++ * self.lock = Semaphore()
++ * self.lock.acquire(True)
++ * self.callback = None # <<<<<<<<<<<<<<
++ * self.isshutdown = False
++ *
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1139
++ * self.lock.acquire(True)
++ * self.callback = None
++ * self.isshutdown = False # <<<<<<<<<<<<<<
++ *
++ * def shutdown(self):
++ */
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1133
++ *
++ * class CallbackThread(Thread):
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * Thread.__init__(self)
++ * self.daemon = True
++ */
++
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_opengl_fbo, __pyx_v_flip_y, __pyx_v_depth, __pyx_v_block_for_target_time, __pyx_v_skip_rendering);
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
++/* "vidcutter/libs/pympv/mpv.pyx":1141
++ * self.isshutdown = False
+ *
+- * @_errors
+- * def render(self, # <<<<<<<<<<<<<<
+- * opengl_fbo=None,
+- * flip_y=False,
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * self.isshutdown = True
++ * self.callback = None
+ */
+
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown = {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(__pyx_self, ((PyObject *)__pyx_v_self));
++
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_opengl_fbo, PyObject *__pyx_v_flip_y, PyObject *__pyx_v_depth, PyObject *__pyx_v_block_for_target_time, PyObject *__pyx_v_skip_rendering) {
+- struct mpv_opengl_fbo __pyx_v_fbo;
+- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_params = NULL;
+- int __pyx_v_ret;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- int __pyx_t_6;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("render", 0);
++ __Pyx_RefNannySetupContext("shutdown", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1079
+- * mpv_opengl_fbo fbo
+- *
+- * params = _RenderParams() # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1142
+ *
+- * if opengl_fbo:
++ * def shutdown(self):
++ * self.isshutdown = True # <<<<<<<<<<<<<<
++ * self.callback = None
++ * self.lock.release()
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
+- __pyx_t_1 = 0;
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1081
+- * params = _RenderParams()
++ /* "vidcutter/libs/pympv/mpv.pyx":1143
++ * def shutdown(self):
++ * self.isshutdown = True
++ * self.callback = None # <<<<<<<<<<<<<<
++ * self.lock.release()
+ *
+- * if opengl_fbo: # <<<<<<<<<<<<<<
+- * memset(&fbo, 0, sizeof(fbo))
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
+- if (__pyx_t_2) {
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1082
++ /* "vidcutter/libs/pympv/mpv.pyx":1144
++ * self.isshutdown = True
++ * self.callback = None
++ * self.lock.release() # <<<<<<<<<<<<<<
+ *
+- * if opengl_fbo:
+- * memset(&fbo, 0, sizeof(fbo)) # <<<<<<<<<<<<<<
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+- * fbo.w = opengl_fbo["w"]
+- */
+- (void)(memset((&__pyx_v_fbo), 0, (sizeof(__pyx_v_fbo))));
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1083
+- * if opengl_fbo:
+- * memset(&fbo, 0, sizeof(fbo))
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
+- * fbo.w = opengl_fbo["w"]
+- * fbo.h = opengl_fbo["h"]
++ * def call(self):
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
+- if (!__pyx_t_2) {
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- } else {
+- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error)
+- __pyx_t_3 = __pyx_t_5;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- goto __pyx_L4_bool_binop_done;
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_2)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_2);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+- __pyx_t_3 = 0;
+- __pyx_L4_bool_binop_done:;
+- __pyx_v_fbo.fbo = __pyx_t_3;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1084
+- * memset(&fbo, 0, sizeof(fbo))
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+- * fbo.w = opengl_fbo["w"] # <<<<<<<<<<<<<<
+- * fbo.h = opengl_fbo["h"]
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+- */
+- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_v_fbo.w = __pyx_t_3;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1085
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+- * fbo.w = opengl_fbo["w"]
+- * fbo.h = opengl_fbo["h"] # <<<<<<<<<<<<<<
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- */
+- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_v_fbo.h = __pyx_t_3;
++ }
++ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1086
+- * fbo.w = opengl_fbo["w"]
+- * fbo.h = opengl_fbo["h"]
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- * if flip_y:
++ /* "vidcutter/libs/pympv/mpv.pyx":1141
++ * self.isshutdown = False
++ *
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * self.isshutdown = True
++ * self.callback = None
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error)
+- if (!__pyx_t_2) {
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- } else {
+- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
+- __pyx_t_3 = __pyx_t_5;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- goto __pyx_L6_bool_binop_done;
+- }
+- __pyx_t_3 = 0;
+- __pyx_L6_bool_binop_done:;
+- __pyx_v_fbo.internal_format = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1087
+- * fbo.h = opengl_fbo["h"]
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo) # <<<<<<<<<<<<<<
+- * if flip_y:
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1081
+- * params = _RenderParams()
++/* "vidcutter/libs/pympv/mpv.pyx":1146
++ * self.lock.release()
++ *
++ * def call(self): # <<<<<<<<<<<<<<
++ * self.lock.release()
+ *
+- * if opengl_fbo: # <<<<<<<<<<<<<<
+- * memset(&fbo, 0, sizeof(fbo))
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ */
+- }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1088
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- * if flip_y: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- * if depth is not None:
+- */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
+- if (__pyx_t_2) {
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call = {"call", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("call (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(__pyx_self, ((PyObject *)__pyx_v_self));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1089
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- * if flip_y:
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1) # <<<<<<<<<<<<<<
+- * if depth is not None:
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1088
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- * if flip_y: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- * if depth is not None:
+- */
+- }
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("call", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1090
+- * if flip_y:
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- * if depth is not None: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- * if not block_for_target_time:
++ /* "vidcutter/libs/pympv/mpv.pyx":1147
++ *
++ * def call(self):
++ * self.lock.release() # <<<<<<<<<<<<<<
++ *
++ * def set(self, callback):
+ */
+- __pyx_t_2 = (__pyx_v_depth != Py_None);
+- __pyx_t_6 = (__pyx_t_2 != 0);
+- if (__pyx_t_6) {
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
++ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
++ if (likely(__pyx_t_2)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_2);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_3, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1091
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- * if depth is not None:
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth) # <<<<<<<<<<<<<<
+- * if not block_for_target_time:
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
++ /* "vidcutter/libs/pympv/mpv.pyx":1146
++ * self.lock.release()
++ *
++ * def call(self): # <<<<<<<<<<<<<<
++ * self.lock.release()
++ *
+ */
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1090
+- * if flip_y:
+- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+- * if depth is not None: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- * if not block_for_target_time:
+- */
+- }
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.call", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1092
+- * if depth is not None:
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- * if not block_for_target_time: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+- * if skip_rendering:
++/* "vidcutter/libs/pympv/mpv.pyx":1149
++ * self.lock.release()
++ *
++ * def set(self, callback): # <<<<<<<<<<<<<<
++ * self.callback = callback
++ *
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
+- __pyx_t_2 = ((!__pyx_t_6) != 0);
+- if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1093
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- * if not block_for_target_time:
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0) # <<<<<<<<<<<<<<
+- * if skip_rendering:
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+- */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1092
+- * if depth is not None:
+- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+- * if not block_for_target_time: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+- * if skip_rendering:
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1094
+- * if not block_for_target_time:
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+- * if skip_rendering: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+- *
+- */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
+- if (__pyx_t_2) {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1095
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+- * if skip_rendering:
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1) # <<<<<<<<<<<<<<
+- *
+- * with nogil:
+- */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1094
+- * if not block_for_target_time:
+- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+- * if skip_rendering: # <<<<<<<<<<<<<<
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+- *
+- */
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1097
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+- *
+- * with nogil: # <<<<<<<<<<<<<<
+- * ret = mpv_render_context_render(self._ctx, params.params)
+- * return ret
+- */
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set = {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v_self = 0;
++ PyObject *__pyx_v_callback = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("set (wrapper)", 0);
+ {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1098
+- *
+- * with nogil:
+- * ret = mpv_render_context_render(self._ctx, params.params) # <<<<<<<<<<<<<<
+- * return ret
+- *
+- */
+- __pyx_v_ret = mpv_render_context_render(__pyx_v_self->_ctx, __pyx_v_params->params);
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
+ }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1097
+- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+- *
+- * with nogil: # <<<<<<<<<<<<<<
+- * ret = mpv_render_context_render(self._ctx, params.params)
+- * return ret
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L14;
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1149, __pyx_L3_error)
+ }
+- __pyx_L14:;
+ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1149, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ }
++ __pyx_v_self = values[0];
++ __pyx_v_callback = values[1];
+ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1149, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(__pyx_self, __pyx_v_self, __pyx_v_callback);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1099
+- * with nogil:
+- * ret = mpv_render_context_render(self._ctx, params.params)
+- * return ret # <<<<<<<<<<<<<<
++ /* function exit code */
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("set", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1150
+ *
+- * def report_swap(self):
++ * def set(self, callback):
++ * self.callback = callback # <<<<<<<<<<<<<<
++ *
++ * def run(self):
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_r = __pyx_t_1;
+- __pyx_t_1 = 0;
+- goto __pyx_L0;
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
++ /* "vidcutter/libs/pympv/mpv.pyx":1149
++ * self.lock.release()
++ *
++ * def set(self, callback): # <<<<<<<<<<<<<<
++ * self.callback = callback
+ *
+- * @_errors
+- * def render(self, # <<<<<<<<<<<<<<
+- * opengl_fbo=None,
+- * flip_y=False,
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF((PyObject *)__pyx_v_params);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1101
+- * return ret
++/* "vidcutter/libs/pympv/mpv.pyx":1152
++ * self.callback = callback
+ *
+- * def report_swap(self): # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_report_swap(self._ctx)
++ * def run(self): # <<<<<<<<<<<<<<
++ * while not self.isshutdown:
++ * self.lock.acquire(True)
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run = {"run", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run, METH_O, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("report_swap (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("run (wrapper)", 0);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("report_swap", 0);
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("run", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1102
+- *
+- * def report_swap(self):
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_report_swap(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":1153
+ *
++ * def run(self):
++ * while not self.isshutdown: # <<<<<<<<<<<<<<
++ * self.lock.acquire(True)
++ * self.mpv_callback(self.callback) if self.callback else None
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ while (1) {
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_3 = ((!__pyx_t_2) != 0);
++ if (!__pyx_t_3) break;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1103
+- * def report_swap(self):
+- * with nogil:
+- * mpv_render_context_report_swap(self._ctx) # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1154
++ * def run(self):
++ * while not self.isshutdown:
++ * self.lock.acquire(True) # <<<<<<<<<<<<<<
++ * self.mpv_callback(self.callback) if self.callback else None
+ *
+- * def free(self):
+ */
+- mpv_render_context_report_swap(__pyx_v_self->_ctx);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1102
+- *
+- * def report_swap(self):
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_report_swap(self._ctx)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_True);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1155
++ * while not self.isshutdown:
++ * self.lock.acquire(True)
++ * self.mpv_callback(self.callback) if self.callback else None # <<<<<<<<<<<<<<
+ *
++ * def mpv_callback(self, callback):
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L5;
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ if (__pyx_t_3) {
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
++ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
++ if (likely(__pyx_t_7)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
++ __Pyx_INCREF(__pyx_t_7);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+- __pyx_L5:;
+ }
++ __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_1 = __pyx_t_5;
++ __pyx_t_5 = 0;
++ } else {
++ __Pyx_INCREF(Py_None);
++ __pyx_t_1 = Py_None;
++ }
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1101
+- * return ret
++ /* "vidcutter/libs/pympv/mpv.pyx":1152
++ * self.callback = callback
+ *
+- * def report_swap(self): # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_report_swap(self._ctx)
++ * def run(self): # <<<<<<<<<<<<<<
++ * while not self.isshutdown:
++ * self.lock.acquire(True)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
++ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1105
+- * mpv_render_context_report_swap(self._ctx)
++/* "vidcutter/libs/pympv/mpv.pyx":1157
++ * self.mpv_callback(self.callback) if self.callback else None
+ *
+- * def free(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
++ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
++ * try:
++ * callback()
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback = {"mpv_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
++ PyObject *__pyx_v_callback = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("free (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("mpv_callback (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
++ PyObject* values[2] = {0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1157, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ }
++ __pyx_v_self = values[0];
++ __pyx_v_callback = values[1];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1157, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(__pyx_self, __pyx_v_self, __pyx_v_callback);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
++ PyObject *__pyx_v_e = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- __Pyx_RefNannySetupContext("free", 0);
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ int __pyx_t_7;
++ PyObject *__pyx_t_8 = NULL;
++ PyObject *__pyx_t_9 = NULL;
++ PyObject *__pyx_t_10 = NULL;
++ PyObject *__pyx_t_11 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("mpv_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1106
++ /* "vidcutter/libs/pympv/mpv.pyx":1158
+ *
+- * def free(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ * def mpv_callback(self, callback):
++ * try: # <<<<<<<<<<<<<<
++ * callback()
++ * except Exception as e:
+ */
+- __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
+- if (__pyx_t_1) {
++ {
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
++ __Pyx_XGOTREF(__pyx_t_1);
++ __Pyx_XGOTREF(__pyx_t_2);
++ __Pyx_XGOTREF(__pyx_t_3);
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1107
+- * def free(self):
+- * if not self.inited:
+- * return # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_free(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":1159
++ * def mpv_callback(self, callback):
++ * try:
++ * callback() # <<<<<<<<<<<<<<
++ * except Exception as e:
++ * sys.stderr.write("pympv error during callback: %s\n" % e)
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
++ __Pyx_INCREF(__pyx_v_callback);
++ __pyx_t_5 = __pyx_v_callback; __pyx_t_6 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
++ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
++ if (likely(__pyx_t_6)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
++ __Pyx_INCREF(__pyx_t_6);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_5, function);
++ }
++ }
++ __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L3_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1106
++ /* "vidcutter/libs/pympv/mpv.pyx":1158
+ *
+- * def free(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ * def mpv_callback(self, callback):
++ * try: # <<<<<<<<<<<<<<
++ * callback()
++ * except Exception as e:
+ */
+- }
++ }
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ goto __pyx_L8_try_end;
++ __pyx_L3_error:;
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1108
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1109
+- * return
+- * with nogil:
+- * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
+- * self.inited = False
++ /* "vidcutter/libs/pympv/mpv.pyx":1160
++ * try:
++ * callback()
++ * except Exception as e: # <<<<<<<<<<<<<<
++ * sys.stderr.write("pympv error during callback: %s\n" % e)
+ *
+ */
+- mpv_render_context_free(__pyx_v_self->_ctx);
+- }
++ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ if (__pyx_t_7) {
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1160, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_5);
++ __pyx_v_e = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1108
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False
++ /* "vidcutter/libs/pympv/mpv.pyx":1161
++ * callback()
++ * except Exception as e:
++ * sys.stderr.write("pympv error during callback: %s\n" % e) # <<<<<<<<<<<<<<
++ *
++ * cdef void _c_callback(void* d) with gil:
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
++ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_9);
++ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_10);
++ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_9);
++ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
++ __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_10);
++ __pyx_t_11 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
++ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
++ if (likely(__pyx_t_11)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
++ __Pyx_INCREF(__pyx_t_11);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+- __pyx_L6:;
+ }
+- }
++ __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
++ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
++ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
++ if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GOTREF(__pyx_t_8);
++ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
++ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ goto __pyx_L4_exception_handled;
++ }
++ goto __pyx_L5_except_error;
++ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1110
+- * with nogil:
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":1158
+ *
+- * def close(self):
++ * def mpv_callback(self, callback):
++ * try: # <<<<<<<<<<<<<<
++ * callback()
++ * except Exception as e:
+ */
+- __pyx_v_self->inited = 0;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ goto __pyx_L1_error;
++ __pyx_L4_exception_handled:;
++ __Pyx_XGIVEREF(__pyx_t_1);
++ __Pyx_XGIVEREF(__pyx_t_2);
++ __Pyx_XGIVEREF(__pyx_t_3);
++ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
++ __pyx_L8_try_end:;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1105
+- * mpv_render_context_report_swap(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":1157
++ * self.mpv_callback(self.callback) if self.callback else None
+ *
+- * def free(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
++ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
++ * try:
++ * callback()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_XDECREF(__pyx_t_9);
++ __Pyx_XDECREF(__pyx_t_10);
++ __Pyx_XDECREF(__pyx_t_11);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_e);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1112
+- * self.inited = False
++/* "vidcutter/libs/pympv/mpv.pyx":1163
++ * sys.stderr.write("pympv error during callback: %s\n" % e)
+ *
+- * def close(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
++ * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
++ * cdef uint64_t name = <uint64_t>d
++ * callback = _callbacks.get(name)
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("close (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
++static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
++ uint64_t __pyx_v_name;
++ PyObject *__pyx_v_callback = NULL;
+ __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- __Pyx_RefNannySetupContext("close", 0);
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ #ifdef WITH_THREAD
++ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
++ #endif
++ __Pyx_RefNannySetupContext("_c_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1113
++ /* "vidcutter/libs/pympv/mpv.pyx":1164
+ *
+- * def close(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ * cdef void _c_callback(void* d) with gil:
++ * cdef uint64_t name = <uint64_t>d # <<<<<<<<<<<<<<
++ * callback = _callbacks.get(name)
++ * callback.call()
+ */
+- __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
+- if (__pyx_t_1) {
++ __pyx_v_name = ((uint64_t)__pyx_v_d);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1114
+- * def close(self):
+- * if not self.inited:
+- * return # <<<<<<<<<<<<<<
+- * with nogil:
+- * mpv_render_context_free(self._ctx)
++ /* "vidcutter/libs/pympv/mpv.pyx":1165
++ * cdef void _c_callback(void* d) with gil:
++ * cdef uint64_t name = <uint64_t>d
++ * callback = _callbacks.get(name) # <<<<<<<<<<<<<<
++ * callback.call()
+ */
+- __Pyx_XDECREF(__pyx_r);
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v_callback = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1113
+- *
+- * def close(self):
+- * if not self.inited: # <<<<<<<<<<<<<<
+- * return
+- * with nogil:
++ /* "vidcutter/libs/pympv/mpv.pyx":1166
++ * cdef uint64_t name = <uint64_t>d
++ * callback = _callbacks.get(name)
++ * callback.call() # <<<<<<<<<<<<<<
+ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_3 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_3)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
+ }
++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1115
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False
+- */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1116
+- * return
+- * with nogil:
+- * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
+- * self.inited = False
+- *
+- */
+- mpv_render_context_free(__pyx_v_self->_ctx);
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1115
+- * if not self.inited:
+- * return
+- * with nogil: # <<<<<<<<<<<<<<
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False
+- */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L6;
+- }
+- __pyx_L6:;
+- }
+- }
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1117
+- * with nogil:
+- * mpv_render_context_free(self._ctx)
+- * self.inited = False # <<<<<<<<<<<<<<
+- *
+- * def __dealloc__(self):
+- */
+- __pyx_v_self->inited = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1112
+- * self.inited = False
+- *
+- * def close(self): # <<<<<<<<<<<<<<
+- * if not self.inited:
+- * return
+- */
+-
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":1119
+- * self.inited = False
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.close()
+- *
+- */
+-
+-/* Python wrapper */
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self); /*proto*/
+-static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+- __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+-}
+-
+-static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__dealloc__", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1120
+- *
+- * def __dealloc__(self):
+- * self.close() # <<<<<<<<<<<<<<
+- *
+- * cdef class OpenGLRenderContext(RenderContext):
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1119
+- * self.inited = False
+- *
+- * def __dealloc__(self): # <<<<<<<<<<<<<<
+- * self.close()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":1163
++ * sys.stderr.write("pympv error during callback: %s\n" % e)
++ *
++ * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
++ * cdef uint64_t name = <uint64_t>d
++ * callback = _callbacks.get(name)
+ */
+
+ /* function exit code */
+@@ -21415,774 +20550,1244 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv.RenderContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v_callback);
+ __Pyx_RefNannyFinishContext();
++ #ifdef WITH_THREAD
++ __Pyx_PyGILState_Release(__pyx_gilstate_save);
++ #endif
+ }
+
+ /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached = {"__pyx_unpickle_EndOfFileReached", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v___pyx_type = 0;
++ long __pyx_v___pyx_checksum;
++ PyObject *__pyx_v___pyx_state = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
++ PyObject* values[3] = {0,0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_EndOfFileReached") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ }
++ __pyx_v___pyx_type = values[0];
++ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_v___pyx_state = values[2];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_v___pyx_PickleError = 0;
++ PyObject *__pyx_v___pyx_result = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached", 0);
+
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 2, __pyx_L1_error)
++ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x56be9b6) != 0);
++ if (__pyx_t_1) {
+
+- /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ /* "(tree fragment)":5
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x56be9b6:
++ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+ */
++ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_n_s_PickleError);
++ __Pyx_GIVEREF(__pyx_n_s_PickleError);
++ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
++ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_2);
++ __pyx_v___pyx_PickleError = __pyx_t_2;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "(tree fragment)":6
++ * if __pyx_checksum != 0x56be9b6:
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum) # <<<<<<<<<<<<<<
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
++ * if __pyx_state is not None:
+ */
++ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_INCREF(__pyx_v___pyx_PickleError);
++ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(1, 6, __pyx_L1_error)
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
++ */
++ }
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
++ /* "(tree fragment)":7
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type) # <<<<<<<<<<<<<<
++ * if __pyx_state is not None:
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v___pyx_result = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
++ __pyx_t_6 = (__pyx_t_1 != 0);
++ if (__pyx_t_6) {
+
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ /* "(tree fragment)":9
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
++ * return __pyx_result
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 4, __pyx_L1_error)
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
++ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
++ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ }
++
++ /* "(tree fragment)":10
++ * if __pyx_state is not None:
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result # <<<<<<<<<<<<<<
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v___pyx_result);
++ __pyx_r = __pyx_v___pyx_result;
++ goto __pyx_L0;
++
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
++ __Pyx_XDECREF(__pyx_v___pyx_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1123
+- *
+- * cdef class OpenGLRenderContext(RenderContext):
+- * def __init__(self, mpv, # <<<<<<<<<<<<<<
+- * get_proc_address,
+- * *args, **kwargs):
++/* "(tree fragment)":11
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+ */
+
+-/* Python wrapper */
+-static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_mpv = 0;
+- PyObject *__pyx_v_get_proc_address = 0;
+- PyObject *__pyx_v_args = 0;
+- PyObject *__pyx_v_kwargs = 0;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = NULL;
++ __Pyx_RefNannyDeclarations
++ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ Py_ssize_t __pyx_t_3;
++ int __pyx_t_4;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- int __pyx_r;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
+- __Pyx_GOTREF(__pyx_v_kwargs);
+- if (PyTuple_GET_SIZE(__pyx_args) > 2) {
+- __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
+- if (unlikely(!__pyx_v_args)) {
+- __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+- __Pyx_RefNannyFinishContext();
+- return -1;
+- }
+- __Pyx_GOTREF(__pyx_v_args);
+- } else {
+- __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached__set_state", 0);
++
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1] # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[2])
++ */
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
+ }
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_get_proc_address,0};
+- PyObject* values[2] = {0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- default:
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1123, __pyx_L3_error)
+- }
+- }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->error);
++ __Pyx_DECREF(__pyx_v___pyx_result->error);
++ __pyx_v___pyx_result->error = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->reason);
++ __Pyx_DECREF(__pyx_v___pyx_result->reason);
++ __pyx_v___pyx_result->reason = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[2])
++ */
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
++ __PYX_ERR(1, 13, __pyx_L1_error)
++ }
++ __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
++ if (__pyx_t_4) {
++ } else {
++ __pyx_t_2 = __pyx_t_4;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_5 = (__pyx_t_4 != 0);
++ __pyx_t_2 = __pyx_t_5;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_2) {
++
++ /* "(tree fragment)":14
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
++ */
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 14, __pyx_L1_error)
++ }
++ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[2])
++ */
++ }
++
++ /* "(tree fragment)":11
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ */
++
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
++ __pyx_L0:;
++ __Pyx_XGIVEREF(__pyx_r);
++ __Pyx_RefNannyFinishContext();
++ return __pyx_r;
++}
++
++/* "(tree fragment)":1
++ * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++
++/* Python wrapper */
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage = {"__pyx_unpickle_LogMessage", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v___pyx_type = 0;
++ long __pyx_v___pyx_checksum;
++ PyObject *__pyx_v___pyx_state = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ PyObject *__pyx_r = 0;
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
++ PyObject* values[3] = {0,0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ }
+ if (unlikely(kw_args > 0)) {
+- const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1123, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_LogMessage") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+ }
+- } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+- __pyx_v_mpv = values[0];
+- __pyx_v_get_proc_address = values[1];
++ __pyx_v___pyx_type = values[0];
++ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_v___pyx_state = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1123, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+- __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+- return -1;
++ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_get_proc_address, __pyx_v_args, __pyx_v_kwargs);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_LogMessage(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+
+ /* function exit code */
+- __Pyx_XDECREF(__pyx_v_args);
+- __Pyx_XDECREF(__pyx_v_kwargs);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_get_proc_address, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
+- PyObject *__pyx_v_init_params = NULL;
+- int __pyx_r;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_v___pyx_PickleError = 0;
++ PyObject *__pyx_v___pyx_result = 0;
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1127
+- * *args, **kwargs):
+- * init_params = {
+- * "get_proc_address": get_proc_address # <<<<<<<<<<<<<<
+- * }
+- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1127, __pyx_L1_error)
+- __pyx_v_init_params = ((PyObject*)__pyx_t_1);
+- __pyx_t_1 = 0;
++ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x8774fae) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1129
+- * "get_proc_address": get_proc_address
+- * }
+- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
+- * init_params, *args, **kwargs)
+- *
++ /* "(tree fragment)":5
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x8774fae:
++ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
++ * __pyx_result = LogMessage.__new__(__pyx_type)
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_n_s_PickleError);
++ __Pyx_GIVEREF(__pyx_n_s_PickleError);
++ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
++ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_2);
++ __pyx_v___pyx_PickleError = __pyx_t_2;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1130
+- * }
+- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
+- * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
+- *
+- * class CallbackThread(Thread):
++ /* "(tree fragment)":6
++ * if __pyx_checksum != 0x8774fae:
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum) # <<<<<<<<<<<<<<
++ * __pyx_result = LogMessage.__new__(__pyx_type)
++ * if __pyx_state is not None:
+ */
+- __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_INCREF(((PyObject *)__pyx_v_self));
+- __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+- PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
+- __Pyx_INCREF(__pyx_v_mpv);
+- __Pyx_GIVEREF(__pyx_v_mpv);
+- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_mpv);
+- __Pyx_GIVEREF(__pyx_t_2);
+- PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
+- __Pyx_INCREF(__pyx_v_init_params);
+- __Pyx_GIVEREF(__pyx_v_init_params);
+- PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_init_params);
+- __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_INCREF(__pyx_v___pyx_PickleError);
++ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(1, 6, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1129
+- * "get_proc_address": get_proc_address
+- * }
+- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
+- * init_params, *args, **kwargs)
+- *
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+ */
+- __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1130
+- * }
+- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
+- * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
+- *
+- * class CallbackThread(Thread):
++ /* "(tree fragment)":7
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
++ * __pyx_result = LogMessage.__new__(__pyx_type) # <<<<<<<<<<<<<<
++ * if __pyx_state is not None:
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+ */
+- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __pyx_v___pyx_result = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1123
+- *
+- * cdef class OpenGLRenderContext(RenderContext):
+- * def __init__(self, mpv, # <<<<<<<<<<<<<<
+- * get_proc_address,
+- * *args, **kwargs):
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
++ * __pyx_result = LogMessage.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
++ * return __pyx_result
+ */
++ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
++ __pyx_t_6 = (__pyx_t_1 != 0);
++ if (__pyx_t_6) {
+
+- /* function exit code */
+- __pyx_r = 0;
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = -1;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_init_params);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ /* "(tree fragment)":9
++ * __pyx_result = LogMessage.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
++ * return __pyx_result
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+ */
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
++ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
++ * __pyx_result = LogMessage.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ }
+
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ /* "(tree fragment)":10
++ * if __pyx_state is not None:
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
++ * return __pyx_result # <<<<<<<<<<<<<<
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v___pyx_result);
++ __pyx_r = __pyx_v___pyx_result;
++ goto __pyx_L0;
+
+ /* "(tree fragment)":1
+- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
++ * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
++ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
++ __Pyx_XDECREF(__pyx_v___pyx_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++/* "(tree fragment)":11
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_2;
++ Py_ssize_t __pyx_t_3;
++ int __pyx_t_4;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage__set_state", 0);
+
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3] # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[4])
+ */
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(1, 4, __pyx_L1_error)
+-
+- /* "(tree fragment)":3
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->level);
++ __Pyx_DECREF(__pyx_v___pyx_result->level);
++ __pyx_v___pyx_result->level = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->log_level);
++ __Pyx_DECREF(__pyx_v___pyx_result->log_level);
++ __pyx_v___pyx_result->log_level = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->prefix);
++ __Pyx_DECREF(__pyx_v___pyx_result->prefix);
++ __pyx_v___pyx_result->prefix = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->text);
++ __Pyx_DECREF(__pyx_v___pyx_result->text);
++ __pyx_v___pyx_result->text = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[4])
++ */
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
++ __PYX_ERR(1, 13, __pyx_L1_error)
++ }
++ __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_4 = ((__pyx_t_3 > 4) != 0);
++ if (__pyx_t_4) {
++ } else {
++ __pyx_t_2 = __pyx_t_4;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_5 = (__pyx_t_4 != 0);
++ __pyx_t_2 = __pyx_t_5;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_2) {
++
++ /* "(tree fragment)":14
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
++ */
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 14, __pyx_L1_error)
++ }
++ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[4])
++ */
++ }
++
++ /* "(tree fragment)":11
++ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ */
++
++ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
++ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1133
+- *
+- * class CallbackThread(Thread):
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * Thread.__init__(self)
+- * self.daemon = True
++/* "(tree fragment)":1
++ * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__ = {"__init__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property = {"__pyx_unpickle_Property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v___pyx_type = 0;
++ long __pyx_v___pyx_checksum;
++ PyObject *__pyx_v___pyx_state = 0;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(__pyx_self, ((PyObject *)__pyx_v_self));
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Property (wrapper)", 0);
++ {
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
++ PyObject* values[3] = {0,0,0};
++ if (unlikely(__pyx_kwds)) {
++ Py_ssize_t kw_args;
++ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
++ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
++ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ CYTHON_FALLTHROUGH;
++ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ CYTHON_FALLTHROUGH;
++ case 0: break;
++ default: goto __pyx_L5_argtuple_error;
++ }
++ kw_args = PyDict_Size(__pyx_kwds);
++ switch (pos_args) {
++ case 0:
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
++ else goto __pyx_L5_argtuple_error;
++ CYTHON_FALLTHROUGH;
++ case 1:
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ }
++ if (unlikely(kw_args > 0)) {
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Property") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
++ goto __pyx_L5_argtuple_error;
++ } else {
++ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
++ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ }
++ __pyx_v___pyx_type = values[0];
++ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_v___pyx_state = values[2];
++ }
++ goto __pyx_L4_argument_unpacking_done;
++ __pyx_L5_argtuple_error:;
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_L3_error:;
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_RefNannyFinishContext();
++ return NULL;
++ __pyx_L4_argument_unpacking_done:;
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_Property(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_v___pyx_PickleError = 0;
++ PyObject *__pyx_v___pyx_result = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__init__", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Property", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1134
+- * class CallbackThread(Thread):
+- * def __init__(self):
+- * Thread.__init__(self) # <<<<<<<<<<<<<<
+- * self.daemon = True
+- * self.lock = Semaphore()
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_2)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_2);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self);
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0572d11) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1135
+- * def __init__(self):
+- * Thread.__init__(self)
+- * self.daemon = True # <<<<<<<<<<<<<<
+- * self.lock = Semaphore()
+- * self.lock.acquire(True)
+- */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
++ /* "(tree fragment)":5
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x0572d11:
++ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
++ * __pyx_result = Property.__new__(__pyx_type)
++ */
++ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_n_s_PickleError);
++ __Pyx_GIVEREF(__pyx_n_s_PickleError);
++ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
++ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_2);
++ __pyx_v___pyx_PickleError = __pyx_t_2;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1136
+- * Thread.__init__(self)
+- * self.daemon = True
+- * self.lock = Semaphore() # <<<<<<<<<<<<<<
+- * self.lock.acquire(True)
+- * self.callback = None
++ /* "(tree fragment)":6
++ * if __pyx_checksum != 0x0572d11:
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum) # <<<<<<<<<<<<<<
++ * __pyx_result = Property.__new__(__pyx_type)
++ * if __pyx_state is not None:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_2)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_2);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
++ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_INCREF(__pyx_v___pyx_PickleError);
++ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
+ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(1, 6, __pyx_L1_error)
++
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
++ */
+ }
+- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1137
+- * self.daemon = True
+- * self.lock = Semaphore()
+- * self.lock.acquire(True) # <<<<<<<<<<<<<<
+- * self.callback = None
+- * self.isshutdown = False
++ /* "(tree fragment)":7
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
++ * __pyx_result = Property.__new__(__pyx_type) # <<<<<<<<<<<<<<
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_3 = NULL;
++ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
++ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_True);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v___pyx_result = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1138
+- * self.lock = Semaphore()
+- * self.lock.acquire(True)
+- * self.callback = None # <<<<<<<<<<<<<<
+- * self.isshutdown = False
+- *
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
++ * __pyx_result = Property.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
++ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
++ __pyx_t_6 = (__pyx_t_1 != 0);
++ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1139
+- * self.lock.acquire(True)
+- * self.callback = None
+- * self.isshutdown = False # <<<<<<<<<<<<<<
+- *
+- * def shutdown(self):
++ /* "(tree fragment)":9
++ * __pyx_result = Property.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
++ * return __pyx_result
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
++ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
+- *
+- * class CallbackThread(Thread):
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * Thread.__init__(self)
+- * self.daemon = True
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
++ * __pyx_result = Property.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result
+ */
++ }
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ /* "(tree fragment)":10
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result # <<<<<<<<<<<<<<
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v___pyx_result);
++ __pyx_r = __pyx_v___pyx_result;
+ goto __pyx_L0;
++
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++
++ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
++ __Pyx_XDECREF(__pyx_v___pyx_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1141
+- * self.isshutdown = False
+- *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * self.isshutdown = True
+- * self.callback = None
++/* "(tree fragment)":11
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown = {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(__pyx_self, ((PyObject *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
++ int __pyx_t_2;
++ Py_ssize_t __pyx_t_3;
++ int __pyx_t_4;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("shutdown", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1142
+- *
+- * def shutdown(self):
+- * self.isshutdown = True # <<<<<<<<<<<<<<
+- * self.callback = None
+- * self.lock.release()
+- */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Property__set_state", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1143
+- * def shutdown(self):
+- * self.isshutdown = True
+- * self.callback = None # <<<<<<<<<<<<<<
+- * self.lock.release()
+- *
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[2])
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1144
+- * self.isshutdown = True
+- * self.callback = None
+- * self.lock.release() # <<<<<<<<<<<<<<
+- *
+- * def call(self):
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_2)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_2);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
+ }
+- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->data);
++ __Pyx_DECREF(__pyx_v___pyx_result->data);
++ __pyx_v___pyx_result->data = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->name);
++ __Pyx_DECREF(__pyx_v___pyx_result->name);
++ __pyx_v___pyx_result->name = __pyx_t_1;
++ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
+- * self.isshutdown = False
+- *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * self.isshutdown = True
+- * self.callback = None
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[2])
+ */
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
++ __PYX_ERR(1, 13, __pyx_L1_error)
++ }
++ __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
++ if (__pyx_t_4) {
++ } else {
++ __pyx_t_2 = __pyx_t_4;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_5 = (__pyx_t_4 != 0);
++ __pyx_t_2 = __pyx_t_5;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_2) {
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "vidcutter/libs/pympv/mpv.pyx":1146
+- * self.lock.release()
+- *
+- * def call(self): # <<<<<<<<<<<<<<
+- * self.lock.release()
+- *
++ /* "(tree fragment)":14
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
+ */
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 14, __pyx_L1_error)
++ }
++ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
++ }
++ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call = {"call", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("call (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(__pyx_self, ((PyObject *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("call", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1147
+- *
+- * def call(self):
+- * self.lock.release() # <<<<<<<<<<<<<<
+- *
+- * def set(self, callback):
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[2])
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+- if (likely(__pyx_t_2)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+- __Pyx_INCREF(__pyx_t_2);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_3, function);
+- }
+ }
+- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
+- * self.lock.release()
+- *
+- * def call(self): # <<<<<<<<<<<<<<
+- * self.lock.release()
+- *
++ /* "(tree fragment)":11
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+ */
+
+ /* function exit code */
+@@ -22190,43 +21795,45 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.call", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1149
+- * self.lock.release()
+- *
+- * def set(self, callback): # <<<<<<<<<<<<<<
+- * self.callback = callback
+- *
++/* "(tree fragment)":1
++ * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set = {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v_self = 0;
+- PyObject *__pyx_v_callback = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event = {"__pyx_unpickle_Event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v___pyx_type = 0;
++ long __pyx_v___pyx_checksum;
++ PyObject *__pyx_v___pyx_state = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("set (wrapper)", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Event (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
+- PyObject* values[2] = {0,0};
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
++ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+@@ -22237,207 +21844,378 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1149, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1149, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Event") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+ }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+- __pyx_v_self = values[0];
+- __pyx_v_callback = values[1];
++ __pyx_v___pyx_type = values[0];
++ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_v___pyx_state = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1149, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(__pyx_self, __pyx_v_self, __pyx_v_callback);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Event(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_v___pyx_PickleError = 0;
++ PyObject *__pyx_v___pyx_result = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
++ int __pyx_t_1;
++ PyObject *__pyx_t_2 = NULL;
++ PyObject *__pyx_t_3 = NULL;
++ PyObject *__pyx_t_4 = NULL;
++ PyObject *__pyx_t_5 = NULL;
++ int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("set", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Event", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1150
+- *
+- * def set(self, callback):
+- * self.callback = callback # <<<<<<<<<<<<<<
+- *
+- * def run(self):
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
++ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xda38c25) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
+- * self.lock.release()
+- *
+- * def set(self, callback): # <<<<<<<<<<<<<<
+- * self.callback = callback
+- *
++ /* "(tree fragment)":5
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xda38c25:
++ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
++ * __pyx_result = Event.__new__(__pyx_type)
+ */
++ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_n_s_PickleError);
++ __Pyx_GIVEREF(__pyx_n_s_PickleError);
++ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
++ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_2);
++ __pyx_v___pyx_PickleError = __pyx_t_2;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
++ /* "(tree fragment)":6
++ * if __pyx_checksum != 0xda38c25:
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum) # <<<<<<<<<<<<<<
++ * __pyx_result = Event.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ */
++ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_INCREF(__pyx_v___pyx_PickleError);
++ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(1, 6, __pyx_L1_error)
++
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
++ */
++ }
++
++ /* "(tree fragment)":7
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
++ * __pyx_result = Event.__new__(__pyx_type) # <<<<<<<<<<<<<<
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ */
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
++ }
++ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v___pyx_result = __pyx_t_3;
++ __pyx_t_3 = 0;
++
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
++ * __pyx_result = Event.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
++ __pyx_t_6 = (__pyx_t_1 != 0);
++ if (__pyx_t_6) {
++
++ /* "(tree fragment)":9
++ * __pyx_result = Event.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
++ * return __pyx_result
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
++ */
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
++ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
++ * __pyx_result = Event.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ }
++
++ /* "(tree fragment)":10
++ * if __pyx_state is not None:
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ * return __pyx_result # <<<<<<<<<<<<<<
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v___pyx_result);
++ __pyx_r = __pyx_v___pyx_result;
+ goto __pyx_L0;
++
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++
++ /* function exit code */
+ __pyx_L1_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
++ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
++ __Pyx_XDECREF(__pyx_v___pyx_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1152
+- * self.callback = callback
+- *
+- * def run(self): # <<<<<<<<<<<<<<
+- * while not self.isshutdown:
+- * self.lock.acquire(True)
++/* "(tree fragment)":11
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+ */
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run = {"run", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run, METH_O, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("run (wrapper)", 0);
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(__pyx_self, ((PyObject *)__pyx_v_self));
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
++ enum mpv_event_id __pyx_t_3;
++ int __pyx_t_4;
++ Py_ssize_t __pyx_t_5;
++ int __pyx_t_6;
++ int __pyx_t_7;
++ PyObject *__pyx_t_8 = NULL;
++ PyObject *__pyx_t_9 = NULL;
++ PyObject *__pyx_t_10 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("run", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1153
+- *
+- * def run(self):
+- * while not self.isshutdown: # <<<<<<<<<<<<<<
+- * self.lock.acquire(True)
+- * self.mpv_callback(self.callback) if self.callback else None
+- */
+- while (1) {
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_3 = ((!__pyx_t_2) != 0);
+- if (!__pyx_t_3) break;
++ __Pyx_RefNannySetupContext("__pyx_unpickle_Event__set_state", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1154
+- * def run(self):
+- * while not self.isshutdown:
+- * self.lock.acquire(True) # <<<<<<<<<<<<<<
+- * self.mpv_callback(self.callback) if self.callback else None
+- *
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3] # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[4])
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_4);
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->data);
++ __Pyx_DECREF(__pyx_v___pyx_result->data);
++ __pyx_v___pyx_result->data = __pyx_t_1;
++ __pyx_t_1 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v___pyx_result->error = __pyx_t_2;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_v___pyx_result->id = __pyx_t_3;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_1);
++ __Pyx_GOTREF(__pyx_v___pyx_result->reply_userdata);
++ __Pyx_DECREF(__pyx_v___pyx_result->reply_userdata);
++ __pyx_v___pyx_result->reply_userdata = __pyx_t_1;
++ __pyx_t_1 = 0;
++
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[4])
++ */
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
++ __PYX_ERR(1, 13, __pyx_L1_error)
++ }
++ __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_6 = ((__pyx_t_5 > 4) != 0);
++ if (__pyx_t_6) {
++ } else {
++ __pyx_t_4 = __pyx_t_6;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
++ __pyx_t_7 = (__pyx_t_6 != 0);
++ __pyx_t_4 = __pyx_t_7;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_4) {
++
++ /* "(tree fragment)":14
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
++ */
++ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_8);
++ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_9);
++ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 14, __pyx_L1_error)
++ }
++ __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_8);
++ __pyx_t_10 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
++ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
++ if (likely(__pyx_t_10)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
++ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
++ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_True);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
++ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
++ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
++ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1155
+- * while not self.isshutdown:
+- * self.lock.acquire(True)
+- * self.mpv_callback(self.callback) if self.callback else None # <<<<<<<<<<<<<<
+- *
+- * def mpv_callback(self, callback):
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[4])
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (__pyx_t_3) {
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1155, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
+- if (likely(__pyx_t_7)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+- __Pyx_INCREF(__pyx_t_7);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_4, function);
+- }
+- }
+- __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_1 = __pyx_t_5;
+- __pyx_t_5 = 0;
+- } else {
+- __Pyx_INCREF(Py_None);
+- __pyx_t_1 = Py_None;
+- }
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
+- * self.callback = callback
+- *
+- * def run(self): # <<<<<<<<<<<<<<
+- * while not self.isshutdown:
+- * self.lock.acquire(True)
++ /* "(tree fragment)":11
++ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
++ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+ */
+
+ /* function exit code */
+@@ -22445,45 +22223,45 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_XDECREF(__pyx_t_9);
++ __Pyx_XDECREF(__pyx_t_10);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1157
+- * self.mpv_callback(self.callback) if self.callback else None
+- *
+- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+- * try:
+- * callback()
++/* "(tree fragment)":1
++ * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback = {"mpv_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+- PyObject *__pyx_v_callback = 0;
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
++static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo = {"__pyx_unpickle_RenderFrameInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo, METH_VARARGS|METH_KEYWORDS, 0};
++static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
++ PyObject *__pyx_v___pyx_type = 0;
++ long __pyx_v___pyx_checksum;
++ PyObject *__pyx_v___pyx_state = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("mpv_callback (wrapper)", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo (wrapper)", 0);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
+- PyObject* values[2] = {0,0};
++ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
++ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
++ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
++ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+@@ -22494,6068 +22272,2370 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
++ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
++ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1157, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
++ else {
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RenderFrameInfo") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+ }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
++ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
++ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+- __pyx_v_self = values[0];
+- __pyx_v_callback = values[1];
++ __pyx_v___pyx_type = values[0];
++ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
++ __pyx_v___pyx_state = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1157, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+ __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(__pyx_self, __pyx_v_self, __pyx_v_callback);
++ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_RenderFrameInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
+- PyObject *__pyx_v_e = NULL;
++static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_v___pyx_PickleError = 0;
++ PyObject *__pyx_v___pyx_result = 0;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
++ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- int __pyx_t_7;
+- PyObject *__pyx_t_8 = NULL;
+- PyObject *__pyx_t_9 = NULL;
+- PyObject *__pyx_t_10 = NULL;
+- PyObject *__pyx_t_11 = NULL;
++ int __pyx_t_6;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("mpv_callback", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
+- *
+- * def mpv_callback(self, callback):
+- * try: # <<<<<<<<<<<<<<
+- * callback()
+- * except Exception as e:
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+ */
+- {
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+- __Pyx_XGOTREF(__pyx_t_1);
+- __Pyx_XGOTREF(__pyx_t_2);
+- __Pyx_XGOTREF(__pyx_t_3);
+- /*try:*/ {
++ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1159
+- * def mpv_callback(self, callback):
+- * try:
+- * callback() # <<<<<<<<<<<<<<
+- * except Exception as e:
+- * sys.stderr.write("pympv error during callback: %s\n" % e)
++ /* "(tree fragment)":5
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xd41d8cd:
++ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+ */
+- __Pyx_INCREF(__pyx_v_callback);
+- __pyx_t_5 = __pyx_v_callback; __pyx_t_6 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+- if (likely(__pyx_t_6)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+- __Pyx_INCREF(__pyx_t_6);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_5, function);
+- }
+- }
+- __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L3_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_n_s_PickleError);
++ __Pyx_GIVEREF(__pyx_n_s_PickleError);
++ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
++ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_2);
++ __pyx_v___pyx_PickleError = __pyx_t_2;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
+- *
+- * def mpv_callback(self, callback):
+- * try: # <<<<<<<<<<<<<<
+- * callback()
+- * except Exception as e:
++ /* "(tree fragment)":6
++ * if __pyx_checksum != 0xd41d8cd:
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<<
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
++ * if __pyx_state is not None:
+ */
++ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_INCREF(__pyx_v___pyx_PickleError);
++ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_5)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_5);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
++ }
+ }
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- goto __pyx_L8_try_end;
+- __pyx_L3_error:;
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++ __PYX_ERR(1, 6, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1160
+- * try:
+- * callback()
+- * except Exception as e: # <<<<<<<<<<<<<<
+- * sys.stderr.write("pympv error during callback: %s\n" % e)
+- *
++ /* "(tree fragment)":4
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+ */
+- __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- if (__pyx_t_7) {
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1160, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_5);
+- __pyx_v_e = __pyx_t_5;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1161
+- * callback()
+- * except Exception as e:
+- * sys.stderr.write("pympv error during callback: %s\n" % e) # <<<<<<<<<<<<<<
+- *
+- * cdef void _c_callback(void* d) with gil:
++ /* "(tree fragment)":7
++ * from pickle import PickleError as __pyx_PickleError
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type) # <<<<<<<<<<<<<<
++ * if __pyx_state is not None:
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_9);
+- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_10);
+- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_9);
+- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+- __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_10);
+- __pyx_t_11 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
+- if (likely(__pyx_t_11)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+- __Pyx_INCREF(__pyx_t_11);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_9, function);
+- }
+- }
+- __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
+- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
+- __Pyx_GOTREF(__pyx_t_8);
+- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- goto __pyx_L4_exception_handled;
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __pyx_t_4 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
++ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
++ if (likely(__pyx_t_4)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
++ __Pyx_INCREF(__pyx_t_4);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+- goto __pyx_L5_except_error;
+- __pyx_L5_except_error:;
++ }
++ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
++ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_v___pyx_result = __pyx_t_3;
++ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
+- *
+- * def mpv_callback(self, callback):
+- * try: # <<<<<<<<<<<<<<
+- * callback()
+- * except Exception as e:
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
++ * return __pyx_result
++ */
++ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
++ __pyx_t_6 = (__pyx_t_1 != 0);
++ if (__pyx_t_6) {
++
++ /* "(tree fragment)":9
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
++ * if __pyx_state is not None:
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
++ * return __pyx_result
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
++ */
++ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
++ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_3);
++ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++
++ /* "(tree fragment)":8
++ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
++ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
++ * if __pyx_state is not None: # <<<<<<<<<<<<<<
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
++ * return __pyx_result
+ */
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- goto __pyx_L1_error;
+- __pyx_L4_exception_handled:;
+- __Pyx_XGIVEREF(__pyx_t_1);
+- __Pyx_XGIVEREF(__pyx_t_2);
+- __Pyx_XGIVEREF(__pyx_t_3);
+- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+- __pyx_L8_try_end:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
+- * self.mpv_callback(self.callback) if self.callback else None
+- *
+- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+- * try:
+- * callback()
++ /* "(tree fragment)":10
++ * if __pyx_state is not None:
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
++ * return __pyx_result # <<<<<<<<<<<<<<
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
++ */
++ __Pyx_XDECREF(__pyx_r);
++ __Pyx_INCREF(__pyx_v___pyx_result);
++ __pyx_r = __pyx_v___pyx_result;
++ goto __pyx_L0;
++
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+
+ /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_XDECREF(__pyx_t_9);
+- __Pyx_XDECREF(__pyx_t_10);
+- __Pyx_XDECREF(__pyx_t_11);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_e);
++ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
++ __Pyx_XDECREF(__pyx_v___pyx_result);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1163
+- * sys.stderr.write("pympv error during callback: %s\n" % e)
+- *
+- * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
+- * cdef uint64_t name = <uint64_t>d
+- * callback = _callbacks.get(name)
++/* "(tree fragment)":11
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[0])
+ */
+
+-static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
+- uint64_t __pyx_v_name;
+- PyObject *__pyx_v_callback = NULL;
++static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
++ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_1;
++ Py_ssize_t __pyx_t_2;
++ int __pyx_t_3;
++ int __pyx_t_4;
++ PyObject *__pyx_t_5 = NULL;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ PyObject *__pyx_t_8 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+- #ifdef WITH_THREAD
+- PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
+- #endif
+- __Pyx_RefNannySetupContext("_c_callback", 0);
++ __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo__set_state", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1164
+- *
+- * cdef void _c_callback(void* d) with gil:
+- * cdef uint64_t name = <uint64_t>d # <<<<<<<<<<<<<<
+- * callback = _callbacks.get(name)
+- * callback.call()
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[0])
+ */
+- __pyx_v_name = ((uint64_t)__pyx_v_d);
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
++ __PYX_ERR(1, 12, __pyx_L1_error)
++ }
++ __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
++ __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
++ if (__pyx_t_3) {
++ } else {
++ __pyx_t_1 = __pyx_t_3;
++ goto __pyx_L4_bool_binop_done;
++ }
++ __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
++ __pyx_t_4 = (__pyx_t_3 != 0);
++ __pyx_t_1 = __pyx_t_4;
++ __pyx_L4_bool_binop_done:;
++ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1165
+- * cdef void _c_callback(void* d) with gil:
+- * cdef uint64_t name = <uint64_t>d
+- * callback = _callbacks.get(name) # <<<<<<<<<<<<<<
+- * callback.call()
++ /* "(tree fragment)":13
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<<
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(__pyx_v___pyx_state == Py_None)) {
++ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
++ __PYX_ERR(1, 13, __pyx_L1_error)
+ }
+- }
+- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v_callback = __pyx_t_1;
+- __pyx_t_1 = 0;
++ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_8 = NULL;
++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
++ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
++ if (likely(__pyx_t_8)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
++ __Pyx_INCREF(__pyx_t_8);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_7, function);
++ }
++ }
++ __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_5);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1166
+- * cdef uint64_t name = <uint64_t>d
+- * callback = _callbacks.get(name)
+- * callback.call() # <<<<<<<<<<<<<<
++ /* "(tree fragment)":12
++ * return __pyx_result
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
++ * __pyx_result.__dict__.update(__pyx_state[0])
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_3)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_3);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+ }
+- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1163
+- * sys.stderr.write("pympv error during callback: %s\n" % e)
+- *
+- * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
+- * cdef uint64_t name = <uint64_t>d
+- * callback = _callbacks.get(name)
++ /* "(tree fragment)":11
++ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
++ * __pyx_result.__dict__.update(__pyx_state[0])
+ */
+
+ /* function exit code */
++ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
++ __Pyx_XDECREF(__pyx_t_5);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ __Pyx_XDECREF(__pyx_t_8);
++ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ __pyx_r = 0;
+ __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v_callback);
++ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+- #ifdef WITH_THREAD
+- __Pyx_PyGILState_Release(__pyx_gilstate_save);
++ return __pyx_r;
++}
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
++
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
++ }
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
++ p->reason = Py_None; Py_INCREF(Py_None);
++ p->error = Py_None; Py_INCREF(Py_None);
++ return o;
++}
++
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
+ #endif
++ PyObject_GC_UnTrack(o);
++ Py_CLEAR(p->reason);
++ Py_CLEAR(p->error);
++ (*Py_TYPE(o)->tp_free)(o);
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
++ if (p->reason) {
++ e = (*v)(p->reason, a); if (e) return e;
++ }
++ if (p->error) {
++ e = (*v)(p->error, a); if (e) return e;
++ }
++ return 0;
++}
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached = {"__pyx_unpickle_EndOfFileReached", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_EndOfFileReached") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
++ tmp = ((PyObject*)p->reason);
++ p->reason = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->error);
++ p->error = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached", 0);
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x56be9b6) != 0);
+- if (__pyx_t_1) {
+-
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x56be9b6:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0x56be9b6:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_1__get__(o);
++}
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- */
++static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_3__set__(o, v);
+ }
+-
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_5__del__(o);
+ }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
++}
+
+- /* "(tree fragment)":9
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_1__get__(o);
++}
+
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
+- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
++static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_3__set__(o, v);
++ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_5__del__(o);
+ }
+-
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-/* "(tree fragment)":11
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_1__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_3__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- Py_ssize_t __pyx_t_3;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached__set_state", 0);
++static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
++ {(char *)"reason", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, (char *)0, 0},
++ {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, (char *)0, 0},
++ {0, 0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1] # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->error);
+- __Pyx_DECREF(__pyx_v___pyx_result->error);
+- __pyx_v___pyx_result->error = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->reason);
+- __Pyx_DECREF(__pyx_v___pyx_result->reason);
+- __pyx_v___pyx_result->reason = __pyx_t_1;
+- __pyx_t_1 = 0;
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.EndOfFileReached", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ "Data field for MPV_EVENT_END_FILE events\n\n Wraps: mpv_event_end_file\n ", /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_methods*/
++ 0, /*tp_members*/
++ __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 13, __pyx_L1_error)
+- }
+- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
+- if (__pyx_t_4) {
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
+ } else {
+- __pyx_t_2 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_5 = (__pyx_t_4 != 0);
+- __pyx_t_2 = __pyx_t_5;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_2) {
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage;
++ p->prefix = Py_None; Py_INCREF(Py_None);
++ p->level = Py_None; Py_INCREF(Py_None);
++ p->text = Py_None; Py_INCREF(Py_None);
++ p->log_level = Py_None; Py_INCREF(Py_None);
++ return o;
++}
+
+- /* "(tree fragment)":14
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 14, __pyx_L1_error)
+- }
+- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
++ #endif
++ PyObject_GC_UnTrack(o);
++ Py_CLEAR(p->prefix);
++ Py_CLEAR(p->level);
++ Py_CLEAR(p->text);
++ Py_CLEAR(p->log_level);
++ (*Py_TYPE(o)->tp_free)(o);
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
++ if (p->prefix) {
++ e = (*v)(p->prefix, a); if (e) return e;
++ }
++ if (p->level) {
++ e = (*v)(p->level, a); if (e) return e;
++ }
++ if (p->text) {
++ e = (*v)(p->text, a); if (e) return e;
++ }
++ if (p->log_level) {
++ e = (*v)(p->log_level, a); if (e) return e;
+ }
++ return 0;
++}
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
++ tmp = ((PyObject*)p->prefix);
++ p->prefix = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->level);
++ p->level = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->text);
++ p->text = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->log_level);
++ p->log_level = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
++}
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(o);
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_InputDispatch(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch = {"__pyx_unpickle_InputDispatch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_InputDispatch (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_InputDispatch", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_InputDispatch", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_InputDispatch") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
++static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(o, v);
++ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(o);
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_InputDispatch", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_InputDispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_InputDispatch(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_InputDispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_InputDispatch", 0);
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xbf641a9: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xbf641a9) != 0);
+- if (__pyx_t_1) {
+-
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xbf641a9:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- * __pyx_result = InputDispatch.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0xbf641a9:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = InputDispatch.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xbf, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(o);
++}
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xbf641a9: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- */
++static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(o, v);
+ }
+-
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- * __pyx_result = InputDispatch.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(o);
+ }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- * __pyx_result = InputDispatch.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
++}
+
+- /* "(tree fragment)":9
+- * __pyx_result = InputDispatch.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(o);
++}
+
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
+- * __pyx_result = InputDispatch.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
++static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(o, v);
+ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(o);
++ }
++}
+
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_InputDispatch(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(o);
++}
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_InputDispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(o, v);
++ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(o);
++ }
+ }
+
+-/* "(tree fragment)":11
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_LogMessage[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- Py_ssize_t __pyx_t_3;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_InputDispatch__set_state", 0);
++static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage[] = {
++ {(char *)"prefix", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, (char *)0, 0},
++ {(char *)"level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level, (char *)0, 0},
++ {(char *)"text", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text, (char *)0, 0},
++ {(char *)"log_level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, (char *)0, 0},
++ {0, 0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1] # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_LogMessage = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.LogMessage", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ "Data field for MPV_EVENT_LOG_MESSAGE events.\n\n Wraps: mpv_event_log_message\n ", /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_LogMessage, /*tp_methods*/
++ 0, /*tp_members*/
++ __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property __pyx_vtable_9vidcutter_4libs_3mpv_Property;
++
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Property(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->arg0);
+- __Pyx_DECREF(__pyx_v___pyx_result->arg0);
+- __pyx_v___pyx_result->arg0 = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Property;
++ p->name = Py_None; Py_INCREF(Py_None);
++ p->data = Py_None; Py_INCREF(Py_None);
++ return o;
++}
++
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->type);
+- __Pyx_DECREF(__pyx_v___pyx_result->type);
+- __pyx_v___pyx_result->type = __pyx_t_1;
+- __pyx_t_1 = 0;
++ #endif
++ PyObject_GC_UnTrack(o);
++ Py_CLEAR(p->name);
++ Py_CLEAR(p->data);
++ (*Py_TYPE(o)->tp_free)(o);
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 13, __pyx_L1_error)
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
++ if (p->name) {
++ e = (*v)(p->name, a); if (e) return e;
+ }
+- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
+- if (__pyx_t_4) {
+- } else {
+- __pyx_t_2 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
++ if (p->data) {
++ e = (*v)(p->data, a); if (e) return e;
+ }
+- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_5 = (__pyx_t_4 != 0);
+- __pyx_t_2 = __pyx_t_5;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_2) {
++ return 0;
++}
+
+- /* "(tree fragment)":14
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 14, __pyx_L1_error)
+- }
+- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Property(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
++ tmp = ((PyObject*)p->name);
++ p->name = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->data);
++ p->data = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(o);
++}
++
++static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(o, v);
++ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(o);
+ }
++}
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(o);
++}
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_InputDispatch__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(o, v);
++ }
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(o);
++ }
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Property[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage = {"__pyx_unpickle_LogMessage", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_LogMessage") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
++static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Property[] = {
++ {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_name, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name, (char *)0, 0},
++ {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_data, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data, (char *)0, 0},
++ {0, 0, 0, 0, 0}
++};
++
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Property = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.Property", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Property), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ "Data field for MPV_EVENT_PROPERTY_CHANGE and MPV_EVENT_GET_PROPERTY_REPLY.\n\n Wraps: mpv_event_property\n ", /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_Property, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_Property, /*tp_methods*/
++ 0, /*tp_members*/
++ __pyx_getsets_9vidcutter_4libs_3mpv_Property, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_Property, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event __pyx_vtable_9vidcutter_4libs_3mpv_Event;
++
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Event(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_LogMessage(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Event;
++ p->data = Py_None; Py_INCREF(Py_None);
++ p->reply_userdata = Py_None; Py_INCREF(Py_None);
++ return o;
++}
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
++ #endif
++ PyObject_GC_UnTrack(o);
++ Py_CLEAR(p->data);
++ Py_CLEAR(p->reply_userdata);
++ (*Py_TYPE(o)->tp_free)(o);
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage", 0);
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
++ if (p->data) {
++ e = (*v)(p->data, a); if (e) return e;
++ }
++ if (p->reply_userdata) {
++ e = (*v)(p->reply_userdata, a); if (e) return e;
++ }
++ return 0;
++}
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x8774fae) != 0);
+- if (__pyx_t_1) {
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Event(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
++ tmp = ((PyObject*)p->data);
++ p->data = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->reply_userdata);
++ p->reply_userdata = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
++}
+
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x8774fae:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- * __pyx_result = LogMessage.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(o);
++}
+
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0x8774fae:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = LogMessage.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_name(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(o);
++}
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- */
+- }
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(o);
++}
+
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- * __pyx_result = LogMessage.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
++static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(o, v);
+ }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- * __pyx_result = LogMessage.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
+-
+- /* "(tree fragment)":9
+- * __pyx_result = LogMessage.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
+- * __pyx_result = LogMessage.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
++ else {
++ PyErr_SetString(PyExc_NotImplementedError, "__del__");
++ return -1;
+ }
+-
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+ }
+
+-/* "(tree fragment)":11
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- */
+-
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- Py_ssize_t __pyx_t_3;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage__set_state", 0);
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(o);
++}
+
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3] # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(o, v);
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->level);
+- __Pyx_DECREF(__pyx_v___pyx_result->level);
+- __pyx_v___pyx_result->level = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++ else {
++ PyErr_SetString(PyExc_NotImplementedError, "__del__");
++ return -1;
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->log_level);
+- __Pyx_DECREF(__pyx_v___pyx_result->log_level);
+- __pyx_v___pyx_result->log_level = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++}
++
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(o);
++}
++
++static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(o, v);
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->prefix);
+- __Pyx_DECREF(__pyx_v___pyx_result->prefix);
+- __pyx_v___pyx_result->prefix = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(o);
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->text);
+- __Pyx_DECREF(__pyx_v___pyx_result->text);
+- __pyx_v___pyx_result->text = __pyx_t_1;
+- __pyx_t_1 = 0;
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 13, __pyx_L1_error)
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(o);
++}
++
++static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
++ if (v) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(o, v);
+ }
+- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_4 = ((__pyx_t_3 > 4) != 0);
+- if (__pyx_t_4) {
+- } else {
+- __pyx_t_2 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
++ else {
++ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(o);
+ }
+- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_5 = (__pyx_t_4 != 0);
+- __pyx_t_2 = __pyx_t_5;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_2) {
++}
+
+- /* "(tree fragment)":14
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 14, __pyx_L1_error)
+- }
+- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Event[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
+- }
++static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Event[] = {
++ {(char *)"error_str", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str, 0, (char *)"mpv_error_string of the error proeprty", 0},
++ {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_name, 0, (char *)"mpv_event_name of the event id", 0},
++ {(char *)"id", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_id, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id, (char *)0, 0},
++ {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error, (char *)0, 0},
++ {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_data, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data, (char *)0, 0},
++ {(char *)"reply_userdata", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, (char *)0, 0},
++ {0, 0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Event = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.Event", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Event), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ "Wraps: mpv_event", /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_Event, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_Event, /*tp_methods*/
++ 0, /*tp_members*/
++ __pyx_getsets_9vidcutter_4libs_3mpv_Event, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_Event, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context __pyx_vtable_9vidcutter_4libs_3mpv_Context;
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Context(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
++ }
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Context;
++ p->callback = Py_None; Py_INCREF(Py_None);
++ p->callbackthread = Py_None; Py_INCREF(Py_None);
++ p->reply_userdata = Py_None; Py_INCREF(Py_None);
++ if (unlikely(__pyx_pw_9vidcutter_4libs_3mpv_7Context_33__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
++ return o;
++ bad:
++ Py_DECREF(o); o = 0;
++ return NULL;
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property = {"__pyx_unpickle_Property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Property (wrapper)", 0);
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
++ #endif
++ PyObject_GC_UnTrack(o);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Property") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
++ PyObject *etype, *eval, *etb;
++ PyErr_Fetch(&etype, &eval, &etb);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
++ __pyx_pw_9vidcutter_4libs_3mpv_7Context_41__dealloc__(o);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
++ PyErr_Restore(etype, eval, etb);
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Property(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
++ Py_CLEAR(p->callback);
++ Py_CLEAR(p->callbackthread);
++ Py_CLEAR(p->reply_userdata);
++ (*Py_TYPE(o)->tp_free)(o);
++}
+
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
++ if (p->callback) {
++ e = (*v)(p->callback, a); if (e) return e;
++ }
++ if (p->callbackthread) {
++ e = (*v)(p->callbackthread, a); if (e) return e;
++ }
++ if (p->reply_userdata) {
++ e = (*v)(p->reply_userdata, a); if (e) return e;
++ }
++ return 0;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Property", 0);
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0572d11) != 0);
+- if (__pyx_t_1) {
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Context(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
++ tmp = ((PyObject*)p->callback);
++ p->callback = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->callbackthread);
++ p->callbackthread = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->reply_userdata);
++ p->reply_userdata = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
++}
+
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x0572d11:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- * __pyx_result = Property.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(o);
++}
+
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0x0572d11:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = Property.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_name(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(o);
++}
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- */
+- }
++static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_time(PyObject *o, CYTHON_UNUSED void *x) {
++ return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(o);
++}
+
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- * __pyx_result = Property.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Context[] = {
++ {"request_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_request_event},
++ {"set_log_level", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_3set_log_level, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_2set_log_level},
++ {"load_config", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_5load_config, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_4load_config},
++ {"_format_for", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_7_format_for, METH_O, 0},
++ {"command", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_8command},
++ {"get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_10get_property_async},
++ {"try_get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_async, METH_VARARGS|METH_KEYWORDS, 0},
++ {"try_get_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property, METH_VARARGS|METH_KEYWORDS, 0},
++ {"get_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_17get_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_16get_property},
++ {"set_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_18set_property},
++ {"set_option", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_20set_option},
++ {"initialize", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_23initialize, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_22initialize},
++ {"wait_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_24wait_event},
++ {"wakeup", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_27wakeup, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_26wakeup},
++ {"set_wakeup_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_29set_wakeup_callback, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback},
++ {"get_wakeup_pipe", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_31get_wakeup_pipe, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe},
++ {"observe_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_34observe_property},
++ {"unobserve_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_37unobserve_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_36unobserve_property},
++ {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_39shutdown, METH_NOARGS, 0},
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_43__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_45__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- * __pyx_result = Property.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
++static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Context[] = {
++ {(char *)"api_version", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version, 0, (char *)0, 0},
++ {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_name, 0, (char *)"Unique name for every context created.\n\n Wraps: mpv_client_name\n ", 0},
++ {(char *)"time", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_time, 0, (char *)"Internal mpv client time.\n\n Has an arbitrary start offset, but will never wrap or go backwards.\n\n Wraps: mpv_get_time_us\n ", 0},
++ {0, 0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":9
+- * __pyx_result = Property.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Context = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.Context", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Context), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ "Base class wrapping a context to interact with mpv.\n\n Assume all calls can raise MPVError.\n\n Wraps: mpv_create, mpv_destroy and all mpv_handle related calls\n ", /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_Context, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_Context, /*tp_methods*/
++ 0, /*tp_members*/
++ __pyx_getsets_9vidcutter_4libs_3mpv_Context, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_Context, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
+
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
+- * __pyx_result = Property.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams;
++ p->owned = Py_None; Py_INCREF(Py_None);
++ return o;
++}
+
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
++ #endif
++ PyObject_GC_UnTrack(o);
++ {
++ PyObject *etype, *eval, *etb;
++ PyErr_Fetch(&etype, &eval, &etb);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
++ __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(o);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
++ PyErr_Restore(etype, eval, etb);
++ }
++ Py_CLEAR(p->owned);
++ (*Py_TYPE(o)->tp_free)(o);
++}
+
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
++ if (p->owned) {
++ e = (*v)(p->owned, a); if (e) return e;
++ }
++ return 0;
++}
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
++ tmp = ((PyObject*)p->owned);
++ p->owned = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
+ }
+
+-/* "(tree fragment)":11
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv__RenderParams[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- Py_ssize_t __pyx_t_3;
+- int __pyx_t_4;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Property__set_state", 0);
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv__RenderParams = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv._RenderParams", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ 0, /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv__RenderParams, /*tp_methods*/
++ 0, /*tp_members*/
++ 0, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
++static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
+
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->data);
+- __Pyx_DECREF(__pyx_v___pyx_result->data);
+- __pyx_v___pyx_result->data = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->name);
+- __Pyx_DECREF(__pyx_v___pyx_result->name);
+- __pyx_v___pyx_result->name = __pyx_t_1;
+- __pyx_t_1 = 0;
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)o);
++ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo;
++ return o;
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 13, __pyx_L1_error)
+- }
+- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
+- if (__pyx_t_4) {
+- } else {
+- __pyx_t_2 = __pyx_t_4;
+- goto __pyx_L4_bool_binop_done;
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo(PyObject *o) {
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_5 = (__pyx_t_4 != 0);
+- __pyx_t_2 = __pyx_t_5;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_2) {
++ #endif
++ (*Py_TYPE(o)->tp_free)(o);
++}
+
+- /* "(tree fragment)":14
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 14, __pyx_L1_error)
+- }
+- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[2])
+- */
+- }
+-
+- /* "(tree fragment)":11
+- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.RenderFrameInfo", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
++ 0, /*tp_doc*/
++ 0, /*tp_traverse*/
++ 0, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_methods*/
++ 0, /*tp_members*/
++ 0, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
+
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p;
++ PyObject *o;
++ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
++ o = (*t->tp_alloc)(t, 0);
++ } else {
++ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
++ }
++ if (unlikely(!o)) return 0;
++ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o);
++ p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
++ p->update_cb = Py_None; Py_INCREF(Py_None);
++ p->_x11_display = Py_None; Py_INCREF(Py_None);
++ p->_wl_display = Py_None; Py_INCREF(Py_None);
++ p->_get_proc_address = Py_None; Py_INCREF(Py_None);
++ return o;
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event = {"__pyx_unpickle_Event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Event (wrapper)", 0);
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
++ #if CYTHON_USE_TP_FINALIZE
++ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
++ if (PyObject_CallFinalizerFromDealloc(o)) return;
++ }
++ #endif
++ PyObject_GC_UnTrack(o);
+ {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Event") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
++ PyObject *etype, *eval, *etb;
++ PyErr_Fetch(&etype, &eval, &etb);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
++ __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(o);
++ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
++ PyErr_Restore(etype, eval, etb);
+ }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_Event(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++ Py_CLEAR(p->_mpv);
++ Py_CLEAR(p->update_cb);
++ Py_CLEAR(p->_x11_display);
++ Py_CLEAR(p->_wl_display);
++ Py_CLEAR(p->_get_proc_address);
++ (*Py_TYPE(o)->tp_free)(o);
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Event", 0);
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xda38c25) != 0);
+- if (__pyx_t_1) {
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
++ if (p->_mpv) {
++ e = (*v)(((PyObject *)p->_mpv), a); if (e) return e;
++ }
++ if (p->update_cb) {
++ e = (*v)(p->update_cb, a); if (e) return e;
++ }
++ if (p->_x11_display) {
++ e = (*v)(p->_x11_display, a); if (e) return e;
++ }
++ if (p->_wl_display) {
++ e = (*v)(p->_wl_display, a); if (e) return e;
++ }
++ if (p->_get_proc_address) {
++ e = (*v)(p->_get_proc_address, a); if (e) return e;
++ }
++ return 0;
++}
+
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xda38c25:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- * __pyx_result = Event.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0xda38c25:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = Event.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- */
+- }
+-
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- * __pyx_result = Event.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- * __pyx_result = Event.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
+-
+- /* "(tree fragment)":9
+- * __pyx_result = Event.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
+- * __pyx_result = Event.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- }
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
++ tmp = ((PyObject*)p->_mpv);
++ p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->update_cb);
++ p->update_cb = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->_x11_display);
++ p->_x11_display = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->_wl_display);
++ p->_wl_display = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ tmp = ((PyObject*)p->_get_proc_address);
++ p->_get_proc_address = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
++}
+
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderContext[] = {
++ {"set_icc_profile", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile, METH_O, 0},
++ {"set_ambient_light", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light, METH_O, 0},
++ {"get_next_frame_info", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info, METH_NOARGS, 0},
++ {"set_update_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback, METH_O, 0},
++ {"update", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update, METH_NOARGS, 0},
++ {"render", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render, METH_VARARGS|METH_KEYWORDS, 0},
++ {"report_swap", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap, METH_NOARGS, 0},
++ {"free", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free, METH_NOARGS, 0},
++ {"close", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close, METH_NOARGS, 0},
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderContext = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.RenderContext", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ 0, /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_RenderContext, /*tp_methods*/
++ 0, /*tp_members*/
++ 0, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
+
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeObject *t, PyObject *a, PyObject *k) {
++ PyObject *o = __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(t, a, k);
++ if (unlikely(!o)) return 0;
++ return o;
+ }
+
+-/* "(tree fragment)":11
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- */
++static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext[] = {
++ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__, METH_NOARGS, 0},
++ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__, METH_O, 0},
++ {0, 0, 0, 0}
++};
+
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- PyObject *__pyx_t_1 = NULL;
+- int __pyx_t_2;
+- enum mpv_event_id __pyx_t_3;
+- int __pyx_t_4;
+- Py_ssize_t __pyx_t_5;
+- int __pyx_t_6;
+- int __pyx_t_7;
+- PyObject *__pyx_t_8 = NULL;
+- PyObject *__pyx_t_9 = NULL;
+- PyObject *__pyx_t_10 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_Event__set_state", 0);
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.OpenGLRenderContext", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ 0, /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_methods*/
++ 0, /*tp_members*/
++ 0, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
+
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3] # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->data);
+- __Pyx_DECREF(__pyx_v___pyx_result->data);
+- __pyx_v___pyx_result->data = __pyx_t_1;
+- __pyx_t_1 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v___pyx_result->error = __pyx_t_2;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_v___pyx_result->id = __pyx_t_3;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_1);
+- __Pyx_GOTREF(__pyx_v___pyx_result->reply_userdata);
+- __Pyx_DECREF(__pyx_v___pyx_result->reply_userdata);
+- __pyx_v___pyx_result->reply_userdata = __pyx_t_1;
+- __pyx_t_1 = 0;
++static struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[8];
++static int __pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = 0;
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 13, __pyx_L1_error)
+- }
+- __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_6 = ((__pyx_t_5 > 4) != 0);
+- if (__pyx_t_6) {
++static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
++ PyObject *o;
++ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
++ o = (PyObject*)__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[--__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors];
++ memset(o, 0, sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors));
++ (void) PyObject_INIT(o, t);
++ PyObject_GC_Track(o);
+ } else {
+- __pyx_t_4 = __pyx_t_6;
+- goto __pyx_L4_bool_binop_done;
++ o = (*t->tp_alloc)(t, 0);
++ if (unlikely(!o)) return 0;
+ }
+- __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
+- __pyx_t_7 = (__pyx_t_6 != 0);
+- __pyx_t_4 = __pyx_t_7;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_4) {
+-
+- /* "(tree fragment)":14
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_8);
+- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_9);
+- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 14, __pyx_L1_error)
+- }
+- __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_8);
+- __pyx_t_10 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
+- if (likely(__pyx_t_10)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+- __Pyx_INCREF(__pyx_t_10);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_9, function);
+- }
+- }
+- __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
+- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ return o;
++}
+
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[4])
+- */
++static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
++ PyObject_GC_UnTrack(o);
++ Py_CLEAR(p->__pyx_v_fn);
++ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
++ __pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors++] = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o);
++ } else {
++ (*Py_TYPE(o)->tp_free)(o);
+ }
++}
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
+- */
+-
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_XDECREF(__pyx_t_9);
+- __Pyx_XDECREF(__pyx_t_10);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o, visitproc v, void *a) {
++ int e;
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
++ if (p->__pyx_v_fn) {
++ e = (*v)(p->__pyx_v_fn, a); if (e) return e;
++ }
++ return 0;
+ }
+
+-/* "(tree fragment)":1
+- * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+-/* Python wrapper */
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+-static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo = {"__pyx_unpickle_RenderFrameInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo, METH_VARARGS|METH_KEYWORDS, 0};
+-static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+- PyObject *__pyx_v___pyx_type = 0;
+- long __pyx_v___pyx_checksum;
+- PyObject *__pyx_v___pyx_state = 0;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- PyObject *__pyx_r = 0;
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo (wrapper)", 0);
+- {
+- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
+- PyObject* values[3] = {0,0,0};
+- if (unlikely(__pyx_kwds)) {
+- Py_ssize_t kw_args;
+- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+- switch (pos_args) {
+- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- CYTHON_FALLTHROUGH;
+- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- CYTHON_FALLTHROUGH;
+- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- CYTHON_FALLTHROUGH;
+- case 0: break;
+- default: goto __pyx_L5_argtuple_error;
+- }
+- kw_args = PyDict_Size(__pyx_kwds);
+- switch (pos_args) {
+- case 0:
+- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
+- else goto __pyx_L5_argtuple_error;
+- CYTHON_FALLTHROUGH;
+- case 1:
+- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
+- else {
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- }
+- if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RenderFrameInfo") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
+- }
+- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+- goto __pyx_L5_argtuple_error;
+- } else {
+- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+- }
+- __pyx_v___pyx_type = values[0];
+- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_v___pyx_state = values[2];
+- }
+- goto __pyx_L4_argument_unpacking_done;
+- __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
+- __pyx_L3_error:;
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __Pyx_RefNannyFinishContext();
+- return NULL;
+- __pyx_L4_argument_unpacking_done:;
+- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_16__pyx_unpickle_RenderFrameInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
+-
+- /* function exit code */
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
++static int __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
++ PyObject* tmp;
++ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
++ tmp = ((PyObject*)p->__pyx_v_fn);
++ p->__pyx_v_fn = Py_None; Py_INCREF(Py_None);
++ Py_XDECREF(tmp);
++ return 0;
+ }
+
+-static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_v___pyx_PickleError = 0;
+- PyObject *__pyx_v___pyx_result = 0;
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- PyObject *__pyx_t_2 = NULL;
+- PyObject *__pyx_t_3 = NULL;
+- PyObject *__pyx_t_4 = NULL;
+- PyObject *__pyx_t_5 = NULL;
+- int __pyx_t_6;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo", 0);
+-
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- */
+- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
+- if (__pyx_t_1) {
+-
+- /* "(tree fragment)":5
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xd41d8cd:
+- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+- */
+- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_n_s_PickleError);
+- __Pyx_GIVEREF(__pyx_n_s_PickleError);
+- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
+- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_2);
+- __pyx_v___pyx_PickleError = __pyx_t_2;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
++static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "vidcutter.libs.mpv.__pyx_scope_struct___errors", /*tp_name*/
++ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors), /*tp_basicsize*/
++ 0, /*tp_itemsize*/
++ __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_dealloc*/
++ #if PY_VERSION_HEX < 0x030800b4
++ 0, /*tp_print*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4
++ 0, /*tp_vectorcall_offset*/
++ #endif
++ 0, /*tp_getattr*/
++ 0, /*tp_setattr*/
++ #if PY_MAJOR_VERSION < 3
++ 0, /*tp_compare*/
++ #endif
++ #if PY_MAJOR_VERSION >= 3
++ 0, /*tp_as_async*/
++ #endif
++ 0, /*tp_repr*/
++ 0, /*tp_as_number*/
++ 0, /*tp_as_sequence*/
++ 0, /*tp_as_mapping*/
++ 0, /*tp_hash*/
++ 0, /*tp_call*/
++ 0, /*tp_str*/
++ 0, /*tp_getattro*/
++ 0, /*tp_setattro*/
++ 0, /*tp_as_buffer*/
++ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
++ 0, /*tp_doc*/
++ __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_traverse*/
++ __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_clear*/
++ 0, /*tp_richcompare*/
++ 0, /*tp_weaklistoffset*/
++ 0, /*tp_iter*/
++ 0, /*tp_iternext*/
++ 0, /*tp_methods*/
++ 0, /*tp_members*/
++ 0, /*tp_getset*/
++ 0, /*tp_base*/
++ 0, /*tp_dict*/
++ 0, /*tp_descr_get*/
++ 0, /*tp_descr_set*/
++ 0, /*tp_dictoffset*/
++ 0, /*tp_init*/
++ 0, /*tp_alloc*/
++ __pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_new*/
++ 0, /*tp_free*/
++ 0, /*tp_is_gc*/
++ 0, /*tp_bases*/
++ 0, /*tp_mro*/
++ 0, /*tp_cache*/
++ 0, /*tp_subclasses*/
++ 0, /*tp_weaklist*/
++ 0, /*tp_del*/
++ 0, /*tp_version_tag*/
++ #if PY_VERSION_HEX >= 0x030400a1
++ 0, /*tp_finalize*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0, /*tp_vectorcall*/
++ #endif
++ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0, /*tp_print*/
++ #endif
++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0, /*tp_pypy_flags*/
++ #endif
++};
+
+- /* "(tree fragment)":6
+- * if __pyx_checksum != 0xd41d8cd:
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<<
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- */
+- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_INCREF(__pyx_v___pyx_PickleError);
+- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_5)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_5);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(1, 6, __pyx_L1_error)
++static PyMethodDef __pyx_methods[] = {
++ {0, 0, 0, 0}
++};
+
+- /* "(tree fragment)":4
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- */
+- }
++#if PY_MAJOR_VERSION >= 3
++#if CYTHON_PEP489_MULTI_PHASE_INIT
++static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
++static int __pyx_pymod_exec_mpv(PyObject* module); /*proto*/
++static PyModuleDef_Slot __pyx_moduledef_slots[] = {
++ {Py_mod_create, (void*)__pyx_pymod_create},
++ {Py_mod_exec, (void*)__pyx_pymod_exec_mpv},
++ {0, NULL}
++};
++#endif
+
+- /* "(tree fragment)":7
+- * from pickle import PickleError as __pyx_PickleError
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type) # <<<<<<<<<<<<<<
+- * if __pyx_state is not None:
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+- if (likely(__pyx_t_4)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+- __Pyx_INCREF(__pyx_t_4);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_2, function);
+- }
+- }
+- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
+- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_v___pyx_result = __pyx_t_3;
+- __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
+- __pyx_t_6 = (__pyx_t_1 != 0);
+- if (__pyx_t_6) {
+-
+- /* "(tree fragment)":9
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+- * if __pyx_state is not None:
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
+- * return __pyx_result
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
+- */
+- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
+- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_3);
+- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+-
+- /* "(tree fragment)":8
+- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
+- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
+- * if __pyx_state is not None: # <<<<<<<<<<<<<<
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- * return __pyx_result
+- */
+- }
+-
+- /* "(tree fragment)":10
+- * if __pyx_state is not None:
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- * return __pyx_result # <<<<<<<<<<<<<<
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
+- */
+- __Pyx_XDECREF(__pyx_r);
+- __Pyx_INCREF(__pyx_v___pyx_result);
+- __pyx_r = __pyx_v___pyx_result;
+- goto __pyx_L0;
+-
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+-
+- /* function exit code */
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_3);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = NULL;
+- __pyx_L0:;
+- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
+- __Pyx_XDECREF(__pyx_v___pyx_result);
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-
+-/* "(tree fragment)":11
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[0])
+- */
+-
+-static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
+- PyObject *__pyx_r = NULL;
+- __Pyx_RefNannyDeclarations
+- int __pyx_t_1;
+- Py_ssize_t __pyx_t_2;
+- int __pyx_t_3;
+- int __pyx_t_4;
+- PyObject *__pyx_t_5 = NULL;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- PyObject *__pyx_t_8 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo__set_state", 0);
+-
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[0])
+- */
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+- __PYX_ERR(1, 12, __pyx_L1_error)
+- }
+- __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
+- __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
+- if (__pyx_t_3) {
+- } else {
+- __pyx_t_1 = __pyx_t_3;
+- goto __pyx_L4_bool_binop_done;
+- }
+- __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
+- __pyx_t_4 = (__pyx_t_3 != 0);
+- __pyx_t_1 = __pyx_t_4;
+- __pyx_L4_bool_binop_done:;
+- if (__pyx_t_1) {
+-
+- /* "(tree fragment)":13
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<<
+- */
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(__pyx_v___pyx_state == Py_None)) {
+- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+- __PYX_ERR(1, 13, __pyx_L1_error)
+- }
+- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_8 = NULL;
+- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
+- if (likely(__pyx_t_8)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+- __Pyx_INCREF(__pyx_t_8);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_7, function);
+- }
+- }
+- __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+-
+- /* "(tree fragment)":12
+- * return __pyx_result
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
+- * __pyx_result.__dict__.update(__pyx_state[0])
+- */
+- }
+-
+- /* "(tree fragment)":11
+- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
+- * __pyx_result.__dict__.update(__pyx_state[0])
+- */
+-
+- /* function exit code */
+- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_5);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- __Pyx_XDECREF(__pyx_t_8);
+- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- __pyx_r = 0;
+- __pyx_L0:;
+- __Pyx_XGIVEREF(__pyx_r);
+- __Pyx_RefNannyFinishContext();
+- return __pyx_r;
+-}
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
+- p->reason = Py_None; Py_INCREF(Py_None);
+- p->error = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
++static struct PyModuleDef __pyx_moduledef = {
++ PyModuleDef_HEAD_INIT,
++ "mpv",
++ __pyx_k_pympv_Python_wrapper_for_libmpv, /* m_doc */
++ #if CYTHON_PEP489_MULTI_PHASE_INIT
++ 0, /* m_size */
++ #else
++ -1, /* m_size */
+ #endif
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->reason);
+- Py_CLEAR(p->error);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
++ __pyx_methods /* m_methods */,
++ #if CYTHON_PEP489_MULTI_PHASE_INIT
++ __pyx_moduledef_slots, /* m_slots */
++ #else
++ NULL, /* m_reload */
++ #endif
++ NULL, /* m_traverse */
++ NULL, /* m_clear */
++ NULL /* m_free */
++};
++#endif
++#ifndef CYTHON_SMALL_CODE
++#if defined(__clang__)
++ #define CYTHON_SMALL_CODE
++#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
++ #define CYTHON_SMALL_CODE __attribute__((cold))
++#else
++ #define CYTHON_SMALL_CODE
++#endif
++#endif
+
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
+- if (p->reason) {
+- e = (*v)(p->reason, a); if (e) return e;
+- }
+- if (p->error) {
+- e = (*v)(p->error, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
+- tmp = ((PyObject*)p->reason);
+- p->reason = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->error);
+- p->error = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_5__del__(o);
+- }
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
+- {(char *)"reason", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, (char *)0, 0},
+- {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, (char *)0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.EndOfFileReached", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Data field for MPV_EVENT_END_FILE events\n\n Wraps: mpv_event_end_file\n ", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch __pyx_vtable_9vidcutter_4libs_3mpv_InputDispatch;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_InputDispatch(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch;
+- p->arg0 = Py_None; Py_INCREF(Py_None);
+- p->type = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_InputDispatch(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->arg0);
+- Py_CLEAR(p->type);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_InputDispatch(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o;
+- if (p->arg0) {
+- e = (*v)(p->arg0, a); if (e) return e;
+- }
+- if (p->type) {
+- e = (*v)(p->type, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_InputDispatch(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o;
+- tmp = ((PyObject*)p->arg0);
+- p->arg0 = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->type);
+- p->type = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_type(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_5__del__(o);
+- }
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_InputDispatch[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_InputDispatch[] = {
+- {(char *)"arg0", __pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0, __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0, (char *)0, 0},
+- {(char *)"type", __pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_type, __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_type, (char *)0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_InputDispatch = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.InputDispatch", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_InputDispatch, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.\n\n Wraps: mpv_event_script_input_dispatch\n ", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_InputDispatch, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_InputDispatch, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_InputDispatch, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_InputDispatch, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_InputDispatch, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage;
+- p->prefix = Py_None; Py_INCREF(Py_None);
+- p->level = Py_None; Py_INCREF(Py_None);
+- p->text = Py_None; Py_INCREF(Py_None);
+- p->log_level = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->prefix);
+- Py_CLEAR(p->level);
+- Py_CLEAR(p->text);
+- Py_CLEAR(p->log_level);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
+- if (p->prefix) {
+- e = (*v)(p->prefix, a); if (e) return e;
+- }
+- if (p->level) {
+- e = (*v)(p->level, a); if (e) return e;
+- }
+- if (p->text) {
+- e = (*v)(p->text, a); if (e) return e;
+- }
+- if (p->log_level) {
+- e = (*v)(p->log_level, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
+- tmp = ((PyObject*)p->prefix);
+- p->prefix = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->level);
+- p->level = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->text);
+- p->text = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->log_level);
+- p->log_level = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(o);
+- }
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_LogMessage[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage[] = {
+- {(char *)"prefix", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, (char *)0, 0},
+- {(char *)"level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level, (char *)0, 0},
+- {(char *)"text", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text, (char *)0, 0},
+- {(char *)"log_level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, (char *)0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_LogMessage = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.LogMessage", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Data field for MPV_EVENT_LOG_MESSAGE events.\n\n Wraps: mpv_event_log_message\n ", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_LogMessage, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property __pyx_vtable_9vidcutter_4libs_3mpv_Property;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Property(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Property;
+- p->name = Py_None; Py_INCREF(Py_None);
+- p->data = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->name);
+- Py_CLEAR(p->data);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
+- if (p->name) {
+- e = (*v)(p->name, a); if (e) return e;
+- }
+- if (p->data) {
+- e = (*v)(p->data, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Property(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
+- tmp = ((PyObject*)p->name);
+- p->name = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->data);
+- p->data = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(o);
+- }
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Property[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Property[] = {
+- {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_name, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name, (char *)0, 0},
+- {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_data, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data, (char *)0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Property = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.Property", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Property), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Data field for MPV_EVENT_PROPERTY_CHANGE and MPV_EVENT_GET_PROPERTY_REPLY.\n\n Wraps: mpv_event_property\n ", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_Property, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_Property, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_Property, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_Property, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event __pyx_vtable_9vidcutter_4libs_3mpv_Event;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Event(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Event;
+- p->data = Py_None; Py_INCREF(Py_None);
+- p->reply_userdata = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->data);
+- Py_CLEAR(p->reply_userdata);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
+- if (p->data) {
+- e = (*v)(p->data, a); if (e) return e;
+- }
+- if (p->reply_userdata) {
+- e = (*v)(p->reply_userdata, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Event(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
+- tmp = ((PyObject*)p->data);
+- p->data = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->reply_userdata);
+- p->reply_userdata = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(o);
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_name(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(o);
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(o, v);
+- }
+- else {
+- PyErr_SetString(PyExc_NotImplementedError, "__del__");
+- return -1;
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(o, v);
+- }
+- else {
+- PyErr_SetString(PyExc_NotImplementedError, "__del__");
+- return -1;
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(o);
+- }
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(o);
+-}
+-
+-static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+- if (v) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(o, v);
+- }
+- else {
+- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(o);
+- }
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Event[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Event[] = {
+- {(char *)"error_str", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str, 0, (char *)"mpv_error_string of the error proeprty", 0},
+- {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_name, 0, (char *)"mpv_event_name of the event id", 0},
+- {(char *)"id", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_id, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id, (char *)0, 0},
+- {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error, (char *)0, 0},
+- {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_data, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data, (char *)0, 0},
+- {(char *)"reply_userdata", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, (char *)0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Event = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.Event", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Event), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Wraps: mpv_event", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_Event, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_Event, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_Event, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_Event, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context __pyx_vtable_9vidcutter_4libs_3mpv_Context;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Context(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Context;
+- p->callback = Py_None; Py_INCREF(Py_None);
+- p->callbackthread = Py_None; Py_INCREF(Py_None);
+- p->reply_userdata = Py_None; Py_INCREF(Py_None);
+- if (unlikely(__pyx_pw_9vidcutter_4libs_3mpv_7Context_37__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
+- return o;
+- bad:
+- Py_DECREF(o); o = 0;
+- return NULL;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- {
+- PyObject *etype, *eval, *etb;
+- PyErr_Fetch(&etype, &eval, &etb);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
+- __pyx_pw_9vidcutter_4libs_3mpv_7Context_47__dealloc__(o);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
+- PyErr_Restore(etype, eval, etb);
+- }
+- Py_CLEAR(p->callback);
+- Py_CLEAR(p->callbackthread);
+- Py_CLEAR(p->reply_userdata);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
+- if (p->callback) {
+- e = (*v)(p->callback, a); if (e) return e;
+- }
+- if (p->callbackthread) {
+- e = (*v)(p->callbackthread, a); if (e) return e;
+- }
+- if (p->reply_userdata) {
+- e = (*v)(p->reply_userdata, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Context(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
+- tmp = ((PyObject*)p->callback);
+- p->callback = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->callbackthread);
+- p->callbackthread = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->reply_userdata);
+- p->reply_userdata = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(o);
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_name(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(o);
+-}
+-
+-static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_time(PyObject *o, CYTHON_UNUSED void *x) {
+- return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(o);
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Context[] = {
+- {"suspend", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_1suspend, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_suspend},
+- {"resume", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_3resume, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_2resume},
+- {"request_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_5request_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_4request_event},
+- {"set_log_level", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_7set_log_level, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_6set_log_level},
+- {"load_config", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_9load_config, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_8load_config},
+- {"_format_for", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_11_format_for, METH_O, 0},
+- {"command", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_13command, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_12command},
+- {"get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_14get_property_async},
+- {"try_get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_17try_get_property_async, METH_VARARGS|METH_KEYWORDS, 0},
+- {"try_get_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property, METH_VARARGS|METH_KEYWORDS, 0},
+- {"get_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_21get_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_20get_property},
+- {"set_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_23set_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_22set_property},
+- {"set_option", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_25set_option, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_24set_option},
+- {"initialize", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_27initialize, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_26initialize},
+- {"wait_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_28wait_event},
+- {"wakeup", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_31wakeup, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_30wakeup},
+- {"set_wakeup_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_33set_wakeup_callback, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback},
+- {"get_wakeup_pipe", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_35get_wakeup_pipe, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe},
+- {"observe_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_39observe_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_38observe_property},
+- {"unobserve_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_41unobserve_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_40unobserve_property},
+- {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_43shutdown, METH_NOARGS, 0},
+- {"opengl_cb_api", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_45opengl_cb_api, METH_NOARGS, 0},
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_49__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_51__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Context[] = {
+- {(char *)"api_version", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version, 0, (char *)0, 0},
+- {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_name, 0, (char *)"Unique name for every context created.\n\n Wraps: mpv_client_name\n ", 0},
+- {(char *)"time", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_time, 0, (char *)"Internal mpv client time.\n\n Has an arbitrary start offset, but will never wrap or go backwards.\n\n Wraps: mpv_get_time_us\n ", 0},
+- {0, 0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Context = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.Context", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Context), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- "Base class wrapping a context to interact with mpv.\n\n Assume all calls can raise MPVError.\n\n Wraps: mpv_create, mpv_destroy and all mpv_handle related calls\n ", /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_Context, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_Context, /*tp_methods*/
+- 0, /*tp_members*/
+- __pyx_getsets_9vidcutter_4libs_3mpv_Context, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_Context, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o);
+- p->update_cb = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_OpenGLContext(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- {
+- PyObject *etype, *eval, *etb;
+- PyErr_Fetch(&etype, &eval, &etb);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
+- __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_13__dealloc__(o);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
+- PyErr_Restore(etype, eval, etb);
+- }
+- Py_CLEAR(p->update_cb);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_OpenGLContext(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o;
+- if (p->update_cb) {
+- e = (*v)(p->update_cb, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_OpenGLContext(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o;
+- tmp = ((PyObject*)p->update_cb);
+- p->update_cb = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_OpenGLContext[] = {
+- {"init_gl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_3init_gl, METH_VARARGS|METH_KEYWORDS, 0},
+- {"set_update_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_5set_update_callback, METH_O, 0},
+- {"draw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_7draw, METH_VARARGS|METH_KEYWORDS, 0},
+- {"report_flip", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_9report_flip, METH_O, 0},
+- {"uninit_gl", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_11uninit_gl, METH_NOARGS, 0},
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_15__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_17__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.OpenGLContext", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- 0, /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_1__init__, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams;
+- p->owned = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- {
+- PyObject *etype, *eval, *etb;
+- PyErr_Fetch(&etype, &eval, &etb);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
+- __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(o);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
+- PyErr_Restore(etype, eval, etb);
+- }
+- Py_CLEAR(p->owned);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
+- if (p->owned) {
+- e = (*v)(p->owned, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
+- tmp = ((PyObject*)p->owned);
+- p->owned = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv__RenderParams[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv__RenderParams = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv._RenderParams", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- 0, /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv__RenderParams, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)o);
+- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo;
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo(PyObject *o) {
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.RenderFrameInfo", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+- 0, /*tp_doc*/
+- 0, /*tp_traverse*/
+- 0, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p;
+- PyObject *o;
+- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+- o = (*t->tp_alloc)(t, 0);
+- } else {
+- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+- }
+- if (unlikely(!o)) return 0;
+- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o);
+- p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
+- p->update_cb = Py_None; Py_INCREF(Py_None);
+- p->_x11_display = Py_None; Py_INCREF(Py_None);
+- p->_wl_display = Py_None; Py_INCREF(Py_None);
+- p->_get_proc_address = Py_None; Py_INCREF(Py_None);
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
+- #if CYTHON_USE_TP_FINALIZE
+- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+- if (PyObject_CallFinalizerFromDealloc(o)) return;
+- }
+- #endif
+- PyObject_GC_UnTrack(o);
+- {
+- PyObject *etype, *eval, *etb;
+- PyErr_Fetch(&etype, &eval, &etb);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
+- __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(o);
+- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
+- PyErr_Restore(etype, eval, etb);
+- }
+- Py_CLEAR(p->_mpv);
+- Py_CLEAR(p->update_cb);
+- Py_CLEAR(p->_x11_display);
+- Py_CLEAR(p->_wl_display);
+- Py_CLEAR(p->_get_proc_address);
+- (*Py_TYPE(o)->tp_free)(o);
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
+- if (p->_mpv) {
+- e = (*v)(((PyObject *)p->_mpv), a); if (e) return e;
+- }
+- if (p->update_cb) {
+- e = (*v)(p->update_cb, a); if (e) return e;
+- }
+- if (p->_x11_display) {
+- e = (*v)(p->_x11_display, a); if (e) return e;
+- }
+- if (p->_wl_display) {
+- e = (*v)(p->_wl_display, a); if (e) return e;
+- }
+- if (p->_get_proc_address) {
+- e = (*v)(p->_get_proc_address, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
+- tmp = ((PyObject*)p->_mpv);
+- p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->update_cb);
+- p->update_cb = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->_x11_display);
+- p->_x11_display = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->_wl_display);
+- p->_wl_display = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- tmp = ((PyObject*)p->_get_proc_address);
+- p->_get_proc_address = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderContext[] = {
+- {"set_icc_profile", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile, METH_O, 0},
+- {"set_ambient_light", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light, METH_O, 0},
+- {"get_next_frame_info", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info, METH_NOARGS, 0},
+- {"set_update_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback, METH_O, 0},
+- {"update", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update, METH_NOARGS, 0},
+- {"render", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render, METH_VARARGS|METH_KEYWORDS, 0},
+- {"report_swap", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap, METH_NOARGS, 0},
+- {"free", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free, METH_NOARGS, 0},
+- {"close", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close, METH_NOARGS, 0},
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderContext = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.RenderContext", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- 0, /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_RenderContext, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeObject *t, PyObject *a, PyObject *k) {
+- PyObject *o = __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(t, a, k);
+- if (unlikely(!o)) return 0;
+- return o;
+-}
+-
+-static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext[] = {
+- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__, METH_NOARGS, 0},
+- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__, METH_O, 0},
+- {0, 0, 0, 0}
+-};
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.OpenGLRenderContext", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- 0, /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-
+-static struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[8];
+-static int __pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = 0;
+-
+-static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+- PyObject *o;
+- if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
+- o = (PyObject*)__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[--__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors];
+- memset(o, 0, sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors));
+- (void) PyObject_INIT(o, t);
+- PyObject_GC_Track(o);
+- } else {
+- o = (*t->tp_alloc)(t, 0);
+- if (unlikely(!o)) return 0;
+- }
+- return o;
+-}
+-
+-static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
+- PyObject_GC_UnTrack(o);
+- Py_CLEAR(p->__pyx_v_fn);
+- if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
+- __pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors++] = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o);
+- } else {
+- (*Py_TYPE(o)->tp_free)(o);
+- }
+-}
+-
+-static int __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o, visitproc v, void *a) {
+- int e;
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
+- if (p->__pyx_v_fn) {
+- e = (*v)(p->__pyx_v_fn, a); if (e) return e;
+- }
+- return 0;
+-}
+-
+-static int __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
+- PyObject* tmp;
+- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
+- tmp = ((PyObject*)p->__pyx_v_fn);
+- p->__pyx_v_fn = Py_None; Py_INCREF(Py_None);
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-
+-static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "vidcutter.libs.mpv.__pyx_scope_struct___errors", /*tp_name*/
+- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors), /*tp_basicsize*/
+- 0, /*tp_itemsize*/
+- __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_dealloc*/
+- #if PY_VERSION_HEX < 0x030800b4
+- 0, /*tp_print*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4
+- 0, /*tp_vectorcall_offset*/
+- #endif
+- 0, /*tp_getattr*/
+- 0, /*tp_setattr*/
+- #if PY_MAJOR_VERSION < 3
+- 0, /*tp_compare*/
+- #endif
+- #if PY_MAJOR_VERSION >= 3
+- 0, /*tp_as_async*/
+- #endif
+- 0, /*tp_repr*/
+- 0, /*tp_as_number*/
+- 0, /*tp_as_sequence*/
+- 0, /*tp_as_mapping*/
+- 0, /*tp_hash*/
+- 0, /*tp_call*/
+- 0, /*tp_str*/
+- 0, /*tp_getattro*/
+- 0, /*tp_setattro*/
+- 0, /*tp_as_buffer*/
+- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+- 0, /*tp_doc*/
+- __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_traverse*/
+- __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_clear*/
+- 0, /*tp_richcompare*/
+- 0, /*tp_weaklistoffset*/
+- 0, /*tp_iter*/
+- 0, /*tp_iternext*/
+- 0, /*tp_methods*/
+- 0, /*tp_members*/
+- 0, /*tp_getset*/
+- 0, /*tp_base*/
+- 0, /*tp_dict*/
+- 0, /*tp_descr_get*/
+- 0, /*tp_descr_set*/
+- 0, /*tp_dictoffset*/
+- 0, /*tp_init*/
+- 0, /*tp_alloc*/
+- __pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_new*/
+- 0, /*tp_free*/
+- 0, /*tp_is_gc*/
+- 0, /*tp_bases*/
+- 0, /*tp_mro*/
+- 0, /*tp_cache*/
+- 0, /*tp_subclasses*/
+- 0, /*tp_weaklist*/
+- 0, /*tp_del*/
+- 0, /*tp_version_tag*/
+- #if PY_VERSION_HEX >= 0x030400a1
+- 0, /*tp_finalize*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b1
+- 0, /*tp_vectorcall*/
+- #endif
+- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0, /*tp_print*/
+- #endif
+-};
+-
+-static PyMethodDef __pyx_methods[] = {
+- {0, 0, 0, 0}
+-};
+-
+-#if PY_MAJOR_VERSION >= 3
+-#if CYTHON_PEP489_MULTI_PHASE_INIT
+-static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
+-static int __pyx_pymod_exec_mpv(PyObject* module); /*proto*/
+-static PyModuleDef_Slot __pyx_moduledef_slots[] = {
+- {Py_mod_create, (void*)__pyx_pymod_create},
+- {Py_mod_exec, (void*)__pyx_pymod_exec_mpv},
+- {0, NULL}
+-};
+-#endif
+-
+-static struct PyModuleDef __pyx_moduledef = {
+- PyModuleDef_HEAD_INIT,
+- "mpv",
+- __pyx_k_pympv_Python_wrapper_for_libmpv, /* m_doc */
+- #if CYTHON_PEP489_MULTI_PHASE_INIT
+- 0, /* m_size */
+- #else
+- -1, /* m_size */
+- #endif
+- __pyx_methods /* m_methods */,
+- #if CYTHON_PEP489_MULTI_PHASE_INIT
+- __pyx_moduledef_slots, /* m_slots */
+- #else
+- NULL, /* m_reload */
+- #endif
+- NULL, /* m_traverse */
+- NULL, /* m_clear */
+- NULL /* m_free */
+-};
+-#endif
+-#ifndef CYTHON_SMALL_CODE
+-#if defined(__clang__)
+- #define CYTHON_SMALL_CODE
+-#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+- #define CYTHON_SMALL_CODE __attribute__((cold))
+-#else
+- #define CYTHON_SMALL_CODE
+-#endif
+-#endif
+-
+-static __Pyx_StringTabEntry __pyx_string_tab[] = {
+- {&__pyx_kp_s_0_3_0, __pyx_k_0_3_0, sizeof(__pyx_k_0_3_0), 0, 0, 1, 0},
+- {&__pyx_n_s_API_OPENGL, __pyx_k_API_OPENGL, sizeof(__pyx_k_API_OPENGL), 0, 0, 1, 1},
+- {&__pyx_kp_s_Andre_D, __pyx_k_Andre_D, sizeof(__pyx_k_Andre_D), 0, 0, 1, 0},
+- {&__pyx_n_s_CAPI_MAJOR, __pyx_k_CAPI_MAJOR, sizeof(__pyx_k_CAPI_MAJOR), 0, 0, 1, 1},
+- {&__pyx_n_s_CAPI_MINOR, __pyx_k_CAPI_MINOR, sizeof(__pyx_k_CAPI_MINOR), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread, __pyx_k_CallbackThread, sizeof(__pyx_k_CallbackThread), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread___init, __pyx_k_CallbackThread___init, sizeof(__pyx_k_CallbackThread___init), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread_call, __pyx_k_CallbackThread_call, sizeof(__pyx_k_CallbackThread_call), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread_mpv_callback, __pyx_k_CallbackThread_mpv_callback, sizeof(__pyx_k_CallbackThread_mpv_callback), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread_run, __pyx_k_CallbackThread_run, sizeof(__pyx_k_CallbackThread_run), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread_set, __pyx_k_CallbackThread_set, sizeof(__pyx_k_CallbackThread_set), 0, 0, 1, 1},
+- {&__pyx_n_s_CallbackThread_shutdown, __pyx_k_CallbackThread_shutdown, sizeof(__pyx_k_CallbackThread_shutdown), 0, 0, 1, 1},
+- {&__pyx_n_s_Context, __pyx_k_Context, sizeof(__pyx_k_Context), 0, 0, 1, 1},
+- {&__pyx_kp_s_Context_creation_error, __pyx_k_Context_creation_error, sizeof(__pyx_k_Context_creation_error), 0, 0, 1, 0},
+- {&__pyx_n_s_DeprecationWarning, __pyx_k_DeprecationWarning, sizeof(__pyx_k_DeprecationWarning), 0, 0, 1, 1},
+- {&__pyx_n_s_EOFReasons, __pyx_k_EOFReasons, sizeof(__pyx_k_EOFReasons), 0, 0, 1, 1},
+- {&__pyx_n_s_EndOfFileReached, __pyx_k_EndOfFileReached, sizeof(__pyx_k_EndOfFileReached), 0, 0, 1, 1},
+- {&__pyx_n_s_Errors, __pyx_k_Errors, sizeof(__pyx_k_Errors), 0, 0, 1, 1},
+- {&__pyx_n_s_Event, __pyx_k_Event, sizeof(__pyx_k_Event), 0, 0, 1, 1},
+- {&__pyx_n_s_Events, __pyx_k_Events, sizeof(__pyx_k_Events), 0, 0, 1, 1},
+- {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_k_Incompatible_checksums_s_vs_0x05, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x05), 0, 0, 1, 0},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_k_Incompatible_checksums_s_vs_0x56, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x56), 0, 0, 1, 0},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_k_Incompatible_checksums_s_vs_0x87, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x87), 0, 0, 1, 0},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0xbf, __pyx_k_Incompatible_checksums_s_vs_0xbf, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xbf), 0, 0, 1, 0},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0},
+- {&__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_k_Incompatible_checksums_s_vs_0xda, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xda), 0, 0, 1, 0},
+- {&__pyx_n_s_InputDispatch, __pyx_k_InputDispatch, sizeof(__pyx_k_InputDispatch), 0, 0, 1, 1},
+- {&__pyx_kp_s_Known_possible_values_for_EndOfF, __pyx_k_Known_possible_values_for_EndOfF, sizeof(__pyx_k_Known_possible_values_for_EndOfF), 0, 0, 1, 0},
+- {&__pyx_n_s_LogLevels, __pyx_k_LogLevels, sizeof(__pyx_k_LogLevels), 0, 0, 1, 1},
+- {&__pyx_n_s_LogMessage, __pyx_k_LogMessage, sizeof(__pyx_k_LogMessage), 0, 0, 1, 1},
+- {&__pyx_n_s_MIN_CAPI_MINOR, __pyx_k_MIN_CAPI_MINOR, sizeof(__pyx_k_MIN_CAPI_MINOR), 0, 0, 1, 1},
+- {&__pyx_n_s_MPVError, __pyx_k_MPVError, sizeof(__pyx_k_MPVError), 0, 0, 1, 1},
+- {&__pyx_n_s_MPVError___init, __pyx_k_MPVError___init, sizeof(__pyx_k_MPVError___init), 0, 0, 1, 1},
+- {&__pyx_n_s_OpenGLContext, __pyx_k_OpenGLContext, sizeof(__pyx_k_OpenGLContext), 0, 0, 1, 1},
+- {&__pyx_kp_s_OpenGLContext_is_deprecated_plea, __pyx_k_OpenGLContext_is_deprecated_plea, sizeof(__pyx_k_OpenGLContext_is_deprecated_plea), 0, 0, 1, 0},
+- {&__pyx_n_s_OpenGLRenderContext, __pyx_k_OpenGLRenderContext, sizeof(__pyx_k_OpenGLRenderContext), 0, 0, 1, 1},
+- {&__pyx_kp_s_OpenGL_API_not_available, __pyx_k_OpenGL_API_not_available, sizeof(__pyx_k_OpenGL_API_not_available), 0, 0, 1, 0},
+- {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
+- {&__pyx_n_s_Property, __pyx_k_Property, sizeof(__pyx_k_Property), 0, 0, 1, 1},
+- {&__pyx_n_s_PyMPVError, __pyx_k_PyMPVError, sizeof(__pyx_k_PyMPVError), 0, 0, 1, 1},
+- {&__pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_k_REQUIRED_CAPI_MAJOR, sizeof(__pyx_k_REQUIRED_CAPI_MAJOR), 0, 0, 1, 1},
+- {&__pyx_n_s_RenderContext, __pyx_k_RenderContext, sizeof(__pyx_k_RenderContext), 0, 0, 1, 1},
+- {&__pyx_n_s_RenderParams, __pyx_k_RenderParams, sizeof(__pyx_k_RenderParams), 0, 0, 1, 1},
+- {&__pyx_kp_s_RenderParams_overflow, __pyx_k_RenderParams_overflow, sizeof(__pyx_k_RenderParams_overflow), 0, 0, 1, 0},
+- {&__pyx_n_s_ReplyUserData, __pyx_k_ReplyUserData, sizeof(__pyx_k_ReplyUserData), 0, 0, 1, 1},
+- {&__pyx_n_s_ReplyUserData___init, __pyx_k_ReplyUserData___init, sizeof(__pyx_k_ReplyUserData___init), 0, 0, 1, 1},
+- {&__pyx_n_s_ReplyUserData_add, __pyx_k_ReplyUserData_add, sizeof(__pyx_k_ReplyUserData_add), 0, 0, 1, 1},
+- {&__pyx_n_s_ReplyUserData_remove, __pyx_k_ReplyUserData_remove, sizeof(__pyx_k_ReplyUserData_remove), 0, 0, 1, 1},
+- {&__pyx_n_s_Semaphore, __pyx_k_Semaphore, sizeof(__pyx_k_Semaphore), 0, 0, 1, 1},
+- {&__pyx_kp_s_Set_of_known_error_codes_from_Mp, __pyx_k_Set_of_known_error_codes_from_Mp, sizeof(__pyx_k_Set_of_known_error_codes_from_Mp), 0, 0, 1, 0},
+- {&__pyx_kp_s_Set_of_known_values_for_Event_id, __pyx_k_Set_of_known_values_for_Event_id, sizeof(__pyx_k_Set_of_known_values_for_Event_id), 0, 0, 1, 0},
+- {&__pyx_n_s_Thread, __pyx_k_Thread, sizeof(__pyx_k_Thread), 0, 0, 1, 1},
+- {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+- {&__pyx_n_s_UPDATE_FRAME, __pyx_k_UPDATE_FRAME, sizeof(__pyx_k_UPDATE_FRAME), 0, 0, 1, 1},
+- {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1},
+- {&__pyx_n_s_UnicodeEncodeError, __pyx_k_UnicodeEncodeError, sizeof(__pyx_k_UnicodeEncodeError), 0, 0, 1, 1},
+- {&__pyx_kp_s_Unknown_api_type_r, __pyx_k_Unknown_api_type_r, sizeof(__pyx_k_Unknown_api_type_r), 0, 0, 1, 0},
+- {&__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_k_Unknown_or_invalid_pointer_objec, sizeof(__pyx_k_Unknown_or_invalid_pointer_objec), 0, 0, 1, 0},
+- {&__pyx_n_s_aborted, __pyx_k_aborted, sizeof(__pyx_k_aborted), 0, 0, 1, 1},
+- {&__pyx_n_s_acquire, __pyx_k_acquire, sizeof(__pyx_k_acquire), 0, 0, 1, 1},
+- {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
+- {&__pyx_n_s_advanced_control, __pyx_k_advanced_control, sizeof(__pyx_k_advanced_control), 0, 0, 1, 1},
+- {&__pyx_n_s_ao_init_failed, __pyx_k_ao_init_failed, sizeof(__pyx_k_ao_init_failed), 0, 0, 1, 1},
+- {&__pyx_n_s_api_type, __pyx_k_api_type, sizeof(__pyx_k_api_type), 0, 0, 1, 1},
+- {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
+- {&__pyx_n_s_asynchronous, __pyx_k_asynchronous, sizeof(__pyx_k_asynchronous), 0, 0, 1, 1},
+- {&__pyx_n_s_atomic_request_ptr, __pyx_k_atomic_request_ptr, sizeof(__pyx_k_atomic_request_ptr), 0, 0, 1, 1},
+- {&__pyx_n_s_audio_reconfig, __pyx_k_audio_reconfig, sizeof(__pyx_k_audio_reconfig), 0, 0, 1, 1},
+- {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1},
+- {&__pyx_n_s_block_for_target_time, __pyx_k_block_for_target_time, sizeof(__pyx_k_block_for_target_time), 0, 0, 1, 1},
+- {&__pyx_n_s_block_vsync, __pyx_k_block_vsync, sizeof(__pyx_k_block_vsync), 0, 0, 1, 1},
+- {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
+- {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
+- {&__pyx_n_s_chapter_change, __pyx_k_chapter_change, sizeof(__pyx_k_chapter_change), 0, 0, 1, 1},
+- {&__pyx_n_s_client_message, __pyx_k_client_message, sizeof(__pyx_k_client_message), 0, 0, 1, 1},
+- {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
+- {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
+- {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
+- {&__pyx_n_s_command_error, __pyx_k_command_error, sizeof(__pyx_k_command_error), 0, 0, 1, 1},
+- {&__pyx_n_s_command_reply, __pyx_k_command_reply, sizeof(__pyx_k_command_reply), 0, 0, 1, 1},
+- {&__pyx_n_s_connector_id, __pyx_k_connector_id, sizeof(__pyx_k_connector_id), 0, 0, 1, 1},
+- {&__pyx_n_s_counter, __pyx_k_counter, sizeof(__pyx_k_counter), 0, 0, 1, 1},
+- {&__pyx_n_s_crtc_id, __pyx_k_crtc_id, sizeof(__pyx_k_crtc_id), 0, 0, 1, 1},
+- {&__pyx_n_s_daemon, __pyx_k_daemon, sizeof(__pyx_k_daemon), 0, 0, 1, 1},
+- {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
+- {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
+- {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
+- {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
+- {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1},
+- {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
+- {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
+- {&__pyx_kp_s_drmModeAtomicReq, __pyx_k_drmModeAtomicReq, sizeof(__pyx_k_drmModeAtomicReq), 0, 0, 1, 0},
+- {&__pyx_n_s_drm_display, __pyx_k_drm_display, sizeof(__pyx_k_drm_display), 0, 0, 1, 1},
+- {&__pyx_n_s_drm_osd_size, __pyx_k_drm_osd_size, sizeof(__pyx_k_drm_osd_size), 0, 0, 1, 1},
+- {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
+- {&__pyx_n_s_e_i, __pyx_k_e_i, sizeof(__pyx_k_e_i), 0, 0, 1, 1},
+- {&__pyx_n_s_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 0, 1, 1},
+- {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
+- {&__pyx_n_s_end_file, __pyx_k_end_file, sizeof(__pyx_k_end_file), 0, 0, 1, 1},
+- {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
+- {&__pyx_n_s_eof, __pyx_k_eof, sizeof(__pyx_k_eof), 0, 0, 1, 1},
+- {&__pyx_n_s_err_c, __pyx_k_err_c, sizeof(__pyx_k_err_c), 0, 0, 1, 1},
+- {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
+- {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
+- {&__pyx_n_s_errors_locals_wrapped, __pyx_k_errors_locals_wrapped, sizeof(__pyx_k_errors_locals_wrapped), 0, 0, 1, 1},
+- {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1},
+- {&__pyx_n_s_exts, __pyx_k_exts, sizeof(__pyx_k_exts), 0, 0, 1, 1},
+- {&__pyx_n_s_fatal, __pyx_k_fatal, sizeof(__pyx_k_fatal), 0, 0, 1, 1},
+- {&__pyx_n_s_fbo, __pyx_k_fbo, sizeof(__pyx_k_fbo), 0, 0, 1, 1},
+- {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
+- {&__pyx_n_s_file_loaded, __pyx_k_file_loaded, sizeof(__pyx_k_file_loaded), 0, 0, 1, 1},
+- {&__pyx_n_s_flip_y, __pyx_k_flip_y, sizeof(__pyx_k_flip_y), 0, 0, 1, 1},
+- {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
+- {&__pyx_n_s_format_for, __pyx_k_format_for, sizeof(__pyx_k_format_for), 0, 0, 1, 1},
+- {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
+- {&__pyx_n_s_get_proc_address, __pyx_k_get_proc_address, sizeof(__pyx_k_get_proc_address), 0, 0, 1, 1},
+- {&__pyx_n_s_get_property, __pyx_k_get_property, sizeof(__pyx_k_get_property), 0, 0, 1, 1},
+- {&__pyx_n_s_get_property_async, __pyx_k_get_property_async, sizeof(__pyx_k_get_property_async), 0, 0, 1, 1},
+- {&__pyx_n_s_get_property_reply, __pyx_k_get_property_reply, sizeof(__pyx_k_get_property_reply), 0, 0, 1, 1},
+- {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
+- {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
+- {&__pyx_kp_s_icc_blob_should_be_a_bytes_insta, __pyx_k_icc_blob_should_be_a_bytes_insta, sizeof(__pyx_k_icc_blob_should_be_a_bytes_insta), 0, 0, 1, 0},
+- {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
+- {&__pyx_n_s_idle, __pyx_k_idle, sizeof(__pyx_k_idle), 0, 0, 1, 1},
+- {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+- {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
+- {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
+- {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1},
+- {&__pyx_n_s_internal_format, __pyx_k_internal_format, sizeof(__pyx_k_internal_format), 0, 0, 1, 1},
+- {&__pyx_n_s_invalid_parameter, __pyx_k_invalid_parameter, sizeof(__pyx_k_invalid_parameter), 0, 0, 1, 1},
+- {&__pyx_n_s_is_py3, __pyx_k_is_py3, sizeof(__pyx_k_is_py3), 0, 0, 1, 1},
+- {&__pyx_n_s_isshutdown, __pyx_k_isshutdown, sizeof(__pyx_k_isshutdown), 0, 0, 1, 1},
+- {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
+- {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
+- {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
+- {&__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_k_libmpv_version_is_incorrect_Requ, sizeof(__pyx_k_libmpv_version_is_incorrect_Requ), 0, 0, 1, 0},
+- {&__pyx_n_s_load_config, __pyx_k_load_config, sizeof(__pyx_k_load_config), 0, 0, 1, 1},
+- {&__pyx_n_s_loading_failed, __pyx_k_loading_failed, sizeof(__pyx_k_loading_failed), 0, 0, 1, 1},
+- {&__pyx_n_s_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 0, 1, 1},
+- {&__pyx_n_s_log_message, __pyx_k_log_message, sizeof(__pyx_k_log_message), 0, 0, 1, 1},
+- {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+- {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
+- {&__pyx_n_s_metadata_update, __pyx_k_metadata_update, sizeof(__pyx_k_metadata_update), 0, 0, 1, 1},
+- {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
+- {&__pyx_n_s_mpv, __pyx_k_mpv, sizeof(__pyx_k_mpv), 0, 0, 1, 1},
+- {&__pyx_n_s_mpv_callback, __pyx_k_mpv_callback, sizeof(__pyx_k_mpv_callback), 0, 0, 1, 1},
+- {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
+- {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
+- {&__pyx_n_s_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 0, 1, 1},
+- {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
+- {&__pyx_n_s_nomem, __pyx_k_nomem, sizeof(__pyx_k_nomem), 0, 0, 1, 1},
+- {&__pyx_n_s_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 0, 1, 1},
+- {&__pyx_n_s_not_found, __pyx_k_not_found, sizeof(__pyx_k_not_found), 0, 0, 1, 1},
+- {&__pyx_n_s_not_implemented, __pyx_k_not_implemented, sizeof(__pyx_k_not_implemented), 0, 0, 1, 1},
+- {&__pyx_n_s_nothing_to_play, __pyx_k_nothing_to_play, sizeof(__pyx_k_nothing_to_play), 0, 0, 1, 1},
+- {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
+- {&__pyx_n_s_observe_property, __pyx_k_observe_property, sizeof(__pyx_k_observe_property), 0, 0, 1, 1},
+- {&__pyx_n_s_observed, __pyx_k_observed, sizeof(__pyx_k_observed), 0, 0, 1, 1},
+- {&__pyx_n_s_opengl, __pyx_k_opengl, sizeof(__pyx_k_opengl), 0, 0, 1, 1},
+- {&__pyx_n_s_opengl_fbo, __pyx_k_opengl_fbo, sizeof(__pyx_k_opengl_fbo), 0, 0, 1, 1},
+- {&__pyx_n_s_opengl_init_params, __pyx_k_opengl_init_params, sizeof(__pyx_k_opengl_init_params), 0, 0, 1, 1},
+- {&__pyx_n_s_option_error, __pyx_k_option_error, sizeof(__pyx_k_option_error), 0, 0, 1, 1},
+- {&__pyx_n_s_option_format, __pyx_k_option_format, sizeof(__pyx_k_option_format), 0, 0, 1, 1},
+- {&__pyx_n_s_pause, __pyx_k_pause, sizeof(__pyx_k_pause), 0, 0, 1, 1},
+- {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
+- {&__pyx_n_s_playback_restart, __pyx_k_playback_restart, sizeof(__pyx_k_playback_restart), 0, 0, 1, 1},
+- {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
+- {&__pyx_n_s_present, __pyx_k_present, sizeof(__pyx_k_present), 0, 0, 1, 1},
+- {&__pyx_n_s_prop, __pyx_k_prop, sizeof(__pyx_k_prop), 0, 0, 1, 1},
+- {&__pyx_n_s_property_change, __pyx_k_property_change, sizeof(__pyx_k_property_change), 0, 0, 1, 1},
+- {&__pyx_n_s_property_error, __pyx_k_property_error, sizeof(__pyx_k_property_error), 0, 0, 1, 1},
+- {&__pyx_n_s_property_format, __pyx_k_property_format, sizeof(__pyx_k_property_format), 0, 0, 1, 1},
+- {&__pyx_n_s_property_unavailable, __pyx_k_property_unavailable, sizeof(__pyx_k_property_unavailable), 0, 0, 1, 1},
+- {&__pyx_kp_s_pympv_error_during_callback_s, __pyx_k_pympv_error_during_callback_s, sizeof(__pyx_k_pympv_error_during_callback_s), 0, 0, 1, 0},
+- {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_k_pyx_unpickle_EndOfFileReached, sizeof(__pyx_k_pyx_unpickle_EndOfFileReached), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_Event, __pyx_k_pyx_unpickle_Event, sizeof(__pyx_k_pyx_unpickle_Event), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_InputDispatch, __pyx_k_pyx_unpickle_InputDispatch, sizeof(__pyx_k_pyx_unpickle_InputDispatch), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_LogMessage, __pyx_k_pyx_unpickle_LogMessage, sizeof(__pyx_k_pyx_unpickle_LogMessage), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_Property, __pyx_k_pyx_unpickle_Property, sizeof(__pyx_k_pyx_unpickle_Property), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_k_pyx_unpickle_RenderFrameInfo, sizeof(__pyx_k_pyx_unpickle_RenderFrameInfo), 0, 0, 1, 1},
+- {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
+- {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
+- {&__pyx_n_s_queue_full, __pyx_k_queue_full, sizeof(__pyx_k_queue_full), 0, 0, 1, 1},
+- {&__pyx_n_s_quit, __pyx_k_quit, sizeof(__pyx_k_quit), 0, 0, 1, 1},
+- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
+- {&__pyx_n_s_redraw, __pyx_k_redraw, sizeof(__pyx_k_redraw), 0, 0, 1, 1},
+- {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
+- {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
+- {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
+- {&__pyx_n_s_release, __pyx_k_release, sizeof(__pyx_k_release), 0, 0, 1, 1},
+- {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
+- {&__pyx_n_s_render, __pyx_k_render, sizeof(__pyx_k_render), 0, 0, 1, 1},
+- {&__pyx_n_s_render_fd, __pyx_k_render_fd, sizeof(__pyx_k_render_fd), 0, 0, 1, 1},
+- {&__pyx_n_s_repeat, __pyx_k_repeat, sizeof(__pyx_k_repeat), 0, 0, 1, 1},
+- {&__pyx_n_s_request_event, __pyx_k_request_event, sizeof(__pyx_k_request_event), 0, 0, 1, 1},
+- {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1},
+- {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
+- {&__pyx_n_s_script_input_dispatch, __pyx_k_script_input_dispatch, sizeof(__pyx_k_script_input_dispatch), 0, 0, 1, 1},
+- {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
+- {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
+- {&__pyx_kp_s_self__ctx_cannot_be_converted_to, __pyx_k_self__ctx_cannot_be_converted_to, sizeof(__pyx_k_self__ctx_cannot_be_converted_to), 0, 0, 1, 0},
+- {&__pyx_kp_s_self_params_cannot_be_converted, __pyx_k_self_params_cannot_be_converted, sizeof(__pyx_k_self_params_cannot_be_converted), 0, 0, 1, 0},
+- {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
+- {&__pyx_n_s_set_ambient_light, __pyx_k_set_ambient_light, sizeof(__pyx_k_set_ambient_light), 0, 0, 1, 1},
+- {&__pyx_n_s_set_icc_profile, __pyx_k_set_icc_profile, sizeof(__pyx_k_set_icc_profile), 0, 0, 1, 1},
+- {&__pyx_n_s_set_log_level, __pyx_k_set_log_level, sizeof(__pyx_k_set_log_level), 0, 0, 1, 1},
+- {&__pyx_n_s_set_option, __pyx_k_set_option, sizeof(__pyx_k_set_option), 0, 0, 1, 1},
+- {&__pyx_n_s_set_property, __pyx_k_set_property, sizeof(__pyx_k_set_property), 0, 0, 1, 1},
+- {&__pyx_n_s_set_property_reply, __pyx_k_set_property_reply, sizeof(__pyx_k_set_property_reply), 0, 0, 1, 1},
+- {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
+- {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
+- {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1},
+- {&__pyx_n_s_skip_rendering, __pyx_k_skip_rendering, sizeof(__pyx_k_skip_rendering), 0, 0, 1, 1},
+- {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
+- {&__pyx_n_s_start_file, __pyx_k_start_file, sizeof(__pyx_k_start_file), 0, 0, 1, 1},
+- {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
+- {&__pyx_n_s_strdec, __pyx_k_strdec, sizeof(__pyx_k_strdec), 0, 0, 1, 1},
+- {&__pyx_n_s_strdec_err, __pyx_k_strdec_err, sizeof(__pyx_k_strdec_err), 0, 0, 1, 1},
+- {&__pyx_n_s_strenc, __pyx_k_strenc, sizeof(__pyx_k_strenc), 0, 0, 1, 1},
+- {&__pyx_n_s_strict, __pyx_k_strict, sizeof(__pyx_k_strict), 0, 0, 1, 1},
+- {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
+- {&__pyx_n_s_success, __pyx_k_success, sizeof(__pyx_k_success), 0, 0, 1, 1},
+- {&__pyx_n_s_surrogateescape, __pyx_k_surrogateescape, sizeof(__pyx_k_surrogateescape), 0, 0, 1, 1},
+- {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+- {&__pyx_n_s_target_time, __pyx_k_target_time, sizeof(__pyx_k_target_time), 0, 0, 1, 1},
+- {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+- {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
+- {&__pyx_n_s_tick, __pyx_k_tick, sizeof(__pyx_k_tick), 0, 0, 1, 1},
+- {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
+- {&__pyx_n_s_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 0, 1, 1},
+- {&__pyx_n_s_tracks_changed, __pyx_k_tracks_changed, sizeof(__pyx_k_tracks_changed), 0, 0, 1, 1},
+- {&__pyx_n_s_tracks_switched, __pyx_k_tracks_switched, sizeof(__pyx_k_tracks_switched), 0, 0, 1, 1},
+- {&__pyx_n_s_uninit_gl, __pyx_k_uninit_gl, sizeof(__pyx_k_uninit_gl), 0, 0, 1, 1},
+- {&__pyx_n_s_uninitialized, __pyx_k_uninitialized, sizeof(__pyx_k_uninitialized), 0, 0, 1, 1},
+- {&__pyx_n_s_unknown_format, __pyx_k_unknown_format, sizeof(__pyx_k_unknown_format), 0, 0, 1, 1},
+- {&__pyx_n_s_unobserve_property, __pyx_k_unobserve_property, sizeof(__pyx_k_unobserve_property), 0, 0, 1, 1},
+- {&__pyx_n_s_unpause, __pyx_k_unpause, sizeof(__pyx_k_unpause), 0, 0, 1, 1},
+- {&__pyx_n_s_unsupported, __pyx_k_unsupported, sizeof(__pyx_k_unsupported), 0, 0, 1, 1},
+- {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
+- {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
+- {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
+- {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
+- {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
+- {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
+- {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
+- {&__pyx_n_s_vidcutter_libs_mpv, __pyx_k_vidcutter_libs_mpv, sizeof(__pyx_k_vidcutter_libs_mpv), 0, 0, 1, 1},
+- {&__pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_k_vidcutter_libs_pympv_mpv_pyx, sizeof(__pyx_k_vidcutter_libs_pympv_mpv_pyx), 0, 0, 1, 0},
+- {&__pyx_n_s_video_reconfig, __pyx_k_video_reconfig, sizeof(__pyx_k_video_reconfig), 0, 0, 1, 1},
+- {&__pyx_n_s_vo_init_failed, __pyx_k_vo_init_failed, sizeof(__pyx_k_vo_init_failed), 0, 0, 1, 1},
+- {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
+- {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
+- {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
+- {&__pyx_n_s_wl_display, __pyx_k_wl_display, sizeof(__pyx_k_wl_display), 0, 0, 1, 1},
+- {&__pyx_n_s_wrapped, __pyx_k_wrapped, sizeof(__pyx_k_wrapped), 0, 0, 1, 1},
+- {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
+- {&__pyx_n_s_x11_display, __pyx_k_x11_display, sizeof(__pyx_k_x11_display), 0, 0, 1, 1},
+- {0, 0, 0, 0, 0, 0, 0}
+-};
+-static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
+- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 44, __pyx_L1_error)
+- __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 346, __pyx_L1_error)
+- __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 58, __pyx_L1_error)
+- __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 66, __pyx_L1_error)
+- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 222, __pyx_L1_error)
+- __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 303, __pyx_L1_error)
+- __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 475, __pyx_L1_error)
+- __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
+- __pyx_builtin_DeprecationWarning = __Pyx_GetBuiltinName(__pyx_n_s_DeprecationWarning); if (!__pyx_builtin_DeprecationWarning) __PYX_ERR(0, 830, __pyx_L1_error)
+- return 0;
+- __pyx_L1_error:;
+- return -1;
+-}
+-
+-static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":319
+- *
+- * def _errors(fn):
+- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+- * v = fn(*k, **kw)
+- * if v < 0:
+- */
+- __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 319, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple_);
+- __Pyx_GIVEREF(__pyx_tuple_);
+- __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 319, __pyx_L1_error)
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+- */
+- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__3);
+- __Pyx_GIVEREF(__pyx_tuple__3);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+- */
+- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__4);
+- __Pyx_GIVEREF(__pyx_tuple__4);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":830
+- * def __init__(self):
+- * self.inited = False
+- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning) # <<<<<<<<<<<<<<
+- *
+- * def init_gl(self, exts, get_proc_address):
+- */
+- __pyx_tuple__5 = PyTuple_Pack(2, __pyx_kp_s_OpenGLContext_is_deprecated_plea, __pyx_builtin_DeprecationWarning); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 830, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__5);
+- __Pyx_GIVEREF(__pyx_tuple__5);
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- */
+- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__6);
+- __Pyx_GIVEREF(__pyx_tuple__6);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- */
+- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__7);
+- __Pyx_GIVEREF(__pyx_tuple__7);
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- */
+- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__8);
+- __Pyx_GIVEREF(__pyx_tuple__8);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("self.params cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- */
+- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__9);
+- __Pyx_GIVEREF(__pyx_tuple__9);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":992
+- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+- * if drm_display:
+- * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- */
+- __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 992, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__10);
+- __Pyx_GIVEREF(__pyx_tuple__10);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":993
+- * if drm_display:
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None)
+- */
+- __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 993, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__11);
+- __Pyx_GIVEREF(__pyx_tuple__11);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":994
+- * drm_params.fd = drm_display.get("fd", -1)
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
+- * arp = drm_display.get("atomic_request_ptr", None)
+- * if arp is not None:
+- */
+- __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 994, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__12);
+- __Pyx_GIVEREF(__pyx_tuple__12);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":995
+- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+- * drm_params.connector_id = drm_display.get("connector_id", -1)
+- * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
+- * if arp is not None:
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- */
+- __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 995, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__13);
+- __Pyx_GIVEREF(__pyx_tuple__13);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":998
+- * if arp is not None:
+- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+- * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+- * if drm_osd_size:
+- */
+- __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 998, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__14);
+- __Pyx_GIVEREF(__pyx_tuple__14);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1083
+- * if opengl_fbo:
+- * memset(&fbo, 0, sizeof(fbo))
+- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
+- * fbo.w = opengl_fbo["w"]
+- * fbo.h = opengl_fbo["h"]
+- */
+- __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1083, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__15);
+- __Pyx_GIVEREF(__pyx_tuple__15);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1086
+- * fbo.w = opengl_fbo["w"]
+- * fbo.h = opengl_fbo["h"]
+- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
+- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+- * if flip_y:
+- */
+- __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1086, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__16);
+- __Pyx_GIVEREF(__pyx_tuple__16);
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- */
+- __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__17);
+- __Pyx_GIVEREF(__pyx_tuple__17);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- */
+- __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__18);
+- __Pyx_GIVEREF(__pyx_tuple__18);
+-
+- /* "(tree fragment)":2
+- * def __reduce_cython__(self):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- */
+- __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 2, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__19);
+- __Pyx_GIVEREF(__pyx_tuple__19);
+-
+- /* "(tree fragment)":4
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+- * def __setstate_cython__(self, __pyx_state):
+- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+- */
+- __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 4, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__20);
+- __Pyx_GIVEREF(__pyx_tuple__20);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":52
+- * void PyEval_InitThreads()
+- *
+- * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
+- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+- * # mpv -> Python
+- */
+- __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 52, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__21);
+- __Pyx_GIVEREF(__pyx_tuple__21);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":55
+- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+- * # mpv -> Python
+- * def _strdec(s): # <<<<<<<<<<<<<<
+- * try:
+- * return s.decode("utf-8", _strdec_err)
+- */
+- __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 55, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__22);
+- __Pyx_GIVEREF(__pyx_tuple__22);
+- __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 55, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":63
+- *
+- * # Python -> mpv
+- * def _strenc(s): # <<<<<<<<<<<<<<
+- * try:
+- * return s.encode("utf-8", _strdec_err)
+- */
+- __pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 63, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__24);
+- __Pyx_GIVEREF(__pyx_tuple__24);
+- __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 63, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":318
+- *
+- *
+- * def _errors(fn): # <<<<<<<<<<<<<<
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
+- */
+- __pyx_tuple__26 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 318, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__26);
+- __Pyx_GIVEREF(__pyx_tuple__26);
+- __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 318, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":329
+- * code = None
+- *
+- * def __init__(self, e): # <<<<<<<<<<<<<<
+- * self.code = e
+- * cdef const char* err_c
+- */
+- __pyx_tuple__28 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 329, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__28);
+- __Pyx_GIVEREF(__pyx_tuple__28);
+- __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 329, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":346
+- * cdef _reply_userdatas = dict()
+- *
+- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+- * def __init__(self, data):
+- * self.counter = 0
+- */
+- __pyx_tuple__30 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 346, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__30);
+- __Pyx_GIVEREF(__pyx_tuple__30);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":347
+- *
+- * class _ReplyUserData(object):
+- * def __init__(self, data): # <<<<<<<<<<<<<<
+- * self.counter = 0
+- * self.data = data
+- */
+- __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 347, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__31);
+- __Pyx_GIVEREF(__pyx_tuple__31);
+- __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 347, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":352
+- * self.observed = False
+- *
+- * def add(self): # <<<<<<<<<<<<<<
+- * self.counter += 1
+- *
+- */
+- __pyx_tuple__33 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 352, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__33);
+- __Pyx_GIVEREF(__pyx_tuple__33);
+- __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 352, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":355
+- * self.counter += 1
+- *
+- * def remove(self): # <<<<<<<<<<<<<<
+- * self.counter -= 1
+- *
+- */
+- __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 355, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__35);
+- __Pyx_GIVEREF(__pyx_tuple__35);
+- __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 355, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
+- *
+- * class CallbackThread(Thread):
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * Thread.__init__(self)
+- * self.daemon = True
+- */
+- __pyx_tuple__37 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 1133, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__37);
+- __Pyx_GIVEREF(__pyx_tuple__37);
+- __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 1133, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
+- * self.isshutdown = False
+- *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * self.isshutdown = True
+- * self.callback = None
+- */
+- __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 1141, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__39);
+- __Pyx_GIVEREF(__pyx_tuple__39);
+- __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 1141, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
+- * self.lock.release()
+- *
+- * def call(self): # <<<<<<<<<<<<<<
+- * self.lock.release()
+- *
+- */
+- __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1146, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__41);
+- __Pyx_GIVEREF(__pyx_tuple__41);
+- __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 1146, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
+- * self.lock.release()
+- *
+- * def set(self, callback): # <<<<<<<<<<<<<<
+- * self.callback = callback
+- *
+- */
+- __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1149, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__43);
+- __Pyx_GIVEREF(__pyx_tuple__43);
+- __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 1149, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
+- * self.callback = callback
+- *
+- * def run(self): # <<<<<<<<<<<<<<
+- * while not self.isshutdown:
+- * self.lock.acquire(True)
+- */
+- __pyx_tuple__45 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1152, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__45);
+- __Pyx_GIVEREF(__pyx_tuple__45);
+- __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 1152, __pyx_L1_error)
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
+- * self.mpv_callback(self.callback) if self.callback else None
+- *
+- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+- * try:
+- * callback()
+- */
+- __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1157, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__47);
+- __Pyx_GIVEREF(__pyx_tuple__47);
+- __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 1157, __pyx_L1_error)
+-
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
+- */
+- __pyx_tuple__49 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__49);
+- __Pyx_GIVEREF(__pyx_tuple__49);
+- __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_EndOfFileReached, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __pyx_tuple__51 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__51);
+- __Pyx_GIVEREF(__pyx_tuple__51);
+- __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_InputDispatch, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __pyx_tuple__53 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__53);
+- __Pyx_GIVEREF(__pyx_tuple__53);
+- __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_LogMessage, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __pyx_tuple__55 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__55);
+- __Pyx_GIVEREF(__pyx_tuple__55);
+- __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Property, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __pyx_tuple__57 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__57);
+- __Pyx_GIVEREF(__pyx_tuple__57);
+- __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Event, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __pyx_tuple__59 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_tuple__59);
+- __Pyx_GIVEREF(__pyx_tuple__59);
+- __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RenderFrameInfo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_RefNannyFinishContext();
+- return 0;
+- __pyx_L1_error:;
+- __Pyx_RefNannyFinishContext();
+- return -1;
+-}
+-
+-static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
+- if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+- __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_5713169 = PyInt_FromLong(5713169L); if (unlikely(!__pyx_int_5713169)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_90958262 = PyInt_FromLong(90958262L); if (unlikely(!__pyx_int_90958262)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_142036910 = PyInt_FromLong(142036910L); if (unlikely(!__pyx_int_142036910)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_200688041 = PyInt_FromLong(200688041L); if (unlikely(!__pyx_int_200688041)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_228822053 = PyInt_FromLong(228822053L); if (unlikely(!__pyx_int_228822053)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+- return 0;
+- __pyx_L1_error:;
+- return -1;
+-}
+-
+-static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
+-static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
+-
+-static int __Pyx_modinit_global_init_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
+- /*--- Global init code ---*/
+- __pyx_v_9vidcutter_4libs_3mpv__callbacks = Py_None; Py_INCREF(Py_None);
+- __pyx_v_9vidcutter_4libs_3mpv__reply_userdatas = Py_None; Py_INCREF(Py_None);
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-static int __Pyx_modinit_variable_export_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
+- /*--- Variable export code ---*/
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-static int __Pyx_modinit_function_export_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
+- /*--- Function export code ---*/
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-static int __Pyx_modinit_type_init_code(void) {
+- __Pyx_RefNannyDeclarations
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
+- /*--- Type init code ---*/
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
+- __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, struct mpv_event_end_file *))__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch = &__pyx_vtable_9vidcutter_4libs_3mpv_InputDispatch;
+- __pyx_vtable_9vidcutter_4libs_3mpv_InputDispatch._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *, struct mpv_event_script_input_dispatch *))__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_InputDispatch, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch = &__pyx_type_9vidcutter_4libs_3mpv_InputDispatch;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage = &__pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
+- __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, struct mpv_event_log_message *))__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = &__pyx_type_9vidcutter_4libs_3mpv_LogMessage;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_Property = &__pyx_vtable_9vidcutter_4libs_3mpv_Property;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Property._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, struct mpv_event_property *))__pyx_f_9vidcutter_4libs_3mpv_8Property__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_Property.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_Property = &__pyx_type_9vidcutter_4libs_3mpv_Property;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_Event = &__pyx_vtable_9vidcutter_4libs_3mpv_Event;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Event._data = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *))__pyx_f_9vidcutter_4libs_3mpv_5Event__data;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Event._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_5Event__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_Event.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_Event = &__pyx_type_9vidcutter_4libs_3mpv_Event;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_Context = &__pyx_vtable_9vidcutter_4libs_3mpv_Context;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_list = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_map = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_native_value = (struct mpv_node (*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value;
+- __pyx_vtable_9vidcutter_4libs_3mpv_Context._free_native_value = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, struct mpv_node))__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_Context.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_Context = &__pyx_type_9vidcutter_4libs_3mpv_Context;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams = &__pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
+- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_voidp = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, void *, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
+- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_int = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, int))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int;
+- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_string = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, char *))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = &__pyx_type_9vidcutter_4libs_3mpv__RenderParams;
+- __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
+- __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo._from_struct = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *, struct mpv_render_frame_info *))__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = &__pyx_type_9vidcutter_4libs_3mpv_RenderContext;
+- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_base = __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+- }
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
+- __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLRenderContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
+- #if PY_VERSION_HEX < 0x030800B1
+- __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_print = 0;
+- #endif
+- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro == PyObject_GenericGetAttr)) {
+- __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
+- }
+- __pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = &__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors;
+- __Pyx_RefNannyFinishContext();
+- return 0;
+- __pyx_L1_error:;
+- __Pyx_RefNannyFinishContext();
+- return -1;
+-}
+-
+-static int __Pyx_modinit_type_import_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
+- /*--- Type import code ---*/
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-static int __Pyx_modinit_variable_import_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
+- /*--- Variable import code ---*/
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-static int __Pyx_modinit_function_import_code(void) {
+- __Pyx_RefNannyDeclarations
+- __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
+- /*--- Function import code ---*/
+- __Pyx_RefNannyFinishContext();
+- return 0;
+-}
+-
+-
+-#ifndef CYTHON_NO_PYINIT_EXPORT
+-#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
+-#elif PY_MAJOR_VERSION < 3
+-#ifdef __cplusplus
+-#define __Pyx_PyMODINIT_FUNC extern "C" void
+-#else
+-#define __Pyx_PyMODINIT_FUNC void
+-#endif
+-#else
+-#ifdef __cplusplus
+-#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
+-#else
+-#define __Pyx_PyMODINIT_FUNC PyObject *
+-#endif
+-#endif
+-
+-
+-#if PY_MAJOR_VERSION < 3
+-__Pyx_PyMODINIT_FUNC initmpv(void) CYTHON_SMALL_CODE; /*proto*/
+-__Pyx_PyMODINIT_FUNC initmpv(void)
+-#else
+-__Pyx_PyMODINIT_FUNC PyInit_mpv(void) CYTHON_SMALL_CODE; /*proto*/
+-__Pyx_PyMODINIT_FUNC PyInit_mpv(void)
+-#if CYTHON_PEP489_MULTI_PHASE_INIT
+-{
+- return PyModuleDef_Init(&__pyx_moduledef);
+-}
+-static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
+- #if PY_VERSION_HEX >= 0x030700A1
+- static PY_INT64_T main_interpreter_id = -1;
+- PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
+- if (main_interpreter_id == -1) {
+- main_interpreter_id = current_id;
+- return (unlikely(current_id == -1)) ? -1 : 0;
+- } else if (unlikely(main_interpreter_id != current_id))
+- #else
+- static PyInterpreterState *main_interpreter = NULL;
+- PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
+- if (!main_interpreter) {
+- main_interpreter = current_interpreter;
+- } else if (unlikely(main_interpreter != current_interpreter))
+- #endif
+- {
+- PyErr_SetString(
+- PyExc_ImportError,
+- "Interpreter change detected - this module can only be loaded into one interpreter per process.");
+- return -1;
+- }
+- return 0;
+-}
+-static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
+- PyObject *value = PyObject_GetAttrString(spec, from_name);
+- int result = 0;
+- if (likely(value)) {
+- if (allow_none || value != Py_None) {
+- result = PyDict_SetItemString(moddict, to_name, value);
+- }
+- Py_DECREF(value);
+- } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+- PyErr_Clear();
+- } else {
+- result = -1;
+- }
+- return result;
+-}
+-static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
+- PyObject *module = NULL, *moddict, *modname;
+- if (__Pyx_check_single_interpreter())
+- return NULL;
+- if (__pyx_m)
+- return __Pyx_NewRef(__pyx_m);
+- modname = PyObject_GetAttrString(spec, "name");
+- if (unlikely(!modname)) goto bad;
+- module = PyModule_NewObject(modname);
+- Py_DECREF(modname);
+- if (unlikely(!module)) goto bad;
+- moddict = PyModule_GetDict(module);
+- if (unlikely(!moddict)) goto bad;
+- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
+- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
+- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
+- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
+- return module;
+-bad:
+- Py_XDECREF(module);
+- return NULL;
+-}
+-
+-
+-static CYTHON_SMALL_CODE int __pyx_pymod_exec_mpv(PyObject *__pyx_pyinit_module)
+-#endif
+-#endif
+-{
+- PyObject *__pyx_t_1 = NULL;
+- PyObject *__pyx_t_2 = NULL;
+- int __pyx_t_3;
+- PyObject *__pyx_t_4 = NULL;
+- int __pyx_t_5;
+- PyObject *__pyx_t_6 = NULL;
+- PyObject *__pyx_t_7 = NULL;
+- int __pyx_lineno = 0;
+- const char *__pyx_filename = NULL;
+- int __pyx_clineno = 0;
+- __Pyx_RefNannyDeclarations
+- #if CYTHON_PEP489_MULTI_PHASE_INIT
+- if (__pyx_m) {
+- if (__pyx_m == __pyx_pyinit_module) return 0;
+- PyErr_SetString(PyExc_RuntimeError, "Module 'mpv' has already been imported. Re-initialisation is not supported.");
+- return -1;
+- }
+- #elif PY_MAJOR_VERSION >= 3
+- if (__pyx_m) return __Pyx_NewRef(__pyx_m);
+- #endif
+- #if CYTHON_REFNANNY
+-__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+-if (!__Pyx_RefNanny) {
+- PyErr_Clear();
+- __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+- if (!__Pyx_RefNanny)
+- Py_FatalError("failed to import 'refnanny' module");
+-}
+-#endif
+- __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_mpv(void)", 0);
+- if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #ifdef __Pxy_PyFrame_Initialize_Offsets
+- __Pxy_PyFrame_Initialize_Offsets();
+- #endif
+- __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
+- #ifdef __Pyx_CyFunction_USED
+- if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- #ifdef __Pyx_FusedFunction_USED
+- if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- #ifdef __Pyx_Coroutine_USED
+- if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- #ifdef __Pyx_Generator_USED
+- if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- #ifdef __Pyx_AsyncGen_USED
+- if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- #ifdef __Pyx_StopAsyncIteration_USED
+- if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- /*--- Library function declarations ---*/
+- /*--- Threads initialization code ---*/
+- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+- #ifdef WITH_THREAD /* Python build with threading support? */
+- PyEval_InitThreads();
+- #endif
+- #endif
+- /*--- Module creation code ---*/
+- #if CYTHON_PEP489_MULTI_PHASE_INIT
+- __pyx_m = __pyx_pyinit_module;
+- Py_INCREF(__pyx_m);
+- #else
+- #if PY_MAJOR_VERSION < 3
+- __pyx_m = Py_InitModule4("mpv", __pyx_methods, __pyx_k_pympv_Python_wrapper_for_libmpv, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+- #else
+- __pyx_m = PyModule_Create(&__pyx_moduledef);
+- #endif
+- if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
+- Py_INCREF(__pyx_d);
+- __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
+- Py_INCREF(__pyx_b);
+- __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
+- Py_INCREF(__pyx_cython_runtime);
+- if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+- /*--- Initialize various global constants etc. ---*/
+- if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+- if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
+- if (__pyx_module_is_main_vidcutter__libs__mpv) {
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- }
+- #if PY_MAJOR_VERSION >= 3
+- {
+- PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
+- if (!PyDict_GetItemString(modules, "vidcutter.libs.mpv")) {
+- if (unlikely(PyDict_SetItemString(modules, "vidcutter.libs.mpv", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
+- }
+- }
+- #endif
+- /*--- Builtin init code ---*/
+- if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- /*--- Constants init code ---*/
+- if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- /*--- Global type/function init code ---*/
+- (void)__Pyx_modinit_global_init_code();
+- (void)__Pyx_modinit_variable_export_code();
+- (void)__Pyx_modinit_function_export_code();
+- if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
+- (void)__Pyx_modinit_type_import_code();
+- (void)__Pyx_modinit_variable_import_code();
+- (void)__Pyx_modinit_function_import_code();
+- /*--- Execution code ---*/
+- #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+- if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- #endif
++static __Pyx_StringTabEntry __pyx_string_tab[] = {
++ {&__pyx_kp_s_0_3_0, __pyx_k_0_3_0, sizeof(__pyx_k_0_3_0), 0, 0, 1, 0},
++ {&__pyx_n_s_API_OPENGL, __pyx_k_API_OPENGL, sizeof(__pyx_k_API_OPENGL), 0, 0, 1, 1},
++ {&__pyx_kp_s_Andre_D, __pyx_k_Andre_D, sizeof(__pyx_k_Andre_D), 0, 0, 1, 0},
++ {&__pyx_n_s_CAPI_MAJOR, __pyx_k_CAPI_MAJOR, sizeof(__pyx_k_CAPI_MAJOR), 0, 0, 1, 1},
++ {&__pyx_n_s_CAPI_MINOR, __pyx_k_CAPI_MINOR, sizeof(__pyx_k_CAPI_MINOR), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread, __pyx_k_CallbackThread, sizeof(__pyx_k_CallbackThread), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread___init, __pyx_k_CallbackThread___init, sizeof(__pyx_k_CallbackThread___init), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread_call, __pyx_k_CallbackThread_call, sizeof(__pyx_k_CallbackThread_call), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread_mpv_callback, __pyx_k_CallbackThread_mpv_callback, sizeof(__pyx_k_CallbackThread_mpv_callback), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread_run, __pyx_k_CallbackThread_run, sizeof(__pyx_k_CallbackThread_run), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread_set, __pyx_k_CallbackThread_set, sizeof(__pyx_k_CallbackThread_set), 0, 0, 1, 1},
++ {&__pyx_n_s_CallbackThread_shutdown, __pyx_k_CallbackThread_shutdown, sizeof(__pyx_k_CallbackThread_shutdown), 0, 0, 1, 1},
++ {&__pyx_n_s_Context, __pyx_k_Context, sizeof(__pyx_k_Context), 0, 0, 1, 1},
++ {&__pyx_kp_s_Context_creation_error, __pyx_k_Context_creation_error, sizeof(__pyx_k_Context_creation_error), 0, 0, 1, 0},
++ {&__pyx_n_s_EOFReasons, __pyx_k_EOFReasons, sizeof(__pyx_k_EOFReasons), 0, 0, 1, 1},
++ {&__pyx_n_s_EndOfFileReached, __pyx_k_EndOfFileReached, sizeof(__pyx_k_EndOfFileReached), 0, 0, 1, 1},
++ {&__pyx_n_s_Errors, __pyx_k_Errors, sizeof(__pyx_k_Errors), 0, 0, 1, 1},
++ {&__pyx_n_s_Event, __pyx_k_Event, sizeof(__pyx_k_Event), 0, 0, 1, 1},
++ {&__pyx_n_s_Events, __pyx_k_Events, sizeof(__pyx_k_Events), 0, 0, 1, 1},
++ {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
++ {&__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_k_Incompatible_checksums_s_vs_0x05, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x05), 0, 0, 1, 0},
++ {&__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_k_Incompatible_checksums_s_vs_0x56, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x56), 0, 0, 1, 0},
++ {&__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_k_Incompatible_checksums_s_vs_0x87, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x87), 0, 0, 1, 0},
++ {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0},
++ {&__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_k_Incompatible_checksums_s_vs_0xda, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xda), 0, 0, 1, 0},
++ {&__pyx_kp_s_Known_possible_values_for_EndOfF, __pyx_k_Known_possible_values_for_EndOfF, sizeof(__pyx_k_Known_possible_values_for_EndOfF), 0, 0, 1, 0},
++ {&__pyx_n_s_LogLevels, __pyx_k_LogLevels, sizeof(__pyx_k_LogLevels), 0, 0, 1, 1},
++ {&__pyx_n_s_LogMessage, __pyx_k_LogMessage, sizeof(__pyx_k_LogMessage), 0, 0, 1, 1},
++ {&__pyx_n_s_MIN_CAPI_MINOR, __pyx_k_MIN_CAPI_MINOR, sizeof(__pyx_k_MIN_CAPI_MINOR), 0, 0, 1, 1},
++ {&__pyx_n_s_MPVError, __pyx_k_MPVError, sizeof(__pyx_k_MPVError), 0, 0, 1, 1},
++ {&__pyx_n_s_MPVError___init, __pyx_k_MPVError___init, sizeof(__pyx_k_MPVError___init), 0, 0, 1, 1},
++ {&__pyx_n_s_OpenGLRenderContext, __pyx_k_OpenGLRenderContext, sizeof(__pyx_k_OpenGLRenderContext), 0, 0, 1, 1},
++ {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
++ {&__pyx_n_s_Property, __pyx_k_Property, sizeof(__pyx_k_Property), 0, 0, 1, 1},
++ {&__pyx_n_s_PyMPVError, __pyx_k_PyMPVError, sizeof(__pyx_k_PyMPVError), 0, 0, 1, 1},
++ {&__pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_k_REQUIRED_CAPI_MAJOR, sizeof(__pyx_k_REQUIRED_CAPI_MAJOR), 0, 0, 1, 1},
++ {&__pyx_n_s_RenderContext, __pyx_k_RenderContext, sizeof(__pyx_k_RenderContext), 0, 0, 1, 1},
++ {&__pyx_n_s_RenderParams, __pyx_k_RenderParams, sizeof(__pyx_k_RenderParams), 0, 0, 1, 1},
++ {&__pyx_kp_s_RenderParams_overflow, __pyx_k_RenderParams_overflow, sizeof(__pyx_k_RenderParams_overflow), 0, 0, 1, 0},
++ {&__pyx_n_s_ReplyUserData, __pyx_k_ReplyUserData, sizeof(__pyx_k_ReplyUserData), 0, 0, 1, 1},
++ {&__pyx_n_s_ReplyUserData___init, __pyx_k_ReplyUserData___init, sizeof(__pyx_k_ReplyUserData___init), 0, 0, 1, 1},
++ {&__pyx_n_s_ReplyUserData_add, __pyx_k_ReplyUserData_add, sizeof(__pyx_k_ReplyUserData_add), 0, 0, 1, 1},
++ {&__pyx_n_s_ReplyUserData_remove, __pyx_k_ReplyUserData_remove, sizeof(__pyx_k_ReplyUserData_remove), 0, 0, 1, 1},
++ {&__pyx_n_s_Semaphore, __pyx_k_Semaphore, sizeof(__pyx_k_Semaphore), 0, 0, 1, 1},
++ {&__pyx_kp_s_Set_of_known_error_codes_from_Mp, __pyx_k_Set_of_known_error_codes_from_Mp, sizeof(__pyx_k_Set_of_known_error_codes_from_Mp), 0, 0, 1, 0},
++ {&__pyx_kp_s_Set_of_known_values_for_Event_id, __pyx_k_Set_of_known_values_for_Event_id, sizeof(__pyx_k_Set_of_known_values_for_Event_id), 0, 0, 1, 0},
++ {&__pyx_n_s_Thread, __pyx_k_Thread, sizeof(__pyx_k_Thread), 0, 0, 1, 1},
++ {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
++ {&__pyx_n_s_UPDATE_FRAME, __pyx_k_UPDATE_FRAME, sizeof(__pyx_k_UPDATE_FRAME), 0, 0, 1, 1},
++ {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1},
++ {&__pyx_n_s_UnicodeEncodeError, __pyx_k_UnicodeEncodeError, sizeof(__pyx_k_UnicodeEncodeError), 0, 0, 1, 1},
++ {&__pyx_kp_s_Unknown_api_type_r, __pyx_k_Unknown_api_type_r, sizeof(__pyx_k_Unknown_api_type_r), 0, 0, 1, 0},
++ {&__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_k_Unknown_or_invalid_pointer_objec, sizeof(__pyx_k_Unknown_or_invalid_pointer_objec), 0, 0, 1, 0},
++ {&__pyx_n_s_aborted, __pyx_k_aborted, sizeof(__pyx_k_aborted), 0, 0, 1, 1},
++ {&__pyx_n_s_acquire, __pyx_k_acquire, sizeof(__pyx_k_acquire), 0, 0, 1, 1},
++ {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
++ {&__pyx_n_s_advanced_control, __pyx_k_advanced_control, sizeof(__pyx_k_advanced_control), 0, 0, 1, 1},
++ {&__pyx_n_s_ao_init_failed, __pyx_k_ao_init_failed, sizeof(__pyx_k_ao_init_failed), 0, 0, 1, 1},
++ {&__pyx_n_s_api_type, __pyx_k_api_type, sizeof(__pyx_k_api_type), 0, 0, 1, 1},
++ {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
++ {&__pyx_n_s_asynchronous, __pyx_k_asynchronous, sizeof(__pyx_k_asynchronous), 0, 0, 1, 1},
++ {&__pyx_n_s_atomic_request_ptr, __pyx_k_atomic_request_ptr, sizeof(__pyx_k_atomic_request_ptr), 0, 0, 1, 1},
++ {&__pyx_n_s_audio_reconfig, __pyx_k_audio_reconfig, sizeof(__pyx_k_audio_reconfig), 0, 0, 1, 1},
++ {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1},
++ {&__pyx_n_s_block_for_target_time, __pyx_k_block_for_target_time, sizeof(__pyx_k_block_for_target_time), 0, 0, 1, 1},
++ {&__pyx_n_s_block_vsync, __pyx_k_block_vsync, sizeof(__pyx_k_block_vsync), 0, 0, 1, 1},
++ {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
++ {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
++ {&__pyx_n_s_client_message, __pyx_k_client_message, sizeof(__pyx_k_client_message), 0, 0, 1, 1},
++ {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
++ {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
++ {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
++ {&__pyx_n_s_command_error, __pyx_k_command_error, sizeof(__pyx_k_command_error), 0, 0, 1, 1},
++ {&__pyx_n_s_command_reply, __pyx_k_command_reply, sizeof(__pyx_k_command_reply), 0, 0, 1, 1},
++ {&__pyx_n_s_connector_id, __pyx_k_connector_id, sizeof(__pyx_k_connector_id), 0, 0, 1, 1},
++ {&__pyx_n_s_counter, __pyx_k_counter, sizeof(__pyx_k_counter), 0, 0, 1, 1},
++ {&__pyx_n_s_crtc_id, __pyx_k_crtc_id, sizeof(__pyx_k_crtc_id), 0, 0, 1, 1},
++ {&__pyx_n_s_daemon, __pyx_k_daemon, sizeof(__pyx_k_daemon), 0, 0, 1, 1},
++ {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
++ {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
++ {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
++ {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
++ {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1},
++ {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
++ {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
++ {&__pyx_kp_s_drmModeAtomicReq, __pyx_k_drmModeAtomicReq, sizeof(__pyx_k_drmModeAtomicReq), 0, 0, 1, 0},
++ {&__pyx_n_s_drm_display, __pyx_k_drm_display, sizeof(__pyx_k_drm_display), 0, 0, 1, 1},
++ {&__pyx_n_s_drm_osd_size, __pyx_k_drm_osd_size, sizeof(__pyx_k_drm_osd_size), 0, 0, 1, 1},
++ {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
++ {&__pyx_n_s_e_i, __pyx_k_e_i, sizeof(__pyx_k_e_i), 0, 0, 1, 1},
++ {&__pyx_n_s_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 0, 1, 1},
++ {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
++ {&__pyx_n_s_end_file, __pyx_k_end_file, sizeof(__pyx_k_end_file), 0, 0, 1, 1},
++ {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
++ {&__pyx_n_s_eof, __pyx_k_eof, sizeof(__pyx_k_eof), 0, 0, 1, 1},
++ {&__pyx_n_s_err_c, __pyx_k_err_c, sizeof(__pyx_k_err_c), 0, 0, 1, 1},
++ {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
++ {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
++ {&__pyx_n_s_errors_locals_wrapped, __pyx_k_errors_locals_wrapped, sizeof(__pyx_k_errors_locals_wrapped), 0, 0, 1, 1},
++ {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1},
++ {&__pyx_n_s_fatal, __pyx_k_fatal, sizeof(__pyx_k_fatal), 0, 0, 1, 1},
++ {&__pyx_n_s_fbo, __pyx_k_fbo, sizeof(__pyx_k_fbo), 0, 0, 1, 1},
++ {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
++ {&__pyx_n_s_file_loaded, __pyx_k_file_loaded, sizeof(__pyx_k_file_loaded), 0, 0, 1, 1},
++ {&__pyx_n_s_flip_y, __pyx_k_flip_y, sizeof(__pyx_k_flip_y), 0, 0, 1, 1},
++ {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
++ {&__pyx_n_s_format_for, __pyx_k_format_for, sizeof(__pyx_k_format_for), 0, 0, 1, 1},
++ {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
++ {&__pyx_n_s_get_proc_address, __pyx_k_get_proc_address, sizeof(__pyx_k_get_proc_address), 0, 0, 1, 1},
++ {&__pyx_n_s_get_property, __pyx_k_get_property, sizeof(__pyx_k_get_property), 0, 0, 1, 1},
++ {&__pyx_n_s_get_property_async, __pyx_k_get_property_async, sizeof(__pyx_k_get_property_async), 0, 0, 1, 1},
++ {&__pyx_n_s_get_property_reply, __pyx_k_get_property_reply, sizeof(__pyx_k_get_property_reply), 0, 0, 1, 1},
++ {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
++ {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
++ {&__pyx_kp_s_icc_blob_should_be_a_bytes_insta, __pyx_k_icc_blob_should_be_a_bytes_insta, sizeof(__pyx_k_icc_blob_should_be_a_bytes_insta), 0, 0, 1, 0},
++ {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
++ {&__pyx_n_s_idle, __pyx_k_idle, sizeof(__pyx_k_idle), 0, 0, 1, 1},
++ {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
++ {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
++ {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
++ {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1},
++ {&__pyx_n_s_internal_format, __pyx_k_internal_format, sizeof(__pyx_k_internal_format), 0, 0, 1, 1},
++ {&__pyx_n_s_invalid_parameter, __pyx_k_invalid_parameter, sizeof(__pyx_k_invalid_parameter), 0, 0, 1, 1},
++ {&__pyx_n_s_is_py3, __pyx_k_is_py3, sizeof(__pyx_k_is_py3), 0, 0, 1, 1},
++ {&__pyx_n_s_isshutdown, __pyx_k_isshutdown, sizeof(__pyx_k_isshutdown), 0, 0, 1, 1},
++ {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
++ {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
++ {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
++ {&__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_k_libmpv_version_is_incorrect_Requ, sizeof(__pyx_k_libmpv_version_is_incorrect_Requ), 0, 0, 1, 0},
++ {&__pyx_n_s_load_config, __pyx_k_load_config, sizeof(__pyx_k_load_config), 0, 0, 1, 1},
++ {&__pyx_n_s_loading_failed, __pyx_k_loading_failed, sizeof(__pyx_k_loading_failed), 0, 0, 1, 1},
++ {&__pyx_n_s_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 0, 1, 1},
++ {&__pyx_n_s_log_message, __pyx_k_log_message, sizeof(__pyx_k_log_message), 0, 0, 1, 1},
++ {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
++ {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
++ {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
++ {&__pyx_n_s_mpv, __pyx_k_mpv, sizeof(__pyx_k_mpv), 0, 0, 1, 1},
++ {&__pyx_n_s_mpv_callback, __pyx_k_mpv_callback, sizeof(__pyx_k_mpv_callback), 0, 0, 1, 1},
++ {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
++ {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
++ {&__pyx_n_s_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 0, 1, 1},
++ {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
++ {&__pyx_n_s_nomem, __pyx_k_nomem, sizeof(__pyx_k_nomem), 0, 0, 1, 1},
++ {&__pyx_n_s_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 0, 1, 1},
++ {&__pyx_n_s_not_found, __pyx_k_not_found, sizeof(__pyx_k_not_found), 0, 0, 1, 1},
++ {&__pyx_n_s_not_implemented, __pyx_k_not_implemented, sizeof(__pyx_k_not_implemented), 0, 0, 1, 1},
++ {&__pyx_n_s_nothing_to_play, __pyx_k_nothing_to_play, sizeof(__pyx_k_nothing_to_play), 0, 0, 1, 1},
++ {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
++ {&__pyx_n_s_observe_property, __pyx_k_observe_property, sizeof(__pyx_k_observe_property), 0, 0, 1, 1},
++ {&__pyx_n_s_observed, __pyx_k_observed, sizeof(__pyx_k_observed), 0, 0, 1, 1},
++ {&__pyx_n_s_opengl, __pyx_k_opengl, sizeof(__pyx_k_opengl), 0, 0, 1, 1},
++ {&__pyx_n_s_opengl_fbo, __pyx_k_opengl_fbo, sizeof(__pyx_k_opengl_fbo), 0, 0, 1, 1},
++ {&__pyx_n_s_opengl_init_params, __pyx_k_opengl_init_params, sizeof(__pyx_k_opengl_init_params), 0, 0, 1, 1},
++ {&__pyx_n_s_option_error, __pyx_k_option_error, sizeof(__pyx_k_option_error), 0, 0, 1, 1},
++ {&__pyx_n_s_option_format, __pyx_k_option_format, sizeof(__pyx_k_option_format), 0, 0, 1, 1},
++ {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
++ {&__pyx_n_s_playback_restart, __pyx_k_playback_restart, sizeof(__pyx_k_playback_restart), 0, 0, 1, 1},
++ {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
++ {&__pyx_n_s_present, __pyx_k_present, sizeof(__pyx_k_present), 0, 0, 1, 1},
++ {&__pyx_n_s_prop, __pyx_k_prop, sizeof(__pyx_k_prop), 0, 0, 1, 1},
++ {&__pyx_n_s_property_change, __pyx_k_property_change, sizeof(__pyx_k_property_change), 0, 0, 1, 1},
++ {&__pyx_n_s_property_error, __pyx_k_property_error, sizeof(__pyx_k_property_error), 0, 0, 1, 1},
++ {&__pyx_n_s_property_format, __pyx_k_property_format, sizeof(__pyx_k_property_format), 0, 0, 1, 1},
++ {&__pyx_n_s_property_unavailable, __pyx_k_property_unavailable, sizeof(__pyx_k_property_unavailable), 0, 0, 1, 1},
++ {&__pyx_kp_s_pympv_error_during_callback_s, __pyx_k_pympv_error_during_callback_s, sizeof(__pyx_k_pympv_error_during_callback_s), 0, 0, 1, 0},
++ {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_k_pyx_unpickle_EndOfFileReached, sizeof(__pyx_k_pyx_unpickle_EndOfFileReached), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_unpickle_Event, __pyx_k_pyx_unpickle_Event, sizeof(__pyx_k_pyx_unpickle_Event), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_unpickle_LogMessage, __pyx_k_pyx_unpickle_LogMessage, sizeof(__pyx_k_pyx_unpickle_LogMessage), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_unpickle_Property, __pyx_k_pyx_unpickle_Property, sizeof(__pyx_k_pyx_unpickle_Property), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_k_pyx_unpickle_RenderFrameInfo, sizeof(__pyx_k_pyx_unpickle_RenderFrameInfo), 0, 0, 1, 1},
++ {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
++ {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
++ {&__pyx_n_s_queue_full, __pyx_k_queue_full, sizeof(__pyx_k_queue_full), 0, 0, 1, 1},
++ {&__pyx_n_s_quit, __pyx_k_quit, sizeof(__pyx_k_quit), 0, 0, 1, 1},
++ {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
++ {&__pyx_n_s_redraw, __pyx_k_redraw, sizeof(__pyx_k_redraw), 0, 0, 1, 1},
++ {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
++ {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
++ {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
++ {&__pyx_n_s_release, __pyx_k_release, sizeof(__pyx_k_release), 0, 0, 1, 1},
++ {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
++ {&__pyx_n_s_render, __pyx_k_render, sizeof(__pyx_k_render), 0, 0, 1, 1},
++ {&__pyx_n_s_render_fd, __pyx_k_render_fd, sizeof(__pyx_k_render_fd), 0, 0, 1, 1},
++ {&__pyx_n_s_repeat, __pyx_k_repeat, sizeof(__pyx_k_repeat), 0, 0, 1, 1},
++ {&__pyx_n_s_request_event, __pyx_k_request_event, sizeof(__pyx_k_request_event), 0, 0, 1, 1},
++ {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1},
++ {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
++ {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
++ {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
++ {&__pyx_kp_s_self__ctx_cannot_be_converted_to, __pyx_k_self__ctx_cannot_be_converted_to, sizeof(__pyx_k_self__ctx_cannot_be_converted_to), 0, 0, 1, 0},
++ {&__pyx_kp_s_self_params_cannot_be_converted, __pyx_k_self_params_cannot_be_converted, sizeof(__pyx_k_self_params_cannot_be_converted), 0, 0, 1, 0},
++ {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
++ {&__pyx_n_s_set_ambient_light, __pyx_k_set_ambient_light, sizeof(__pyx_k_set_ambient_light), 0, 0, 1, 1},
++ {&__pyx_n_s_set_icc_profile, __pyx_k_set_icc_profile, sizeof(__pyx_k_set_icc_profile), 0, 0, 1, 1},
++ {&__pyx_n_s_set_log_level, __pyx_k_set_log_level, sizeof(__pyx_k_set_log_level), 0, 0, 1, 1},
++ {&__pyx_n_s_set_option, __pyx_k_set_option, sizeof(__pyx_k_set_option), 0, 0, 1, 1},
++ {&__pyx_n_s_set_property, __pyx_k_set_property, sizeof(__pyx_k_set_property), 0, 0, 1, 1},
++ {&__pyx_n_s_set_property_reply, __pyx_k_set_property_reply, sizeof(__pyx_k_set_property_reply), 0, 0, 1, 1},
++ {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
++ {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
++ {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1},
++ {&__pyx_n_s_skip_rendering, __pyx_k_skip_rendering, sizeof(__pyx_k_skip_rendering), 0, 0, 1, 1},
++ {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
++ {&__pyx_n_s_start_file, __pyx_k_start_file, sizeof(__pyx_k_start_file), 0, 0, 1, 1},
++ {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
++ {&__pyx_n_s_strdec, __pyx_k_strdec, sizeof(__pyx_k_strdec), 0, 0, 1, 1},
++ {&__pyx_n_s_strdec_err, __pyx_k_strdec_err, sizeof(__pyx_k_strdec_err), 0, 0, 1, 1},
++ {&__pyx_n_s_strenc, __pyx_k_strenc, sizeof(__pyx_k_strenc), 0, 0, 1, 1},
++ {&__pyx_n_s_strict, __pyx_k_strict, sizeof(__pyx_k_strict), 0, 0, 1, 1},
++ {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
++ {&__pyx_n_s_success, __pyx_k_success, sizeof(__pyx_k_success), 0, 0, 1, 1},
++ {&__pyx_n_s_surrogateescape, __pyx_k_surrogateescape, sizeof(__pyx_k_surrogateescape), 0, 0, 1, 1},
++ {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
++ {&__pyx_n_s_target_time, __pyx_k_target_time, sizeof(__pyx_k_target_time), 0, 0, 1, 1},
++ {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
++ {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
++ {&__pyx_n_s_tick, __pyx_k_tick, sizeof(__pyx_k_tick), 0, 0, 1, 1},
++ {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
++ {&__pyx_n_s_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 0, 1, 1},
++ {&__pyx_n_s_uninitialized, __pyx_k_uninitialized, sizeof(__pyx_k_uninitialized), 0, 0, 1, 1},
++ {&__pyx_n_s_unknown_format, __pyx_k_unknown_format, sizeof(__pyx_k_unknown_format), 0, 0, 1, 1},
++ {&__pyx_n_s_unobserve_property, __pyx_k_unobserve_property, sizeof(__pyx_k_unobserve_property), 0, 0, 1, 1},
++ {&__pyx_n_s_unsupported, __pyx_k_unsupported, sizeof(__pyx_k_unsupported), 0, 0, 1, 1},
++ {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
++ {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
++ {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
++ {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
++ {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
++ {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
++ {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
++ {&__pyx_n_s_vidcutter_libs_mpv, __pyx_k_vidcutter_libs_mpv, sizeof(__pyx_k_vidcutter_libs_mpv), 0, 0, 1, 1},
++ {&__pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_k_vidcutter_libs_pympv_mpv_pyx, sizeof(__pyx_k_vidcutter_libs_pympv_mpv_pyx), 0, 0, 1, 0},
++ {&__pyx_n_s_video_reconfig, __pyx_k_video_reconfig, sizeof(__pyx_k_video_reconfig), 0, 0, 1, 1},
++ {&__pyx_n_s_vo_init_failed, __pyx_k_vo_init_failed, sizeof(__pyx_k_vo_init_failed), 0, 0, 1, 1},
++ {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
++ {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
++ {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
++ {&__pyx_n_s_wl_display, __pyx_k_wl_display, sizeof(__pyx_k_wl_display), 0, 0, 1, 1},
++ {&__pyx_n_s_wrapped, __pyx_k_wrapped, sizeof(__pyx_k_wrapped), 0, 0, 1, 1},
++ {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
++ {&__pyx_n_s_x11_display, __pyx_k_x11_display, sizeof(__pyx_k_x11_display), 0, 0, 1, 1},
++ {0, 0, 0, 0, 0, 0, 0}
++};
++static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
++ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 44, __pyx_L1_error)
++ __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 58, __pyx_L1_error)
++ __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 66, __pyx_L1_error)
++ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 222, __pyx_L1_error)
++ __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 303, __pyx_L1_error)
++ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
++ return 0;
++ __pyx_L1_error:;
++ return -1;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":22
++static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":319
+ *
+- * import cython
+- * import sys, warnings # <<<<<<<<<<<<<<
+- * from threading import Thread, Semaphore
+- * from libc.stdlib cimport malloc, free
++ * def _errors(fn):
++ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
++ * v = fn(*k, **kw)
++ * if v < 0:
+ */
+- __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 319, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple_);
++ __Pyx_GIVEREF(__pyx_tuple_);
++ __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 319, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":23
+- * import cython
+- * import sys, warnings
+- * from threading import Thread, Semaphore # <<<<<<<<<<<<<<
+- * from libc.stdlib cimport malloc, free
+- * from libc.string cimport strcpy, strlen, memset
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+- __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_INCREF(__pyx_n_s_Thread);
+- __Pyx_GIVEREF(__pyx_n_s_Thread);
+- PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Thread);
+- __Pyx_INCREF(__pyx_n_s_Semaphore);
+- __Pyx_GIVEREF(__pyx_n_s_Semaphore);
+- PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Semaphore);
+- __pyx_t_2 = __Pyx_Import(__pyx_n_s_threading, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Thread, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Semaphore, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__3);
++ __Pyx_GIVEREF(__pyx_tuple__3);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":30
+- * from client cimport *
+- *
+- * __version__ = "0.3.0" # <<<<<<<<<<<<<<
+- * __author__ = "Andre D"
+- *
++ /* "(tree fragment)":4
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_3_0) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
++ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__4);
++ __Pyx_GIVEREF(__pyx_tuple__4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":31
+- *
+- * __version__ = "0.3.0"
+- * __author__ = "Andre D" # <<<<<<<<<<<<<<
+- *
+- * _REQUIRED_CAPI_MAJOR = 1
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_s_Andre_D) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
++ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__5);
++ __Pyx_GIVEREF(__pyx_tuple__5);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":33
+- * __author__ = "Andre D"
+- *
+- * _REQUIRED_CAPI_MAJOR = 1 # <<<<<<<<<<<<<<
+- * _MIN_CAPI_MINOR = 9
+- *
++ /* "(tree fragment)":4
++ * raise TypeError("self.params cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
++ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__6);
++ __Pyx_GIVEREF(__pyx_tuple__6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":34
+- *
+- * _REQUIRED_CAPI_MAJOR = 1
+- * _MIN_CAPI_MINOR = 9 # <<<<<<<<<<<<<<
+- *
+- * cdef unsigned long _CAPI_VERSION
++ /* "vidcutter/libs/pympv/mpv.pyx":992
++ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
++ * if drm_display:
++ * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_9) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
++ __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__7);
++ __Pyx_GIVEREF(__pyx_tuple__7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":37
+- *
+- * cdef unsigned long _CAPI_VERSION
+- * with nogil: # <<<<<<<<<<<<<<
+- * _CAPI_VERSION = mpv_client_api_version()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":993
++ * if drm_display:
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None)
+ */
+- {
+- #ifdef WITH_THREAD
+- PyThreadState *_save;
+- Py_UNBLOCK_THREADS
+- __Pyx_FastGIL_Remember();
+- #endif
+- /*try:*/ {
++ __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__8);
++ __Pyx_GIVEREF(__pyx_tuple__8);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":38
+- * cdef unsigned long _CAPI_VERSION
+- * with nogil:
+- * _CAPI_VERSION = mpv_client_api_version() # <<<<<<<<<<<<<<
+- *
+- * _CAPI_MAJOR = _CAPI_VERSION >> 16
++ /* "vidcutter/libs/pympv/mpv.pyx":994
++ * drm_params.fd = drm_display.get("fd", -1)
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
++ * arp = drm_display.get("atomic_request_ptr", None)
++ * if arp is not None:
+ */
+- __pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION = mpv_client_api_version();
+- }
++ __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__9);
++ __Pyx_GIVEREF(__pyx_tuple__9);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":37
+- *
+- * cdef unsigned long _CAPI_VERSION
+- * with nogil: # <<<<<<<<<<<<<<
+- * _CAPI_VERSION = mpv_client_api_version()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":995
++ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
++ * drm_params.connector_id = drm_display.get("connector_id", -1)
++ * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
++ * if arp is not None:
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ */
+- /*finally:*/ {
+- /*normal exit:*/{
+- #ifdef WITH_THREAD
+- __Pyx_FastGIL_Forget();
+- Py_BLOCK_THREADS
+- #endif
+- goto __pyx_L4;
+- }
+- __pyx_L4:;
+- }
+- }
++ __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__10);
++ __Pyx_GIVEREF(__pyx_tuple__10);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":40
+- * _CAPI_VERSION = mpv_client_api_version()
+- *
+- * _CAPI_MAJOR = _CAPI_VERSION >> 16 # <<<<<<<<<<<<<<
+- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":998
++ * if arp is not None:
++ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
++ * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
++ * if drm_osd_size:
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__11);
++ __Pyx_GIVEREF(__pyx_tuple__11);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":41
+- *
+- * _CAPI_MAJOR = _CAPI_VERSION >> 16
+- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF # <<<<<<<<<<<<<<
+- *
+- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
++ /* "vidcutter/libs/pympv/mpv.pyx":1083
++ * if opengl_fbo:
++ * memset(&fbo, 0, sizeof(fbo))
++ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
++ * fbo.w = opengl_fbo["w"]
++ * fbo.h = opengl_fbo["h"]
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__12);
++ __Pyx_GIVEREF(__pyx_tuple__12);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":43
+- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+- *
+- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
+- * raise ImportError(
+- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (!__pyx_t_5) {
+- } else {
+- __pyx_t_3 = __pyx_t_5;
+- goto __pyx_L6_bool_binop_done;
+- }
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_3 = __pyx_t_5;
+- __pyx_L6_bool_binop_done:;
+- if (unlikely(__pyx_t_3)) {
++ /* "vidcutter/libs/pympv/mpv.pyx":1086
++ * fbo.w = opengl_fbo["w"]
++ * fbo.h = opengl_fbo["h"]
++ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
++ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
++ * if flip_y:
++ */
++ __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__13);
++ __Pyx_GIVEREF(__pyx_tuple__13);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":46
+- * raise ImportError(
+- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR) # <<<<<<<<<<<<<<
+- * )
+- *
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_GIVEREF(__pyx_t_2);
+- PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
+- __Pyx_GIVEREF(__pyx_t_1);
+- PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
+- __Pyx_GIVEREF(__pyx_t_4);
+- PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4);
+- __Pyx_GIVEREF(__pyx_t_6);
+- PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
+- __pyx_t_2 = 0;
+- __pyx_t_1 = 0;
+- __pyx_t_4 = 0;
+- __pyx_t_6 = 0;
++ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__14);
++ __Pyx_GIVEREF(__pyx_tuple__14);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":45
+- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+- * raise ImportError(
+- * "libmpv version is incorrect. Required %d.%d got %d.%d." % # <<<<<<<<<<<<<<
+- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
+- * )
++ /* "(tree fragment)":4
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__15);
++ __Pyx_GIVEREF(__pyx_tuple__15);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":44
+- *
+- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+- * raise ImportError( # <<<<<<<<<<<<<<
+- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
++ /* "(tree fragment)":2
++ * def __reduce_cython__(self):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
+ */
+- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __PYX_ERR(0, 44, __pyx_L1_error)
++ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 2, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__16);
++ __Pyx_GIVEREF(__pyx_tuple__16);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":43
+- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+- *
+- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
+- * raise ImportError(
+- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
++ /* "(tree fragment)":4
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
++ * def __setstate_cython__(self, __pyx_state):
++ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
+ */
+- }
++ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 4, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__17);
++ __Pyx_GIVEREF(__pyx_tuple__17);
+
+ /* "vidcutter/libs/pympv/mpv.pyx":52
+- * void PyEval_InitThreads()
++ * void Py_Initialize()
+ *
+ * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__21, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":53
+- *
+- * _is_py3 = sys.version_info >= (3,)
+- * _strdec_err = "surrogateescape" if _is_py3 else "strict" # <<<<<<<<<<<<<<
+- * # mpv -> Python
+- * def _strdec(s):
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 53, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (__pyx_t_3) {
+- __Pyx_INCREF(__pyx_n_s_surrogateescape);
+- __pyx_t_7 = __pyx_n_s_surrogateescape;
+- } else {
+- __Pyx_INCREF(__pyx_n_s_strict);
+- __pyx_t_7 = __pyx_n_s_strict;
+- }
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__18);
++ __Pyx_GIVEREF(__pyx_tuple__18);
+
+ /* "vidcutter/libs/pympv/mpv.pyx":55
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+@@ -28564,10 +24644,10 @@ if (!__Pyx_RefNanny) {
+ * try:
+ * return s.decode("utf-8", _strdec_err)
+ */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 55, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__19);
++ __Pyx_GIVEREF(__pyx_tuple__19);
++ __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 55, __pyx_L1_error)
+
+ /* "vidcutter/libs/pympv/mpv.pyx":63
+ *
+@@ -28576,5040 +24656,5555 @@ if (!__Pyx_RefNanny) {
+ * try:
+ * return s.encode("utf-8", _strdec_err)
+ */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 63, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__21);
++ __Pyx_GIVEREF(__pyx_tuple__21);
++ __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 63, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":70
+- * return s
++ /* "vidcutter/libs/pympv/mpv.pyx":318
+ *
+- * PyEval_InitThreads() # <<<<<<<<<<<<<<
+ *
+- * class Errors:
++ * def _errors(fn): # <<<<<<<<<<<<<<
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
+ */
+- PyEval_InitThreads();
++ __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 318, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__23);
++ __Pyx_GIVEREF(__pyx_tuple__23);
++ __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 318, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":72
+- * PyEval_InitThreads()
++ /* "vidcutter/libs/pympv/mpv.pyx":329
++ * code = None
+ *
+- * class Errors: # <<<<<<<<<<<<<<
+- * """Set of known error codes from MpvError and Event responses.
++ * def __init__(self, e): # <<<<<<<<<<<<<<
++ * self.code = e
++ * cdef const char* err_c
++ */
++ __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 329, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__25);
++ __Pyx_GIVEREF(__pyx_tuple__25);
++ __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 329, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":346
++ * cdef _reply_userdatas = dict()
+ *
++ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
++ * def __init__(self, data):
++ * self.counter = 0
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 72, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__27);
++ __Pyx_GIVEREF(__pyx_tuple__27);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":79
+- * You should handle the possibility that error codes may not be any of these values.
+- * """
+- * success = MPV_ERROR_SUCCESS # <<<<<<<<<<<<<<
+- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+- * nomem = MPV_ERROR_NOMEM
++ /* "vidcutter/libs/pympv/mpv.pyx":347
++ *
++ * class _ReplyUserData(object):
++ * def __init__(self, data): # <<<<<<<<<<<<<<
++ * self.counter = 0
++ * self.data = data
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 347, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__28);
++ __Pyx_GIVEREF(__pyx_tuple__28);
++ __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 347, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":80
+- * """
+- * success = MPV_ERROR_SUCCESS
+- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL # <<<<<<<<<<<<<<
+- * nomem = MPV_ERROR_NOMEM
+- * uninitialized = MPV_ERROR_UNINITIALIZED
++ /* "vidcutter/libs/pympv/mpv.pyx":352
++ * self.observed = False
++ *
++ * def add(self): # <<<<<<<<<<<<<<
++ * self.counter += 1
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 352, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__30);
++ __Pyx_GIVEREF(__pyx_tuple__30);
++ __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 352, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":81
+- * success = MPV_ERROR_SUCCESS
+- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+- * nomem = MPV_ERROR_NOMEM # <<<<<<<<<<<<<<
+- * uninitialized = MPV_ERROR_UNINITIALIZED
+- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
++ /* "vidcutter/libs/pympv/mpv.pyx":355
++ * self.counter += 1
++ *
++ * def remove(self): # <<<<<<<<<<<<<<
++ * self.counter -= 1
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 355, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__32);
++ __Pyx_GIVEREF(__pyx_tuple__32);
++ __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 355, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":82
+- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+- * nomem = MPV_ERROR_NOMEM
+- * uninitialized = MPV_ERROR_UNINITIALIZED # <<<<<<<<<<<<<<
+- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+- * not_found = MPV_ERROR_OPTION_NOT_FOUND
++ /* "vidcutter/libs/pympv/mpv.pyx":1133
++ *
++ * class CallbackThread(Thread):
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * Thread.__init__(self)
++ * self.daemon = True
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__34);
++ __Pyx_GIVEREF(__pyx_tuple__34);
++ __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1133, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":83
+- * nomem = MPV_ERROR_NOMEM
+- * uninitialized = MPV_ERROR_UNINITIALIZED
+- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER # <<<<<<<<<<<<<<
+- * not_found = MPV_ERROR_OPTION_NOT_FOUND
+- * option_format = MPV_ERROR_OPTION_FORMAT
++ /* "vidcutter/libs/pympv/mpv.pyx":1141
++ * self.isshutdown = False
++ *
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * self.isshutdown = True
++ * self.callback = None
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__36);
++ __Pyx_GIVEREF(__pyx_tuple__36);
++ __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1141, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":84
+- * uninitialized = MPV_ERROR_UNINITIALIZED
+- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+- * not_found = MPV_ERROR_OPTION_NOT_FOUND # <<<<<<<<<<<<<<
+- * option_format = MPV_ERROR_OPTION_FORMAT
+- * option_error = MPV_ERROR_OPTION_ERROR
++ /* "vidcutter/libs/pympv/mpv.pyx":1146
++ * self.lock.release()
++ *
++ * def call(self): # <<<<<<<<<<<<<<
++ * self.lock.release()
++ *
++ */
++ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__38);
++ __Pyx_GIVEREF(__pyx_tuple__38);
++ __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1146, __pyx_L1_error)
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1149
++ * self.lock.release()
++ *
++ * def set(self, callback): # <<<<<<<<<<<<<<
++ * self.callback = callback
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__40);
++ __Pyx_GIVEREF(__pyx_tuple__40);
++ __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1149, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":85
+- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+- * not_found = MPV_ERROR_OPTION_NOT_FOUND
+- * option_format = MPV_ERROR_OPTION_FORMAT # <<<<<<<<<<<<<<
+- * option_error = MPV_ERROR_OPTION_ERROR
+- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
++ /* "vidcutter/libs/pympv/mpv.pyx":1152
++ * self.callback = callback
++ *
++ * def run(self): # <<<<<<<<<<<<<<
++ * while not self.isshutdown:
++ * self.lock.acquire(True)
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__42);
++ __Pyx_GIVEREF(__pyx_tuple__42);
++ __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 1152, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":86
+- * not_found = MPV_ERROR_OPTION_NOT_FOUND
+- * option_format = MPV_ERROR_OPTION_FORMAT
+- * option_error = MPV_ERROR_OPTION_ERROR # <<<<<<<<<<<<<<
+- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+- * property_format = MPV_ERROR_PROPERTY_FORMAT
++ /* "vidcutter/libs/pympv/mpv.pyx":1157
++ * self.mpv_callback(self.callback) if self.callback else None
++ *
++ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
++ * try:
++ * callback()
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__44);
++ __Pyx_GIVEREF(__pyx_tuple__44);
++ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1157, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":87
+- * option_format = MPV_ERROR_OPTION_FORMAT
+- * option_error = MPV_ERROR_OPTION_ERROR
+- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND # <<<<<<<<<<<<<<
+- * property_format = MPV_ERROR_PROPERTY_FORMAT
+- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_tuple__46 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__46);
++ __Pyx_GIVEREF(__pyx_tuple__46);
++ __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_EndOfFileReached, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __pyx_tuple__48 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__48);
++ __Pyx_GIVEREF(__pyx_tuple__48);
++ __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_LogMessage, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __pyx_tuple__50 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__50);
++ __Pyx_GIVEREF(__pyx_tuple__50);
++ __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Property, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __pyx_tuple__52 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__52);
++ __Pyx_GIVEREF(__pyx_tuple__52);
++ __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Event, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __pyx_tuple__54 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_tuple__54);
++ __Pyx_GIVEREF(__pyx_tuple__54);
++ __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RenderFrameInfo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_RefNannyFinishContext();
++ return 0;
++ __pyx_L1_error:;
++ __Pyx_RefNannyFinishContext();
++ return -1;
++}
++
++static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
++ if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
++ __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_5713169 = PyInt_FromLong(5713169L); if (unlikely(!__pyx_int_5713169)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_90958262 = PyInt_FromLong(90958262L); if (unlikely(!__pyx_int_90958262)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_142036910 = PyInt_FromLong(142036910L); if (unlikely(!__pyx_int_142036910)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_228822053 = PyInt_FromLong(228822053L); if (unlikely(!__pyx_int_228822053)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
++ return 0;
++ __pyx_L1_error:;
++ return -1;
++}
++
++static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
++static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
++
++static int __Pyx_modinit_global_init_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
++ /*--- Global init code ---*/
++ __pyx_v_9vidcutter_4libs_3mpv__callbacks = Py_None; Py_INCREF(Py_None);
++ __pyx_v_9vidcutter_4libs_3mpv__reply_userdatas = Py_None; Py_INCREF(Py_None);
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
++
++static int __Pyx_modinit_variable_export_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
++ /*--- Variable export code ---*/
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
++
++static int __Pyx_modinit_function_export_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
++ /*--- Function export code ---*/
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
++
++static int __Pyx_modinit_type_init_code(void) {
++ __Pyx_RefNannyDeclarations
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
++ /*--- Type init code ---*/
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
++ __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, struct mpv_event_end_file *))__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage = &__pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
++ __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, struct mpv_event_log_message *))__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = &__pyx_type_9vidcutter_4libs_3mpv_LogMessage;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_Property = &__pyx_vtable_9vidcutter_4libs_3mpv_Property;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Property._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, struct mpv_event_property *))__pyx_f_9vidcutter_4libs_3mpv_8Property__init;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_Property.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_Property = &__pyx_type_9vidcutter_4libs_3mpv_Property;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_Event = &__pyx_vtable_9vidcutter_4libs_3mpv_Event;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Event._data = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *))__pyx_f_9vidcutter_4libs_3mpv_5Event__data;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Event._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_5Event__init;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_Event.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_Event = &__pyx_type_9vidcutter_4libs_3mpv_Event;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_Context = &__pyx_vtable_9vidcutter_4libs_3mpv_Context;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_list = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_map = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_native_value = (struct mpv_node (*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value;
++ __pyx_vtable_9vidcutter_4libs_3mpv_Context._free_native_value = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, struct mpv_node))__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_Context.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_Context = &__pyx_type_9vidcutter_4libs_3mpv_Context;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams = &__pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
++ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_voidp = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, void *, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
++ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_int = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, int))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int;
++ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_string = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, char *))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = &__pyx_type_9vidcutter_4libs_3mpv__RenderParams;
++ __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
++ __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo._from_struct = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *, struct mpv_render_frame_info *))__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = &__pyx_type_9vidcutter_4libs_3mpv_RenderContext;
++ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_base = __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
++ }
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
++ __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLRenderContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext;
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
++ #if PY_VERSION_HEX < 0x030800B1
++ __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_print = 0;
++ #endif
++ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro == PyObject_GenericGetAttr)) {
++ __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
++ }
++ __pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = &__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors;
++ __Pyx_RefNannyFinishContext();
++ return 0;
++ __pyx_L1_error:;
++ __Pyx_RefNannyFinishContext();
++ return -1;
++}
++
++static int __Pyx_modinit_type_import_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
++ /*--- Type import code ---*/
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":88
+- * option_error = MPV_ERROR_OPTION_ERROR
+- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+- * property_format = MPV_ERROR_PROPERTY_FORMAT # <<<<<<<<<<<<<<
+- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+- * property_error = MPV_ERROR_PROPERTY_ERROR
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++static int __Pyx_modinit_variable_import_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
++ /*--- Variable import code ---*/
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":89
+- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+- * property_format = MPV_ERROR_PROPERTY_FORMAT
+- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE # <<<<<<<<<<<<<<
+- * property_error = MPV_ERROR_PROPERTY_ERROR
+- * command_error = MPV_ERROR_COMMAND
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++static int __Pyx_modinit_function_import_code(void) {
++ __Pyx_RefNannyDeclarations
++ __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
++ /*--- Function import code ---*/
++ __Pyx_RefNannyFinishContext();
++ return 0;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":90
+- * property_format = MPV_ERROR_PROPERTY_FORMAT
+- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+- * property_error = MPV_ERROR_PROPERTY_ERROR # <<<<<<<<<<<<<<
+- * command_error = MPV_ERROR_COMMAND
+- * loading_failed = MPV_ERROR_LOADING_FAILED
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":91
+- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+- * property_error = MPV_ERROR_PROPERTY_ERROR
+- * command_error = MPV_ERROR_COMMAND # <<<<<<<<<<<<<<
+- * loading_failed = MPV_ERROR_LOADING_FAILED
+- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++#ifndef CYTHON_NO_PYINIT_EXPORT
++#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
++#elif PY_MAJOR_VERSION < 3
++#ifdef __cplusplus
++#define __Pyx_PyMODINIT_FUNC extern "C" void
++#else
++#define __Pyx_PyMODINIT_FUNC void
++#endif
++#else
++#ifdef __cplusplus
++#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
++#else
++#define __Pyx_PyMODINIT_FUNC PyObject *
++#endif
++#endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":92
+- * property_error = MPV_ERROR_PROPERTY_ERROR
+- * command_error = MPV_ERROR_COMMAND
+- * loading_failed = MPV_ERROR_LOADING_FAILED # <<<<<<<<<<<<<<
+- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":93
+- * command_error = MPV_ERROR_COMMAND
+- * loading_failed = MPV_ERROR_LOADING_FAILED
+- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED # <<<<<<<<<<<<<<
+- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++#if PY_MAJOR_VERSION < 3
++__Pyx_PyMODINIT_FUNC initmpv(void) CYTHON_SMALL_CODE; /*proto*/
++__Pyx_PyMODINIT_FUNC initmpv(void)
++#else
++__Pyx_PyMODINIT_FUNC PyInit_mpv(void) CYTHON_SMALL_CODE; /*proto*/
++__Pyx_PyMODINIT_FUNC PyInit_mpv(void)
++#if CYTHON_PEP489_MULTI_PHASE_INIT
++{
++ return PyModuleDef_Init(&__pyx_moduledef);
++}
++static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
++ #if PY_VERSION_HEX >= 0x030700A1
++ static PY_INT64_T main_interpreter_id = -1;
++ PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
++ if (main_interpreter_id == -1) {
++ main_interpreter_id = current_id;
++ return (unlikely(current_id == -1)) ? -1 : 0;
++ } else if (unlikely(main_interpreter_id != current_id))
++ #else
++ static PyInterpreterState *main_interpreter = NULL;
++ PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
++ if (!main_interpreter) {
++ main_interpreter = current_interpreter;
++ } else if (unlikely(main_interpreter != current_interpreter))
++ #endif
++ {
++ PyErr_SetString(
++ PyExc_ImportError,
++ "Interpreter change detected - this module can only be loaded into one interpreter per process.");
++ return -1;
++ }
++ return 0;
++}
++static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
++ PyObject *value = PyObject_GetAttrString(spec, from_name);
++ int result = 0;
++ if (likely(value)) {
++ if (allow_none || value != Py_None) {
++ result = PyDict_SetItemString(moddict, to_name, value);
++ }
++ Py_DECREF(value);
++ } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
++ PyErr_Clear();
++ } else {
++ result = -1;
++ }
++ return result;
++}
++static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
++ PyObject *module = NULL, *moddict, *modname;
++ if (__Pyx_check_single_interpreter())
++ return NULL;
++ if (__pyx_m)
++ return __Pyx_NewRef(__pyx_m);
++ modname = PyObject_GetAttrString(spec, "name");
++ if (unlikely(!modname)) goto bad;
++ module = PyModule_NewObject(modname);
++ Py_DECREF(modname);
++ if (unlikely(!module)) goto bad;
++ moddict = PyModule_GetDict(module);
++ if (unlikely(!moddict)) goto bad;
++ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
++ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
++ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
++ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
++ return module;
++bad:
++ Py_XDECREF(module);
++ return NULL;
++}
+
+- /* "vidcutter/libs/pympv/mpv.pyx":94
+- * loading_failed = MPV_ERROR_LOADING_FAILED
+- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED # <<<<<<<<<<<<<<
+- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":95
+- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY # <<<<<<<<<<<<<<
+- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+- * unsupported = MPV_ERROR_UNSUPPORTED
++static CYTHON_SMALL_CODE int __pyx_pymod_exec_mpv(PyObject *__pyx_pyinit_module)
++#endif
++#endif
++{
++ PyObject *__pyx_t_1 = NULL;
++ PyObject *__pyx_t_2 = NULL;
++ int __pyx_t_3;
++ PyObject *__pyx_t_4 = NULL;
++ int __pyx_t_5;
++ PyObject *__pyx_t_6 = NULL;
++ PyObject *__pyx_t_7 = NULL;
++ int __pyx_lineno = 0;
++ const char *__pyx_filename = NULL;
++ int __pyx_clineno = 0;
++ __Pyx_RefNannyDeclarations
++ #if CYTHON_PEP489_MULTI_PHASE_INIT
++ if (__pyx_m) {
++ if (__pyx_m == __pyx_pyinit_module) return 0;
++ PyErr_SetString(PyExc_RuntimeError, "Module 'mpv' has already been imported. Re-initialisation is not supported.");
++ return -1;
++ }
++ #elif PY_MAJOR_VERSION >= 3
++ if (__pyx_m) return __Pyx_NewRef(__pyx_m);
++ #endif
++ #if CYTHON_REFNANNY
++__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
++if (!__Pyx_RefNanny) {
++ PyErr_Clear();
++ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
++ if (!__Pyx_RefNanny)
++ Py_FatalError("failed to import 'refnanny' module");
++}
++#endif
++ __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_mpv(void)", 0);
++ if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #ifdef __Pxy_PyFrame_Initialize_Offsets
++ __Pxy_PyFrame_Initialize_Offsets();
++ #endif
++ __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
++ #ifdef __Pyx_CyFunction_USED
++ if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ #ifdef __Pyx_FusedFunction_USED
++ if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ #ifdef __Pyx_Coroutine_USED
++ if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ #ifdef __Pyx_Generator_USED
++ if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ #ifdef __Pyx_AsyncGen_USED
++ if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ #ifdef __Pyx_StopAsyncIteration_USED
++ if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ /*--- Library function declarations ---*/
++ /*--- Threads initialization code ---*/
++ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
++ PyEval_InitThreads();
++ #endif
++ /*--- Module creation code ---*/
++ #if CYTHON_PEP489_MULTI_PHASE_INIT
++ __pyx_m = __pyx_pyinit_module;
++ Py_INCREF(__pyx_m);
++ #else
++ #if PY_MAJOR_VERSION < 3
++ __pyx_m = Py_InitModule4("mpv", __pyx_methods, __pyx_k_pympv_Python_wrapper_for_libmpv, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
++ #else
++ __pyx_m = PyModule_Create(&__pyx_moduledef);
++ #endif
++ if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
++ Py_INCREF(__pyx_d);
++ __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
++ Py_INCREF(__pyx_b);
++ __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
++ Py_INCREF(__pyx_cython_runtime);
++ if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
++ /*--- Initialize various global constants etc. ---*/
++ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
++ if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++ if (__pyx_module_is_main_vidcutter__libs__mpv) {
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ }
++ #if PY_MAJOR_VERSION >= 3
++ {
++ PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
++ if (!PyDict_GetItemString(modules, "vidcutter.libs.mpv")) {
++ if (unlikely(PyDict_SetItemString(modules, "vidcutter.libs.mpv", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
++ }
++ }
++ #endif
++ /*--- Builtin init code ---*/
++ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ /*--- Constants init code ---*/
++ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ /*--- Global type/function init code ---*/
++ (void)__Pyx_modinit_global_init_code();
++ (void)__Pyx_modinit_variable_export_code();
++ (void)__Pyx_modinit_function_export_code();
++ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
++ (void)__Pyx_modinit_type_import_code();
++ (void)__Pyx_modinit_variable_import_code();
++ (void)__Pyx_modinit_function_import_code();
++ /*--- Execution code ---*/
++ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
++ if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ #endif
++
++ /* "vidcutter/libs/pympv/mpv.pyx":22
++ *
++ * import cython
++ * import sys, warnings # <<<<<<<<<<<<<<
++ * from threading import Thread, Semaphore
++ * from libc.stdlib cimport malloc, free
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":96
+- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT # <<<<<<<<<<<<<<
+- * unsupported = MPV_ERROR_UNSUPPORTED
+- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
++ /* "vidcutter/libs/pympv/mpv.pyx":23
++ * import cython
++ * import sys, warnings
++ * from threading import Thread, Semaphore # <<<<<<<<<<<<<<
++ * from libc.stdlib cimport malloc, free
++ * from libc.string cimport strcpy, strlen, memset
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_INCREF(__pyx_n_s_Thread);
++ __Pyx_GIVEREF(__pyx_n_s_Thread);
++ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Thread);
++ __Pyx_INCREF(__pyx_n_s_Semaphore);
++ __Pyx_GIVEREF(__pyx_n_s_Semaphore);
++ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Semaphore);
++ __pyx_t_2 = __Pyx_Import(__pyx_n_s_threading, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Thread, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Semaphore, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":97
+- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+- * unsupported = MPV_ERROR_UNSUPPORTED # <<<<<<<<<<<<<<
+- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
++ /* "vidcutter/libs/pympv/mpv.pyx":30
++ * from client cimport *
++ *
++ * __version__ = "0.3.0" # <<<<<<<<<<<<<<
++ * __author__ = "Andre D"
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_3_0) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":98
+- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+- * unsupported = MPV_ERROR_UNSUPPORTED
+- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":31
+ *
++ * __version__ = "0.3.0"
++ * __author__ = "Andre D" # <<<<<<<<<<<<<<
+ *
++ * _REQUIRED_CAPI_MAJOR = 2
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_s_Andre_D) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":72
+- * PyEval_InitThreads()
++ /* "vidcutter/libs/pympv/mpv.pyx":33
++ * __author__ = "Andre D"
+ *
+- * class Errors: # <<<<<<<<<<<<<<
+- * """Set of known error codes from MpvError and Event responses.
++ * _REQUIRED_CAPI_MAJOR = 2 # <<<<<<<<<<<<<<
++ * _MIN_CAPI_MINOR = 0
+ *
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":101
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":34
+ *
+- * class Events: # <<<<<<<<<<<<<<
+- * """Set of known values for Event ids.
++ * _REQUIRED_CAPI_MAJOR = 2
++ * _MIN_CAPI_MINOR = 0 # <<<<<<<<<<<<<<
+ *
++ * cdef unsigned long _CAPI_VERSION
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":108
+- * You should handle the possibility that event ids may not be any of these values.
+- * """
+- * none = MPV_EVENT_NONE # <<<<<<<<<<<<<<
+- * shutdown = MPV_EVENT_SHUTDOWN
+- * log_message = MPV_EVENT_LOG_MESSAGE
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":109
+- * """
+- * none = MPV_EVENT_NONE
+- * shutdown = MPV_EVENT_SHUTDOWN # <<<<<<<<<<<<<<
+- * log_message = MPV_EVENT_LOG_MESSAGE
+- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 109, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":110
+- * none = MPV_EVENT_NONE
+- * shutdown = MPV_EVENT_SHUTDOWN
+- * log_message = MPV_EVENT_LOG_MESSAGE # <<<<<<<<<<<<<<
+- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":111
+- * shutdown = MPV_EVENT_SHUTDOWN
+- * log_message = MPV_EVENT_LOG_MESSAGE
+- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY # <<<<<<<<<<<<<<
+- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+- * command_reply = MPV_EVENT_COMMAND_REPLY
+- */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_0) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":112
+- * log_message = MPV_EVENT_LOG_MESSAGE
+- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY # <<<<<<<<<<<<<<
+- * command_reply = MPV_EVENT_COMMAND_REPLY
+- * start_file = MPV_EVENT_START_FILE
++ /* "vidcutter/libs/pympv/mpv.pyx":37
++ *
++ * cdef unsigned long _CAPI_VERSION
++ * with nogil: # <<<<<<<<<<<<<<
++ * _CAPI_VERSION = mpv_client_api_version()
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ {
++ #ifdef WITH_THREAD
++ PyThreadState *_save;
++ Py_UNBLOCK_THREADS
++ __Pyx_FastGIL_Remember();
++ #endif
++ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":113
+- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+- * command_reply = MPV_EVENT_COMMAND_REPLY # <<<<<<<<<<<<<<
+- * start_file = MPV_EVENT_START_FILE
+- * end_file = MPV_EVENT_END_FILE
++ /* "vidcutter/libs/pympv/mpv.pyx":38
++ * cdef unsigned long _CAPI_VERSION
++ * with nogil:
++ * _CAPI_VERSION = mpv_client_api_version() # <<<<<<<<<<<<<<
++ *
++ * _CAPI_MAJOR = _CAPI_VERSION >> 16
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION = mpv_client_api_version();
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":114
+- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+- * command_reply = MPV_EVENT_COMMAND_REPLY
+- * start_file = MPV_EVENT_START_FILE # <<<<<<<<<<<<<<
+- * end_file = MPV_EVENT_END_FILE
+- * file_loaded = MPV_EVENT_FILE_LOADED
++ /* "vidcutter/libs/pympv/mpv.pyx":37
++ *
++ * cdef unsigned long _CAPI_VERSION
++ * with nogil: # <<<<<<<<<<<<<<
++ * _CAPI_VERSION = mpv_client_api_version()
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ /*finally:*/ {
++ /*normal exit:*/{
++ #ifdef WITH_THREAD
++ __Pyx_FastGIL_Forget();
++ Py_BLOCK_THREADS
++ #endif
++ goto __pyx_L4;
++ }
++ __pyx_L4:;
++ }
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":115
+- * command_reply = MPV_EVENT_COMMAND_REPLY
+- * start_file = MPV_EVENT_START_FILE
+- * end_file = MPV_EVENT_END_FILE # <<<<<<<<<<<<<<
+- * file_loaded = MPV_EVENT_FILE_LOADED
+- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
++ /* "vidcutter/libs/pympv/mpv.pyx":40
++ * _CAPI_VERSION = mpv_client_api_version()
++ *
++ * _CAPI_MAJOR = _CAPI_VERSION >> 16 # <<<<<<<<<<<<<<
++ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":116
+- * start_file = MPV_EVENT_START_FILE
+- * end_file = MPV_EVENT_END_FILE
+- * file_loaded = MPV_EVENT_FILE_LOADED # <<<<<<<<<<<<<<
+- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
+- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
++ /* "vidcutter/libs/pympv/mpv.pyx":41
++ *
++ * _CAPI_MAJOR = _CAPI_VERSION >> 16
++ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF # <<<<<<<<<<<<<<
++ *
++ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":117
+- * end_file = MPV_EVENT_END_FILE
+- * file_loaded = MPV_EVENT_FILE_LOADED
+- * tracks_changed = MPV_EVENT_TRACKS_CHANGED # <<<<<<<<<<<<<<
+- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
+- * idle = MPV_EVENT_IDLE
++ /* "vidcutter/libs/pympv/mpv.pyx":43
++ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
++ *
++ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
++ * raise ImportError(
++ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TRACKS_CHANGED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tracks_changed, __pyx_t_6) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (!__pyx_t_5) {
++ } else {
++ __pyx_t_3 = __pyx_t_5;
++ goto __pyx_L6_bool_binop_done;
++ }
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
++ __pyx_t_3 = __pyx_t_5;
++ __pyx_L6_bool_binop_done:;
++ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":118
+- * file_loaded = MPV_EVENT_FILE_LOADED
+- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
+- * tracks_switched = MPV_EVENT_TRACK_SWITCHED # <<<<<<<<<<<<<<
+- * idle = MPV_EVENT_IDLE
+- * pause = MPV_EVENT_PAUSE
++ /* "vidcutter/libs/pympv/mpv.pyx":46
++ * raise ImportError(
++ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
++ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR) # <<<<<<<<<<<<<<
++ * )
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TRACK_SWITCHED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 118, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tracks_switched, __pyx_t_6) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_2);
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_GIVEREF(__pyx_t_2);
++ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
++ __Pyx_GIVEREF(__pyx_t_1);
++ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
++ __Pyx_GIVEREF(__pyx_t_4);
++ PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4);
++ __Pyx_GIVEREF(__pyx_t_6);
++ PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
++ __pyx_t_2 = 0;
++ __pyx_t_1 = 0;
++ __pyx_t_4 = 0;
++ __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":119
+- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
+- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
+- * idle = MPV_EVENT_IDLE # <<<<<<<<<<<<<<
+- * pause = MPV_EVENT_PAUSE
+- * unpause = MPV_EVENT_UNPAUSE
++ /* "vidcutter/libs/pympv/mpv.pyx":45
++ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
++ * raise ImportError(
++ * "libmpv version is incorrect. Required %d.%d got %d.%d." % # <<<<<<<<<<<<<<
++ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
++ * )
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":120
+- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
+- * idle = MPV_EVENT_IDLE
+- * pause = MPV_EVENT_PAUSE # <<<<<<<<<<<<<<
+- * unpause = MPV_EVENT_UNPAUSE
+- * tick = MPV_EVENT_TICK
++ /* "vidcutter/libs/pympv/mpv.pyx":44
++ *
++ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
++ * raise ImportError( # <<<<<<<<<<<<<<
++ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
++ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PAUSE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_pause, __pyx_t_6) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_Raise(__pyx_t_7, 0, 0, 0);
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __PYX_ERR(0, 44, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":121
+- * idle = MPV_EVENT_IDLE
+- * pause = MPV_EVENT_PAUSE
+- * unpause = MPV_EVENT_UNPAUSE # <<<<<<<<<<<<<<
+- * tick = MPV_EVENT_TICK
+- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ /* "vidcutter/libs/pympv/mpv.pyx":43
++ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
++ *
++ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
++ * raise ImportError(
++ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_UNPAUSE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 121, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unpause, __pyx_t_6) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":122
+- * pause = MPV_EVENT_PAUSE
+- * unpause = MPV_EVENT_UNPAUSE
+- * tick = MPV_EVENT_TICK # <<<<<<<<<<<<<<
+- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+- * client_message = MPV_EVENT_CLIENT_MESSAGE
++ /* "vidcutter/libs/pympv/mpv.pyx":52
++ * void Py_Initialize()
++ *
++ * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
++ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
++ * # mpv -> Python
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__18, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":123
+- * unpause = MPV_EVENT_UNPAUSE
+- * tick = MPV_EVENT_TICK
+- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH # <<<<<<<<<<<<<<
+- * client_message = MPV_EVENT_CLIENT_MESSAGE
+- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
++ /* "vidcutter/libs/pympv/mpv.pyx":53
++ *
++ * _is_py3 = sys.version_info >= (3,)
++ * _strdec_err = "surrogateescape" if _is_py3 else "strict" # <<<<<<<<<<<<<<
++ * # mpv -> Python
++ * def _strdec(s):
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SCRIPT_INPUT_DISPATCH); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 123, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_script_input_dispatch, __pyx_t_6) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 53, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (__pyx_t_3) {
++ __Pyx_INCREF(__pyx_n_s_surrogateescape);
++ __pyx_t_7 = __pyx_n_s_surrogateescape;
++ } else {
++ __Pyx_INCREF(__pyx_n_s_strict);
++ __pyx_t_7 = __pyx_n_s_strict;
++ }
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":124
+- * tick = MPV_EVENT_TICK
+- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+- * client_message = MPV_EVENT_CLIENT_MESSAGE # <<<<<<<<<<<<<<
+- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
++ /* "vidcutter/libs/pympv/mpv.pyx":55
++ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
++ * # mpv -> Python
++ * def _strdec(s): # <<<<<<<<<<<<<<
++ * try:
++ * return s.decode("utf-8", _strdec_err)
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":125
+- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+- * client_message = MPV_EVENT_CLIENT_MESSAGE
+- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG # <<<<<<<<<<<<<<
+- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+- * metadata_update = MPV_EVENT_METADATA_UPDATE
++ /* "vidcutter/libs/pympv/mpv.pyx":63
++ *
++ * # Python -> mpv
++ * def _strenc(s): # <<<<<<<<<<<<<<
++ * try:
++ * return s.encode("utf-8", _strdec_err)
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":126
+- * client_message = MPV_EVENT_CLIENT_MESSAGE
+- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG # <<<<<<<<<<<<<<
+- * metadata_update = MPV_EVENT_METADATA_UPDATE
+- * seek = MPV_EVENT_SEEK
++ /* "vidcutter/libs/pympv/mpv.pyx":70
++ * return s
++ *
++ * Py_Initialize() # <<<<<<<<<<<<<<
++ *
++ * class Errors:
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ Py_Initialize();
+
+- /* "vidcutter/libs/pympv/mpv.pyx":127
+- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+- * metadata_update = MPV_EVENT_METADATA_UPDATE # <<<<<<<<<<<<<<
+- * seek = MPV_EVENT_SEEK
+- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
++ /* "vidcutter/libs/pympv/mpv.pyx":72
++ * Py_Initialize()
++ *
++ * class Errors: # <<<<<<<<<<<<<<
++ * """Set of known error codes from MpvError and Event responses.
++ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_METADATA_UPDATE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 127, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_metadata_update, __pyx_t_6) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 72, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":128
+- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+- * metadata_update = MPV_EVENT_METADATA_UPDATE
+- * seek = MPV_EVENT_SEEK # <<<<<<<<<<<<<<
+- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
+- * property_change = MPV_EVENT_PROPERTY_CHANGE
++ /* "vidcutter/libs/pympv/mpv.pyx":79
++ * You should handle the possibility that error codes may not be any of these values.
++ * """
++ * success = MPV_ERROR_SUCCESS # <<<<<<<<<<<<<<
++ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
++ * nomem = MPV_ERROR_NOMEM
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":129
+- * metadata_update = MPV_EVENT_METADATA_UPDATE
+- * seek = MPV_EVENT_SEEK
+- * playback_restart = MPV_EVENT_PLAYBACK_RESTART # <<<<<<<<<<<<<<
+- * property_change = MPV_EVENT_PROPERTY_CHANGE
+- * chapter_change = MPV_EVENT_CHAPTER_CHANGE
++ /* "vidcutter/libs/pympv/mpv.pyx":80
++ * """
++ * success = MPV_ERROR_SUCCESS
++ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL # <<<<<<<<<<<<<<
++ * nomem = MPV_ERROR_NOMEM
++ * uninitialized = MPV_ERROR_UNINITIALIZED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":130
+- * seek = MPV_EVENT_SEEK
+- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
+- * property_change = MPV_EVENT_PROPERTY_CHANGE # <<<<<<<<<<<<<<
+- * chapter_change = MPV_EVENT_CHAPTER_CHANGE
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":81
++ * success = MPV_ERROR_SUCCESS
++ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
++ * nomem = MPV_ERROR_NOMEM # <<<<<<<<<<<<<<
++ * uninitialized = MPV_ERROR_UNINITIALIZED
++ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":131
+- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
+- * property_change = MPV_EVENT_PROPERTY_CHANGE
+- * chapter_change = MPV_EVENT_CHAPTER_CHANGE # <<<<<<<<<<<<<<
+- *
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":82
++ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
++ * nomem = MPV_ERROR_NOMEM
++ * uninitialized = MPV_ERROR_UNINITIALIZED # <<<<<<<<<<<<<<
++ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
++ * not_found = MPV_ERROR_OPTION_NOT_FOUND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CHAPTER_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_chapter_change, __pyx_t_6) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":101
+- *
+- *
+- * class Events: # <<<<<<<<<<<<<<
+- * """Set of known values for Event ids.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":83
++ * nomem = MPV_ERROR_NOMEM
++ * uninitialized = MPV_ERROR_UNINITIALIZED
++ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER # <<<<<<<<<<<<<<
++ * not_found = MPV_ERROR_OPTION_NOT_FOUND
++ * option_format = MPV_ERROR_OPTION_FORMAT
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":134
+- *
+- *
+- * class LogLevels: # <<<<<<<<<<<<<<
+- * no = MPV_LOG_LEVEL_NONE
+- * fatal = MPV_LOG_LEVEL_FATAL
++ /* "vidcutter/libs/pympv/mpv.pyx":84
++ * uninitialized = MPV_ERROR_UNINITIALIZED
++ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
++ * not_found = MPV_ERROR_OPTION_NOT_FOUND # <<<<<<<<<<<<<<
++ * option_format = MPV_ERROR_OPTION_FORMAT
++ * option_error = MPV_ERROR_OPTION_ERROR
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":135
+- *
+- * class LogLevels:
+- * no = MPV_LOG_LEVEL_NONE # <<<<<<<<<<<<<<
+- * fatal = MPV_LOG_LEVEL_FATAL
+- * error = MPV_LOG_LEVEL_ERROR
++ /* "vidcutter/libs/pympv/mpv.pyx":85
++ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
++ * not_found = MPV_ERROR_OPTION_NOT_FOUND
++ * option_format = MPV_ERROR_OPTION_FORMAT # <<<<<<<<<<<<<<
++ * option_error = MPV_ERROR_OPTION_ERROR
++ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":136
+- * class LogLevels:
+- * no = MPV_LOG_LEVEL_NONE
+- * fatal = MPV_LOG_LEVEL_FATAL # <<<<<<<<<<<<<<
+- * error = MPV_LOG_LEVEL_ERROR
+- * warn = MPV_LOG_LEVEL_WARN
++ /* "vidcutter/libs/pympv/mpv.pyx":86
++ * not_found = MPV_ERROR_OPTION_NOT_FOUND
++ * option_format = MPV_ERROR_OPTION_FORMAT
++ * option_error = MPV_ERROR_OPTION_ERROR # <<<<<<<<<<<<<<
++ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
++ * property_format = MPV_ERROR_PROPERTY_FORMAT
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":137
+- * no = MPV_LOG_LEVEL_NONE
+- * fatal = MPV_LOG_LEVEL_FATAL
+- * error = MPV_LOG_LEVEL_ERROR # <<<<<<<<<<<<<<
+- * warn = MPV_LOG_LEVEL_WARN
+- * info = MPV_LOG_LEVEL_INFO
++ /* "vidcutter/libs/pympv/mpv.pyx":87
++ * option_format = MPV_ERROR_OPTION_FORMAT
++ * option_error = MPV_ERROR_OPTION_ERROR
++ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND # <<<<<<<<<<<<<<
++ * property_format = MPV_ERROR_PROPERTY_FORMAT
++ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":138
+- * fatal = MPV_LOG_LEVEL_FATAL
+- * error = MPV_LOG_LEVEL_ERROR
+- * warn = MPV_LOG_LEVEL_WARN # <<<<<<<<<<<<<<
+- * info = MPV_LOG_LEVEL_INFO
+- * v = MPV_LOG_LEVEL_V
++ /* "vidcutter/libs/pympv/mpv.pyx":88
++ * option_error = MPV_ERROR_OPTION_ERROR
++ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
++ * property_format = MPV_ERROR_PROPERTY_FORMAT # <<<<<<<<<<<<<<
++ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
++ * property_error = MPV_ERROR_PROPERTY_ERROR
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":139
+- * error = MPV_LOG_LEVEL_ERROR
+- * warn = MPV_LOG_LEVEL_WARN
+- * info = MPV_LOG_LEVEL_INFO # <<<<<<<<<<<<<<
+- * v = MPV_LOG_LEVEL_V
+- * debug = MPV_LOG_LEVEL_DEBUG
++ /* "vidcutter/libs/pympv/mpv.pyx":89
++ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
++ * property_format = MPV_ERROR_PROPERTY_FORMAT
++ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE # <<<<<<<<<<<<<<
++ * property_error = MPV_ERROR_PROPERTY_ERROR
++ * command_error = MPV_ERROR_COMMAND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":140
+- * warn = MPV_LOG_LEVEL_WARN
+- * info = MPV_LOG_LEVEL_INFO
+- * v = MPV_LOG_LEVEL_V # <<<<<<<<<<<<<<
+- * debug = MPV_LOG_LEVEL_DEBUG
+- * trace = MPV_LOG_LEVEL_TRACE
++ /* "vidcutter/libs/pympv/mpv.pyx":90
++ * property_format = MPV_ERROR_PROPERTY_FORMAT
++ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
++ * property_error = MPV_ERROR_PROPERTY_ERROR # <<<<<<<<<<<<<<
++ * command_error = MPV_ERROR_COMMAND
++ * loading_failed = MPV_ERROR_LOADING_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":141
+- * info = MPV_LOG_LEVEL_INFO
+- * v = MPV_LOG_LEVEL_V
+- * debug = MPV_LOG_LEVEL_DEBUG # <<<<<<<<<<<<<<
+- * trace = MPV_LOG_LEVEL_TRACE
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":91
++ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
++ * property_error = MPV_ERROR_PROPERTY_ERROR
++ * command_error = MPV_ERROR_COMMAND # <<<<<<<<<<<<<<
++ * loading_failed = MPV_ERROR_LOADING_FAILED
++ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":142
+- * v = MPV_LOG_LEVEL_V
+- * debug = MPV_LOG_LEVEL_DEBUG
+- * trace = MPV_LOG_LEVEL_TRACE # <<<<<<<<<<<<<<
+- *
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":92
++ * property_error = MPV_ERROR_PROPERTY_ERROR
++ * command_error = MPV_ERROR_COMMAND
++ * loading_failed = MPV_ERROR_LOADING_FAILED # <<<<<<<<<<<<<<
++ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
++ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":134
+- *
+- *
+- * class LogLevels: # <<<<<<<<<<<<<<
+- * no = MPV_LOG_LEVEL_NONE
+- * fatal = MPV_LOG_LEVEL_FATAL
++ /* "vidcutter/libs/pympv/mpv.pyx":93
++ * command_error = MPV_ERROR_COMMAND
++ * loading_failed = MPV_ERROR_LOADING_FAILED
++ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED # <<<<<<<<<<<<<<
++ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
++ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":145
+- *
+- *
+- * class EOFReasons: # <<<<<<<<<<<<<<
+- * """Known possible values for EndOfFileReached reason.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":94
++ * loading_failed = MPV_ERROR_LOADING_FAILED
++ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
++ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED # <<<<<<<<<<<<<<
++ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
++ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":150
+- * You should handle the possibility that the reason may not be any of these values.
+- * """
+- * eof = MPV_END_FILE_REASON_EOF # <<<<<<<<<<<<<<
+- * aborted = MPV_END_FILE_REASON_STOP
+- * quit = MPV_END_FILE_REASON_QUIT
++ /* "vidcutter/libs/pympv/mpv.pyx":95
++ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
++ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
++ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY # <<<<<<<<<<<<<<
++ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
++ * unsupported = MPV_ERROR_UNSUPPORTED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":151
+- * """
+- * eof = MPV_END_FILE_REASON_EOF
+- * aborted = MPV_END_FILE_REASON_STOP # <<<<<<<<<<<<<<
+- * quit = MPV_END_FILE_REASON_QUIT
+- * error = MPV_END_FILE_REASON_ERROR
++ /* "vidcutter/libs/pympv/mpv.pyx":96
++ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
++ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
++ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT # <<<<<<<<<<<<<<
++ * unsupported = MPV_ERROR_UNSUPPORTED
++ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":152
+- * eof = MPV_END_FILE_REASON_EOF
+- * aborted = MPV_END_FILE_REASON_STOP
+- * quit = MPV_END_FILE_REASON_QUIT # <<<<<<<<<<<<<<
+- * error = MPV_END_FILE_REASON_ERROR
++ /* "vidcutter/libs/pympv/mpv.pyx":97
++ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
++ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
++ * unsupported = MPV_ERROR_UNSUPPORTED # <<<<<<<<<<<<<<
++ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":153
+- * aborted = MPV_END_FILE_REASON_STOP
+- * quit = MPV_END_FILE_REASON_QUIT
+- * error = MPV_END_FILE_REASON_ERROR # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":98
++ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
++ * unsupported = MPV_ERROR_UNSUPPORTED
++ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED # <<<<<<<<<<<<<<
+ *
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":145
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":72
++ * Py_Initialize()
+ *
+- * class EOFReasons: # <<<<<<<<<<<<<<
+- * """Known possible values for EndOfFileReached reason.
++ * class Errors: # <<<<<<<<<<<<<<
++ * """Set of known error codes from MpvError and Event responses.
+ *
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":318
+- *
+- *
+- * def _errors(fn): # <<<<<<<<<<<<<<
+- * def wrapped(*k, **kw):
+- * v = fn(*k, **kw)
+- */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":326
++ /* "vidcutter/libs/pympv/mpv.pyx":101
+ *
+ *
+- * class MPVError(Exception): # <<<<<<<<<<<<<<
+- * code = None
++ * class Events: # <<<<<<<<<<<<<<
++ * """Set of known values for Event ids.
+ *
+ */
+- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":327
+- *
+- * class MPVError(Exception):
+- * code = None # <<<<<<<<<<<<<<
+- *
+- * def __init__(self, e):
+- */
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":329
+- * code = None
+- *
+- * def __init__(self, e): # <<<<<<<<<<<<<<
+- * self.code = e
+- * cdef const char* err_c
++ /* "vidcutter/libs/pympv/mpv.pyx":108
++ * You should handle the possibility that event ids may not be any of these values.
++ * """
++ * none = MPV_EVENT_NONE # <<<<<<<<<<<<<<
++ * shutdown = MPV_EVENT_SHUTDOWN
++ * log_message = MPV_EVENT_LOG_MESSAGE
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":326
+- *
+- *
+- * class MPVError(Exception): # <<<<<<<<<<<<<<
+- * code = None
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":109
++ * """
++ * none = MPV_EVENT_NONE
++ * shutdown = MPV_EVENT_SHUTDOWN # <<<<<<<<<<<<<<
++ * log_message = MPV_EVENT_LOG_MESSAGE
++ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+ */
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 109, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":340
+- * Exception.__init__(self, e)
+- *
+- * class PyMPVError(Exception): # <<<<<<<<<<<<<<
+- * pass
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":110
++ * none = MPV_EVENT_NONE
++ * shutdown = MPV_EVENT_SHUTDOWN
++ * log_message = MPV_EVENT_LOG_MESSAGE # <<<<<<<<<<<<<<
++ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
++ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+ */
+- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 340, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":343
+- * pass
+- *
+- * cdef _callbacks = dict() # <<<<<<<<<<<<<<
+- * cdef _reply_userdatas = dict()
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":111
++ * shutdown = MPV_EVENT_SHUTDOWN
++ * log_message = MPV_EVENT_LOG_MESSAGE
++ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY # <<<<<<<<<<<<<<
++ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
++ * command_reply = MPV_EVENT_COMMAND_REPLY
+ */
+- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__callbacks);
+- __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_t_7);
+- __Pyx_GIVEREF(__pyx_t_7);
+- __pyx_t_7 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":344
+- *
+- * cdef _callbacks = dict()
+- * cdef _reply_userdatas = dict() # <<<<<<<<<<<<<<
+- *
+- * class _ReplyUserData(object):
++ /* "vidcutter/libs/pympv/mpv.pyx":112
++ * log_message = MPV_EVENT_LOG_MESSAGE
++ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
++ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY # <<<<<<<<<<<<<<
++ * command_reply = MPV_EVENT_COMMAND_REPLY
++ * start_file = MPV_EVENT_START_FILE
+ */
+- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas);
+- __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_t_7);
+- __Pyx_GIVEREF(__pyx_t_7);
+- __pyx_t_7 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":346
+- * cdef _reply_userdatas = dict()
+- *
+- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+- * def __init__(self, data):
+- * self.counter = 0
++ /* "vidcutter/libs/pympv/mpv.pyx":113
++ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
++ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
++ * command_reply = MPV_EVENT_COMMAND_REPLY # <<<<<<<<<<<<<<
++ * start_file = MPV_EVENT_START_FILE
++ * end_file = MPV_EVENT_END_FILE
+ */
+- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__30); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__30, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":347
+- *
+- * class _ReplyUserData(object):
+- * def __init__(self, data): # <<<<<<<<<<<<<<
+- * self.counter = 0
+- * self.data = data
++ /* "vidcutter/libs/pympv/mpv.pyx":114
++ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
++ * command_reply = MPV_EVENT_COMMAND_REPLY
++ * start_file = MPV_EVENT_START_FILE # <<<<<<<<<<<<<<
++ * end_file = MPV_EVENT_END_FILE
++ * file_loaded = MPV_EVENT_FILE_LOADED
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":352
+- * self.observed = False
+- *
+- * def add(self): # <<<<<<<<<<<<<<
+- * self.counter += 1
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":115
++ * command_reply = MPV_EVENT_COMMAND_REPLY
++ * start_file = MPV_EVENT_START_FILE
++ * end_file = MPV_EVENT_END_FILE # <<<<<<<<<<<<<<
++ * file_loaded = MPV_EVENT_FILE_LOADED
++ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":355
+- * self.counter += 1
+- *
+- * def remove(self): # <<<<<<<<<<<<<<
+- * self.counter -= 1
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":116
++ * start_file = MPV_EVENT_START_FILE
++ * end_file = MPV_EVENT_END_FILE
++ * file_loaded = MPV_EVENT_FILE_LOADED # <<<<<<<<<<<<<<
++ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
++ * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":346
+- * cdef _reply_userdatas = dict()
+- *
+- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+- * def __init__(self, data):
+- * self.counter = 0
++ /* "vidcutter/libs/pympv/mpv.pyx":119
++ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
++ * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
++ * idle = MPV_EVENT_IDLE # <<<<<<<<<<<<<<
++ * # pause = MPV_EVENT_PAUSE
++ * # unpause = MPV_EVENT_UNPAUSE
+ */
+- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__30, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":411
+- * mpv_resume(self._ctx)
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def request_event(self, event, enable):
+- * """Enable or disable a given event.
++ /* "vidcutter/libs/pympv/mpv.pyx":122
++ * # pause = MPV_EVENT_PAUSE
++ * # unpause = MPV_EVENT_UNPAUSE
++ * tick = MPV_EVENT_TICK # <<<<<<<<<<<<<<
++ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ * client_message = MPV_EVENT_CLIENT_MESSAGE
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":412
+- *
+- * @_errors
+- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+- * """Enable or disable a given event.
+- *
++ /* "vidcutter/libs/pympv/mpv.pyx":124
++ * tick = MPV_EVENT_TICK
++ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ * client_message = MPV_EVENT_CLIENT_MESSAGE # <<<<<<<<<<<<<<
++ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
++ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":429
+- * return err
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def set_log_level(self, loglevel):
+- * """Wraps: mpv_request_log_messages"""
++ /* "vidcutter/libs/pympv/mpv.pyx":125
++ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ * client_message = MPV_EVENT_CLIENT_MESSAGE
++ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG # <<<<<<<<<<<<<<
++ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
++ * # metadata_update = MPV_EVENT_METADATA_UPDATE
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":430
+- *
+- * @_errors
+- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_request_log_messages"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":126
++ * client_message = MPV_EVENT_CLIENT_MESSAGE
++ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
++ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG # <<<<<<<<<<<<<<
++ * # metadata_update = MPV_EVENT_METADATA_UPDATE
++ * seek = MPV_EVENT_SEEK
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":440
+- * return err
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def load_config(self, filename):
+- * """Wraps: mpv_load_config_file"""
++ /* "vidcutter/libs/pympv/mpv.pyx":128
++ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
++ * # metadata_update = MPV_EVENT_METADATA_UPDATE
++ * seek = MPV_EVENT_SEEK # <<<<<<<<<<<<<<
++ * playback_restart = MPV_EVENT_PLAYBACK_RESTART
++ * property_change = MPV_EVENT_PROPERTY_CHANGE
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":441
+- *
+- * @_errors
+- * def load_config(self, filename): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_load_config_file"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":129
++ * # metadata_update = MPV_EVENT_METADATA_UPDATE
++ * seek = MPV_EVENT_SEEK
++ * playback_restart = MPV_EVENT_PLAYBACK_RESTART # <<<<<<<<<<<<<<
++ * property_change = MPV_EVENT_PROPERTY_CHANGE
++ * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":573
+- * return result
++ /* "vidcutter/libs/pympv/mpv.pyx":130
++ * seek = MPV_EVENT_SEEK
++ * playback_restart = MPV_EVENT_PLAYBACK_RESTART
++ * property_change = MPV_EVENT_PROPERTY_CHANGE # <<<<<<<<<<<<<<
++ * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def get_property_async(self, prop, data=None):
+- * """Gets the value of a property asynchronously.
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":574
++ /* "vidcutter/libs/pympv/mpv.pyx":101
+ *
+- * @_errors
+- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Gets the value of a property asynchronously.
++ *
++ * class Events: # <<<<<<<<<<<<<<
++ * """Set of known values for Event ids.
+ *
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":635
+- * return v
++ /* "vidcutter/libs/pympv/mpv.pyx":134
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def set_property(self, prop, value=True, asynchronous=False, data=None):
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":636
+ *
+- * @_errors
+- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_property and mpv_set_property_async"""
+- * assert self._ctx
++ * class LogLevels: # <<<<<<<<<<<<<<
++ * no = MPV_LOG_LEVEL_NONE
++ * fatal = MPV_LOG_LEVEL_FATAL
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":673
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":135
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def set_option(self, prop, value=True):
+- * """Wraps: mpv_set_option"""
++ * class LogLevels:
++ * no = MPV_LOG_LEVEL_NONE # <<<<<<<<<<<<<<
++ * fatal = MPV_LOG_LEVEL_FATAL
++ * error = MPV_LOG_LEVEL_ERROR
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":674
+- *
+- * @_errors
+- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_set_option"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":136
++ * class LogLevels:
++ * no = MPV_LOG_LEVEL_NONE
++ * fatal = MPV_LOG_LEVEL_FATAL # <<<<<<<<<<<<<<
++ * error = MPV_LOG_LEVEL_ERROR
++ * warn = MPV_LOG_LEVEL_WARN
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 674, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":695
+- * return err
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def initialize(self):
+- * """Wraps: mpv_initialize"""
++ /* "vidcutter/libs/pympv/mpv.pyx":137
++ * no = MPV_LOG_LEVEL_NONE
++ * fatal = MPV_LOG_LEVEL_FATAL
++ * error = MPV_LOG_LEVEL_ERROR # <<<<<<<<<<<<<<
++ * warn = MPV_LOG_LEVEL_WARN
++ * info = MPV_LOG_LEVEL_INFO
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":696
+- *
+- * @_errors
+- * def initialize(self): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_initialize"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":138
++ * fatal = MPV_LOG_LEVEL_FATAL
++ * error = MPV_LOG_LEVEL_ERROR
++ * warn = MPV_LOG_LEVEL_WARN # <<<<<<<<<<<<<<
++ * info = MPV_LOG_LEVEL_INFO
++ * v = MPV_LOG_LEVEL_V
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":748
+- * self.callbackthread.start()
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def observe_property(self, prop, data=None):
+- * """Wraps: mpv_observe_property"""
++ /* "vidcutter/libs/pympv/mpv.pyx":139
++ * error = MPV_LOG_LEVEL_ERROR
++ * warn = MPV_LOG_LEVEL_WARN
++ * info = MPV_LOG_LEVEL_INFO # <<<<<<<<<<<<<<
++ * v = MPV_LOG_LEVEL_V
++ * debug = MPV_LOG_LEVEL_DEBUG
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":749
+- *
+- * @_errors
+- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_observe_property"""
+- * assert self._ctx
++ /* "vidcutter/libs/pympv/mpv.pyx":140
++ * warn = MPV_LOG_LEVEL_WARN
++ * info = MPV_LOG_LEVEL_INFO
++ * v = MPV_LOG_LEVEL_V # <<<<<<<<<<<<<<
++ * debug = MPV_LOG_LEVEL_DEBUG
++ * trace = MPV_LOG_LEVEL_TRACE
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":770
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":141
++ * info = MPV_LOG_LEVEL_INFO
++ * v = MPV_LOG_LEVEL_V
++ * debug = MPV_LOG_LEVEL_DEBUG # <<<<<<<<<<<<<<
++ * trace = MPV_LOG_LEVEL_TRACE
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def unobserve_property(self, data):
+- * """Wraps: mpv_unobserve_property"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":771
++ /* "vidcutter/libs/pympv/mpv.pyx":142
++ * v = MPV_LOG_LEVEL_V
++ * debug = MPV_LOG_LEVEL_DEBUG
++ * trace = MPV_LOG_LEVEL_TRACE # <<<<<<<<<<<<<<
++ *
+ *
+- * @_errors
+- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+- * """Wraps: mpv_unobserve_property"""
+- * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":938
++ /* "vidcutter/libs/pympv/mpv.pyx":134
+ *
+- * cdef class RenderContext(object):
+- * API_OPENGL = "opengl" # <<<<<<<<<<<<<<
+- * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME
+ *
++ * class LogLevels: # <<<<<<<<<<<<<<
++ * no = MPV_LOG_LEVEL_NONE
++ * fatal = MPV_LOG_LEVEL_FATAL
+ */
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":939
+- * cdef class RenderContext(object):
+- * API_OPENGL = "opengl"
+- * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":145
++ *
++ *
++ * class EOFReasons: # <<<<<<<<<<<<<<
++ * """Known possible values for EndOfFileReached reason.
+ *
+- * cdef:
+ */
+- __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 939, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1009
+- * self.inited = True
+- *
+- * @_errors # <<<<<<<<<<<<<<
+- * def set_icc_profile(self, icc_blob):
+- * cdef:
++ /* "vidcutter/libs/pympv/mpv.pyx":150
++ * You should handle the possibility that the reason may not be any of these values.
++ * """
++ * eof = MPV_END_FILE_REASON_EOF # <<<<<<<<<<<<<<
++ * aborted = MPV_END_FILE_REASON_STOP
++ * quit = MPV_END_FILE_REASON_QUIT
++ */
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":151
++ * """
++ * eof = MPV_END_FILE_REASON_EOF
++ * aborted = MPV_END_FILE_REASON_STOP # <<<<<<<<<<<<<<
++ * quit = MPV_END_FILE_REASON_QUIT
++ * error = MPV_END_FILE_REASON_ERROR
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1009, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1010
++ /* "vidcutter/libs/pympv/mpv.pyx":152
++ * eof = MPV_END_FILE_REASON_EOF
++ * aborted = MPV_END_FILE_REASON_STOP
++ * quit = MPV_END_FILE_REASON_QUIT # <<<<<<<<<<<<<<
++ * error = MPV_END_FILE_REASON_ERROR
+ *
+- * @_errors
+- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1009, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1028
+- * return err
++ /* "vidcutter/libs/pympv/mpv.pyx":153
++ * aborted = MPV_END_FILE_REASON_STOP
++ * quit = MPV_END_FILE_REASON_QUIT
++ * error = MPV_END_FILE_REASON_ERROR # <<<<<<<<<<<<<<
++ *
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def set_ambient_light(self, lux):
+- * cdef:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1029
++ /* "vidcutter/libs/pympv/mpv.pyx":145
++ *
++ *
++ * class EOFReasons: # <<<<<<<<<<<<<<
++ * """Known possible values for EndOfFileReached reason.
+ *
+- * @_errors
+- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+- * cdef:
+- * mpv_render_param param
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1068
+- * return ret
++ /* "vidcutter/libs/pympv/mpv.pyx":318
+ *
+- * @_errors # <<<<<<<<<<<<<<
+- * def render(self,
+- * opengl_fbo=None,
+- */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+-
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
+ *
+- * @_errors
+- * def render(self, # <<<<<<<<<<<<<<
+- * opengl_fbo=None,
+- * flip_y=False,
++ * def _errors(fn): # <<<<<<<<<<<<<<
++ * def wrapped(*k, **kw):
++ * v = fn(*k, **kw)
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = NULL;
+- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+- if (likely(__pyx_t_1)) {
+- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+- __Pyx_INCREF(__pyx_t_1);
+- __Pyx_INCREF(function);
+- __Pyx_DECREF_SET(__pyx_t_6, function);
+- }
+- }
+- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error)
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1132
+- * init_params, *args, **kwargs)
++ /* "vidcutter/libs/pympv/mpv.pyx":326
++ *
++ *
++ * class MPVError(Exception): # <<<<<<<<<<<<<<
++ * code = None
+ *
+- * class CallbackThread(Thread): # <<<<<<<<<<<<<<
+- * def __init__(self):
+- * Thread.__init__(self)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __Pyx_GIVEREF(__pyx_t_7);
+- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
+- __pyx_t_7 = 0;
+- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
++ /* "vidcutter/libs/pympv/mpv.pyx":327
+ *
+- * class CallbackThread(Thread):
+- * def __init__(self): # <<<<<<<<<<<<<<
+- * Thread.__init__(self)
+- * self.daemon = True
++ * class MPVError(Exception):
++ * code = None # <<<<<<<<<<<<<<
++ *
++ * def __init__(self, e):
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1133, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
+- * self.isshutdown = False
++ /* "vidcutter/libs/pympv/mpv.pyx":329
++ * code = None
+ *
+- * def shutdown(self): # <<<<<<<<<<<<<<
+- * self.isshutdown = True
+- * self.callback = None
++ * def __init__(self, e): # <<<<<<<<<<<<<<
++ * self.code = e
++ * cdef const char* err_c
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
+- * self.lock.release()
++ /* "vidcutter/libs/pympv/mpv.pyx":326
+ *
+- * def call(self): # <<<<<<<<<<<<<<
+- * self.lock.release()
++ *
++ * class MPVError(Exception): # <<<<<<<<<<<<<<
++ * code = None
+ *
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1146, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
+- * self.lock.release()
++ /* "vidcutter/libs/pympv/mpv.pyx":340
++ * Exception.__init__(self, e)
+ *
+- * def set(self, callback): # <<<<<<<<<<<<<<
+- * self.callback = callback
++ * class PyMPVError(Exception): # <<<<<<<<<<<<<<
++ * pass
+ *
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
++ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
+- * self.callback = callback
++ /* "vidcutter/libs/pympv/mpv.pyx":343
++ * pass
+ *
+- * def run(self): # <<<<<<<<<<<<<<
+- * while not self.isshutdown:
+- * self.lock.acquire(True)
++ * cdef _callbacks = dict() # <<<<<<<<<<<<<<
++ * cdef _reply_userdatas = dict()
++ *
++ */
++ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__callbacks);
++ __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_t_7);
++ __Pyx_GIVEREF(__pyx_t_7);
++ __pyx_t_7 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":344
++ *
++ * cdef _callbacks = dict()
++ * cdef _reply_userdatas = dict() # <<<<<<<<<<<<<<
++ *
++ * class _ReplyUserData(object):
++ */
++ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas);
++ __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_t_7);
++ __Pyx_GIVEREF(__pyx_t_7);
++ __pyx_t_7 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":346
++ * cdef _reply_userdatas = dict()
++ *
++ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
++ * def __init__(self, data):
++ * self.counter = 0
++ */
++ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__27); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__27, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":347
++ *
++ * class _ReplyUserData(object):
++ * def __init__(self, data): # <<<<<<<<<<<<<<
++ * self.counter = 0
++ * self.data = data
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
+- * self.mpv_callback(self.callback) if self.callback else None
++ /* "vidcutter/libs/pympv/mpv.pyx":352
++ * self.observed = False
++ *
++ * def add(self): # <<<<<<<<<<<<<<
++ * self.counter += 1
+ *
+- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+- * try:
+- * callback()
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1157, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1132
+- * init_params, *args, **kwargs)
++ /* "vidcutter/libs/pympv/mpv.pyx":355
++ * self.counter += 1
++ *
++ * def remove(self): # <<<<<<<<<<<<<<
++ * self.counter -= 1
+ *
+- * class CallbackThread(Thread): # <<<<<<<<<<<<<<
+- * def __init__(self):
+- * Thread.__init__(self)
+ */
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1132, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
++ /* "vidcutter/libs/pympv/mpv.pyx":346
++ * cdef _reply_userdatas = dict()
++ *
++ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
++ * def __init__(self, data):
++ * self.counter = 0
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__27, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
+- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ /* "vidcutter/libs/pympv/mpv.pyx":411
++ * # mpv_resume(self._ctx)
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def request_event(self, event, enable):
++ * """Enable or disable a given event.
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_InputDispatch, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
++ /* "vidcutter/libs/pympv/mpv.pyx":412
++ *
++ * @_errors
++ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
++ * """Enable or disable a given event.
++ *
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_LogMessage, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
++ }
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ /* "vidcutter/libs/pympv/mpv.pyx":429
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def set_log_level(self, loglevel):
++ * """Wraps: mpv_request_log_messages"""
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Property, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "(tree fragment)":1
+- * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+- * cdef object __pyx_PickleError
+- * cdef object __pyx_result
++ /* "vidcutter/libs/pympv/mpv.pyx":430
++ *
++ * @_errors
++ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_request_log_messages"""
++ * assert self._ctx
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Event, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
++ }
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "(tree fragment)":11
+- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
+- * return __pyx_result
+- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
+- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
+- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
++ /* "vidcutter/libs/pympv/mpv.pyx":440
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def load_config(self, filename):
++ * """Wraps: mpv_load_config_file"""
+ */
+- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1
+- * # This program is free software: you can redistribute it and/or modify # <<<<<<<<<<<<<<
+- * # it under the terms of the GNU General Public License as published by
+- * # the Free Software Foundation, either version 3 of the License, or
++ /* "vidcutter/libs/pympv/mpv.pyx":441
++ *
++ * @_errors
++ * def load_config(self, filename): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_load_config_file"""
++ * assert self._ctx
+ */
+- __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+-
+- /*--- Wrapped vars code ---*/
+-
+- goto __pyx_L0;
+- __pyx_L1_error:;
+- __Pyx_XDECREF(__pyx_t_1);
+- __Pyx_XDECREF(__pyx_t_2);
+- __Pyx_XDECREF(__pyx_t_4);
+- __Pyx_XDECREF(__pyx_t_6);
+- __Pyx_XDECREF(__pyx_t_7);
+- if (__pyx_m) {
+- if (__pyx_d) {
+- __Pyx_AddTraceback("init vidcutter.libs.mpv", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- }
+- Py_CLEAR(__pyx_m);
+- } else if (!PyErr_Occurred()) {
+- PyErr_SetString(PyExc_ImportError, "init vidcutter.libs.mpv");
+- }
+- __pyx_L0:;
+- __Pyx_RefNannyFinishContext();
+- #if CYTHON_PEP489_MULTI_PHASE_INIT
+- return (__pyx_m != NULL) ? 0 : -1;
+- #elif PY_MAJOR_VERSION >= 3
+- return __pyx_m;
+- #else
+- return;
+- #endif
+-}
+-
+-/* --- Runtime support code --- */
+-/* Refnanny */
+-#if CYTHON_REFNANNY
+-static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+- PyObject *m = NULL, *p = NULL;
+- void *r = NULL;
+- m = PyImport_ImportModule(modname);
+- if (!m) goto end;
+- p = PyObject_GetAttrString(m, "RefNannyAPI");
+- if (!p) goto end;
+- r = PyLong_AsVoidPtr(p);
+-end:
+- Py_XDECREF(p);
+- Py_XDECREF(m);
+- return (__Pyx_RefNannyAPIStruct *)r;
+-}
+-#endif
+-
+-/* PyObjectGetAttrStr */
+-#if CYTHON_USE_TYPE_SLOTS
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+- PyTypeObject* tp = Py_TYPE(obj);
+- if (likely(tp->tp_getattro))
+- return tp->tp_getattro(obj, attr_name);
+-#if PY_MAJOR_VERSION < 3
+- if (likely(tp->tp_getattr))
+- return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+-#endif
+- return PyObject_GetAttr(obj, attr_name);
+-}
+-#endif
+-
+-/* GetBuiltinName */
+-static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+- PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+- if (unlikely(!result)) {
+- PyErr_Format(PyExc_NameError,
+-#if PY_MAJOR_VERSION >= 3
+- "name '%U' is not defined", name);
+-#else
+- "name '%.200s' is not defined", PyString_AS_STRING(name));
+-#endif
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- return result;
+-}
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+-/* PyDictVersioning */
+-#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
+-static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
+- PyObject *dict = Py_TYPE(obj)->tp_dict;
+- return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
+-}
+-static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
+- PyObject **dictptr = NULL;
+- Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
+- if (offset) {
+-#if CYTHON_COMPILING_IN_CPYTHON
+- dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
+-#else
+- dictptr = _PyObject_GetDictPtr(obj);
+-#endif
+- }
+- return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
+-}
+-static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
+- PyObject *dict = Py_TYPE(obj)->tp_dict;
+- if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
+- return 0;
+- return obj_dict_version == __Pyx_get_object_dict_version(obj);
+-}
+-#endif
++ /* "vidcutter/libs/pympv/mpv.pyx":573
++ * return result
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def get_property_async(self, prop, data=None):
++ * """Gets the value of a property asynchronously.
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
+
+-/* GetModuleGlobalName */
+-#if CYTHON_USE_DICT_VERSIONS
+-static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
+-#else
+-static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
+-#endif
+-{
+- PyObject *result;
+-#if !CYTHON_AVOID_BORROWED_REFS
+-#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
+- result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
+- __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
+- if (likely(result)) {
+- return __Pyx_NewRef(result);
+- } else if (unlikely(PyErr_Occurred())) {
+- return NULL;
+- }
+-#else
+- result = PyDict_GetItem(__pyx_d, name);
+- __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
+- if (likely(result)) {
+- return __Pyx_NewRef(result);
+- }
+-#endif
+-#else
+- result = PyObject_GetItem(__pyx_d, name);
+- __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
+- if (likely(result)) {
+- return __Pyx_NewRef(result);
++ /* "vidcutter/libs/pympv/mpv.pyx":574
++ *
++ * @_errors
++ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Gets the value of a property asynchronously.
++ *
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- PyErr_Clear();
+-#endif
+- return __Pyx_GetBuiltinName(name);
+-}
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+-/* PyFunctionFastCall */
+-#if CYTHON_FAST_PYCALL
+-static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
+- PyObject *globals) {
+- PyFrameObject *f;
+- PyThreadState *tstate = __Pyx_PyThreadState_Current;
+- PyObject **fastlocals;
+- Py_ssize_t i;
+- PyObject *result;
+- assert(globals != NULL);
+- /* XXX Perhaps we should create a specialized
+- PyFrame_New() that doesn't take locals, but does
+- take builtins without sanity checking them.
+- */
+- assert(tstate != NULL);
+- f = PyFrame_New(tstate, co, globals, NULL);
+- if (f == NULL) {
+- return NULL;
+- }
+- fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
+- for (i = 0; i < na; i++) {
+- Py_INCREF(*args);
+- fastlocals[i] = *args++;
+- }
+- result = PyEval_EvalFrameEx(f,0);
+- ++tstate->recursion_depth;
+- Py_DECREF(f);
+- --tstate->recursion_depth;
+- return result;
+-}
+-#if 1 || PY_VERSION_HEX < 0x030600B1
+-static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
+- PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
+- PyObject *globals = PyFunction_GET_GLOBALS(func);
+- PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
+- PyObject *closure;
+-#if PY_MAJOR_VERSION >= 3
+- PyObject *kwdefs;
+-#endif
+- PyObject *kwtuple, **k;
+- PyObject **d;
+- Py_ssize_t nd;
+- Py_ssize_t nk;
+- PyObject *result;
+- assert(kwargs == NULL || PyDict_Check(kwargs));
+- nk = kwargs ? PyDict_Size(kwargs) : 0;
+- if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
+- return NULL;
+- }
+- if (
+-#if PY_MAJOR_VERSION >= 3
+- co->co_kwonlyargcount == 0 &&
+-#endif
+- likely(kwargs == NULL || nk == 0) &&
+- co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
+- if (argdefs == NULL && co->co_argcount == nargs) {
+- result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
+- goto done;
+- }
+- else if (nargs == 0 && argdefs != NULL
+- && co->co_argcount == Py_SIZE(argdefs)) {
+- /* function called with no arguments, but all parameters have
+- a default value: use default values as arguments .*/
+- args = &PyTuple_GET_ITEM(argdefs, 0);
+- result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
+- goto done;
+- }
++ /* "vidcutter/libs/pympv/mpv.pyx":635
++ * return v
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def set_property(self, prop, value=True, asynchronous=False, data=None):
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":636
++ *
++ * @_errors
++ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_property and mpv_set_property_async"""
++ * assert self._ctx
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- if (kwargs != NULL) {
+- Py_ssize_t pos, i;
+- kwtuple = PyTuple_New(2 * nk);
+- if (kwtuple == NULL) {
+- result = NULL;
+- goto done;
+- }
+- k = &PyTuple_GET_ITEM(kwtuple, 0);
+- pos = i = 0;
+- while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
+- Py_INCREF(k[i]);
+- Py_INCREF(k[i+1]);
+- i += 2;
+- }
+- nk = i / 2;
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":673
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def set_option(self, prop, value=True):
++ * """Wraps: mpv_set_option"""
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":674
++ *
++ * @_errors
++ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_set_option"""
++ * assert self._ctx
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 674, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- else {
+- kwtuple = NULL;
+- k = NULL;
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":695
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def initialize(self):
++ * """Wraps: mpv_initialize"""
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":696
++ *
++ * @_errors
++ * def initialize(self): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_initialize"""
++ * assert self._ctx
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- closure = PyFunction_GET_CLOSURE(func);
+-#if PY_MAJOR_VERSION >= 3
+- kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+-#endif
+- if (argdefs != NULL) {
+- d = &PyTuple_GET_ITEM(argdefs, 0);
+- nd = Py_SIZE(argdefs);
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":748
++ * self.callbackthread.start()
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def observe_property(self, prop, data=None):
++ * """Wraps: mpv_observe_property"""
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":749
++ *
++ * @_errors
++ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_observe_property"""
++ * assert self._ctx
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- else {
+- d = NULL;
+- nd = 0;
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":770
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def unobserve_property(self, data):
++ * """Wraps: mpv_unobserve_property"""
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":771
++ *
++ * @_errors
++ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
++ * """Wraps: mpv_unobserve_property"""
++ * assert self._ctx
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+-#if PY_MAJOR_VERSION >= 3
+- result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
+- args, (int)nargs,
+- k, (int)nk,
+- d, (int)nd, kwdefs, closure);
+-#else
+- result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
+- args, (int)nargs,
+- k, (int)nk,
+- d, (int)nd, closure);
+-#endif
+- Py_XDECREF(kwtuple);
+-done:
+- Py_LeaveRecursiveCall();
+- return result;
+-}
+-#endif
+-#endif
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+-/* PyCFunctionFastCall */
+-#if CYTHON_FAST_PYCCALL
+-static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
+- PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
+- PyCFunction meth = PyCFunction_GET_FUNCTION(func);
+- PyObject *self = PyCFunction_GET_SELF(func);
+- int flags = PyCFunction_GET_FLAGS(func);
+- assert(PyCFunction_Check(func));
+- assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
+- assert(nargs >= 0);
+- assert(nargs == 0 || args != NULL);
+- /* _PyCFunction_FastCallDict() must not be called with an exception set,
+- because it may clear it (directly or indirectly) and so the
+- caller loses its exception */
+- assert(!PyErr_Occurred());
+- if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
+- return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
+- } else {
+- return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
++ /* "vidcutter/libs/pympv/mpv.pyx":938
++ *
++ * cdef class RenderContext(object):
++ * API_OPENGL = "opengl" # <<<<<<<<<<<<<<
++ * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME
++ *
++ */
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":939
++ * cdef class RenderContext(object):
++ * API_OPENGL = "opengl"
++ * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME # <<<<<<<<<<<<<<
++ *
++ * cdef:
++ */
++ __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 939, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1009
++ * self.inited = True
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def set_icc_profile(self, icc_blob):
++ * cdef:
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1009, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1010
++ *
++ * @_errors
++ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
++ }
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1009, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1028
++ * return err
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def set_ambient_light(self, lux):
++ * cdef:
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1029
++ *
++ * @_errors
++ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
++ * cdef:
++ * mpv_render_param param
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+-}
+-#endif
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+-/* PyObjectCall */
+-#if CYTHON_COMPILING_IN_CPYTHON
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+- PyObject *result;
+- ternaryfunc call = func->ob_type->tp_call;
+- if (unlikely(!call))
+- return PyObject_Call(func, arg, kw);
+- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+- return NULL;
+- result = (*call)(func, arg, kw);
+- Py_LeaveRecursiveCall();
+- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+- PyErr_SetString(
+- PyExc_SystemError,
+- "NULL result without error in PyObject_Call");
+- }
+- return result;
+-}
+-#endif
++ /* "vidcutter/libs/pympv/mpv.pyx":1068
++ * return ret
++ *
++ * @_errors # <<<<<<<<<<<<<<
++ * def render(self,
++ * opengl_fbo=None,
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
+
+-/* GetTopmostException */
+-#if CYTHON_USE_EXC_INFO_STACK
+-static _PyErr_StackItem *
+-__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
+-{
+- _PyErr_StackItem *exc_info = tstate->exc_info;
+- while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
+- exc_info->previous_item != NULL)
+- {
+- exc_info = exc_info->previous_item;
++ /* "vidcutter/libs/pympv/mpv.pyx":1069
++ *
++ * @_errors
++ * def render(self, # <<<<<<<<<<<<<<
++ * opengl_fbo=None,
++ * flip_y=False,
++ */
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
++ __pyx_t_1 = NULL;
++ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
++ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
++ if (likely(__pyx_t_1)) {
++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
++ __Pyx_INCREF(__pyx_t_1);
++ __Pyx_INCREF(function);
++ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+- return exc_info;
+-}
+-#endif
++ }
++ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+-/* SaveResetException */
+-#if CYTHON_FAST_THREAD_STATE
+-static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+- #if CYTHON_USE_EXC_INFO_STACK
+- _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
+- *type = exc_info->exc_type;
+- *value = exc_info->exc_value;
+- *tb = exc_info->exc_traceback;
+- #else
+- *type = tstate->exc_type;
+- *value = tstate->exc_value;
+- *tb = tstate->exc_traceback;
+- #endif
+- Py_XINCREF(*type);
+- Py_XINCREF(*value);
+- Py_XINCREF(*tb);
+-}
+-static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- #if CYTHON_USE_EXC_INFO_STACK
+- _PyErr_StackItem *exc_info = tstate->exc_info;
+- tmp_type = exc_info->exc_type;
+- tmp_value = exc_info->exc_value;
+- tmp_tb = exc_info->exc_traceback;
+- exc_info->exc_type = type;
+- exc_info->exc_value = value;
+- exc_info->exc_traceback = tb;
+- #else
+- tmp_type = tstate->exc_type;
+- tmp_value = tstate->exc_value;
+- tmp_tb = tstate->exc_traceback;
+- tstate->exc_type = type;
+- tstate->exc_value = value;
+- tstate->exc_traceback = tb;
+- #endif
+- Py_XDECREF(tmp_type);
+- Py_XDECREF(tmp_value);
+- Py_XDECREF(tmp_tb);
+-}
+-#endif
++ /* "vidcutter/libs/pympv/mpv.pyx":1132
++ * init_params, *args, **kwargs)
++ *
++ * class CallbackThread(Thread): # <<<<<<<<<<<<<<
++ * def __init__(self):
++ * Thread.__init__(self)
++ */
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ __Pyx_GIVEREF(__pyx_t_7);
++ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
++ __pyx_t_7 = 0;
++ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_7);
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_4);
+
+-/* PyErrExceptionMatches */
+-#if CYTHON_FAST_THREAD_STATE
+-static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
+- Py_ssize_t i, n;
+- n = PyTuple_GET_SIZE(tuple);
+-#if PY_MAJOR_VERSION >= 3
+- for (i=0; i<n; i++) {
+- if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
+- }
+-#endif
+- for (i=0; i<n; i++) {
+- if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
+- }
+- return 0;
+-}
+-static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
+- PyObject *exc_type = tstate->curexc_type;
+- if (exc_type == err) return 1;
+- if (unlikely(!exc_type)) return 0;
+- if (unlikely(PyTuple_Check(err)))
+- return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
+- return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
+-}
+-#endif
++ /* "vidcutter/libs/pympv/mpv.pyx":1133
++ *
++ * class CallbackThread(Thread):
++ * def __init__(self): # <<<<<<<<<<<<<<
++ * Thread.__init__(self)
++ * self.daemon = True
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1141
++ * self.isshutdown = False
++ *
++ * def shutdown(self): # <<<<<<<<<<<<<<
++ * self.isshutdown = True
++ * self.callback = None
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1146
++ * self.lock.release()
++ *
++ * def call(self): # <<<<<<<<<<<<<<
++ * self.lock.release()
++ *
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1149
++ * self.lock.release()
++ *
++ * def set(self, callback): # <<<<<<<<<<<<<<
++ * self.callback = callback
++ *
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1152
++ * self.callback = callback
++ *
++ * def run(self): # <<<<<<<<<<<<<<
++ * while not self.isshutdown:
++ * self.lock.acquire(True)
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1157
++ * self.mpv_callback(self.callback) if self.callback else None
++ *
++ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
++ * try:
++ * callback()
++ */
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++
++ /* "vidcutter/libs/pympv/mpv.pyx":1132
++ * init_params, *args, **kwargs)
++ *
++ * class CallbackThread(Thread): # <<<<<<<<<<<<<<
++ * def __init__(self):
++ * Thread.__init__(self)
++ */
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_1);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
++ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
++ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
++
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* GetException */
+-#if CYTHON_FAST_THREAD_STATE
+-static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
+-#else
+-static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
+-#endif
+-{
+- PyObject *local_type, *local_value, *local_tb;
+-#if CYTHON_FAST_THREAD_STATE
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- local_type = tstate->curexc_type;
+- local_value = tstate->curexc_value;
+- local_tb = tstate->curexc_traceback;
+- tstate->curexc_type = 0;
+- tstate->curexc_value = 0;
+- tstate->curexc_traceback = 0;
+-#else
+- PyErr_Fetch(&local_type, &local_value, &local_tb);
+-#endif
+- PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+-#if CYTHON_FAST_THREAD_STATE
+- if (unlikely(tstate->curexc_type))
+-#else
+- if (unlikely(PyErr_Occurred()))
+-#endif
+- goto bad;
+- #if PY_MAJOR_VERSION >= 3
+- if (local_tb) {
+- if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+- goto bad;
+- }
+- #endif
+- Py_XINCREF(local_tb);
+- Py_XINCREF(local_type);
+- Py_XINCREF(local_value);
+- *type = local_type;
+- *value = local_value;
+- *tb = local_tb;
+-#if CYTHON_FAST_THREAD_STATE
+- #if CYTHON_USE_EXC_INFO_STACK
+- {
+- _PyErr_StackItem *exc_info = tstate->exc_info;
+- tmp_type = exc_info->exc_type;
+- tmp_value = exc_info->exc_value;
+- tmp_tb = exc_info->exc_traceback;
+- exc_info->exc_type = local_type;
+- exc_info->exc_value = local_value;
+- exc_info->exc_traceback = local_tb;
+- }
+- #else
+- tmp_type = tstate->exc_type;
+- tmp_value = tstate->exc_value;
+- tmp_tb = tstate->exc_traceback;
+- tstate->exc_type = local_type;
+- tstate->exc_value = local_value;
+- tstate->exc_traceback = local_tb;
+- #endif
+- Py_XDECREF(tmp_type);
+- Py_XDECREF(tmp_value);
+- Py_XDECREF(tmp_tb);
+-#else
+- PyErr_SetExcInfo(local_type, local_value, local_tb);
+-#endif
+- return 0;
+-bad:
+- *type = 0;
+- *value = 0;
+- *tb = 0;
+- Py_XDECREF(local_type);
+- Py_XDECREF(local_value);
+- Py_XDECREF(local_tb);
+- return -1;
+-}
++ /* "(tree fragment)":11
++ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ */
++ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_LogMessage, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* PyObjectCallMethO */
+-#if CYTHON_COMPILING_IN_CPYTHON
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
+- PyObject *self, *result;
+- PyCFunction cfunc;
+- cfunc = PyCFunction_GET_FUNCTION(func);
+- self = PyCFunction_GET_SELF(func);
+- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+- return NULL;
+- result = cfunc(self, arg);
+- Py_LeaveRecursiveCall();
+- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+- PyErr_SetString(
+- PyExc_SystemError,
+- "NULL result without error in PyObject_Call");
+- }
+- return result;
+-}
+-#endif
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Property, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* PyObjectCallOneArg */
+-#if CYTHON_COMPILING_IN_CPYTHON
+-static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+- PyObject *result;
+- PyObject *args = PyTuple_New(1);
+- if (unlikely(!args)) return NULL;
+- Py_INCREF(arg);
+- PyTuple_SET_ITEM(args, 0, arg);
+- result = __Pyx_PyObject_Call(func, args, NULL);
+- Py_DECREF(args);
+- return result;
+-}
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+-#if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(func)) {
+- return __Pyx_PyFunction_FastCall(func, &arg, 1);
+- }
+-#endif
+- if (likely(PyCFunction_Check(func))) {
+- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
+- return __Pyx_PyObject_CallMethO(func, arg);
+-#if CYTHON_FAST_PYCCALL
+- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
+- return __Pyx_PyCFunction_FastCall(func, &arg, 1);
+-#endif
+- }
+- }
+- return __Pyx__PyObject_CallOneArg(func, arg);
+-}
+-#else
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+- PyObject *result;
+- PyObject *args = PyTuple_Pack(1, arg);
+- if (unlikely(!args)) return NULL;
+- result = __Pyx_PyObject_Call(func, args, NULL);
+- Py_DECREF(args);
+- return result;
+-}
+-#endif
++ /* "(tree fragment)":11
++ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
++ * return __pyx_result
++ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
++ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
++ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
++ */
++ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Event, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* PyErrFetchRestore */
+-#if CYTHON_FAST_THREAD_STATE
+-static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- tmp_type = tstate->curexc_type;
+- tmp_value = tstate->curexc_value;
+- tmp_tb = tstate->curexc_traceback;
+- tstate->curexc_type = type;
+- tstate->curexc_value = value;
+- tstate->curexc_traceback = tb;
+- Py_XDECREF(tmp_type);
+- Py_XDECREF(tmp_value);
+- Py_XDECREF(tmp_tb);
+-}
+-static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+- *type = tstate->curexc_type;
+- *value = tstate->curexc_value;
+- *tb = tstate->curexc_traceback;
+- tstate->curexc_type = 0;
+- tstate->curexc_value = 0;
+- tstate->curexc_traceback = 0;
+-}
+-#endif
++ /* "(tree fragment)":1
++ * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
++ * cdef object __pyx_PickleError
++ * cdef object __pyx_result
++ */
++ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* GetAttr */
+-static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
+-#if CYTHON_USE_TYPE_SLOTS
+-#if PY_MAJOR_VERSION >= 3
+- if (likely(PyUnicode_Check(n)))
+-#else
+- if (likely(PyString_Check(n)))
+-#endif
+- return __Pyx_PyObject_GetAttrStr(o, n);
+-#endif
+- return PyObject_GetAttr(o, n);
+-}
++ /* "vidcutter/libs/pympv/mpv.pyx":1
++ * # This program is free software: you can redistribute it and/or modify # <<<<<<<<<<<<<<
++ * # it under the terms of the GNU General Public License as published by
++ * # the Free Software Foundation, either version 3 of the License, or
++ */
++ __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __Pyx_GOTREF(__pyx_t_6);
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
++ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+-/* GetAttr3 */
+-static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
+- return NULL;
+- __Pyx_PyErr_Clear();
+- Py_INCREF(d);
+- return d;
++ /*--- Wrapped vars code ---*/
++
++ goto __pyx_L0;
++ __pyx_L1_error:;
++ __Pyx_XDECREF(__pyx_t_1);
++ __Pyx_XDECREF(__pyx_t_2);
++ __Pyx_XDECREF(__pyx_t_4);
++ __Pyx_XDECREF(__pyx_t_6);
++ __Pyx_XDECREF(__pyx_t_7);
++ if (__pyx_m) {
++ if (__pyx_d) {
++ __Pyx_AddTraceback("init vidcutter.libs.mpv", __pyx_clineno, __pyx_lineno, __pyx_filename);
++ }
++ Py_CLEAR(__pyx_m);
++ } else if (!PyErr_Occurred()) {
++ PyErr_SetString(PyExc_ImportError, "init vidcutter.libs.mpv");
++ }
++ __pyx_L0:;
++ __Pyx_RefNannyFinishContext();
++ #if CYTHON_PEP489_MULTI_PHASE_INIT
++ return (__pyx_m != NULL) ? 0 : -1;
++ #elif PY_MAJOR_VERSION >= 3
++ return __pyx_m;
++ #else
++ return;
++ #endif
+ }
+-static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
+- PyObject *r = __Pyx_GetAttr(o, n);
+- return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
++
++/* --- Runtime support code --- */
++/* Refnanny */
++#if CYTHON_REFNANNY
++static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
++ PyObject *m = NULL, *p = NULL;
++ void *r = NULL;
++ m = PyImport_ImportModule(modname);
++ if (!m) goto end;
++ p = PyObject_GetAttrString(m, "RefNannyAPI");
++ if (!p) goto end;
++ r = PyLong_AsVoidPtr(p);
++end:
++ Py_XDECREF(p);
++ Py_XDECREF(m);
++ return (__Pyx_RefNannyAPIStruct *)r;
+ }
++#endif
+
+-/* PyObjectCall2Args */
+-static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
+- PyObject *args, *result = NULL;
+- #if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(function)) {
+- PyObject *args[2] = {arg1, arg2};
+- return __Pyx_PyFunction_FastCall(function, args, 2);
+- }
+- #endif
+- #if CYTHON_FAST_PYCCALL
+- if (__Pyx_PyFastCFunction_Check(function)) {
+- PyObject *args[2] = {arg1, arg2};
+- return __Pyx_PyCFunction_FastCall(function, args, 2);
+- }
+- #endif
+- args = PyTuple_New(2);
+- if (unlikely(!args)) goto done;
+- Py_INCREF(arg1);
+- PyTuple_SET_ITEM(args, 0, arg1);
+- Py_INCREF(arg2);
+- PyTuple_SET_ITEM(args, 1, arg2);
+- Py_INCREF(function);
+- result = __Pyx_PyObject_Call(function, args, NULL);
+- Py_DECREF(args);
+- Py_DECREF(function);
+-done:
+- return result;
++/* PyObjectGetAttrStr */
++#if CYTHON_USE_TYPE_SLOTS
++static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
++ PyTypeObject* tp = Py_TYPE(obj);
++ if (likely(tp->tp_getattro))
++ return tp->tp_getattro(obj, attr_name);
++#if PY_MAJOR_VERSION < 3
++ if (likely(tp->tp_getattr))
++ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
++#endif
++ return PyObject_GetAttr(obj, attr_name);
+ }
+-
+-/* PyObjectGetMethod */
+-static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
+- PyObject *attr;
+-#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
+- PyTypeObject *tp = Py_TYPE(obj);
+- PyObject *descr;
+- descrgetfunc f = NULL;
+- PyObject **dictptr, *dict;
+- int meth_found = 0;
+- assert (*method == NULL);
+- if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
+- attr = __Pyx_PyObject_GetAttrStr(obj, name);
+- goto try_unpack;
+- }
+- if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
+- return 0;
+- }
+- descr = _PyType_Lookup(tp, name);
+- if (likely(descr != NULL)) {
+- Py_INCREF(descr);
+-#if PY_MAJOR_VERSION >= 3
+- #ifdef __Pyx_CyFunction_USED
+- if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
+- #else
+- if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
+- #endif
+-#else
+- #ifdef __Pyx_CyFunction_USED
+- if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
+- #else
+- if (likely(PyFunction_Check(descr)))
+- #endif
+ #endif
+- {
+- meth_found = 1;
+- } else {
+- f = Py_TYPE(descr)->tp_descr_get;
+- if (f != NULL && PyDescr_IsData(descr)) {
+- attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
+- Py_DECREF(descr);
+- goto try_unpack;
+- }
+- }
+- }
+- dictptr = _PyObject_GetDictPtr(obj);
+- if (dictptr != NULL && (dict = *dictptr) != NULL) {
+- Py_INCREF(dict);
+- attr = __Pyx_PyDict_GetItemStr(dict, name);
+- if (attr != NULL) {
+- Py_INCREF(attr);
+- Py_DECREF(dict);
+- Py_XDECREF(descr);
+- goto try_unpack;
+- }
+- Py_DECREF(dict);
+- }
+- if (meth_found) {
+- *method = descr;
+- return 1;
+- }
+- if (f != NULL) {
+- attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
+- Py_DECREF(descr);
+- goto try_unpack;
+- }
+- if (descr != NULL) {
+- *method = descr;
+- return 0;
+- }
+- PyErr_Format(PyExc_AttributeError,
++
++/* GetBuiltinName */
++static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
++ PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
++ if (unlikely(!result)) {
++ PyErr_Format(PyExc_NameError,
+ #if PY_MAJOR_VERSION >= 3
+- "'%.50s' object has no attribute '%U'",
+- tp->tp_name, name);
+-#else
+- "'%.50s' object has no attribute '%.400s'",
+- tp->tp_name, PyString_AS_STRING(name));
+-#endif
+- return 0;
++ "name '%U' is not defined", name);
+ #else
+- attr = __Pyx_PyObject_GetAttrStr(obj, name);
+- goto try_unpack;
++ "name '%.200s' is not defined", PyString_AS_STRING(name));
+ #endif
+-try_unpack:
+-#if CYTHON_UNPACK_METHODS
+- if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
+- PyObject *function = PyMethod_GET_FUNCTION(attr);
+- Py_INCREF(function);
+- Py_DECREF(attr);
+- *method = function;
+- return 1;
+ }
+-#endif
+- *method = attr;
+- return 0;
+-}
+-
+-/* PyObjectCallMethod1 */
+-static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
+- PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
+- Py_DECREF(method);
+ return result;
+ }
+-static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
+- PyObject *method = NULL, *result;
+- int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
+- if (likely(is_method)) {
+- result = __Pyx_PyObject_Call2Args(method, obj, arg);
+- Py_DECREF(method);
+- return result;
+- }
+- if (unlikely(!method)) return NULL;
+- return __Pyx__PyObject_CallMethod1(method, arg);
+-}
+
+-/* append */
+-static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+- if (likely(PyList_CheckExact(L))) {
+- if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
+- } else {
+- PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
+- if (unlikely(!retval))
+- return -1;
+- Py_DECREF(retval);
+- }
+- return 0;
++/* PyDictVersioning */
++#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
++static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
++ PyObject *dict = Py_TYPE(obj)->tp_dict;
++ return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
+ }
+-
+-/* PyObjectCallNoArg */
++static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
++ PyObject **dictptr = NULL;
++ Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
++ if (offset) {
+ #if CYTHON_COMPILING_IN_CPYTHON
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
+-#if CYTHON_FAST_PYCALL
+- if (PyFunction_Check(func)) {
+- return __Pyx_PyFunction_FastCall(func, NULL, 0);
+- }
+-#endif
+-#ifdef __Pyx_CyFunction_USED
+- if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
++ dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
+ #else
+- if (likely(PyCFunction_Check(func)))
++ dictptr = _PyObject_GetDictPtr(obj);
+ #endif
+- {
+- if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
+- return __Pyx_PyObject_CallMethO(func, NULL);
+- }
+ }
+- return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
++ return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
++}
++static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
++ PyObject *dict = Py_TYPE(obj)->tp_dict;
++ if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
++ return 0;
++ return obj_dict_version == __Pyx_get_object_dict_version(obj);
+ }
+ #endif
+
+-/* GetItemInt */
+-static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+- PyObject *r;
+- if (!j) return NULL;
+- r = PyObject_GetItem(o, j);
+- Py_DECREF(j);
+- return r;
+-}
+-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+- CYTHON_NCP_UNUSED int wraparound,
+- CYTHON_NCP_UNUSED int boundscheck) {
+-#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- Py_ssize_t wrapped_i = i;
+- if (wraparound & unlikely(i < 0)) {
+- wrapped_i += PyList_GET_SIZE(o);
++/* GetModuleGlobalName */
++#if CYTHON_USE_DICT_VERSIONS
++static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
++#else
++static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
++#endif
++{
++ PyObject *result;
++#if !CYTHON_AVOID_BORROWED_REFS
++#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
++ result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
++ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
++ if (likely(result)) {
++ return __Pyx_NewRef(result);
++ } else if (unlikely(PyErr_Occurred())) {
++ return NULL;
+ }
+- if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
+- PyObject *r = PyList_GET_ITEM(o, wrapped_i);
+- Py_INCREF(r);
+- return r;
++#else
++ result = PyDict_GetItem(__pyx_d, name);
++ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
++ if (likely(result)) {
++ return __Pyx_NewRef(result);
++ }
++#endif
++#else
++ result = PyObject_GetItem(__pyx_d, name);
++ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
++ if (likely(result)) {
++ return __Pyx_NewRef(result);
+ }
+- return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+-#else
+- return PySequence_GetItem(o, i);
++ PyErr_Clear();
+ #endif
++ return __Pyx_GetBuiltinName(name);
+ }
+-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+- CYTHON_NCP_UNUSED int wraparound,
+- CYTHON_NCP_UNUSED int boundscheck) {
+-#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- Py_ssize_t wrapped_i = i;
+- if (wraparound & unlikely(i < 0)) {
+- wrapped_i += PyTuple_GET_SIZE(o);
++
++/* PyFunctionFastCall */
++#if CYTHON_FAST_PYCALL
++static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
++ PyObject *globals) {
++ PyFrameObject *f;
++ PyThreadState *tstate = __Pyx_PyThreadState_Current;
++ PyObject **fastlocals;
++ Py_ssize_t i;
++ PyObject *result;
++ assert(globals != NULL);
++ /* XXX Perhaps we should create a specialized
++ PyFrame_New() that doesn't take locals, but does
++ take builtins without sanity checking them.
++ */
++ assert(tstate != NULL);
++ f = PyFrame_New(tstate, co, globals, NULL);
++ if (f == NULL) {
++ return NULL;
+ }
+- if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
+- PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
+- Py_INCREF(r);
+- return r;
++ fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
++ for (i = 0; i < na; i++) {
++ Py_INCREF(*args);
++ fastlocals[i] = *args++;
+ }
+- return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+-#else
+- return PySequence_GetItem(o, i);
+-#endif
++ result = PyEval_EvalFrameEx(f,0);
++ ++tstate->recursion_depth;
++ Py_DECREF(f);
++ --tstate->recursion_depth;
++ return result;
+ }
+-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
+- CYTHON_NCP_UNUSED int wraparound,
+- CYTHON_NCP_UNUSED int boundscheck) {
+-#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
+- if (is_list || PyList_CheckExact(o)) {
+- Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+- if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
+- PyObject *r = PyList_GET_ITEM(o, n);
+- Py_INCREF(r);
+- return r;
++#if 1 || PY_VERSION_HEX < 0x030600B1
++static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
++ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
++ PyObject *globals = PyFunction_GET_GLOBALS(func);
++ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
++ PyObject *closure;
++#if PY_MAJOR_VERSION >= 3
++ PyObject *kwdefs;
++#endif
++ PyObject *kwtuple, **k;
++ PyObject **d;
++ Py_ssize_t nd;
++ Py_ssize_t nk;
++ PyObject *result;
++ assert(kwargs == NULL || PyDict_Check(kwargs));
++ nk = kwargs ? PyDict_Size(kwargs) : 0;
++ if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
++ return NULL;
++ }
++ if (
++#if PY_MAJOR_VERSION >= 3
++ co->co_kwonlyargcount == 0 &&
++#endif
++ likely(kwargs == NULL || nk == 0) &&
++ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
++ if (argdefs == NULL && co->co_argcount == nargs) {
++ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
++ goto done;
++ }
++ else if (nargs == 0 && argdefs != NULL
++ && co->co_argcount == Py_SIZE(argdefs)) {
++ /* function called with no arguments, but all parameters have
++ a default value: use default values as arguments .*/
++ args = &PyTuple_GET_ITEM(argdefs, 0);
++ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
++ goto done;
+ }
+ }
+- else if (PyTuple_CheckExact(o)) {
+- Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+- if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
+- PyObject *r = PyTuple_GET_ITEM(o, n);
+- Py_INCREF(r);
+- return r;
++ if (kwargs != NULL) {
++ Py_ssize_t pos, i;
++ kwtuple = PyTuple_New(2 * nk);
++ if (kwtuple == NULL) {
++ result = NULL;
++ goto done;
+ }
+- } else {
+- PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+- if (likely(m && m->sq_item)) {
+- if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+- Py_ssize_t l = m->sq_length(o);
+- if (likely(l >= 0)) {
+- i += l;
+- } else {
+- if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+- return NULL;
+- PyErr_Clear();
+- }
+- }
+- return m->sq_item(o, i);
++ k = &PyTuple_GET_ITEM(kwtuple, 0);
++ pos = i = 0;
++ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
++ Py_INCREF(k[i]);
++ Py_INCREF(k[i+1]);
++ i += 2;
+ }
++ nk = i / 2;
+ }
+-#else
+- if (is_list || PySequence_Check(o)) {
+- return PySequence_GetItem(o, i);
++ else {
++ kwtuple = NULL;
++ k = NULL;
+ }
++ closure = PyFunction_GET_CLOSURE(func);
++#if PY_MAJOR_VERSION >= 3
++ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+ #endif
+- return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+-}
+-
+-/* DelItemInt */
+-static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
+- int r;
+- if (!j) return -1;
+- r = PyObject_DelItem(o, j);
+- Py_DECREF(j);
+- return r;
+-}
+-static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
+- CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) {
+-#if !CYTHON_USE_TYPE_SLOTS
+- if (is_list || PySequence_Check(o)) {
+- return PySequence_DelItem(o, i);
++ if (argdefs != NULL) {
++ d = &PyTuple_GET_ITEM(argdefs, 0);
++ nd = Py_SIZE(argdefs);
++ }
++ else {
++ d = NULL;
++ nd = 0;
+ }
++#if PY_MAJOR_VERSION >= 3
++ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
++ args, (int)nargs,
++ k, (int)nk,
++ d, (int)nd, kwdefs, closure);
+ #else
+- PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+- if (likely(m && m->sq_ass_item)) {
+- if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+- Py_ssize_t l = m->sq_length(o);
+- if (likely(l >= 0)) {
+- i += l;
+- } else {
+- if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+- return -1;
+- PyErr_Clear();
+- }
+- }
+- return m->sq_ass_item(o, i, (PyObject *)NULL);
++ result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
++ args, (int)nargs,
++ k, (int)nk,
++ d, (int)nd, closure);
++#endif
++ Py_XDECREF(kwtuple);
++done:
++ Py_LeaveRecursiveCall();
++ return result;
++}
++#endif
++#endif
++
++/* PyCFunctionFastCall */
++#if CYTHON_FAST_PYCCALL
++static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
++ PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
++ PyCFunction meth = PyCFunction_GET_FUNCTION(func);
++ PyObject *self = PyCFunction_GET_SELF(func);
++ int flags = PyCFunction_GET_FLAGS(func);
++ assert(PyCFunction_Check(func));
++ assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
++ assert(nargs >= 0);
++ assert(nargs == 0 || args != NULL);
++ /* _PyCFunction_FastCallDict() must not be called with an exception set,
++ because it may clear it (directly or indirectly) and so the
++ caller loses its exception */
++ assert(!PyErr_Occurred());
++ if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
++ return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
++ } else {
++ return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
+ }
++}
+ #endif
+- return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
++
++/* PyObjectCall */
++#if CYTHON_COMPILING_IN_CPYTHON
++static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
++ PyObject *result;
++ ternaryfunc call = Py_TYPE(func)->tp_call;
++ if (unlikely(!call))
++ return PyObject_Call(func, arg, kw);
++ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
++ return NULL;
++ result = (*call)(func, arg, kw);
++ Py_LeaveRecursiveCall();
++ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
++ PyErr_SetString(
++ PyExc_SystemError,
++ "NULL result without error in PyObject_Call");
++ }
++ return result;
+ }
++#endif
+
+-/* KeywordStringCheck */
+-static int __Pyx_CheckKeywordStrings(
+- PyObject *kwdict,
+- const char* function_name,
+- int kw_allowed)
++/* GetTopmostException */
++#if CYTHON_USE_EXC_INFO_STACK
++static _PyErr_StackItem *
++__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
+ {
+- PyObject* key = 0;
+- Py_ssize_t pos = 0;
+-#if CYTHON_COMPILING_IN_PYPY
+- if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
+- goto invalid_keyword;
+- return 1;
+-#else
+- while (PyDict_Next(kwdict, &pos, &key, 0)) {
+- #if PY_MAJOR_VERSION < 3
+- if (unlikely(!PyString_Check(key)))
+- #endif
+- if (unlikely(!PyUnicode_Check(key)))
+- goto invalid_keyword_type;
++ _PyErr_StackItem *exc_info = tstate->exc_info;
++ while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
++ exc_info->previous_item != NULL)
++ {
++ exc_info = exc_info->previous_item;
+ }
+- if ((!kw_allowed) && unlikely(key))
+- goto invalid_keyword;
+- return 1;
+-invalid_keyword_type:
+- PyErr_Format(PyExc_TypeError,
+- "%.200s() keywords must be strings", function_name);
+- return 0;
++ return exc_info;
++}
+ #endif
+-invalid_keyword:
+- PyErr_Format(PyExc_TypeError,
+- #if PY_MAJOR_VERSION < 3
+- "%.200s() got an unexpected keyword argument '%.200s'",
+- function_name, PyString_AsString(key));
++
++/* SaveResetException */
++#if CYTHON_FAST_THREAD_STATE
++static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
++ #if CYTHON_USE_EXC_INFO_STACK
++ _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
++ *type = exc_info->exc_type;
++ *value = exc_info->exc_value;
++ *tb = exc_info->exc_traceback;
+ #else
+- "%s() got an unexpected keyword argument '%U'",
+- function_name, key);
++ *type = tstate->exc_type;
++ *value = tstate->exc_value;
++ *tb = tstate->exc_traceback;
+ #endif
+- return 0;
++ Py_XINCREF(*type);
++ Py_XINCREF(*value);
++ Py_XINCREF(*tb);
+ }
+-
+-/* None */
+-static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
+- PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
++static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ #if CYTHON_USE_EXC_INFO_STACK
++ _PyErr_StackItem *exc_info = tstate->exc_info;
++ tmp_type = exc_info->exc_type;
++ tmp_value = exc_info->exc_value;
++ tmp_tb = exc_info->exc_traceback;
++ exc_info->exc_type = type;
++ exc_info->exc_value = value;
++ exc_info->exc_traceback = tb;
++ #else
++ tmp_type = tstate->exc_type;
++ tmp_value = tstate->exc_value;
++ tmp_tb = tstate->exc_traceback;
++ tstate->exc_type = type;
++ tstate->exc_value = value;
++ tstate->exc_traceback = tb;
++ #endif
++ Py_XDECREF(tmp_type);
++ Py_XDECREF(tmp_value);
++ Py_XDECREF(tmp_tb);
+ }
++#endif
+
+-/* RaiseException */
+-#if PY_MAJOR_VERSION < 3
+-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+- CYTHON_UNUSED PyObject *cause) {
+- __Pyx_PyThreadState_declare
+- Py_XINCREF(type);
+- if (!value || value == Py_None)
+- value = NULL;
+- else
+- Py_INCREF(value);
+- if (!tb || tb == Py_None)
+- tb = NULL;
+- else {
+- Py_INCREF(tb);
+- if (!PyTraceBack_Check(tb)) {
+- PyErr_SetString(PyExc_TypeError,
+- "raise: arg 3 must be a traceback or None");
+- goto raise_error;
+- }
++/* PyErrExceptionMatches */
++#if CYTHON_FAST_THREAD_STATE
++static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
++ Py_ssize_t i, n;
++ n = PyTuple_GET_SIZE(tuple);
++#if PY_MAJOR_VERSION >= 3
++ for (i=0; i<n; i++) {
++ if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
+ }
+- if (PyType_Check(type)) {
+-#if CYTHON_COMPILING_IN_PYPY
+- if (!value) {
+- Py_INCREF(Py_None);
+- value = Py_None;
+- }
+ #endif
+- PyErr_NormalizeException(&type, &value, &tb);
+- } else {
+- if (value) {
+- PyErr_SetString(PyExc_TypeError,
+- "instance exception may not have a separate value");
+- goto raise_error;
+- }
+- value = type;
+- type = (PyObject*) Py_TYPE(type);
+- Py_INCREF(type);
+- if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+- PyErr_SetString(PyExc_TypeError,
+- "raise: exception class must be a subclass of BaseException");
+- goto raise_error;
+- }
++ for (i=0; i<n; i++) {
++ if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
+ }
+- __Pyx_PyThreadState_assign
+- __Pyx_ErrRestore(type, value, tb);
+- return;
+-raise_error:
+- Py_XDECREF(value);
+- Py_XDECREF(type);
+- Py_XDECREF(tb);
+- return;
++ return 0;
++}
++static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
++ PyObject *exc_type = tstate->curexc_type;
++ if (exc_type == err) return 1;
++ if (unlikely(!exc_type)) return 0;
++ if (unlikely(PyTuple_Check(err)))
++ return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
++ return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
+ }
++#endif
++
++/* GetException */
++#if CYTHON_FAST_THREAD_STATE
++static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
+ #else
+-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+- PyObject* owned_instance = NULL;
+- if (tb == Py_None) {
+- tb = 0;
+- } else if (tb && !PyTraceBack_Check(tb)) {
+- PyErr_SetString(PyExc_TypeError,
+- "raise: arg 3 must be a traceback or None");
++static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
++#endif
++{
++ PyObject *local_type, *local_value, *local_tb;
++#if CYTHON_FAST_THREAD_STATE
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ local_type = tstate->curexc_type;
++ local_value = tstate->curexc_value;
++ local_tb = tstate->curexc_traceback;
++ tstate->curexc_type = 0;
++ tstate->curexc_value = 0;
++ tstate->curexc_traceback = 0;
++#else
++ PyErr_Fetch(&local_type, &local_value, &local_tb);
++#endif
++ PyErr_NormalizeException(&local_type, &local_value, &local_tb);
++#if CYTHON_FAST_THREAD_STATE
++ if (unlikely(tstate->curexc_type))
++#else
++ if (unlikely(PyErr_Occurred()))
++#endif
+ goto bad;
+- }
+- if (value == Py_None)
+- value = 0;
+- if (PyExceptionInstance_Check(type)) {
+- if (value) {
+- PyErr_SetString(PyExc_TypeError,
+- "instance exception may not have a separate value");
++ #if PY_MAJOR_VERSION >= 3
++ if (local_tb) {
++ if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+ goto bad;
+- }
+- value = type;
+- type = (PyObject*) Py_TYPE(value);
+- } else if (PyExceptionClass_Check(type)) {
+- PyObject *instance_class = NULL;
+- if (value && PyExceptionInstance_Check(value)) {
+- instance_class = (PyObject*) Py_TYPE(value);
+- if (instance_class != type) {
+- int is_subclass = PyObject_IsSubclass(instance_class, type);
+- if (!is_subclass) {
+- instance_class = NULL;
+- } else if (unlikely(is_subclass == -1)) {
+- goto bad;
+- } else {
+- type = instance_class;
+- }
+- }
+- }
+- if (!instance_class) {
+- PyObject *args;
+- if (!value)
+- args = PyTuple_New(0);
+- else if (PyTuple_Check(value)) {
+- Py_INCREF(value);
+- args = value;
+- } else
+- args = PyTuple_Pack(1, value);
+- if (!args)
+- goto bad;
+- owned_instance = PyObject_Call(type, args, NULL);
+- Py_DECREF(args);
+- if (!owned_instance)
+- goto bad;
+- value = owned_instance;
+- if (!PyExceptionInstance_Check(value)) {
+- PyErr_Format(PyExc_TypeError,
+- "calling %R should have returned an instance of "
+- "BaseException, not %R",
+- type, Py_TYPE(value));
+- goto bad;
+- }
+- }
+- } else {
+- PyErr_SetString(PyExc_TypeError,
+- "raise: exception class must be a subclass of BaseException");
+- goto bad;
+ }
+- if (cause) {
+- PyObject *fixed_cause;
+- if (cause == Py_None) {
+- fixed_cause = NULL;
+- } else if (PyExceptionClass_Check(cause)) {
+- fixed_cause = PyObject_CallObject(cause, NULL);
+- if (fixed_cause == NULL)
+- goto bad;
+- } else if (PyExceptionInstance_Check(cause)) {
+- fixed_cause = cause;
+- Py_INCREF(fixed_cause);
+- } else {
+- PyErr_SetString(PyExc_TypeError,
+- "exception causes must derive from "
+- "BaseException");
+- goto bad;
++ #endif
++ Py_XINCREF(local_tb);
++ Py_XINCREF(local_type);
++ Py_XINCREF(local_value);
++ *type = local_type;
++ *value = local_value;
++ *tb = local_tb;
++#if CYTHON_FAST_THREAD_STATE
++ #if CYTHON_USE_EXC_INFO_STACK
++ {
++ _PyErr_StackItem *exc_info = tstate->exc_info;
++ tmp_type = exc_info->exc_type;
++ tmp_value = exc_info->exc_value;
++ tmp_tb = exc_info->exc_traceback;
++ exc_info->exc_type = local_type;
++ exc_info->exc_value = local_value;
++ exc_info->exc_traceback = local_tb;
++ }
++ #else
++ tmp_type = tstate->exc_type;
++ tmp_value = tstate->exc_value;
++ tmp_tb = tstate->exc_traceback;
++ tstate->exc_type = local_type;
++ tstate->exc_value = local_value;
++ tstate->exc_traceback = local_tb;
++ #endif
++ Py_XDECREF(tmp_type);
++ Py_XDECREF(tmp_value);
++ Py_XDECREF(tmp_tb);
++#else
++ PyErr_SetExcInfo(local_type, local_value, local_tb);
++#endif
++ return 0;
++bad:
++ *type = 0;
++ *value = 0;
++ *tb = 0;
++ Py_XDECREF(local_type);
++ Py_XDECREF(local_value);
++ Py_XDECREF(local_tb);
++ return -1;
++}
++
++/* PyObjectCallMethO */
++#if CYTHON_COMPILING_IN_CPYTHON
++static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
++ PyObject *self, *result;
++ PyCFunction cfunc;
++ cfunc = PyCFunction_GET_FUNCTION(func);
++ self = PyCFunction_GET_SELF(func);
++ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
++ return NULL;
++ result = cfunc(self, arg);
++ Py_LeaveRecursiveCall();
++ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
++ PyErr_SetString(
++ PyExc_SystemError,
++ "NULL result without error in PyObject_Call");
++ }
++ return result;
++}
++#endif
++
++/* PyObjectCallOneArg */
++#if CYTHON_COMPILING_IN_CPYTHON
++static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
++ PyObject *result;
++ PyObject *args = PyTuple_New(1);
++ if (unlikely(!args)) return NULL;
++ Py_INCREF(arg);
++ PyTuple_SET_ITEM(args, 0, arg);
++ result = __Pyx_PyObject_Call(func, args, NULL);
++ Py_DECREF(args);
++ return result;
++}
++static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
++#if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(func)) {
++ return __Pyx_PyFunction_FastCall(func, &arg, 1);
++ }
++#endif
++ if (likely(PyCFunction_Check(func))) {
++ if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
++ return __Pyx_PyObject_CallMethO(func, arg);
++#if CYTHON_FAST_PYCCALL
++ } else if (__Pyx_PyFastCFunction_Check(func)) {
++ return __Pyx_PyCFunction_FastCall(func, &arg, 1);
++#endif
+ }
+- PyException_SetCause(value, fixed_cause);
+ }
+- PyErr_SetObject(type, value);
+- if (tb) {
+-#if CYTHON_COMPILING_IN_PYPY
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
+- Py_INCREF(tb);
+- PyErr_Restore(tmp_type, tmp_value, tb);
+- Py_XDECREF(tmp_tb);
++ return __Pyx__PyObject_CallOneArg(func, arg);
++}
+ #else
+- PyThreadState *tstate = __Pyx_PyThreadState_Current;
+- PyObject* tmp_tb = tstate->curexc_traceback;
+- if (tb != tmp_tb) {
+- Py_INCREF(tb);
+- tstate->curexc_traceback = tb;
+- Py_XDECREF(tmp_tb);
+- }
++static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
++ PyObject *result;
++ PyObject *args = PyTuple_Pack(1, arg);
++ if (unlikely(!args)) return NULL;
++ result = __Pyx_PyObject_Call(func, args, NULL);
++ Py_DECREF(args);
++ return result;
++}
+ #endif
+- }
+-bad:
+- Py_XDECREF(owned_instance);
+- return;
++
++/* PyErrFetchRestore */
++#if CYTHON_FAST_THREAD_STATE
++static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ tmp_type = tstate->curexc_type;
++ tmp_value = tstate->curexc_value;
++ tmp_tb = tstate->curexc_traceback;
++ tstate->curexc_type = type;
++ tstate->curexc_value = value;
++ tstate->curexc_traceback = tb;
++ Py_XDECREF(tmp_type);
++ Py_XDECREF(tmp_value);
++ Py_XDECREF(tmp_tb);
++}
++static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
++ *type = tstate->curexc_type;
++ *value = tstate->curexc_value;
++ *tb = tstate->curexc_traceback;
++ tstate->curexc_type = 0;
++ tstate->curexc_value = 0;
++ tstate->curexc_traceback = 0;
+ }
+ #endif
+
+-/* FetchCommonType */
+-static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+- PyObject* fake_module;
+- PyTypeObject* cached_type = NULL;
+- fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+- if (!fake_module) return NULL;
+- Py_INCREF(fake_module);
+- cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+- if (cached_type) {
+- if (!PyType_Check((PyObject*)cached_type)) {
+- PyErr_Format(PyExc_TypeError,
+- "Shared Cython type %.200s is not a type object",
+- type->tp_name);
+- goto bad;
+- }
+- if (cached_type->tp_basicsize != type->tp_basicsize) {
+- PyErr_Format(PyExc_TypeError,
+- "Shared Cython type %.200s has the wrong size, try recompiling",
+- type->tp_name);
+- goto bad;
+- }
+- } else {
+- if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+- PyErr_Clear();
+- if (PyType_Ready(type) < 0) goto bad;
+- if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+- goto bad;
+- Py_INCREF(type);
+- cached_type = type;
++/* GetAttr */
++static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
++#if CYTHON_USE_TYPE_SLOTS
++#if PY_MAJOR_VERSION >= 3
++ if (likely(PyUnicode_Check(n)))
++#else
++ if (likely(PyString_Check(n)))
++#endif
++ return __Pyx_PyObject_GetAttrStr(o, n);
++#endif
++ return PyObject_GetAttr(o, n);
++}
++
++/* GetAttr3 */
++static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
++ return NULL;
++ __Pyx_PyErr_Clear();
++ Py_INCREF(d);
++ return d;
++}
++static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
++ PyObject *r = __Pyx_GetAttr(o, n);
++ return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
++}
++
++/* PyObjectCall2Args */
++static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
++ PyObject *args, *result = NULL;
++ #if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(function)) {
++ PyObject *args[2] = {arg1, arg2};
++ return __Pyx_PyFunction_FastCall(function, args, 2);
++ }
++ #endif
++ #if CYTHON_FAST_PYCCALL
++ if (__Pyx_PyFastCFunction_Check(function)) {
++ PyObject *args[2] = {arg1, arg2};
++ return __Pyx_PyCFunction_FastCall(function, args, 2);
+ }
++ #endif
++ args = PyTuple_New(2);
++ if (unlikely(!args)) goto done;
++ Py_INCREF(arg1);
++ PyTuple_SET_ITEM(args, 0, arg1);
++ Py_INCREF(arg2);
++ PyTuple_SET_ITEM(args, 1, arg2);
++ Py_INCREF(function);
++ result = __Pyx_PyObject_Call(function, args, NULL);
++ Py_DECREF(args);
++ Py_DECREF(function);
+ done:
+- Py_DECREF(fake_module);
+- return cached_type;
+-bad:
+- Py_XDECREF(cached_type);
+- cached_type = NULL;
+- goto done;
++ return result;
+ }
+
+-/* CythonFunctionShared */
+-#include <structmember.h>
+-static PyObject *
+-__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
+-{
+- if (unlikely(op->func_doc == NULL)) {
+- if (op->func.m_ml->ml_doc) {
++/* PyObjectGetMethod */
++static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
++ PyObject *attr;
++#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
++ PyTypeObject *tp = Py_TYPE(obj);
++ PyObject *descr;
++ descrgetfunc f = NULL;
++ PyObject **dictptr, *dict;
++ int meth_found = 0;
++ assert (*method == NULL);
++ if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
++ attr = __Pyx_PyObject_GetAttrStr(obj, name);
++ goto try_unpack;
++ }
++ if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
++ return 0;
++ }
++ descr = _PyType_Lookup(tp, name);
++ if (likely(descr != NULL)) {
++ Py_INCREF(descr);
+ #if PY_MAJOR_VERSION >= 3
+- op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
++ #ifdef __Pyx_CyFunction_USED
++ if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
++ #else
++ if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
++ #endif
+ #else
+- op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
++ #ifdef __Pyx_CyFunction_USED
++ if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
++ #else
++ if (likely(PyFunction_Check(descr)))
++ #endif
+ #endif
+- if (unlikely(op->func_doc == NULL))
+- return NULL;
++ {
++ meth_found = 1;
+ } else {
+- Py_INCREF(Py_None);
+- return Py_None;
++ f = Py_TYPE(descr)->tp_descr_get;
++ if (f != NULL && PyDescr_IsData(descr)) {
++ attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
++ Py_DECREF(descr);
++ goto try_unpack;
++ }
++ }
++ }
++ dictptr = _PyObject_GetDictPtr(obj);
++ if (dictptr != NULL && (dict = *dictptr) != NULL) {
++ Py_INCREF(dict);
++ attr = __Pyx_PyDict_GetItemStr(dict, name);
++ if (attr != NULL) {
++ Py_INCREF(attr);
++ Py_DECREF(dict);
++ Py_XDECREF(descr);
++ goto try_unpack;
+ }
++ Py_DECREF(dict);
+ }
+- Py_INCREF(op->func_doc);
+- return op->func_doc;
+-}
+-static int
+-__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
+-{
+- PyObject *tmp = op->func_doc;
+- if (value == NULL) {
+- value = Py_None;
++ if (meth_found) {
++ *method = descr;
++ return 1;
+ }
+- Py_INCREF(value);
+- op->func_doc = value;
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- if (unlikely(op->func_name == NULL)) {
+-#if PY_MAJOR_VERSION >= 3
+- op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
+-#else
+- op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
+-#endif
+- if (unlikely(op->func_name == NULL))
+- return NULL;
++ if (f != NULL) {
++ attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
++ Py_DECREF(descr);
++ goto try_unpack;
+ }
+- Py_INCREF(op->func_name);
+- return op->func_name;
+-}
+-static int
+-__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
+-{
+- PyObject *tmp;
++ if (descr != NULL) {
++ *method = descr;
++ return 0;
++ }
++ PyErr_Format(PyExc_AttributeError,
+ #if PY_MAJOR_VERSION >= 3
+- if (unlikely(value == NULL || !PyUnicode_Check(value)))
++ "'%.50s' object has no attribute '%U'",
++ tp->tp_name, name);
+ #else
+- if (unlikely(value == NULL || !PyString_Check(value)))
++ "'%.50s' object has no attribute '%.400s'",
++ tp->tp_name, PyString_AS_STRING(name));
+ #endif
+- {
+- PyErr_SetString(PyExc_TypeError,
+- "__name__ must be set to a string object");
+- return -1;
+- }
+- tmp = op->func_name;
+- Py_INCREF(value);
+- op->func_name = value;
+- Py_XDECREF(tmp);
+ return 0;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- Py_INCREF(op->func_qualname);
+- return op->func_qualname;
+-}
+-static int
+-__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
+-{
+- PyObject *tmp;
+-#if PY_MAJOR_VERSION >= 3
+- if (unlikely(value == NULL || !PyUnicode_Check(value)))
+ #else
+- if (unlikely(value == NULL || !PyString_Check(value)))
++ attr = __Pyx_PyObject_GetAttrStr(obj, name);
++ goto try_unpack;
+ #endif
+- {
+- PyErr_SetString(PyExc_TypeError,
+- "__qualname__ must be set to a string object");
+- return -1;
+- }
+- tmp = op->func_qualname;
+- Py_INCREF(value);
+- op->func_qualname = value;
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
+-{
+- PyObject *self;
+- self = m->func_closure;
+- if (self == NULL)
+- self = Py_None;
+- Py_INCREF(self);
+- return self;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- if (unlikely(op->func_dict == NULL)) {
+- op->func_dict = PyDict_New();
+- if (unlikely(op->func_dict == NULL))
+- return NULL;
+- }
+- Py_INCREF(op->func_dict);
+- return op->func_dict;
+-}
+-static int
+-__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
+-{
+- PyObject *tmp;
+- if (unlikely(value == NULL)) {
+- PyErr_SetString(PyExc_TypeError,
+- "function's dictionary may not be deleted");
+- return -1;
+- }
+- if (unlikely(!PyDict_Check(value))) {
+- PyErr_SetString(PyExc_TypeError,
+- "setting function's dictionary to a non-dict");
+- return -1;
++try_unpack:
++#if CYTHON_UNPACK_METHODS
++ if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
++ PyObject *function = PyMethod_GET_FUNCTION(attr);
++ Py_INCREF(function);
++ Py_DECREF(attr);
++ *method = function;
++ return 1;
+ }
+- tmp = op->func_dict;
+- Py_INCREF(value);
+- op->func_dict = value;
+- Py_XDECREF(tmp);
++#endif
++ *method = attr;
+ return 0;
+ }
+-static PyObject *
+-__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- Py_INCREF(op->func_globals);
+- return op->func_globals;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- Py_INCREF(Py_None);
+- return Py_None;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+-{
+- PyObject* result = (op->func_code) ? op->func_code : Py_None;
+- Py_INCREF(result);
+- return result;
+-}
+-static int
+-__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
+- int result = 0;
+- PyObject *res = op->defaults_getter((PyObject *) op);
+- if (unlikely(!res))
+- return -1;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
+- Py_INCREF(op->defaults_tuple);
+- op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
+- Py_INCREF(op->defaults_kwdict);
+- #else
+- op->defaults_tuple = PySequence_ITEM(res, 0);
+- if (unlikely(!op->defaults_tuple)) result = -1;
+- else {
+- op->defaults_kwdict = PySequence_ITEM(res, 1);
+- if (unlikely(!op->defaults_kwdict)) result = -1;
+- }
+- #endif
+- Py_DECREF(res);
++
++/* PyObjectCallMethod1 */
++static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
++ PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
++ Py_DECREF(method);
+ return result;
+ }
+-static int
+-__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
+- PyObject* tmp;
+- if (!value) {
+- value = Py_None;
+- } else if (value != Py_None && !PyTuple_Check(value)) {
+- PyErr_SetString(PyExc_TypeError,
+- "__defaults__ must be set to a tuple object");
+- return -1;
+- }
+- Py_INCREF(value);
+- tmp = op->defaults_tuple;
+- op->defaults_tuple = value;
+- Py_XDECREF(tmp);
+- return 0;
+-}
+-static PyObject *
+-__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
+- PyObject* result = op->defaults_tuple;
+- if (unlikely(!result)) {
+- if (op->defaults_getter) {
+- if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+- result = op->defaults_tuple;
+- } else {
+- result = Py_None;
+- }
++static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
++ PyObject *method = NULL, *result;
++ int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
++ if (likely(is_method)) {
++ result = __Pyx_PyObject_Call2Args(method, obj, arg);
++ Py_DECREF(method);
++ return result;
+ }
+- Py_INCREF(result);
+- return result;
++ if (unlikely(!method)) return NULL;
++ return __Pyx__PyObject_CallMethod1(method, arg);
+ }
+-static int
+-__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
+- PyObject* tmp;
+- if (!value) {
+- value = Py_None;
+- } else if (value != Py_None && !PyDict_Check(value)) {
+- PyErr_SetString(PyExc_TypeError,
+- "__kwdefaults__ must be set to a dict object");
+- return -1;
++
++/* append */
++static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
++ if (likely(PyList_CheckExact(L))) {
++ if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
++ } else {
++ PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
++ if (unlikely(!retval))
++ return -1;
++ Py_DECREF(retval);
+ }
+- Py_INCREF(value);
+- tmp = op->defaults_kwdict;
+- op->defaults_kwdict = value;
+- Py_XDECREF(tmp);
+ return 0;
+ }
+-static PyObject *
+-__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
+- PyObject* result = op->defaults_kwdict;
+- if (unlikely(!result)) {
+- if (op->defaults_getter) {
+- if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+- result = op->defaults_kwdict;
+- } else {
+- result = Py_None;
++
++/* PyObjectCallNoArg */
++#if CYTHON_COMPILING_IN_CPYTHON
++static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
++#if CYTHON_FAST_PYCALL
++ if (PyFunction_Check(func)) {
++ return __Pyx_PyFunction_FastCall(func, NULL, 0);
++ }
++#endif
++#ifdef __Pyx_CyFunction_USED
++ if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
++#else
++ if (likely(PyCFunction_Check(func)))
++#endif
++ {
++ if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
++ return __Pyx_PyObject_CallMethO(func, NULL);
+ }
+ }
+- Py_INCREF(result);
+- return result;
++ return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
+ }
+-static int
+-__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
+- PyObject* tmp;
+- if (!value || value == Py_None) {
+- value = NULL;
+- } else if (!PyDict_Check(value)) {
+- PyErr_SetString(PyExc_TypeError,
+- "__annotations__ must be set to a dict object");
+- return -1;
++#endif
++
++/* GetItemInt */
++static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
++ PyObject *r;
++ if (!j) return NULL;
++ r = PyObject_GetItem(o, j);
++ Py_DECREF(j);
++ return r;
++}
++static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
++ CYTHON_NCP_UNUSED int wraparound,
++ CYTHON_NCP_UNUSED int boundscheck) {
++#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ Py_ssize_t wrapped_i = i;
++ if (wraparound & unlikely(i < 0)) {
++ wrapped_i += PyList_GET_SIZE(o);
+ }
+- Py_XINCREF(value);
+- tmp = op->func_annotations;
+- op->func_annotations = value;
+- Py_XDECREF(tmp);
+- return 0;
++ if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
++ PyObject *r = PyList_GET_ITEM(o, wrapped_i);
++ Py_INCREF(r);
++ return r;
++ }
++ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
++#else
++ return PySequence_GetItem(o, i);
++#endif
+ }
+-static PyObject *
+-__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
+- PyObject* result = op->func_annotations;
+- if (unlikely(!result)) {
+- result = PyDict_New();
+- if (unlikely(!result)) return NULL;
+- op->func_annotations = result;
++static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
++ CYTHON_NCP_UNUSED int wraparound,
++ CYTHON_NCP_UNUSED int boundscheck) {
++#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ Py_ssize_t wrapped_i = i;
++ if (wraparound & unlikely(i < 0)) {
++ wrapped_i += PyTuple_GET_SIZE(o);
+ }
+- Py_INCREF(result);
+- return result;
++ if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
++ PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
++ Py_INCREF(r);
++ return r;
++ }
++ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
++#else
++ return PySequence_GetItem(o, i);
++#endif
+ }
+-static PyGetSetDef __pyx_CyFunction_getsets[] = {
+- {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+- {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+- {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+- {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+- {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
+- {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
+- {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+- {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+- {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+- {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+- {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+- {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+- {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+- {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+- {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+- {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+- {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
+- {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
+- {0, 0, 0, 0, 0}
+-};
+-static PyMemberDef __pyx_CyFunction_members[] = {
+- {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
+- {0, 0, 0, 0, 0}
+-};
+-static PyObject *
+-__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
+-{
+-#if PY_MAJOR_VERSION >= 3
+- return PyUnicode_FromString(m->func.m_ml->ml_name);
++static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
++ CYTHON_NCP_UNUSED int wraparound,
++ CYTHON_NCP_UNUSED int boundscheck) {
++#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
++ if (is_list || PyList_CheckExact(o)) {
++ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
++ if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
++ PyObject *r = PyList_GET_ITEM(o, n);
++ Py_INCREF(r);
++ return r;
++ }
++ }
++ else if (PyTuple_CheckExact(o)) {
++ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
++ if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
++ PyObject *r = PyTuple_GET_ITEM(o, n);
++ Py_INCREF(r);
++ return r;
++ }
++ } else {
++ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
++ if (likely(m && m->sq_item)) {
++ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
++ Py_ssize_t l = m->sq_length(o);
++ if (likely(l >= 0)) {
++ i += l;
++ } else {
++ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
++ return NULL;
++ PyErr_Clear();
++ }
++ }
++ return m->sq_item(o, i);
++ }
++ }
+ #else
+- return PyString_FromString(m->func.m_ml->ml_name);
++ if (is_list || PySequence_Check(o)) {
++ return PySequence_GetItem(o, i);
++ }
+ #endif
++ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+ }
+-static PyMethodDef __pyx_CyFunction_methods[] = {
+- {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
+- {0, 0, 0, 0}
+-};
+-#if PY_VERSION_HEX < 0x030500A0
+-#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
++
++/* DelItemInt */
++static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
++ int r;
++ if (!j) return -1;
++ r = PyObject_DelItem(o, j);
++ Py_DECREF(j);
++ return r;
++}
++static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
++ CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) {
++#if !CYTHON_USE_TYPE_SLOTS
++ if (is_list || PySequence_Check(o)) {
++ return PySequence_DelItem(o, i);
++ }
+ #else
+-#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
++ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
++ if (likely(m && m->sq_ass_item)) {
++ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
++ Py_ssize_t l = m->sq_length(o);
++ if (likely(l >= 0)) {
++ i += l;
++ } else {
++ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
++ return -1;
++ PyErr_Clear();
++ }
++ }
++ return m->sq_ass_item(o, i, (PyObject *)NULL);
++ }
+ #endif
+-static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
+- PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
+- if (unlikely(op == NULL))
+- return NULL;
+- op->flags = flags;
+- __Pyx_CyFunction_weakreflist(op) = NULL;
+- op->func.m_ml = ml;
+- op->func.m_self = (PyObject *) op;
+- Py_XINCREF(closure);
+- op->func_closure = closure;
+- Py_XINCREF(module);
+- op->func.m_module = module;
+- op->func_dict = NULL;
+- op->func_name = NULL;
+- Py_INCREF(qualname);
+- op->func_qualname = qualname;
+- op->func_doc = NULL;
+- op->func_classobj = NULL;
+- op->func_globals = globals;
+- Py_INCREF(op->func_globals);
+- Py_XINCREF(code);
+- op->func_code = code;
+- op->defaults_pyobjects = 0;
+- op->defaults_size = 0;
+- op->defaults = NULL;
+- op->defaults_tuple = NULL;
+- op->defaults_kwdict = NULL;
+- op->defaults_getter = NULL;
+- op->func_annotations = NULL;
+- return (PyObject *) op;
++ return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
+ }
+-static int
+-__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
++
++/* KeywordStringCheck */
++static int __Pyx_CheckKeywordStrings(
++ PyObject *kwdict,
++ const char* function_name,
++ int kw_allowed)
+ {
+- Py_CLEAR(m->func_closure);
+- Py_CLEAR(m->func.m_module);
+- Py_CLEAR(m->func_dict);
+- Py_CLEAR(m->func_name);
+- Py_CLEAR(m->func_qualname);
+- Py_CLEAR(m->func_doc);
+- Py_CLEAR(m->func_globals);
+- Py_CLEAR(m->func_code);
+- Py_CLEAR(m->func_classobj);
+- Py_CLEAR(m->defaults_tuple);
+- Py_CLEAR(m->defaults_kwdict);
+- Py_CLEAR(m->func_annotations);
+- if (m->defaults) {
+- PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+- int i;
+- for (i = 0; i < m->defaults_pyobjects; i++)
+- Py_XDECREF(pydefaults[i]);
+- PyObject_Free(m->defaults);
+- m->defaults = NULL;
++ PyObject* key = 0;
++ Py_ssize_t pos = 0;
++#if CYTHON_COMPILING_IN_PYPY
++ if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
++ goto invalid_keyword;
++ return 1;
++#else
++ while (PyDict_Next(kwdict, &pos, &key, 0)) {
++ #if PY_MAJOR_VERSION < 3
++ if (unlikely(!PyString_Check(key)))
++ #endif
++ if (unlikely(!PyUnicode_Check(key)))
++ goto invalid_keyword_type;
+ }
++ if ((!kw_allowed) && unlikely(key))
++ goto invalid_keyword;
++ return 1;
++invalid_keyword_type:
++ PyErr_Format(PyExc_TypeError,
++ "%.200s() keywords must be strings", function_name);
++ return 0;
++#endif
++invalid_keyword:
++ PyErr_Format(PyExc_TypeError,
++ #if PY_MAJOR_VERSION < 3
++ "%.200s() got an unexpected keyword argument '%.200s'",
++ function_name, PyString_AsString(key));
++ #else
++ "%s() got an unexpected keyword argument '%U'",
++ function_name, key);
++ #endif
+ return 0;
+ }
+-static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
+-{
+- if (__Pyx_CyFunction_weakreflist(m) != NULL)
+- PyObject_ClearWeakRefs((PyObject *) m);
+- __Pyx_CyFunction_clear(m);
+- PyObject_GC_Del(m);
+-}
+-static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
+-{
+- PyObject_GC_UnTrack(m);
+- __Pyx__CyFunction_dealloc(m);
++
++/* None */
++static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
++ PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
+ }
+-static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
+-{
+- Py_VISIT(m->func_closure);
+- Py_VISIT(m->func.m_module);
+- Py_VISIT(m->func_dict);
+- Py_VISIT(m->func_name);
+- Py_VISIT(m->func_qualname);
+- Py_VISIT(m->func_doc);
+- Py_VISIT(m->func_globals);
+- Py_VISIT(m->func_code);
+- Py_VISIT(m->func_classobj);
+- Py_VISIT(m->defaults_tuple);
+- Py_VISIT(m->defaults_kwdict);
+- if (m->defaults) {
+- PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+- int i;
+- for (i = 0; i < m->defaults_pyobjects; i++)
+- Py_VISIT(pydefaults[i]);
++
++/* RaiseException */
++#if PY_MAJOR_VERSION < 3
++static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
++ CYTHON_UNUSED PyObject *cause) {
++ __Pyx_PyThreadState_declare
++ Py_XINCREF(type);
++ if (!value || value == Py_None)
++ value = NULL;
++ else
++ Py_INCREF(value);
++ if (!tb || tb == Py_None)
++ tb = NULL;
++ else {
++ Py_INCREF(tb);
++ if (!PyTraceBack_Check(tb)) {
++ PyErr_SetString(PyExc_TypeError,
++ "raise: arg 3 must be a traceback or None");
++ goto raise_error;
++ }
+ }
+- return 0;
++ if (PyType_Check(type)) {
++#if CYTHON_COMPILING_IN_PYPY
++ if (!value) {
++ Py_INCREF(Py_None);
++ value = Py_None;
++ }
++#endif
++ PyErr_NormalizeException(&type, &value, &tb);
++ } else {
++ if (value) {
++ PyErr_SetString(PyExc_TypeError,
++ "instance exception may not have a separate value");
++ goto raise_error;
++ }
++ value = type;
++ type = (PyObject*) Py_TYPE(type);
++ Py_INCREF(type);
++ if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
++ PyErr_SetString(PyExc_TypeError,
++ "raise: exception class must be a subclass of BaseException");
++ goto raise_error;
++ }
++ }
++ __Pyx_PyThreadState_assign
++ __Pyx_ErrRestore(type, value, tb);
++ return;
++raise_error:
++ Py_XDECREF(value);
++ Py_XDECREF(type);
++ Py_XDECREF(tb);
++ return;
+ }
+-static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
+-{
+-#if PY_MAJOR_VERSION < 3
+- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+- if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
+- Py_INCREF(func);
+- return func;
++#else
++static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
++ PyObject* owned_instance = NULL;
++ if (tb == Py_None) {
++ tb = 0;
++ } else if (tb && !PyTraceBack_Check(tb)) {
++ PyErr_SetString(PyExc_TypeError,
++ "raise: arg 3 must be a traceback or None");
++ goto bad;
+ }
+- if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
+- if (type == NULL)
+- type = (PyObject *)(Py_TYPE(obj));
+- return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
++ if (value == Py_None)
++ value = 0;
++ if (PyExceptionInstance_Check(type)) {
++ if (value) {
++ PyErr_SetString(PyExc_TypeError,
++ "instance exception may not have a separate value");
++ goto bad;
++ }
++ value = type;
++ type = (PyObject*) Py_TYPE(value);
++ } else if (PyExceptionClass_Check(type)) {
++ PyObject *instance_class = NULL;
++ if (value && PyExceptionInstance_Check(value)) {
++ instance_class = (PyObject*) Py_TYPE(value);
++ if (instance_class != type) {
++ int is_subclass = PyObject_IsSubclass(instance_class, type);
++ if (!is_subclass) {
++ instance_class = NULL;
++ } else if (unlikely(is_subclass == -1)) {
++ goto bad;
++ } else {
++ type = instance_class;
++ }
++ }
++ }
++ if (!instance_class) {
++ PyObject *args;
++ if (!value)
++ args = PyTuple_New(0);
++ else if (PyTuple_Check(value)) {
++ Py_INCREF(value);
++ args = value;
++ } else
++ args = PyTuple_Pack(1, value);
++ if (!args)
++ goto bad;
++ owned_instance = PyObject_Call(type, args, NULL);
++ Py_DECREF(args);
++ if (!owned_instance)
++ goto bad;
++ value = owned_instance;
++ if (!PyExceptionInstance_Check(value)) {
++ PyErr_Format(PyExc_TypeError,
++ "calling %R should have returned an instance of "
++ "BaseException, not %R",
++ type, Py_TYPE(value));
++ goto bad;
++ }
++ }
++ } else {
++ PyErr_SetString(PyExc_TypeError,
++ "raise: exception class must be a subclass of BaseException");
++ goto bad;
+ }
+- if (obj == Py_None)
+- obj = NULL;
++ if (cause) {
++ PyObject *fixed_cause;
++ if (cause == Py_None) {
++ fixed_cause = NULL;
++ } else if (PyExceptionClass_Check(cause)) {
++ fixed_cause = PyObject_CallObject(cause, NULL);
++ if (fixed_cause == NULL)
++ goto bad;
++ } else if (PyExceptionInstance_Check(cause)) {
++ fixed_cause = cause;
++ Py_INCREF(fixed_cause);
++ } else {
++ PyErr_SetString(PyExc_TypeError,
++ "exception causes must derive from "
++ "BaseException");
++ goto bad;
++ }
++ PyException_SetCause(value, fixed_cause);
++ }
++ PyErr_SetObject(type, value);
++ if (tb) {
++#if CYTHON_COMPILING_IN_PYPY
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
++ Py_INCREF(tb);
++ PyErr_Restore(tmp_type, tmp_value, tb);
++ Py_XDECREF(tmp_tb);
++#else
++ PyThreadState *tstate = __Pyx_PyThreadState_Current;
++ PyObject* tmp_tb = tstate->curexc_traceback;
++ if (tb != tmp_tb) {
++ Py_INCREF(tb);
++ tstate->curexc_traceback = tb;
++ Py_XDECREF(tmp_tb);
++ }
+ #endif
+- return __Pyx_PyMethod_New(func, obj, type);
++ }
++bad:
++ Py_XDECREF(owned_instance);
++ return;
++}
++#endif
++
++/* FetchCommonType */
++static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
++ PyObject* fake_module;
++ PyTypeObject* cached_type = NULL;
++ fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
++ if (!fake_module) return NULL;
++ Py_INCREF(fake_module);
++ cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
++ if (cached_type) {
++ if (!PyType_Check((PyObject*)cached_type)) {
++ PyErr_Format(PyExc_TypeError,
++ "Shared Cython type %.200s is not a type object",
++ type->tp_name);
++ goto bad;
++ }
++ if (cached_type->tp_basicsize != type->tp_basicsize) {
++ PyErr_Format(PyExc_TypeError,
++ "Shared Cython type %.200s has the wrong size, try recompiling",
++ type->tp_name);
++ goto bad;
++ }
++ } else {
++ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
++ PyErr_Clear();
++ if (PyType_Ready(type) < 0) goto bad;
++ if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
++ goto bad;
++ Py_INCREF(type);
++ cached_type = type;
++ }
++done:
++ Py_DECREF(fake_module);
++ return cached_type;
++bad:
++ Py_XDECREF(cached_type);
++ cached_type = NULL;
++ goto done;
+ }
+-static PyObject*
+-__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
++
++/* CythonFunctionShared */
++#include <structmember.h>
++static PyObject *
++__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
+ {
++ if (unlikely(op->func_doc == NULL)) {
++ if (op->func.m_ml->ml_doc) {
+ #if PY_MAJOR_VERSION >= 3
+- return PyUnicode_FromFormat("<cyfunction %U at %p>",
+- op->func_qualname, (void *)op);
++ op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
+ #else
+- return PyString_FromFormat("<cyfunction %s at %p>",
+- PyString_AsString(op->func_qualname), (void *)op);
++ op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
+ #endif
+-}
+-static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
+- PyCFunctionObject* f = (PyCFunctionObject*)func;
+- PyCFunction meth = f->m_ml->ml_meth;
+- Py_ssize_t size;
+- switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
+- case METH_VARARGS:
+- if (likely(kw == NULL || PyDict_Size(kw) == 0))
+- return (*meth)(self, arg);
+- break;
+- case METH_VARARGS | METH_KEYWORDS:
+- return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
+- case METH_NOARGS:
+- if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+- size = PyTuple_GET_SIZE(arg);
+- if (likely(size == 0))
+- return (*meth)(self, NULL);
+- PyErr_Format(PyExc_TypeError,
+- "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
+- f->m_ml->ml_name, size);
+- return NULL;
+- }
+- break;
+- case METH_O:
+- if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+- size = PyTuple_GET_SIZE(arg);
+- if (likely(size == 1)) {
+- PyObject *result, *arg0;
+- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- arg0 = PyTuple_GET_ITEM(arg, 0);
+- #else
+- arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
+- #endif
+- result = (*meth)(self, arg0);
+- #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
+- Py_DECREF(arg0);
+- #endif
+- return result;
+- }
+- PyErr_Format(PyExc_TypeError,
+- "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
+- f->m_ml->ml_name, size);
+- return NULL;
++ if (unlikely(op->func_doc == NULL))
++ return NULL;
++ } else {
++ Py_INCREF(Py_None);
++ return Py_None;
+ }
+- break;
+- default:
+- PyErr_SetString(PyExc_SystemError, "Bad call flags in "
+- "__Pyx_CyFunction_Call. METH_OLDARGS is no "
+- "longer supported!");
+- return NULL;
+ }
+- PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
+- f->m_ml->ml_name);
+- return NULL;
+-}
+-static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+- return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
++ Py_INCREF(op->func_doc);
++ return op->func_doc;
+ }
+-static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
+- PyObject *result;
+- __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
+- if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
+- Py_ssize_t argc;
+- PyObject *new_args;
+- PyObject *self;
+- argc = PyTuple_GET_SIZE(args);
+- new_args = PyTuple_GetSlice(args, 1, argc);
+- if (unlikely(!new_args))
+- return NULL;
+- self = PyTuple_GetItem(args, 0);
+- if (unlikely(!self)) {
+- Py_DECREF(new_args);
+- return NULL;
+- }
+- result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
+- Py_DECREF(new_args);
+- } else {
+- result = __Pyx_CyFunction_Call(func, args, kw);
++static int
++__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
++{
++ PyObject *tmp = op->func_doc;
++ if (value == NULL) {
++ value = Py_None;
+ }
+- return result;
++ Py_INCREF(value);
++ op->func_doc = value;
++ Py_XDECREF(tmp);
++ return 0;
+ }
+-static PyTypeObject __pyx_CyFunctionType_type = {
+- PyVarObject_HEAD_INIT(0, 0)
+- "cython_function_or_method",
+- sizeof(__pyx_CyFunctionObject),
+- 0,
+- (destructor) __Pyx_CyFunction_dealloc,
+- 0,
+- 0,
+- 0,
+-#if PY_MAJOR_VERSION < 3
+- 0,
++static PyObject *
++__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
++{
++ if (unlikely(op->func_name == NULL)) {
++#if PY_MAJOR_VERSION >= 3
++ op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
+ #else
+- 0,
++ op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
+ #endif
+- (reprfunc) __Pyx_CyFunction_repr,
+- 0,
+- 0,
+- 0,
+- 0,
+- __Pyx_CyFunction_CallAsMethod,
+- 0,
+- 0,
+- 0,
+- 0,
+- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+- 0,
+- (traverseproc) __Pyx_CyFunction_traverse,
+- (inquiry) __Pyx_CyFunction_clear,
+- 0,
+-#if PY_VERSION_HEX < 0x030500A0
+- offsetof(__pyx_CyFunctionObject, func_weakreflist),
++ if (unlikely(op->func_name == NULL))
++ return NULL;
++ }
++ Py_INCREF(op->func_name);
++ return op->func_name;
++}
++static int
++__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
++{
++ PyObject *tmp;
++#if PY_MAJOR_VERSION >= 3
++ if (unlikely(value == NULL || !PyUnicode_Check(value)))
+ #else
+- offsetof(PyCFunctionObject, m_weakreflist),
+-#endif
+- 0,
+- 0,
+- __pyx_CyFunction_methods,
+- __pyx_CyFunction_members,
+- __pyx_CyFunction_getsets,
+- 0,
+- 0,
+- __Pyx_CyFunction_descr_get,
+- 0,
+- offsetof(__pyx_CyFunctionObject, func_dict),
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+-#if PY_VERSION_HEX >= 0x030400a1
+- 0,
+-#endif
+-#if PY_VERSION_HEX >= 0x030800b1
+- 0,
+-#endif
+-#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+- 0,
++ if (unlikely(value == NULL || !PyString_Check(value)))
+ #endif
+-};
+-static int __pyx_CyFunction_init(void) {
+- __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
+- if (unlikely(__pyx_CyFunctionType == NULL)) {
++ {
++ PyErr_SetString(PyExc_TypeError,
++ "__name__ must be set to a string object");
+ return -1;
+ }
++ tmp = op->func_name;
++ Py_INCREF(value);
++ op->func_name = value;
++ Py_XDECREF(tmp);
+ return 0;
+ }
+-static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
+- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+- m->defaults = PyObject_Malloc(size);
+- if (unlikely(!m->defaults))
+- return PyErr_NoMemory();
+- memset(m->defaults, 0, size);
+- m->defaults_pyobjects = pyobjects;
+- m->defaults_size = size;
+- return m->defaults;
+-}
+-static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
+- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+- m->defaults_tuple = tuple;
+- Py_INCREF(tuple);
++static PyObject *
++__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
++{
++ Py_INCREF(op->func_qualname);
++ return op->func_qualname;
+ }
+-static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
+- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+- m->defaults_kwdict = dict;
+- Py_INCREF(dict);
++static int
++__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
++{
++ PyObject *tmp;
++#if PY_MAJOR_VERSION >= 3
++ if (unlikely(value == NULL || !PyUnicode_Check(value)))
++#else
++ if (unlikely(value == NULL || !PyString_Check(value)))
++#endif
++ {
++ PyErr_SetString(PyExc_TypeError,
++ "__qualname__ must be set to a string object");
++ return -1;
++ }
++ tmp = op->func_qualname;
++ Py_INCREF(value);
++ op->func_qualname = value;
++ Py_XDECREF(tmp);
++ return 0;
+ }
+-static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
+- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+- m->func_annotations = dict;
+- Py_INCREF(dict);
++static PyObject *
++__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
++{
++ PyObject *self;
++ self = m->func_closure;
++ if (self == NULL)
++ self = Py_None;
++ Py_INCREF(self);
++ return self;
+ }
+-
+-/* CythonFunction */
+-static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
+- PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
+- PyObject *op = __Pyx_CyFunction_Init(
+- PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
+- ml, flags, qualname, closure, module, globals, code
+- );
+- if (likely(op)) {
+- PyObject_GC_Track(op);
++static PyObject *
++__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
++{
++ if (unlikely(op->func_dict == NULL)) {
++ op->func_dict = PyDict_New();
++ if (unlikely(op->func_dict == NULL))
++ return NULL;
+ }
+- return op;
++ Py_INCREF(op->func_dict);
++ return op->func_dict;
+ }
+-
+-/* RaiseArgTupleInvalid */
+-static void __Pyx_RaiseArgtupleInvalid(
+- const char* func_name,
+- int exact,
+- Py_ssize_t num_min,
+- Py_ssize_t num_max,
+- Py_ssize_t num_found)
++static int
++__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
+ {
+- Py_ssize_t num_expected;
+- const char *more_or_less;
+- if (num_found < num_min) {
+- num_expected = num_min;
+- more_or_less = "at least";
+- } else {
+- num_expected = num_max;
+- more_or_less = "at most";
++ PyObject *tmp;
++ if (unlikely(value == NULL)) {
++ PyErr_SetString(PyExc_TypeError,
++ "function's dictionary may not be deleted");
++ return -1;
+ }
+- if (exact) {
+- more_or_less = "exactly";
++ if (unlikely(!PyDict_Check(value))) {
++ PyErr_SetString(PyExc_TypeError,
++ "setting function's dictionary to a non-dict");
++ return -1;
+ }
+- PyErr_Format(PyExc_TypeError,
+- "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+- func_name, more_or_less, num_expected,
+- (num_expected == 1) ? "" : "s", num_found);
++ tmp = op->func_dict;
++ Py_INCREF(value);
++ op->func_dict = value;
++ Py_XDECREF(tmp);
++ return 0;
+ }
+-
+-/* RaiseDoubleKeywords */
+-static void __Pyx_RaiseDoubleKeywordsError(
+- const char* func_name,
+- PyObject* kw_name)
++static PyObject *
++__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+ {
+- PyErr_Format(PyExc_TypeError,
+- #if PY_MAJOR_VERSION >= 3
+- "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+- #else
+- "%s() got multiple values for keyword argument '%s'", func_name,
+- PyString_AsString(kw_name));
+- #endif
++ Py_INCREF(op->func_globals);
++ return op->func_globals;
+ }
+-
+-/* ParseKeywords */
+-static int __Pyx_ParseOptionalKeywords(
+- PyObject *kwds,
+- PyObject **argnames[],
+- PyObject *kwds2,
+- PyObject *values[],
+- Py_ssize_t num_pos_args,
+- const char* function_name)
++static PyObject *
++__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
+ {
+- PyObject *key = 0, *value = 0;
+- Py_ssize_t pos = 0;
+- PyObject*** name;
+- PyObject*** first_kw_arg = argnames + num_pos_args;
+- while (PyDict_Next(kwds, &pos, &key, &value)) {
+- name = first_kw_arg;
+- while (*name && (**name != key)) name++;
+- if (*name) {
+- values[name-argnames] = value;
+- continue;
+- }
+- name = first_kw_arg;
+- #if PY_MAJOR_VERSION < 3
+- if (likely(PyString_Check(key))) {
+- while (*name) {
+- if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+- && _PyString_Eq(**name, key)) {
+- values[name-argnames] = value;
+- break;
+- }
+- name++;
+- }
+- if (*name) continue;
+- else {
+- PyObject*** argname = argnames;
+- while (argname != first_kw_arg) {
+- if ((**argname == key) || (
+- (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+- && _PyString_Eq(**argname, key))) {
+- goto arg_passed_twice;
+- }
+- argname++;
+- }
+- }
+- } else
+- #endif
+- if (likely(PyUnicode_Check(key))) {
+- while (*name) {
+- int cmp = (**name == key) ? 0 :
+- #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+- (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
+- #endif
+- PyUnicode_Compare(**name, key);
+- if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+- if (cmp == 0) {
+- values[name-argnames] = value;
+- break;
+- }
+- name++;
+- }
+- if (*name) continue;
+- else {
+- PyObject*** argname = argnames;
+- while (argname != first_kw_arg) {
+- int cmp = (**argname == key) ? 0 :
+- #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+- (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
+- #endif
+- PyUnicode_Compare(**argname, key);
+- if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+- if (cmp == 0) goto arg_passed_twice;
+- argname++;
+- }
+- }
+- } else
+- goto invalid_keyword_type;
+- if (kwds2) {
+- if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+- } else {
+- goto invalid_keyword;
+- }
+- }
+- return 0;
+-arg_passed_twice:
+- __Pyx_RaiseDoubleKeywordsError(function_name, key);
+- goto bad;
+-invalid_keyword_type:
+- PyErr_Format(PyExc_TypeError,
+- "%.200s() keywords must be strings", function_name);
+- goto bad;
+-invalid_keyword:
+- PyErr_Format(PyExc_TypeError,
+- #if PY_MAJOR_VERSION < 3
+- "%.200s() got an unexpected keyword argument '%.200s'",
+- function_name, PyString_AsString(key));
++ Py_INCREF(Py_None);
++ return Py_None;
++}
++static PyObject *
++__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
++{
++ PyObject* result = (op->func_code) ? op->func_code : Py_None;
++ Py_INCREF(result);
++ return result;
++}
++static int
++__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
++ int result = 0;
++ PyObject *res = op->defaults_getter((PyObject *) op);
++ if (unlikely(!res))
++ return -1;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
++ Py_INCREF(op->defaults_tuple);
++ op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
++ Py_INCREF(op->defaults_kwdict);
+ #else
+- "%s() got an unexpected keyword argument '%U'",
+- function_name, key);
++ op->defaults_tuple = PySequence_ITEM(res, 0);
++ if (unlikely(!op->defaults_tuple)) result = -1;
++ else {
++ op->defaults_kwdict = PySequence_ITEM(res, 1);
++ if (unlikely(!op->defaults_kwdict)) result = -1;
++ }
+ #endif
+-bad:
+- return -1;
++ Py_DECREF(res);
++ return result;
+ }
+-
+-/* PyObjectSetAttrStr */
+-#if CYTHON_USE_TYPE_SLOTS
+-static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+- PyTypeObject* tp = Py_TYPE(obj);
+- if (likely(tp->tp_setattro))
+- return tp->tp_setattro(obj, attr_name, value);
+-#if PY_MAJOR_VERSION < 3
+- if (likely(tp->tp_setattr))
+- return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+-#endif
+- return PyObject_SetAttr(obj, attr_name, value);
++static int
++__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
++ PyObject* tmp;
++ if (!value) {
++ value = Py_None;
++ } else if (value != Py_None && !PyTuple_Check(value)) {
++ PyErr_SetString(PyExc_TypeError,
++ "__defaults__ must be set to a tuple object");
++ return -1;
++ }
++ Py_INCREF(value);
++ tmp = op->defaults_tuple;
++ op->defaults_tuple = value;
++ Py_XDECREF(tmp);
++ return 0;
+ }
+-#endif
+-
+-/* PyIntBinop */
+-#if !CYTHON_COMPILING_IN_PYPY
+-static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
+- (void)inplace;
+- (void)zerodivision_check;
+- #if PY_MAJOR_VERSION < 3
+- if (likely(PyInt_CheckExact(op1))) {
+- const long b = intval;
+- long x;
+- long a = PyInt_AS_LONG(op1);
+- x = (long)((unsigned long)a + b);
+- if (likely((x^a) >= 0 || (x^b) >= 0))
+- return PyInt_FromLong(x);
+- return PyLong_Type.tp_as_number->nb_add(op1, op2);
++static PyObject *
++__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
++ PyObject* result = op->defaults_tuple;
++ if (unlikely(!result)) {
++ if (op->defaults_getter) {
++ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
++ result = op->defaults_tuple;
++ } else {
++ result = Py_None;
++ }
+ }
+- #endif
+- #if CYTHON_USE_PYLONG_INTERNALS
+- if (likely(PyLong_CheckExact(op1))) {
+- const long b = intval;
+- long a, x;
+-#ifdef HAVE_LONG_LONG
+- const PY_LONG_LONG llb = intval;
+- PY_LONG_LONG lla, llx;
+-#endif
+- const digit* digits = ((PyLongObject*)op1)->ob_digit;
+- const Py_ssize_t size = Py_SIZE(op1);
+- if (likely(__Pyx_sst_abs(size) <= 1)) {
+- a = likely(size) ? digits[0] : 0;
+- if (size == -1) a = -a;
++ Py_INCREF(result);
++ return result;
++}
++static int
++__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
++ PyObject* tmp;
++ if (!value) {
++ value = Py_None;
++ } else if (value != Py_None && !PyDict_Check(value)) {
++ PyErr_SetString(PyExc_TypeError,
++ "__kwdefaults__ must be set to a dict object");
++ return -1;
++ }
++ Py_INCREF(value);
++ tmp = op->defaults_kwdict;
++ op->defaults_kwdict = value;
++ Py_XDECREF(tmp);
++ return 0;
++}
++static PyObject *
++__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
++ PyObject* result = op->defaults_kwdict;
++ if (unlikely(!result)) {
++ if (op->defaults_getter) {
++ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
++ result = op->defaults_kwdict;
+ } else {
+- switch (size) {
+- case -2:
+- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+- a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+- a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case -3:
+- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+- a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 3:
+- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+- a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case -4:
+- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+- a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 4:
+- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+- a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
+- }
++ result = Py_None;
+ }
+- x = a + b;
+- return PyLong_FromLong(x);
+-#ifdef HAVE_LONG_LONG
+- long_long:
+- llx = lla + llb;
+- return PyLong_FromLongLong(llx);
+-#endif
+-
+-
+ }
+- #endif
+- if (PyFloat_CheckExact(op1)) {
+- const long b = intval;
+- double a = PyFloat_AS_DOUBLE(op1);
+- double result;
+- PyFPE_START_PROTECT("add", return NULL)
+- result = ((double)a) + (double)b;
+- PyFPE_END_PROTECT(result)
+- return PyFloat_FromDouble(result);
++ Py_INCREF(result);
++ return result;
++}
++static int
++__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
++ PyObject* tmp;
++ if (!value || value == Py_None) {
++ value = NULL;
++ } else if (!PyDict_Check(value)) {
++ PyErr_SetString(PyExc_TypeError,
++ "__annotations__ must be set to a dict object");
++ return -1;
+ }
+- return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
++ Py_XINCREF(value);
++ tmp = op->func_annotations;
++ op->func_annotations = value;
++ Py_XDECREF(tmp);
++ return 0;
+ }
+-#endif
+-
+-/* PyIntBinop */
+-#if !CYTHON_COMPILING_IN_PYPY
+-static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
+- (void)inplace;
+- (void)zerodivision_check;
+- #if PY_MAJOR_VERSION < 3
+- if (likely(PyInt_CheckExact(op1))) {
+- const long b = intval;
+- long x;
+- long a = PyInt_AS_LONG(op1);
+- x = (long)((unsigned long)a - b);
+- if (likely((x^a) >= 0 || (x^~b) >= 0))
+- return PyInt_FromLong(x);
+- return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
++static PyObject *
++__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
++ PyObject* result = op->func_annotations;
++ if (unlikely(!result)) {
++ result = PyDict_New();
++ if (unlikely(!result)) return NULL;
++ op->func_annotations = result;
+ }
+- #endif
+- #if CYTHON_USE_PYLONG_INTERNALS
+- if (likely(PyLong_CheckExact(op1))) {
+- const long b = intval;
+- long a, x;
+-#ifdef HAVE_LONG_LONG
+- const PY_LONG_LONG llb = intval;
+- PY_LONG_LONG lla, llx;
+-#endif
+- const digit* digits = ((PyLongObject*)op1)->ob_digit;
+- const Py_ssize_t size = Py_SIZE(op1);
+- if (likely(__Pyx_sst_abs(size) <= 1)) {
+- a = likely(size) ? digits[0] : 0;
+- if (size == -1) a = -a;
+- } else {
+- switch (size) {
+- case -2:
+- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+- a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 2:
+- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+- a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case -3:
+- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+- a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 3:
+- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+- a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case -4:
+- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+- a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+- lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
+-#endif
+- }
+- CYTHON_FALLTHROUGH;
+- case 4:
+- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+- a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+- break;
+-#ifdef HAVE_LONG_LONG
+- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+- lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+- goto long_long;
++ Py_INCREF(result);
++ return result;
++}
++static PyGetSetDef __pyx_CyFunction_getsets[] = {
++ {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
++ {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
++ {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
++ {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
++ {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
++ {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
++ {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
++ {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
++ {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
++ {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
++ {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
++ {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
++ {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
++ {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
++ {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
++ {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
++ {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
++ {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
++ {0, 0, 0, 0, 0}
++};
++static PyMemberDef __pyx_CyFunction_members[] = {
++ {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
++ {0, 0, 0, 0, 0}
++};
++static PyObject *
++__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
++{
++#if PY_MAJOR_VERSION >= 3
++ Py_INCREF(m->func_qualname);
++ return m->func_qualname;
++#else
++ return PyString_FromString(m->func.m_ml->ml_name);
+ #endif
+- }
+- CYTHON_FALLTHROUGH;
+- default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
+- }
+- }
+- x = a - b;
+- return PyLong_FromLong(x);
+-#ifdef HAVE_LONG_LONG
+- long_long:
+- llx = lla - llb;
+- return PyLong_FromLongLong(llx);
++}
++static PyMethodDef __pyx_CyFunction_methods[] = {
++ {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
++ {0, 0, 0, 0}
++};
++#if PY_VERSION_HEX < 0x030500A0
++#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
++#else
++#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
+ #endif
+-
+-
++static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
++ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
++ if (unlikely(op == NULL))
++ return NULL;
++ op->flags = flags;
++ __Pyx_CyFunction_weakreflist(op) = NULL;
++ op->func.m_ml = ml;
++ op->func.m_self = (PyObject *) op;
++ Py_XINCREF(closure);
++ op->func_closure = closure;
++ Py_XINCREF(module);
++ op->func.m_module = module;
++ op->func_dict = NULL;
++ op->func_name = NULL;
++ Py_INCREF(qualname);
++ op->func_qualname = qualname;
++ op->func_doc = NULL;
++ op->func_classobj = NULL;
++ op->func_globals = globals;
++ Py_INCREF(op->func_globals);
++ Py_XINCREF(code);
++ op->func_code = code;
++ op->defaults_pyobjects = 0;
++ op->defaults_size = 0;
++ op->defaults = NULL;
++ op->defaults_tuple = NULL;
++ op->defaults_kwdict = NULL;
++ op->defaults_getter = NULL;
++ op->func_annotations = NULL;
++ return (PyObject *) op;
++}
++static int
++__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
++{
++ Py_CLEAR(m->func_closure);
++ Py_CLEAR(m->func.m_module);
++ Py_CLEAR(m->func_dict);
++ Py_CLEAR(m->func_name);
++ Py_CLEAR(m->func_qualname);
++ Py_CLEAR(m->func_doc);
++ Py_CLEAR(m->func_globals);
++ Py_CLEAR(m->func_code);
++ Py_CLEAR(m->func_classobj);
++ Py_CLEAR(m->defaults_tuple);
++ Py_CLEAR(m->defaults_kwdict);
++ Py_CLEAR(m->func_annotations);
++ if (m->defaults) {
++ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
++ int i;
++ for (i = 0; i < m->defaults_pyobjects; i++)
++ Py_XDECREF(pydefaults[i]);
++ PyObject_Free(m->defaults);
++ m->defaults = NULL;
+ }
+- #endif
+- if (PyFloat_CheckExact(op1)) {
+- const long b = intval;
+- double a = PyFloat_AS_DOUBLE(op1);
+- double result;
+- PyFPE_START_PROTECT("subtract", return NULL)
+- result = ((double)a) - (double)b;
+- PyFPE_END_PROTECT(result)
+- return PyFloat_FromDouble(result);
++ return 0;
++}
++static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
++{
++ if (__Pyx_CyFunction_weakreflist(m) != NULL)
++ PyObject_ClearWeakRefs((PyObject *) m);
++ __Pyx_CyFunction_clear(m);
++ PyObject_GC_Del(m);
++}
++static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
++{
++ PyObject_GC_UnTrack(m);
++ __Pyx__CyFunction_dealloc(m);
++}
++static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
++{
++ Py_VISIT(m->func_closure);
++ Py_VISIT(m->func.m_module);
++ Py_VISIT(m->func_dict);
++ Py_VISIT(m->func_name);
++ Py_VISIT(m->func_qualname);
++ Py_VISIT(m->func_doc);
++ Py_VISIT(m->func_globals);
++ Py_VISIT(m->func_code);
++ Py_VISIT(m->func_classobj);
++ Py_VISIT(m->defaults_tuple);
++ Py_VISIT(m->defaults_kwdict);
++ if (m->defaults) {
++ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
++ int i;
++ for (i = 0; i < m->defaults_pyobjects; i++)
++ Py_VISIT(pydefaults[i]);
+ }
+- return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
++ return 0;
+ }
++static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
++{
++#if PY_MAJOR_VERSION < 3
++ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
++ if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
++ Py_INCREF(func);
++ return func;
++ }
++ if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
++ if (type == NULL)
++ type = (PyObject *)(Py_TYPE(obj));
++ return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
++ }
++ if (obj == Py_None)
++ obj = NULL;
+ #endif
+-
+-/* WriteUnraisableException */
+-static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
+- CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
+- int full_traceback, CYTHON_UNUSED int nogil) {
+- PyObject *old_exc, *old_val, *old_tb;
+- PyObject *ctx;
+- __Pyx_PyThreadState_declare
+-#ifdef WITH_THREAD
+- PyGILState_STATE state;
+- if (nogil)
+- state = PyGILState_Ensure();
+-#ifdef _MSC_VER
+- else state = (PyGILState_STATE)-1;
+-#endif
++ return __Pyx_PyMethod_New(func, obj, type);
++}
++static PyObject*
++__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
++{
++#if PY_MAJOR_VERSION >= 3
++ return PyUnicode_FromFormat("<cyfunction %U at %p>",
++ op->func_qualname, (void *)op);
++#else
++ return PyString_FromFormat("<cyfunction %s at %p>",
++ PyString_AsString(op->func_qualname), (void *)op);
+ #endif
+- __Pyx_PyThreadState_assign
+- __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
+- if (full_traceback) {
+- Py_XINCREF(old_exc);
+- Py_XINCREF(old_val);
+- Py_XINCREF(old_tb);
+- __Pyx_ErrRestore(old_exc, old_val, old_tb);
+- PyErr_PrintEx(1);
+- }
+- #if PY_MAJOR_VERSION < 3
+- ctx = PyString_FromString(name);
+- #else
+- ctx = PyUnicode_FromString(name);
+- #endif
+- __Pyx_ErrRestore(old_exc, old_val, old_tb);
+- if (!ctx) {
+- PyErr_WriteUnraisable(Py_None);
+- } else {
+- PyErr_WriteUnraisable(ctx);
+- Py_DECREF(ctx);
++}
++static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
++ PyCFunctionObject* f = (PyCFunctionObject*)func;
++ PyCFunction meth = f->m_ml->ml_meth;
++ Py_ssize_t size;
++ switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
++ case METH_VARARGS:
++ if (likely(kw == NULL || PyDict_Size(kw) == 0))
++ return (*meth)(self, arg);
++ break;
++ case METH_VARARGS | METH_KEYWORDS:
++ return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
++ case METH_NOARGS:
++ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
++ size = PyTuple_GET_SIZE(arg);
++ if (likely(size == 0))
++ return (*meth)(self, NULL);
++ PyErr_Format(PyExc_TypeError,
++ "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
++ f->m_ml->ml_name, size);
++ return NULL;
++ }
++ break;
++ case METH_O:
++ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
++ size = PyTuple_GET_SIZE(arg);
++ if (likely(size == 1)) {
++ PyObject *result, *arg0;
++ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
++ arg0 = PyTuple_GET_ITEM(arg, 0);
++ #else
++ arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
++ #endif
++ result = (*meth)(self, arg0);
++ #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
++ Py_DECREF(arg0);
++ #endif
++ return result;
++ }
++ PyErr_Format(PyExc_TypeError,
++ "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
++ f->m_ml->ml_name, size);
++ return NULL;
++ }
++ break;
++ default:
++ PyErr_SetString(PyExc_SystemError, "Bad call flags in "
++ "__Pyx_CyFunction_Call. METH_OLDARGS is no "
++ "longer supported!");
++ return NULL;
+ }
+-#ifdef WITH_THREAD
+- if (nogil)
+- PyGILState_Release(state);
+-#endif
+-}
+-
+-/* SwapException */
+-#if CYTHON_FAST_THREAD_STATE
+-static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- #if CYTHON_USE_EXC_INFO_STACK
+- _PyErr_StackItem *exc_info = tstate->exc_info;
+- tmp_type = exc_info->exc_type;
+- tmp_value = exc_info->exc_value;
+- tmp_tb = exc_info->exc_traceback;
+- exc_info->exc_type = *type;
+- exc_info->exc_value = *value;
+- exc_info->exc_traceback = *tb;
+- #else
+- tmp_type = tstate->exc_type;
+- tmp_value = tstate->exc_value;
+- tmp_tb = tstate->exc_traceback;
+- tstate->exc_type = *type;
+- tstate->exc_value = *value;
+- tstate->exc_traceback = *tb;
+- #endif
+- *type = tmp_type;
+- *value = tmp_value;
+- *tb = tmp_tb;
+-}
+-#else
+-static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
+- PyObject *tmp_type, *tmp_value, *tmp_tb;
+- PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
+- PyErr_SetExcInfo(*type, *value, *tb);
+- *type = tmp_type;
+- *value = tmp_value;
+- *tb = tmp_tb;
++ PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
++ f->m_ml->ml_name);
++ return NULL;
+ }
+-#endif
+-
+-/* SetItemInt */
+-static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
+- int r;
+- if (!j) return -1;
+- r = PyObject_SetItem(o, j, v);
+- Py_DECREF(j);
+- return r;
++static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
++ return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
+ }
+-static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
+- CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
+-#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
+- if (is_list || PyList_CheckExact(o)) {
+- Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
+- if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
+- PyObject* old = PyList_GET_ITEM(o, n);
+- Py_INCREF(v);
+- PyList_SET_ITEM(o, n, v);
+- Py_DECREF(old);
+- return 1;
++static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
++ PyObject *result;
++ __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
++ if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
++ Py_ssize_t argc;
++ PyObject *new_args;
++ PyObject *self;
++ argc = PyTuple_GET_SIZE(args);
++ new_args = PyTuple_GetSlice(args, 1, argc);
++ if (unlikely(!new_args))
++ return NULL;
++ self = PyTuple_GetItem(args, 0);
++ if (unlikely(!self)) {
++ Py_DECREF(new_args);
++ return NULL;
+ }
++ result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
++ Py_DECREF(new_args);
+ } else {
+- PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+- if (likely(m && m->sq_ass_item)) {
+- if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+- Py_ssize_t l = m->sq_length(o);
+- if (likely(l >= 0)) {
+- i += l;
+- } else {
+- if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+- return -1;
+- PyErr_Clear();
+- }
+- }
+- return m->sq_ass_item(o, i, v);
+- }
++ result = __Pyx_CyFunction_Call(func, args, kw);
+ }
++ return result;
++}
++static PyTypeObject __pyx_CyFunctionType_type = {
++ PyVarObject_HEAD_INIT(0, 0)
++ "cython_function_or_method",
++ sizeof(__pyx_CyFunctionObject),
++ 0,
++ (destructor) __Pyx_CyFunction_dealloc,
++ 0,
++ 0,
++ 0,
++#if PY_MAJOR_VERSION < 3
++ 0,
+ #else
+-#if CYTHON_COMPILING_IN_PYPY
+- if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
++ 0,
++#endif
++ (reprfunc) __Pyx_CyFunction_repr,
++ 0,
++ 0,
++ 0,
++ 0,
++ __Pyx_CyFunction_CallAsMethod,
++ 0,
++ 0,
++ 0,
++ 0,
++ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
++ 0,
++ (traverseproc) __Pyx_CyFunction_traverse,
++ (inquiry) __Pyx_CyFunction_clear,
++ 0,
++#if PY_VERSION_HEX < 0x030500A0
++ offsetof(__pyx_CyFunctionObject, func_weakreflist),
+ #else
+- if (is_list || PySequence_Check(o))
++ offsetof(PyCFunctionObject, m_weakreflist),
+ #endif
+- {
+- return PySequence_SetItem(o, i, v);
+- }
++ 0,
++ 0,
++ __pyx_CyFunction_methods,
++ __pyx_CyFunction_members,
++ __pyx_CyFunction_getsets,
++ 0,
++ 0,
++ __Pyx_CyFunction_descr_get,
++ 0,
++ offsetof(__pyx_CyFunctionObject, func_dict),
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++#if PY_VERSION_HEX >= 0x030400a1
++ 0,
+ #endif
+- return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
+-}
+-
+-/* FastTypeChecks */
+-#if CYTHON_COMPILING_IN_CPYTHON
+-static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
+- while (a) {
+- a = a->tp_base;
+- if (a == b)
+- return 1;
++#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
++ 0,
++#endif
++#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
++ 0,
++#endif
++#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
++ 0,
++#endif
++};
++static int __pyx_CyFunction_init(void) {
++ __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
++ if (unlikely(__pyx_CyFunctionType == NULL)) {
++ return -1;
+ }
+- return b == &PyBaseObject_Type;
++ return 0;
+ }
+-static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
+- PyObject *mro;
+- if (a == b) return 1;
+- mro = a->tp_mro;
+- if (likely(mro)) {
+- Py_ssize_t i, n;
+- n = PyTuple_GET_SIZE(mro);
+- for (i = 0; i < n; i++) {
+- if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
+- return 1;
+- }
+- return 0;
++static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
++ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
++ m->defaults = PyObject_Malloc(size);
++ if (unlikely(!m->defaults))
++ return PyErr_NoMemory();
++ memset(m->defaults, 0, size);
++ m->defaults_pyobjects = pyobjects;
++ m->defaults_size = size;
++ return m->defaults;
++}
++static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
++ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
++ m->defaults_tuple = tuple;
++ Py_INCREF(tuple);
++}
++static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
++ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
++ m->defaults_kwdict = dict;
++ Py_INCREF(dict);
++}
++static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
++ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
++ m->func_annotations = dict;
++ Py_INCREF(dict);
++}
++
++/* CythonFunction */
++static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
++ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
++ PyObject *op = __Pyx_CyFunction_Init(
++ PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
++ ml, flags, qualname, closure, module, globals, code
++ );
++ if (likely(op)) {
++ PyObject_GC_Track(op);
+ }
+- return __Pyx_InBases(a, b);
++ return op;
+ }
+-#if PY_MAJOR_VERSION == 2
+-static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
+- PyObject *exception, *value, *tb;
+- int res;
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- __Pyx_ErrFetch(&exception, &value, &tb);
+- res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
+- if (unlikely(res == -1)) {
+- PyErr_WriteUnraisable(err);
+- res = 0;
++
++/* RaiseArgTupleInvalid */
++static void __Pyx_RaiseArgtupleInvalid(
++ const char* func_name,
++ int exact,
++ Py_ssize_t num_min,
++ Py_ssize_t num_max,
++ Py_ssize_t num_found)
++{
++ Py_ssize_t num_expected;
++ const char *more_or_less;
++ if (num_found < num_min) {
++ num_expected = num_min;
++ more_or_less = "at least";
++ } else {
++ num_expected = num_max;
++ more_or_less = "at most";
+ }
+- if (!res) {
+- res = PyObject_IsSubclass(err, exc_type2);
+- if (unlikely(res == -1)) {
+- PyErr_WriteUnraisable(err);
+- res = 0;
+- }
++ if (exact) {
++ more_or_less = "exactly";
+ }
+- __Pyx_ErrRestore(exception, value, tb);
+- return res;
++ PyErr_Format(PyExc_TypeError,
++ "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
++ func_name, more_or_less, num_expected,
++ (num_expected == 1) ? "" : "s", num_found);
+ }
+-#else
+-static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
+- int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
+- if (!res) {
+- res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
+- }
+- return res;
++
++/* RaiseDoubleKeywords */
++static void __Pyx_RaiseDoubleKeywordsError(
++ const char* func_name,
++ PyObject* kw_name)
++{
++ PyErr_Format(PyExc_TypeError,
++ #if PY_MAJOR_VERSION >= 3
++ "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
++ #else
++ "%s() got multiple values for keyword argument '%s'", func_name,
++ PyString_AsString(kw_name));
++ #endif
+ }
+-#endif
+-static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
+- Py_ssize_t i, n;
+- assert(PyExceptionClass_Check(exc_type));
+- n = PyTuple_GET_SIZE(tuple);
+-#if PY_MAJOR_VERSION >= 3
+- for (i=0; i<n; i++) {
+- if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
+- }
+-#endif
+- for (i=0; i<n; i++) {
+- PyObject *t = PyTuple_GET_ITEM(tuple, i);
++
++/* ParseKeywords */
++static int __Pyx_ParseOptionalKeywords(
++ PyObject *kwds,
++ PyObject **argnames[],
++ PyObject *kwds2,
++ PyObject *values[],
++ Py_ssize_t num_pos_args,
++ const char* function_name)
++{
++ PyObject *key = 0, *value = 0;
++ Py_ssize_t pos = 0;
++ PyObject*** name;
++ PyObject*** first_kw_arg = argnames + num_pos_args;
++ while (PyDict_Next(kwds, &pos, &key, &value)) {
++ name = first_kw_arg;
++ while (*name && (**name != key)) name++;
++ if (*name) {
++ values[name-argnames] = value;
++ continue;
++ }
++ name = first_kw_arg;
+ #if PY_MAJOR_VERSION < 3
+- if (likely(exc_type == t)) return 1;
++ if (likely(PyString_Check(key))) {
++ while (*name) {
++ if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
++ && _PyString_Eq(**name, key)) {
++ values[name-argnames] = value;
++ break;
++ }
++ name++;
++ }
++ if (*name) continue;
++ else {
++ PyObject*** argname = argnames;
++ while (argname != first_kw_arg) {
++ if ((**argname == key) || (
++ (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
++ && _PyString_Eq(**argname, key))) {
++ goto arg_passed_twice;
++ }
++ argname++;
++ }
++ }
++ } else
+ #endif
+- if (likely(PyExceptionClass_Check(t))) {
+- if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
++ if (likely(PyUnicode_Check(key))) {
++ while (*name) {
++ int cmp = (**name == key) ? 0 :
++ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
++ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
++ #endif
++ PyUnicode_Compare(**name, key);
++ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
++ if (cmp == 0) {
++ values[name-argnames] = value;
++ break;
++ }
++ name++;
++ }
++ if (*name) continue;
++ else {
++ PyObject*** argname = argnames;
++ while (argname != first_kw_arg) {
++ int cmp = (**argname == key) ? 0 :
++ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
++ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
++ #endif
++ PyUnicode_Compare(**argname, key);
++ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
++ if (cmp == 0) goto arg_passed_twice;
++ argname++;
++ }
++ }
++ } else
++ goto invalid_keyword_type;
++ if (kwds2) {
++ if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+ } else {
++ goto invalid_keyword;
+ }
+ }
+ return 0;
++arg_passed_twice:
++ __Pyx_RaiseDoubleKeywordsError(function_name, key);
++ goto bad;
++invalid_keyword_type:
++ PyErr_Format(PyExc_TypeError,
++ "%.200s() keywords must be strings", function_name);
++ goto bad;
++invalid_keyword:
++ PyErr_Format(PyExc_TypeError,
++ #if PY_MAJOR_VERSION < 3
++ "%.200s() got an unexpected keyword argument '%.200s'",
++ function_name, PyString_AsString(key));
++ #else
++ "%s() got an unexpected keyword argument '%U'",
++ function_name, key);
++ #endif
++bad:
++ return -1;
+ }
+-static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
+- if (likely(err == exc_type)) return 1;
+- if (likely(PyExceptionClass_Check(err))) {
+- if (likely(PyExceptionClass_Check(exc_type))) {
+- return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
+- } else if (likely(PyTuple_Check(exc_type))) {
+- return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
+- } else {
+- }
+- }
+- return PyErr_GivenExceptionMatches(err, exc_type);
++
++/* PyObjectSetAttrStr */
++#if CYTHON_USE_TYPE_SLOTS
++static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
++ PyTypeObject* tp = Py_TYPE(obj);
++ if (likely(tp->tp_setattro))
++ return tp->tp_setattro(obj, attr_name, value);
++#if PY_MAJOR_VERSION < 3
++ if (likely(tp->tp_setattr))
++ return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
++#endif
++ return PyObject_SetAttr(obj, attr_name, value);
+ }
+-static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
+- assert(PyExceptionClass_Check(exc_type1));
+- assert(PyExceptionClass_Check(exc_type2));
+- if (likely(err == exc_type1 || err == exc_type2)) return 1;
+- if (likely(PyExceptionClass_Check(err))) {
+- return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
++#endif
++
++/* PyIntBinop */
++#if !CYTHON_COMPILING_IN_PYPY
++static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
++ (void)inplace;
++ (void)zerodivision_check;
++ #if PY_MAJOR_VERSION < 3
++ if (likely(PyInt_CheckExact(op1))) {
++ const long b = intval;
++ long x;
++ long a = PyInt_AS_LONG(op1);
++ x = (long)((unsigned long)a + b);
++ if (likely((x^a) >= 0 || (x^b) >= 0))
++ return PyInt_FromLong(x);
++ return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+- return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
+-}
++ #endif
++ #if CYTHON_USE_PYLONG_INTERNALS
++ if (likely(PyLong_CheckExact(op1))) {
++ const long b = intval;
++ long a, x;
++#ifdef HAVE_LONG_LONG
++ const PY_LONG_LONG llb = intval;
++ PY_LONG_LONG lla, llx;
++#endif
++ const digit* digits = ((PyLongObject*)op1)->ob_digit;
++ const Py_ssize_t size = Py_SIZE(op1);
++ if (likely(__Pyx_sst_abs(size) <= 1)) {
++ a = likely(size) ? digits[0] : 0;
++ if (size == -1) a = -a;
++ } else {
++ switch (size) {
++ case -2:
++ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
++ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
++ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case -3:
++ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
++ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case 3:
++ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
++ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case -4:
++ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
++ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
+ #endif
+-
+-/* ExtTypeTest */
+-static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
+- if (unlikely(!type)) {
+- PyErr_SetString(PyExc_SystemError, "Missing type object");
+- return 0;
+- }
+- if (likely(__Pyx_TypeCheck(obj, type)))
+- return 1;
+- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
+- Py_TYPE(obj)->tp_name, type->tp_name);
+- return 0;
+-}
+-
+-/* DictGetItem */
+-#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
+-static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
+- PyObject *value;
+- value = PyDict_GetItemWithError(d, key);
+- if (unlikely(!value)) {
+- if (!PyErr_Occurred()) {
+- if (unlikely(PyTuple_Check(key))) {
+- PyObject* args = PyTuple_Pack(1, key);
+- if (likely(args)) {
+- PyErr_SetObject(PyExc_KeyError, args);
+- Py_DECREF(args);
+- }
+- } else {
+- PyErr_SetObject(PyExc_KeyError, key);
++ }
++ CYTHON_FALLTHROUGH;
++ case 4:
++ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
++ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ }
+- return NULL;
+- }
+- Py_INCREF(value);
+- return value;
+-}
++ x = a + b;
++ return PyLong_FromLong(x);
++#ifdef HAVE_LONG_LONG
++ long_long:
++ llx = lla + llb;
++ return PyLong_FromLongLong(llx);
+ #endif
+-
+-/* RaiseTooManyValuesToUnpack */
+-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+- PyErr_Format(PyExc_ValueError,
+- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+-}
+-
+-/* RaiseNeedMoreValuesToUnpack */
+-static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+- PyErr_Format(PyExc_ValueError,
+- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
+- index, (index == 1) ? "" : "s");
+-}
+-
+-/* IterFinish */
+-static CYTHON_INLINE int __Pyx_IterFinish(void) {
+-#if CYTHON_FAST_THREAD_STATE
+- PyThreadState *tstate = __Pyx_PyThreadState_Current;
+- PyObject* exc_type = tstate->curexc_type;
+- if (unlikely(exc_type)) {
+- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
+- PyObject *exc_value, *exc_tb;
+- exc_value = tstate->curexc_value;
+- exc_tb = tstate->curexc_traceback;
+- tstate->curexc_type = 0;
+- tstate->curexc_value = 0;
+- tstate->curexc_traceback = 0;
+- Py_DECREF(exc_type);
+- Py_XDECREF(exc_value);
+- Py_XDECREF(exc_tb);
+- return 0;
+- } else {
+- return -1;
+- }
+- }
+- return 0;
+-#else
+- if (unlikely(PyErr_Occurred())) {
+- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+- PyErr_Clear();
+- return 0;
+- } else {
+- return -1;
+- }
++
++
+ }
+- return 0;
+-#endif
+-}
+-
+-/* UnpackItemEndCheck */
+-static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+- if (unlikely(retval)) {
+- Py_DECREF(retval);
+- __Pyx_RaiseTooManyValuesError(expected);
+- return -1;
+- } else {
+- return __Pyx_IterFinish();
++ #endif
++ if (PyFloat_CheckExact(op1)) {
++ const long b = intval;
++ double a = PyFloat_AS_DOUBLE(op1);
++ double result;
++ PyFPE_START_PROTECT("add", return NULL)
++ result = ((double)a) + (double)b;
++ PyFPE_END_PROTECT(result)
++ return PyFloat_FromDouble(result);
+ }
+- return 0;
++ return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
+ }
++#endif
+
+-/* Import */
+-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+- PyObject *empty_list = 0;
+- PyObject *module = 0;
+- PyObject *global_dict = 0;
+- PyObject *empty_dict = 0;
+- PyObject *list;
++/* PyIntBinop */
++#if !CYTHON_COMPILING_IN_PYPY
++static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
++ (void)inplace;
++ (void)zerodivision_check;
+ #if PY_MAJOR_VERSION < 3
+- PyObject *py_import;
+- py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+- if (!py_import)
+- goto bad;
+- #endif
+- if (from_list)
+- list = from_list;
+- else {
+- empty_list = PyList_New(0);
+- if (!empty_list)
+- goto bad;
+- list = empty_list;
++ if (likely(PyInt_CheckExact(op1))) {
++ const long b = intval;
++ long x;
++ long a = PyInt_AS_LONG(op1);
++ x = (long)((unsigned long)a - b);
++ if (likely((x^a) >= 0 || (x^~b) >= 0))
++ return PyInt_FromLong(x);
++ return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
+ }
+- global_dict = PyModule_GetDict(__pyx_m);
+- if (!global_dict)
+- goto bad;
+- empty_dict = PyDict_New();
+- if (!empty_dict)
+- goto bad;
+- {
+- #if PY_MAJOR_VERSION >= 3
+- if (level == -1) {
+- if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
+- module = PyImport_ImportModuleLevelObject(
+- name, global_dict, empty_dict, list, 1);
+- if (!module) {
+- if (!PyErr_ExceptionMatches(PyExc_ImportError))
+- goto bad;
+- PyErr_Clear();
+- }
++ #endif
++ #if CYTHON_USE_PYLONG_INTERNALS
++ if (likely(PyLong_CheckExact(op1))) {
++ const long b = intval;
++ long a, x;
++#ifdef HAVE_LONG_LONG
++ const PY_LONG_LONG llb = intval;
++ PY_LONG_LONG lla, llx;
++#endif
++ const digit* digits = ((PyLongObject*)op1)->ob_digit;
++ const Py_ssize_t size = Py_SIZE(op1);
++ if (likely(__Pyx_sst_abs(size) <= 1)) {
++ a = likely(size) ? digits[0] : 0;
++ if (size == -1) a = -a;
++ } else {
++ switch (size) {
++ case -2:
++ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
++ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case 2:
++ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
++ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case -3:
++ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
++ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case 3:
++ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
++ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case -4:
++ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
++ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
++ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ case 4:
++ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
++ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
++ break;
++#ifdef HAVE_LONG_LONG
++ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
++ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
++ goto long_long;
++#endif
++ }
++ CYTHON_FALLTHROUGH;
++ default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
+ }
+- level = 0;
+- }
+- #endif
+- if (!module) {
+- #if PY_MAJOR_VERSION < 3
+- PyObject *py_level = PyInt_FromLong(level);
+- if (!py_level)
+- goto bad;
+- module = PyObject_CallFunctionObjArgs(py_import,
+- name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
+- Py_DECREF(py_level);
+- #else
+- module = PyImport_ImportModuleLevelObject(
+- name, global_dict, empty_dict, list, level);
+- #endif
+ }
+- }
+-bad:
+- #if PY_MAJOR_VERSION < 3
+- Py_XDECREF(py_import);
+- #endif
+- Py_XDECREF(empty_list);
+- Py_XDECREF(empty_dict);
+- return module;
+-}
+-
+-/* ImportFrom */
+-static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
+- PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
+- if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+- PyErr_Format(PyExc_ImportError,
+- #if PY_MAJOR_VERSION < 3
+- "cannot import name %.230s", PyString_AS_STRING(name));
+- #else
+- "cannot import name %S", name);
+- #endif
+- }
+- return value;
+-}
+-
+-/* HasAttr */
+-static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
+- PyObject *r;
+- if (unlikely(!__Pyx_PyBaseString_Check(n))) {
+- PyErr_SetString(PyExc_TypeError,
+- "hasattr(): attribute name must be string");
+- return -1;
+- }
+- r = __Pyx_GetAttr(o, n);
+- if (unlikely(!r)) {
+- PyErr_Clear();
+- return 0;
+- } else {
+- Py_DECREF(r);
+- return 1;
+- }
+-}
+-
+-/* PyObject_GenericGetAttrNoDict */
+-#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+-static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
+- PyErr_Format(PyExc_AttributeError,
+-#if PY_MAJOR_VERSION >= 3
+- "'%.50s' object has no attribute '%U'",
+- tp->tp_name, attr_name);
+-#else
+- "'%.50s' object has no attribute '%.400s'",
+- tp->tp_name, PyString_AS_STRING(attr_name));
++ x = a - b;
++ return PyLong_FromLong(x);
++#ifdef HAVE_LONG_LONG
++ long_long:
++ llx = lla - llb;
++ return PyLong_FromLongLong(llx);
+ #endif
+- return NULL;
+-}
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
+- PyObject *descr;
+- PyTypeObject *tp = Py_TYPE(obj);
+- if (unlikely(!PyString_Check(attr_name))) {
+- return PyObject_GenericGetAttr(obj, attr_name);
+- }
+- assert(!tp->tp_dictoffset);
+- descr = _PyType_Lookup(tp, attr_name);
+- if (unlikely(!descr)) {
+- return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
++
++
+ }
+- Py_INCREF(descr);
+- #if PY_MAJOR_VERSION < 3
+- if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
+ #endif
+- {
+- descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
+- if (unlikely(f)) {
+- PyObject *res = f(descr, obj, (PyObject *)tp);
+- Py_DECREF(descr);
+- return res;
+- }
++ if (PyFloat_CheckExact(op1)) {
++ const long b = intval;
++ double a = PyFloat_AS_DOUBLE(op1);
++ double result;
++ PyFPE_START_PROTECT("subtract", return NULL)
++ result = ((double)a) - (double)b;
++ PyFPE_END_PROTECT(result)
++ return PyFloat_FromDouble(result);
+ }
+- return descr;
++ return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
+ }
+ #endif
+
+-/* PyObject_GenericGetAttr */
+-#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+-static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
+- if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
+- return PyObject_GenericGetAttr(obj, attr_name);
+- }
+- return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
+-}
++/* WriteUnraisableException */
++static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
++ CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
++ int full_traceback, CYTHON_UNUSED int nogil) {
++ PyObject *old_exc, *old_val, *old_tb;
++ PyObject *ctx;
++ __Pyx_PyThreadState_declare
++#ifdef WITH_THREAD
++ PyGILState_STATE state;
++ if (nogil)
++ state = PyGILState_Ensure();
++#ifdef _MSC_VER
++ else state = (PyGILState_STATE)-1;
+ #endif
+-
+-/* SetVTable */
+-static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
+-#if PY_VERSION_HEX >= 0x02070000
+- PyObject *ob = PyCapsule_New(vtable, 0, 0);
+-#else
+- PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
+ #endif
+- if (!ob)
+- goto bad;
+- if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
+- goto bad;
+- Py_DECREF(ob);
+- return 0;
+-bad:
+- Py_XDECREF(ob);
+- return -1;
+-}
+-
+-/* PyObjectGetAttrStrNoError */
+-static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
+- __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+- if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
+- __Pyx_PyErr_Clear();
+-}
+-static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
+- PyObject *result;
+-#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
+- PyTypeObject* tp = Py_TYPE(obj);
+- if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
+- return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
++ __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
++ if (full_traceback) {
++ Py_XINCREF(old_exc);
++ Py_XINCREF(old_val);
++ Py_XINCREF(old_tb);
++ __Pyx_ErrRestore(old_exc, old_val, old_tb);
++ PyErr_PrintEx(1);
+ }
+-#endif
+- result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
+- if (unlikely(!result)) {
+- __Pyx_PyObject_GetAttrStr_ClearAttributeError();
++ #if PY_MAJOR_VERSION < 3
++ ctx = PyString_FromString(name);
++ #else
++ ctx = PyUnicode_FromString(name);
++ #endif
++ __Pyx_ErrRestore(old_exc, old_val, old_tb);
++ if (!ctx) {
++ PyErr_WriteUnraisable(Py_None);
++ } else {
++ PyErr_WriteUnraisable(ctx);
++ Py_DECREF(ctx);
+ }
+- return result;
++#ifdef WITH_THREAD
++ if (nogil)
++ PyGILState_Release(state);
++#endif
+ }
+
+-/* SetupReduce */
+-static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
+- int ret;
+- PyObject *name_attr;
+- name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
+- if (likely(name_attr)) {
+- ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
+- } else {
+- ret = -1;
+- }
+- if (unlikely(ret < 0)) {
+- PyErr_Clear();
+- ret = 0;
+- }
+- Py_XDECREF(name_attr);
+- return ret;
++/* SwapException */
++#if CYTHON_FAST_THREAD_STATE
++static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ #if CYTHON_USE_EXC_INFO_STACK
++ _PyErr_StackItem *exc_info = tstate->exc_info;
++ tmp_type = exc_info->exc_type;
++ tmp_value = exc_info->exc_value;
++ tmp_tb = exc_info->exc_traceback;
++ exc_info->exc_type = *type;
++ exc_info->exc_value = *value;
++ exc_info->exc_traceback = *tb;
++ #else
++ tmp_type = tstate->exc_type;
++ tmp_value = tstate->exc_value;
++ tmp_tb = tstate->exc_traceback;
++ tstate->exc_type = *type;
++ tstate->exc_value = *value;
++ tstate->exc_traceback = *tb;
++ #endif
++ *type = tmp_type;
++ *value = tmp_value;
++ *tb = tmp_tb;
+ }
+-static int __Pyx_setup_reduce(PyObject* type_obj) {
+- int ret = 0;
+- PyObject *object_reduce = NULL;
+- PyObject *object_reduce_ex = NULL;
+- PyObject *reduce = NULL;
+- PyObject *reduce_ex = NULL;
+- PyObject *reduce_cython = NULL;
+- PyObject *setstate = NULL;
+- PyObject *setstate_cython = NULL;
+-#if CYTHON_USE_PYTYPE_LOOKUP
+- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
+-#else
+- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
+-#endif
+-#if CYTHON_USE_PYTYPE_LOOKUP
+- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
+-#else
+- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
+-#endif
+- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
+- if (reduce_ex == object_reduce_ex) {
+-#if CYTHON_USE_PYTYPE_LOOKUP
+- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
+ #else
+- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
++static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
++ PyObject *tmp_type, *tmp_value, *tmp_tb;
++ PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
++ PyErr_SetExcInfo(*type, *value, *tb);
++ *type = tmp_type;
++ *value = tmp_value;
++ *tb = tmp_tb;
++}
+ #endif
+- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
+- if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
+- reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
+- if (likely(reduce_cython)) {
+- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
+- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
+- } else if (reduce == object_reduce || PyErr_Occurred()) {
+- goto __PYX_BAD;
+- }
+- setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
+- if (!setstate) PyErr_Clear();
+- if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
+- setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
+- if (likely(setstate_cython)) {
+- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
+- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
+- } else if (!setstate || PyErr_Occurred()) {
+- goto __PYX_BAD;
++
++/* SetItemInt */
++static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
++ int r;
++ if (!j) return -1;
++ r = PyObject_SetItem(o, j, v);
++ Py_DECREF(j);
++ return r;
++}
++static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
++ CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
++#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
++ if (is_list || PyList_CheckExact(o)) {
++ Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
++ if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
++ PyObject* old = PyList_GET_ITEM(o, n);
++ Py_INCREF(v);
++ PyList_SET_ITEM(o, n, v);
++ Py_DECREF(old);
++ return 1;
++ }
++ } else {
++ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
++ if (likely(m && m->sq_ass_item)) {
++ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
++ Py_ssize_t l = m->sq_length(o);
++ if (likely(l >= 0)) {
++ i += l;
++ } else {
++ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
++ return -1;
++ PyErr_Clear();
+ }
+ }
+- PyType_Modified((PyTypeObject*)type_obj);
++ return m->sq_ass_item(o, i, v);
+ }
+ }
+- goto __PYX_GOOD;
+-__PYX_BAD:
+- if (!PyErr_Occurred())
+- PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
+- ret = -1;
+-__PYX_GOOD:
+-#if !CYTHON_USE_PYTYPE_LOOKUP
+- Py_XDECREF(object_reduce);
+- Py_XDECREF(object_reduce_ex);
++#else
++#if CYTHON_COMPILING_IN_PYPY
++ if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
++#else
++ if (is_list || PySequence_Check(o))
+ #endif
+- Py_XDECREF(reduce);
+- Py_XDECREF(reduce_ex);
+- Py_XDECREF(reduce_cython);
+- Py_XDECREF(setstate);
+- Py_XDECREF(setstate_cython);
+- return ret;
++ {
++ return PySequence_SetItem(o, i, v);
++ }
++#endif
++ return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
+ }
+
+-/* CalculateMetaclass */
+-static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
+- Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
+- for (i=0; i < nbases; i++) {
+- PyTypeObject *tmptype;
+- PyObject *tmp = PyTuple_GET_ITEM(bases, i);
+- tmptype = Py_TYPE(tmp);
+-#if PY_MAJOR_VERSION < 3
+- if (tmptype == &PyClass_Type)
+- continue;
+-#endif
+- if (!metaclass) {
+- metaclass = tmptype;
+- continue;
++/* FastTypeChecks */
++#if CYTHON_COMPILING_IN_CPYTHON
++static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
++ while (a) {
++ a = a->tp_base;
++ if (a == b)
++ return 1;
++ }
++ return b == &PyBaseObject_Type;
++}
++static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
++ PyObject *mro;
++ if (a == b) return 1;
++ mro = a->tp_mro;
++ if (likely(mro)) {
++ Py_ssize_t i, n;
++ n = PyTuple_GET_SIZE(mro);
++ for (i = 0; i < n; i++) {
++ if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
++ return 1;
+ }
+- if (PyType_IsSubtype(metaclass, tmptype))
+- continue;
+- if (PyType_IsSubtype(tmptype, metaclass)) {
+- metaclass = tmptype;
+- continue;
++ return 0;
++ }
++ return __Pyx_InBases(a, b);
++}
++#if PY_MAJOR_VERSION == 2
++static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
++ PyObject *exception, *value, *tb;
++ int res;
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ __Pyx_ErrFetch(&exception, &value, &tb);
++ res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
++ if (unlikely(res == -1)) {
++ PyErr_WriteUnraisable(err);
++ res = 0;
++ }
++ if (!res) {
++ res = PyObject_IsSubclass(err, exc_type2);
++ if (unlikely(res == -1)) {
++ PyErr_WriteUnraisable(err);
++ res = 0;
+ }
+- PyErr_SetString(PyExc_TypeError,
+- "metaclass conflict: "
+- "the metaclass of a derived class "
+- "must be a (non-strict) subclass "
+- "of the metaclasses of all its bases");
+- return NULL;
+ }
+- if (!metaclass) {
+-#if PY_MAJOR_VERSION < 3
+- metaclass = &PyClass_Type;
++ __Pyx_ErrRestore(exception, value, tb);
++ return res;
++}
+ #else
+- metaclass = &PyType_Type;
+-#endif
++static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
++ int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
++ if (!res) {
++ res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
+ }
+- Py_INCREF((PyObject*) metaclass);
+- return (PyObject*) metaclass;
++ return res;
+ }
+-
+-/* Py3ClassCreate */
+-static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
+- PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
+- PyObject *ns;
+- if (metaclass) {
+- PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
+- if (prep) {
+- PyObject *pargs = PyTuple_Pack(2, name, bases);
+- if (unlikely(!pargs)) {
+- Py_DECREF(prep);
+- return NULL;
+- }
+- ns = PyObject_Call(prep, pargs, mkw);
+- Py_DECREF(prep);
+- Py_DECREF(pargs);
++#endif
++static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
++ Py_ssize_t i, n;
++ assert(PyExceptionClass_Check(exc_type));
++ n = PyTuple_GET_SIZE(tuple);
++#if PY_MAJOR_VERSION >= 3
++ for (i=0; i<n; i++) {
++ if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
++ }
++#endif
++ for (i=0; i<n; i++) {
++ PyObject *t = PyTuple_GET_ITEM(tuple, i);
++ #if PY_MAJOR_VERSION < 3
++ if (likely(exc_type == t)) return 1;
++ #endif
++ if (likely(PyExceptionClass_Check(t))) {
++ if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
+ } else {
+- if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
+- return NULL;
+- PyErr_Clear();
+- ns = PyDict_New();
+ }
+- } else {
+- ns = PyDict_New();
+ }
+- if (unlikely(!ns))
+- return NULL;
+- if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
+- if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
+- if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
+- return ns;
+-bad:
+- Py_DECREF(ns);
+- return NULL;
++ return 0;
+ }
+-static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
+- PyObject *dict, PyObject *mkw,
+- int calculate_metaclass, int allow_py2_metaclass) {
+- PyObject *result, *margs;
+- PyObject *owned_metaclass = NULL;
+- if (allow_py2_metaclass) {
+- owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
+- if (owned_metaclass) {
+- metaclass = owned_metaclass;
+- } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
+- PyErr_Clear();
++static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
++ if (likely(err == exc_type)) return 1;
++ if (likely(PyExceptionClass_Check(err))) {
++ if (likely(PyExceptionClass_Check(exc_type))) {
++ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
++ } else if (likely(PyTuple_Check(exc_type))) {
++ return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
+ } else {
+- return NULL;
+ }
+ }
+- if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
+- metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
+- Py_XDECREF(owned_metaclass);
+- if (unlikely(!metaclass))
+- return NULL;
+- owned_metaclass = metaclass;
+- }
+- margs = PyTuple_Pack(3, name, bases, dict);
+- if (unlikely(!margs)) {
+- result = NULL;
+- } else {
+- result = PyObject_Call(metaclass, margs, mkw);
+- Py_DECREF(margs);
++ return PyErr_GivenExceptionMatches(err, exc_type);
++}
++static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
++ assert(PyExceptionClass_Check(exc_type1));
++ assert(PyExceptionClass_Check(exc_type2));
++ if (likely(err == exc_type1 || err == exc_type2)) return 1;
++ if (likely(PyExceptionClass_Check(err))) {
++ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
+ }
+- Py_XDECREF(owned_metaclass);
+- return result;
++ return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
+ }
++#endif
+
+-/* GetNameInClass */
+-static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
+- PyObject *result;
+- __Pyx_PyThreadState_declare
+- __Pyx_PyThreadState_assign
+- if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
+- return NULL;
+- __Pyx_PyErr_Clear();
+- __Pyx_GetModuleGlobalNameUncached(result, name);
+- return result;
+-}
+-static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
+- PyObject *result;
+- result = __Pyx_PyObject_GetAttrStr(nmspace, name);
+- if (!result) {
+- result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
++/* ExtTypeTest */
++static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
++ if (unlikely(!type)) {
++ PyErr_SetString(PyExc_SystemError, "Missing type object");
++ return 0;
+ }
+- return result;
++ if (likely(__Pyx_TypeCheck(obj, type)))
++ return 1;
++ PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
++ Py_TYPE(obj)->tp_name, type->tp_name);
++ return 0;
+ }
+
+-/* CLineInTraceback */
+-#ifndef CYTHON_CLINE_IN_TRACEBACK
+-static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
+- PyObject *use_cline;
+- PyObject *ptype, *pvalue, *ptraceback;
+-#if CYTHON_COMPILING_IN_CPYTHON
+- PyObject **cython_runtime_dict;
+-#endif
+- if (unlikely(!__pyx_cython_runtime)) {
+- return c_line;
+- }
+- __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
+-#if CYTHON_COMPILING_IN_CPYTHON
+- cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
+- if (likely(cython_runtime_dict)) {
+- __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
+- use_cline, *cython_runtime_dict,
+- __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
+- } else
+-#endif
+- {
+- PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
+- if (use_cline_obj) {
+- use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
+- Py_DECREF(use_cline_obj);
+- } else {
+- PyErr_Clear();
+- use_cline = NULL;
+- }
+- }
+- if (!use_cline) {
+- c_line = 0;
+- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
+- }
+- else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
+- c_line = 0;
++/* DictGetItem */
++#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
++static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
++ PyObject *value;
++ value = PyDict_GetItemWithError(d, key);
++ if (unlikely(!value)) {
++ if (!PyErr_Occurred()) {
++ if (unlikely(PyTuple_Check(key))) {
++ PyObject* args = PyTuple_Pack(1, key);
++ if (likely(args)) {
++ PyErr_SetObject(PyExc_KeyError, args);
++ Py_DECREF(args);
++ }
++ } else {
++ PyErr_SetObject(PyExc_KeyError, key);
++ }
++ }
++ return NULL;
+ }
+- __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
+- return c_line;
++ Py_INCREF(value);
++ return value;
+ }
+ #endif
+
+-/* CodeObjectCache */
+-static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+- int start = 0, mid = 0, end = count - 1;
+- if (end >= 0 && code_line > entries[end].code_line) {
+- return count;
+- }
+- while (start < end) {
+- mid = start + (end - start) / 2;
+- if (code_line < entries[mid].code_line) {
+- end = mid;
+- } else if (code_line > entries[mid].code_line) {
+- start = mid + 1;
++/* RaiseTooManyValuesToUnpack */
++static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
++ PyErr_Format(PyExc_ValueError,
++ "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
++}
++
++/* RaiseNeedMoreValuesToUnpack */
++static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
++ PyErr_Format(PyExc_ValueError,
++ "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
++ index, (index == 1) ? "" : "s");
++}
++
++/* IterFinish */
++static CYTHON_INLINE int __Pyx_IterFinish(void) {
++#if CYTHON_FAST_THREAD_STATE
++ PyThreadState *tstate = __Pyx_PyThreadState_Current;
++ PyObject* exc_type = tstate->curexc_type;
++ if (unlikely(exc_type)) {
++ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
++ PyObject *exc_value, *exc_tb;
++ exc_value = tstate->curexc_value;
++ exc_tb = tstate->curexc_traceback;
++ tstate->curexc_type = 0;
++ tstate->curexc_value = 0;
++ tstate->curexc_traceback = 0;
++ Py_DECREF(exc_type);
++ Py_XDECREF(exc_value);
++ Py_XDECREF(exc_tb);
++ return 0;
+ } else {
+- return mid;
++ return -1;
+ }
+ }
+- if (code_line <= entries[mid].code_line) {
+- return mid;
+- } else {
+- return mid + 1;
++ return 0;
++#else
++ if (unlikely(PyErr_Occurred())) {
++ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
++ PyErr_Clear();
++ return 0;
++ } else {
++ return -1;
++ }
+ }
++ return 0;
++#endif
+ }
+-static PyCodeObject *__pyx_find_code_object(int code_line) {
+- PyCodeObject* code_object;
+- int pos;
+- if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+- return NULL;
+- }
+- pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+- if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+- return NULL;
++
++/* UnpackItemEndCheck */
++static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
++ if (unlikely(retval)) {
++ Py_DECREF(retval);
++ __Pyx_RaiseTooManyValuesError(expected);
++ return -1;
++ } else {
++ return __Pyx_IterFinish();
+ }
+- code_object = __pyx_code_cache.entries[pos].code_object;
+- Py_INCREF(code_object);
+- return code_object;
++ return 0;
+ }
+-static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+- int pos, i;
+- __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+- if (unlikely(!code_line)) {
+- return;
++
++/* Import */
++static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
++ PyObject *empty_list = 0;
++ PyObject *module = 0;
++ PyObject *global_dict = 0;
++ PyObject *empty_dict = 0;
++ PyObject *list;
++ #if PY_MAJOR_VERSION < 3
++ PyObject *py_import;
++ py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
++ if (!py_import)
++ goto bad;
++ #endif
++ if (from_list)
++ list = from_list;
++ else {
++ empty_list = PyList_New(0);
++ if (!empty_list)
++ goto bad;
++ list = empty_list;
+ }
+- if (unlikely(!entries)) {
+- entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+- if (likely(entries)) {
+- __pyx_code_cache.entries = entries;
+- __pyx_code_cache.max_count = 64;
+- __pyx_code_cache.count = 1;
+- entries[0].code_line = code_line;
+- entries[0].code_object = code_object;
+- Py_INCREF(code_object);
++ global_dict = PyModule_GetDict(__pyx_m);
++ if (!global_dict)
++ goto bad;
++ empty_dict = PyDict_New();
++ if (!empty_dict)
++ goto bad;
++ {
++ #if PY_MAJOR_VERSION >= 3
++ if (level == -1) {
++ if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
++ module = PyImport_ImportModuleLevelObject(
++ name, global_dict, empty_dict, list, 1);
++ if (!module) {
++ if (!PyErr_ExceptionMatches(PyExc_ImportError))
++ goto bad;
++ PyErr_Clear();
++ }
++ }
++ level = 0;
+ }
+- return;
+- }
+- pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+- if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+- PyCodeObject* tmp = entries[pos].code_object;
+- entries[pos].code_object = code_object;
+- Py_DECREF(tmp);
+- return;
+- }
+- if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+- int new_max = __pyx_code_cache.max_count + 64;
+- entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+- __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
+- if (unlikely(!entries)) {
+- return;
++ #endif
++ if (!module) {
++ #if PY_MAJOR_VERSION < 3
++ PyObject *py_level = PyInt_FromLong(level);
++ if (!py_level)
++ goto bad;
++ module = PyObject_CallFunctionObjArgs(py_import,
++ name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
++ Py_DECREF(py_level);
++ #else
++ module = PyImport_ImportModuleLevelObject(
++ name, global_dict, empty_dict, list, level);
++ #endif
+ }
+- __pyx_code_cache.entries = entries;
+- __pyx_code_cache.max_count = new_max;
+- }
+- for (i=__pyx_code_cache.count; i>pos; i--) {
+- entries[i] = entries[i-1];
+ }
+- entries[pos].code_line = code_line;
+- entries[pos].code_object = code_object;
+- __pyx_code_cache.count++;
+- Py_INCREF(code_object);
+-}
+-
+-/* AddTraceback */
+-#include "compile.h"
+-#include "frameobject.h"
+-#include "traceback.h"
+-static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+- const char *funcname, int c_line,
+- int py_line, const char *filename) {
+- PyCodeObject *py_code = 0;
+- PyObject *py_srcfile = 0;
+- PyObject *py_funcname = 0;
++bad:
+ #if PY_MAJOR_VERSION < 3
+- py_srcfile = PyString_FromString(filename);
+- #else
+- py_srcfile = PyUnicode_FromString(filename);
++ Py_XDECREF(py_import);
+ #endif
+- if (!py_srcfile) goto bad;
+- if (c_line) {
+- #if PY_MAJOR_VERSION < 3
+- py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+- #else
+- py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+- #endif
+- }
+- else {
++ Py_XDECREF(empty_list);
++ Py_XDECREF(empty_dict);
++ return module;
++}
++
++/* ImportFrom */
++static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
++ PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
++ if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
++ PyErr_Format(PyExc_ImportError,
+ #if PY_MAJOR_VERSION < 3
+- py_funcname = PyString_FromString(funcname);
++ "cannot import name %.230s", PyString_AS_STRING(name));
+ #else
+- py_funcname = PyUnicode_FromString(funcname);
++ "cannot import name %S", name);
+ #endif
+ }
+- if (!py_funcname) goto bad;
+- py_code = __Pyx_PyCode_New(
+- 0,
+- 0,
+- 0,
+- 0,
+- 0,
+- __pyx_empty_bytes, /*PyObject *code,*/
+- __pyx_empty_tuple, /*PyObject *consts,*/
+- __pyx_empty_tuple, /*PyObject *names,*/
+- __pyx_empty_tuple, /*PyObject *varnames,*/
+- __pyx_empty_tuple, /*PyObject *freevars,*/
+- __pyx_empty_tuple, /*PyObject *cellvars,*/
+- py_srcfile, /*PyObject *filename,*/
+- py_funcname, /*PyObject *name,*/
+- py_line,
+- __pyx_empty_bytes /*PyObject *lnotab*/
+- );
+- Py_DECREF(py_srcfile);
+- Py_DECREF(py_funcname);
+- return py_code;
+-bad:
+- Py_XDECREF(py_srcfile);
+- Py_XDECREF(py_funcname);
+- return NULL;
++ return value;
+ }
+-static void __Pyx_AddTraceback(const char *funcname, int c_line,
+- int py_line, const char *filename) {
+- PyCodeObject *py_code = 0;
+- PyFrameObject *py_frame = 0;
+- PyThreadState *tstate = __Pyx_PyThreadState_Current;
+- if (c_line) {
+- c_line = __Pyx_CLineForTraceback(tstate, c_line);
++
++/* HasAttr */
++static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
++ PyObject *r;
++ if (unlikely(!__Pyx_PyBaseString_Check(n))) {
++ PyErr_SetString(PyExc_TypeError,
++ "hasattr(): attribute name must be string");
++ return -1;
+ }
+- py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
+- if (!py_code) {
+- py_code = __Pyx_CreateCodeObjectForTraceback(
+- funcname, c_line, py_line, filename);
+- if (!py_code) goto bad;
+- __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
++ r = __Pyx_GetAttr(o, n);
++ if (unlikely(!r)) {
++ PyErr_Clear();
++ return 0;
++ } else {
++ Py_DECREF(r);
++ return 1;
+ }
+- py_frame = PyFrame_New(
+- tstate, /*PyThreadState *tstate,*/
+- py_code, /*PyCodeObject *code,*/
+- __pyx_d, /*PyObject *globals,*/
+- 0 /*PyObject *locals*/
+- );
+- if (!py_frame) goto bad;
+- __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
+- PyTraceBack_Here(py_frame);
+-bad:
+- Py_XDECREF(py_code);
+- Py_XDECREF(py_frame);
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(int) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(int) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
+- }
+- } else {
+- if (sizeof(int) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
++/* PyObject_GenericGetAttrNoDict */
++#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
++static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
++ PyErr_Format(PyExc_AttributeError,
++#if PY_MAJOR_VERSION >= 3
++ "'%.50s' object has no attribute '%U'",
++ tp->tp_name, attr_name);
++#else
++ "'%.50s' object has no attribute '%.400s'",
++ tp->tp_name, PyString_AS_STRING(attr_name));
+ #endif
+- }
++ return NULL;
++}
++static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
++ PyObject *descr;
++ PyTypeObject *tp = Py_TYPE(obj);
++ if (unlikely(!PyString_Check(attr_name))) {
++ return PyObject_GenericGetAttr(obj, attr_name);
++ }
++ assert(!tp->tp_dictoffset);
++ descr = _PyType_Lookup(tp, attr_name);
++ if (unlikely(!descr)) {
++ return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
+ }
++ Py_INCREF(descr);
++ #if PY_MAJOR_VERSION < 3
++ if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
++ #endif
+ {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(int),
+- little, !is_unsigned);
++ descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
++ if (unlikely(f)) {
++ PyObject *res = f(descr, obj, (PyObject *)tp);
++ Py_DECREF(descr);
++ return res;
++ }
+ }
++ return descr;
+ }
++#endif
+
+-/* CIntFromPyVerify */
+-#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
+- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
+-#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
+- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
+-#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
+- {\
+- func_type value = func_value;\
+- if (sizeof(target_type) < sizeof(func_type)) {\
+- if (unlikely(value != (func_type) (target_type) value)) {\
+- func_type zero = 0;\
+- if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
+- return (target_type) -1;\
+- if (is_unsigned && unlikely(value < zero))\
+- goto raise_neg_overflow;\
+- else\
+- goto raise_overflow;\
+- }\
+- }\
+- return (target_type) value;\
++/* PyObject_GenericGetAttr */
++#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
++static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
++ if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
++ return PyObject_GenericGetAttr(obj, attr_name);
+ }
++ return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
++}
++#endif
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_event_id(enum mpv_event_id value) {
+- const enum mpv_event_id neg_one = (enum mpv_event_id) ((enum mpv_event_id) 0 - (enum mpv_event_id) 1), const_zero = (enum mpv_event_id) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_event_id) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++/* SetVTable */
++static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
++#if PY_VERSION_HEX >= 0x02070000
++ PyObject *ob = PyCapsule_New(vtable, 0, 0);
++#else
++ PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
++#endif
++ if (!ob)
++ goto bad;
++ if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
++ goto bad;
++ Py_DECREF(ob);
++ return 0;
++bad:
++ Py_XDECREF(ob);
++ return -1;
++}
++
++/* PyObjectGetAttrStrNoError */
++static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
++ __Pyx_PyErr_Clear();
++}
++static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
++ PyObject *result;
++#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
++ PyTypeObject* tp = Py_TYPE(obj);
++ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
++ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
++ }
++#endif
++ result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
++ if (unlikely(!result)) {
++ __Pyx_PyObject_GetAttrStr_ClearAttributeError();
++ }
++ return result;
++}
++
++/* SetupReduce */
++static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
++ int ret;
++ PyObject *name_attr;
++ name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
++ if (likely(name_attr)) {
++ ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
++ } else {
++ ret = -1;
++ }
++ if (unlikely(ret < 0)) {
++ PyErr_Clear();
++ ret = 0;
++ }
++ Py_XDECREF(name_attr);
++ return ret;
++}
++static int __Pyx_setup_reduce(PyObject* type_obj) {
++ int ret = 0;
++ PyObject *object_reduce = NULL;
++ PyObject *object_reduce_ex = NULL;
++ PyObject *reduce = NULL;
++ PyObject *reduce_ex = NULL;
++ PyObject *reduce_cython = NULL;
++ PyObject *setstate = NULL;
++ PyObject *setstate_cython = NULL;
++#if CYTHON_USE_PYTYPE_LOOKUP
++ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
++#else
++ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
+ #endif
+- }
+- } else {
+- if (sizeof(enum mpv_event_id) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
++#if CYTHON_USE_PYTYPE_LOOKUP
++ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
++#else
++ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
++#endif
++ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
++ if (reduce_ex == object_reduce_ex) {
++#if CYTHON_USE_PYTYPE_LOOKUP
++ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
++#else
++ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
+ #endif
++ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
++ if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
++ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
++ if (likely(reduce_cython)) {
++ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
++ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
++ } else if (reduce == object_reduce || PyErr_Occurred()) {
++ goto __PYX_BAD;
++ }
++ setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
++ if (!setstate) PyErr_Clear();
++ if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
++ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
++ if (likely(setstate_cython)) {
++ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
++ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
++ } else if (!setstate || PyErr_Occurred()) {
++ goto __PYX_BAD;
++ }
++ }
++ PyType_Modified((PyTypeObject*)type_obj);
+ }
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_event_id),
+- little, !is_unsigned);
+- }
++ goto __PYX_GOOD;
++__PYX_BAD:
++ if (!PyErr_Occurred())
++ PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
++ ret = -1;
++__PYX_GOOD:
++#if !CYTHON_USE_PYTYPE_LOOKUP
++ Py_XDECREF(object_reduce);
++ Py_XDECREF(object_reduce_ex);
++#endif
++ Py_XDECREF(reduce);
++ Py_XDECREF(reduce_ex);
++ Py_XDECREF(reduce_cython);
++ Py_XDECREF(setstate);
++ Py_XDECREF(setstate_cython);
++ return ret;
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
+- const unsigned long neg_one = (unsigned long) ((unsigned long) 0 - (unsigned long) 1), const_zero = (unsigned long) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(unsigned long) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++/* CalculateMetaclass */
++static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
++ Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
++ for (i=0; i < nbases; i++) {
++ PyTypeObject *tmptype;
++ PyObject *tmp = PyTuple_GET_ITEM(bases, i);
++ tmptype = Py_TYPE(tmp);
++#if PY_MAJOR_VERSION < 3
++ if (tmptype == &PyClass_Type)
++ continue;
+ #endif
++ if (!metaclass) {
++ metaclass = tmptype;
++ continue;
+ }
+- } else {
+- if (sizeof(unsigned long) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
++ if (PyType_IsSubtype(metaclass, tmptype))
++ continue;
++ if (PyType_IsSubtype(tmptype, metaclass)) {
++ metaclass = tmptype;
++ continue;
+ }
++ PyErr_SetString(PyExc_TypeError,
++ "metaclass conflict: "
++ "the metaclass of a derived class "
++ "must be a (non-strict) subclass "
++ "of the metaclasses of all its bases");
++ return NULL;
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
+- little, !is_unsigned);
++ if (!metaclass) {
++#if PY_MAJOR_VERSION < 3
++ metaclass = &PyClass_Type;
++#else
++ metaclass = &PyType_Type;
++#endif
+ }
++ Py_INCREF((PyObject*) metaclass);
++ return (PyObject*) metaclass;
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_error(enum mpv_error value) {
+- const enum mpv_error neg_one = (enum mpv_error) ((enum mpv_error) 0 - (enum mpv_error) 1), const_zero = (enum mpv_error) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_error) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_error) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_error) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
++/* Py3ClassCreate */
++static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
++ PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
++ PyObject *ns;
++ if (metaclass) {
++ PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
++ if (prep) {
++ PyObject *pargs = PyTuple_Pack(2, name, bases);
++ if (unlikely(!pargs)) {
++ Py_DECREF(prep);
++ return NULL;
++ }
++ ns = PyObject_Call(prep, pargs, mkw);
++ Py_DECREF(prep);
++ Py_DECREF(pargs);
++ } else {
++ if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
++ return NULL;
++ PyErr_Clear();
++ ns = PyDict_New();
+ }
+ } else {
+- if (sizeof(enum mpv_error) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_error) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
+- }
+- }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_error),
+- little, !is_unsigned);
++ ns = PyDict_New();
+ }
++ if (unlikely(!ns))
++ return NULL;
++ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
++ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
++ if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
++ return ns;
++bad:
++ Py_DECREF(ns);
++ return NULL;
+ }
+-
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_log_level(enum mpv_log_level value) {
+- const enum mpv_log_level neg_one = (enum mpv_log_level) ((enum mpv_log_level) 0 - (enum mpv_log_level) 1), const_zero = (enum mpv_log_level) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_log_level) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
++static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
++ PyObject *dict, PyObject *mkw,
++ int calculate_metaclass, int allow_py2_metaclass) {
++ PyObject *result, *margs;
++ PyObject *owned_metaclass = NULL;
++ if (allow_py2_metaclass) {
++ owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
++ if (owned_metaclass) {
++ metaclass = owned_metaclass;
++ } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
++ PyErr_Clear();
++ } else {
++ return NULL;
+ }
++ }
++ if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
++ metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
++ Py_XDECREF(owned_metaclass);
++ if (unlikely(!metaclass))
++ return NULL;
++ owned_metaclass = metaclass;
++ }
++ margs = PyTuple_Pack(3, name, bases, dict);
++ if (unlikely(!margs)) {
++ result = NULL;
+ } else {
+- if (sizeof(enum mpv_log_level) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_log_level) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
+- }
++ result = PyObject_Call(metaclass, margs, mkw);
++ Py_DECREF(margs);
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_log_level),
+- little, !is_unsigned);
++ Py_XDECREF(owned_metaclass);
++ return result;
++}
++
++/* GetNameInClass */
++static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
++ PyObject *result;
++ __Pyx_PyThreadState_declare
++ __Pyx_PyThreadState_assign
++ if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
++ return NULL;
++ __Pyx_PyErr_Clear();
++ __Pyx_GetModuleGlobalNameUncached(result, name);
++ return result;
++}
++static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
++ PyObject *result;
++ result = __Pyx_PyObject_GetAttrStr(nmspace, name);
++ if (!result) {
++ result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
+ }
++ return result;
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_end_file_reason(enum mpv_end_file_reason value) {
+- const enum mpv_end_file_reason neg_one = (enum mpv_end_file_reason) ((enum mpv_end_file_reason) 0 - (enum mpv_end_file_reason) 1), const_zero = (enum mpv_end_file_reason) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_end_file_reason) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
+- }
+- } else {
+- if (sizeof(enum mpv_end_file_reason) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_end_file_reason) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
++/* CLineInTraceback */
++#ifndef CYTHON_CLINE_IN_TRACEBACK
++static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
++ PyObject *use_cline;
++ PyObject *ptype, *pvalue, *ptraceback;
++#if CYTHON_COMPILING_IN_CPYTHON
++ PyObject **cython_runtime_dict;
+ #endif
+- }
++ if (unlikely(!__pyx_cython_runtime)) {
++ return c_line;
+ }
++ __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
++#if CYTHON_COMPILING_IN_CPYTHON
++ cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
++ if (likely(cython_runtime_dict)) {
++ __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
++ use_cline, *cython_runtime_dict,
++ __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
++ } else
++#endif
+ {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_end_file_reason),
+- little, !is_unsigned);
++ PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
++ if (use_cline_obj) {
++ use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
++ Py_DECREF(use_cline_obj);
++ } else {
++ PyErr_Clear();
++ use_cline = NULL;
++ }
++ }
++ if (!use_cline) {
++ c_line = 0;
++ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
++ }
++ else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
++ c_line = 0;
+ }
++ __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
++ return c_line;
+ }
+-
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_render_update_flag(enum mpv_render_update_flag value) {
+- const enum mpv_render_update_flag neg_one = (enum mpv_render_update_flag) ((enum mpv_render_update_flag) 0 - (enum mpv_render_update_flag) 1), const_zero = (enum mpv_render_update_flag) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_render_update_flag) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+ #endif
++
++/* CodeObjectCache */
++static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
++ int start = 0, mid = 0, end = count - 1;
++ if (end >= 0 && code_line > entries[end].code_line) {
++ return count;
++ }
++ while (start < end) {
++ mid = start + (end - start) / 2;
++ if (code_line < entries[mid].code_line) {
++ end = mid;
++ } else if (code_line > entries[mid].code_line) {
++ start = mid + 1;
++ } else {
++ return mid;
+ }
++ }
++ if (code_line <= entries[mid].code_line) {
++ return mid;
+ } else {
+- if (sizeof(enum mpv_render_update_flag) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_render_update_flag) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
+- }
++ return mid + 1;
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_render_update_flag),
+- little, !is_unsigned);
++}
++static PyCodeObject *__pyx_find_code_object(int code_line) {
++ PyCodeObject* code_object;
++ int pos;
++ if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
++ return NULL;
++ }
++ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
++ if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
++ return NULL;
+ }
++ code_object = __pyx_code_cache.entries[pos].code_object;
++ Py_INCREF(code_object);
++ return code_object;
+ }
+-
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
+- const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(int64_t) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
++static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
++ int pos, i;
++ __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
++ if (unlikely(!code_line)) {
++ return;
++ }
++ if (unlikely(!entries)) {
++ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
++ if (likely(entries)) {
++ __pyx_code_cache.entries = entries;
++ __pyx_code_cache.max_count = 64;
++ __pyx_code_cache.count = 1;
++ entries[0].code_line = code_line;
++ entries[0].code_object = code_object;
++ Py_INCREF(code_object);
+ }
+- } else {
+- if (sizeof(int64_t) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
++ return;
++ }
++ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
++ if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
++ PyCodeObject* tmp = entries[pos].code_object;
++ entries[pos].code_object = code_object;
++ Py_DECREF(tmp);
++ return;
++ }
++ if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
++ int new_max = __pyx_code_cache.max_count + 64;
++ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
++ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
++ if (unlikely(!entries)) {
++ return;
+ }
++ __pyx_code_cache.entries = entries;
++ __pyx_code_cache.max_count = new_max;
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(int64_t),
+- little, !is_unsigned);
++ for (i=__pyx_code_cache.count; i>pos; i--) {
++ entries[i] = entries[i-1];
+ }
++ entries[pos].code_line = code_line;
++ entries[pos].code_object = code_object;
++ __pyx_code_cache.count++;
++ Py_INCREF(code_object);
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
+- const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(uint64_t) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
+- }
+- } else {
+- if (sizeof(uint64_t) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
+- }
++/* AddTraceback */
++#include "compile.h"
++#include "frameobject.h"
++#include "traceback.h"
++static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
++ const char *funcname, int c_line,
++ int py_line, const char *filename) {
++ PyCodeObject *py_code = NULL;
++ PyObject *py_funcname = NULL;
++ #if PY_MAJOR_VERSION < 3
++ PyObject *py_srcfile = NULL;
++ py_srcfile = PyString_FromString(filename);
++ if (!py_srcfile) goto bad;
++ #endif
++ if (c_line) {
++ #if PY_MAJOR_VERSION < 3
++ py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
++ if (!py_funcname) goto bad;
++ #else
++ py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
++ if (!py_funcname) goto bad;
++ funcname = PyUnicode_AsUTF8(py_funcname);
++ if (!funcname) goto bad;
++ #endif
++ }
++ else {
++ #if PY_MAJOR_VERSION < 3
++ py_funcname = PyString_FromString(funcname);
++ if (!py_funcname) goto bad;
++ #endif
++ }
++ #if PY_MAJOR_VERSION < 3
++ py_code = __Pyx_PyCode_New(
++ 0,
++ 0,
++ 0,
++ 0,
++ 0,
++ __pyx_empty_bytes, /*PyObject *code,*/
++ __pyx_empty_tuple, /*PyObject *consts,*/
++ __pyx_empty_tuple, /*PyObject *names,*/
++ __pyx_empty_tuple, /*PyObject *varnames,*/
++ __pyx_empty_tuple, /*PyObject *freevars,*/
++ __pyx_empty_tuple, /*PyObject *cellvars,*/
++ py_srcfile, /*PyObject *filename,*/
++ py_funcname, /*PyObject *name,*/
++ py_line,
++ __pyx_empty_bytes /*PyObject *lnotab*/
++ );
++ Py_DECREF(py_srcfile);
++ #else
++ py_code = PyCode_NewEmpty(filename, funcname, py_line);
++ #endif
++ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
++ return py_code;
++bad:
++ Py_XDECREF(py_funcname);
++ #if PY_MAJOR_VERSION < 3
++ Py_XDECREF(py_srcfile);
++ #endif
++ return NULL;
++}
++static void __Pyx_AddTraceback(const char *funcname, int c_line,
++ int py_line, const char *filename) {
++ PyCodeObject *py_code = 0;
++ PyFrameObject *py_frame = 0;
++ PyThreadState *tstate = __Pyx_PyThreadState_Current;
++ if (c_line) {
++ c_line = __Pyx_CLineForTraceback(tstate, c_line);
+ }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
+- little, !is_unsigned);
++ py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
++ if (!py_code) {
++ py_code = __Pyx_CreateCodeObjectForTraceback(
++ funcname, c_line, py_line, filename);
++ if (!py_code) goto bad;
++ __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
+ }
++ py_frame = PyFrame_New(
++ tstate, /*PyThreadState *tstate,*/
++ py_code, /*PyCodeObject *code,*/
++ __pyx_d, /*PyObject *globals,*/
++ 0 /*PyObject *locals*/
++ );
++ if (!py_frame) goto bad;
++ __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
++ PyTraceBack_Here(py_frame);
++bad:
++ Py_XDECREF(py_code);
++ Py_XDECREF(py_frame);
+ }
+
+-/* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value) {
+- const enum mpv_format neg_one = (enum mpv_format) ((enum mpv_format) 0 - (enum mpv_format) 1), const_zero = (enum mpv_format) 0;
+- const int is_unsigned = neg_one > const_zero;
+- if (is_unsigned) {
+- if (sizeof(enum mpv_format) < sizeof(long)) {
+- return PyInt_FromLong((long) value);
+- } else if (sizeof(enum mpv_format) <= sizeof(unsigned long)) {
+- return PyLong_FromUnsignedLong((unsigned long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_format) <= sizeof(unsigned PY_LONG_LONG)) {
+- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+-#endif
+- }
+- } else {
+- if (sizeof(enum mpv_format) <= sizeof(long)) {
+- return PyInt_FromLong((long) value);
+-#ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_format) <= sizeof(PY_LONG_LONG)) {
+- return PyLong_FromLongLong((PY_LONG_LONG) value);
+-#endif
+- }
+- }
+- {
+- int one = 1; int little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_format),
+- little, !is_unsigned);
++/* CIntFromPyVerify */
++#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
++ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
++#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
++ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
++#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
++ {\
++ func_type value = func_value;\
++ if (sizeof(target_type) < sizeof(func_type)) {\
++ if (unlikely(value != (func_type) (target_type) value)) {\
++ func_type zero = 0;\
++ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
++ return (target_type) -1;\
++ if (is_unsigned && unlikely(value < zero))\
++ goto raise_neg_overflow;\
++ else\
++ goto raise_overflow;\
++ }\
++ }\
++ return (target_type) value;\
+ }
+-}
+
+ /* CIntToPy */
+-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const int neg_one = (int) -1, const_zero = (int) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+- if (sizeof(long) < sizeof(long)) {
++ if (sizeof(int) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+- } else if (sizeof(long) <= sizeof(unsigned long)) {
++ } else if (sizeof(int) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+ #ifdef HAVE_LONG_LONG
+- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
++ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+ #endif
+ }
+ } else {
+- if (sizeof(long) <= sizeof(long)) {
++ if (sizeof(int) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ #ifdef HAVE_LONG_LONG
+- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
++ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+ #endif
+ }
+@@ -33617,14 +30212,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+- return _PyLong_FromByteArray(bytes, sizeof(long),
++ return _PyLong_FromByteArray(bytes, sizeof(int),
+ little, !is_unsigned);
+ }
+ }
+
+ /* CIntFromPy */
+ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const int neg_one = (int) -1, const_zero = (int) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -33811,9 +30413,54 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+ return (int) -1;
+ }
+
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_event_id(enum mpv_event_id value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_event_id neg_one = (enum mpv_event_id) -1, const_zero = (enum mpv_event_id) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_event_id) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(enum mpv_event_id) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_event_id),
++ little, !is_unsigned);
++ }
++}
++
+ /* CIntFromPy */
+ static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObject *x) {
+- const enum mpv_event_id neg_one = (enum mpv_event_id) ((enum mpv_event_id) 0 - (enum mpv_event_id) 1), const_zero = (enum mpv_event_id) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_event_id neg_one = (enum mpv_event_id) -1, const_zero = (enum mpv_event_id) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -33947,62 +30594,259 @@ static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObjec
+ break;
+ }
+ #endif
+- if (sizeof(enum mpv_event_id) <= sizeof(long)) {
+- __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, long, PyLong_AsLong(x))
++ if (sizeof(enum mpv_event_id) <= sizeof(long)) {
++ __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, long, PyLong_AsLong(x))
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
++ __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, PY_LONG_LONG, PyLong_AsLongLong(x))
++#endif
++ }
++ }
++ {
++#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
++ PyErr_SetString(PyExc_RuntimeError,
++ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
++#else
++ enum mpv_event_id val;
++ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
++ #if PY_MAJOR_VERSION < 3
++ if (likely(v) && !PyLong_Check(v)) {
++ PyObject *tmp = v;
++ v = PyNumber_Long(tmp);
++ Py_DECREF(tmp);
++ }
++ #endif
++ if (likely(v)) {
++ int one = 1; int is_little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&val;
++ int ret = _PyLong_AsByteArray((PyLongObject *)v,
++ bytes, sizeof(val),
++ is_little, !is_unsigned);
++ Py_DECREF(v);
++ if (likely(!ret))
++ return val;
++ }
++#endif
++ return (enum mpv_event_id) -1;
++ }
++ } else {
++ enum mpv_event_id val;
++ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
++ if (!tmp) return (enum mpv_event_id) -1;
++ val = __Pyx_PyInt_As_enum__mpv_event_id(tmp);
++ Py_DECREF(tmp);
++ return val;
++ }
++raise_overflow:
++ PyErr_SetString(PyExc_OverflowError,
++ "value too large to convert to enum mpv_event_id");
++ return (enum mpv_event_id) -1;
++raise_neg_overflow:
++ PyErr_SetString(PyExc_OverflowError,
++ "can't convert negative value to enum mpv_event_id");
++ return (enum mpv_event_id) -1;
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(unsigned long) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(unsigned long) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
++ little, !is_unsigned);
++ }
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_error(enum mpv_error value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_error neg_one = (enum mpv_error) -1, const_zero = (enum mpv_error) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_error) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_error) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_error) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(enum mpv_error) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_error) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_error),
++ little, !is_unsigned);
++ }
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_log_level(enum mpv_log_level value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_log_level neg_one = (enum mpv_log_level) -1, const_zero = (enum mpv_log_level) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_log_level) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(enum mpv_log_level) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
+ #ifdef HAVE_LONG_LONG
+- } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
+- __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, PY_LONG_LONG, PyLong_AsLongLong(x))
++ } else if (sizeof(enum mpv_log_level) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
+ #endif
+- }
+ }
+- {
+-#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+- PyErr_SetString(PyExc_RuntimeError,
+- "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+-#else
+- enum mpv_event_id val;
+- PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+- #if PY_MAJOR_VERSION < 3
+- if (likely(v) && !PyLong_Check(v)) {
+- PyObject *tmp = v;
+- v = PyNumber_Long(tmp);
+- Py_DECREF(tmp);
+- }
+- #endif
+- if (likely(v)) {
+- int one = 1; int is_little = (int)*(unsigned char *)&one;
+- unsigned char *bytes = (unsigned char *)&val;
+- int ret = _PyLong_AsByteArray((PyLongObject *)v,
+- bytes, sizeof(val),
+- is_little, !is_unsigned);
+- Py_DECREF(v);
+- if (likely(!ret))
+- return val;
+- }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_log_level),
++ little, !is_unsigned);
++ }
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_end_file_reason(enum mpv_end_file_reason value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_end_file_reason neg_one = (enum mpv_end_file_reason) -1, const_zero = (enum mpv_end_file_reason) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_end_file_reason) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+ #endif
+- return (enum mpv_event_id) -1;
+ }
+ } else {
+- enum mpv_event_id val;
+- PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+- if (!tmp) return (enum mpv_event_id) -1;
+- val = __Pyx_PyInt_As_enum__mpv_event_id(tmp);
+- Py_DECREF(tmp);
+- return val;
++ if (sizeof(enum mpv_end_file_reason) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_end_file_reason) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_end_file_reason),
++ little, !is_unsigned);
++ }
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_render_update_flag(enum mpv_render_update_flag value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_render_update_flag neg_one = (enum mpv_render_update_flag) -1, const_zero = (enum mpv_render_update_flag) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_render_update_flag) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(enum mpv_render_update_flag) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_render_update_flag) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_render_update_flag),
++ little, !is_unsigned);
+ }
+-raise_overflow:
+- PyErr_SetString(PyExc_OverflowError,
+- "value too large to convert to enum mpv_event_id");
+- return (enum mpv_event_id) -1;
+-raise_neg_overflow:
+- PyErr_SetString(PyExc_OverflowError,
+- "can't convert negative value to enum mpv_event_id");
+- return (enum mpv_event_id) -1;
+ }
+
+ /* CIntFromPy */
+ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const long neg_one = (long) -1, const_zero = (long) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -34189,9 +31033,92 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+ return (long) -1;
+ }
+
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(int64_t) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(int64_t) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(int64_t),
++ little, !is_unsigned);
++ }
++}
++
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(uint64_t) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(uint64_t) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
++ little, !is_unsigned);
++ }
++}
++
+ /* CIntFromPy */
+ static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
+- const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -34378,9 +31305,54 @@ static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
+ return (uint64_t) -1;
+ }
+
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_format neg_one = (enum mpv_format) -1, const_zero = (enum mpv_format) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(enum mpv_format) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(enum mpv_format) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_format) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(enum mpv_format) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(enum mpv_format) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_format),
++ little, !is_unsigned);
++ }
++}
++
+ /* CIntFromPy */
+ static CYTHON_INLINE enum mpv_format __Pyx_PyInt_As_enum__mpv_format(PyObject *x) {
+- const enum mpv_format neg_one = (enum mpv_format) ((enum mpv_format) 0 - (enum mpv_format) 1), const_zero = (enum mpv_format) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const enum mpv_format neg_one = (enum mpv_format) -1, const_zero = (enum mpv_format) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -34569,7 +31541,14 @@ static CYTHON_INLINE enum mpv_format __Pyx_PyInt_As_enum__mpv_format(PyObject *x
+
+ /* CIntFromPy */
+ static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
+- const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -34758,7 +31737,14 @@ static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
+
+ /* CIntFromPy */
+ static CYTHON_INLINE intptr_t __Pyx_PyInt_As_intptr_t(PyObject *x) {
+- const intptr_t neg_one = (intptr_t) ((intptr_t) 0 - (intptr_t) 1), const_zero = (intptr_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const intptr_t neg_one = (intptr_t) -1, const_zero = (intptr_t) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
+ const int is_unsigned = neg_one > const_zero;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+@@ -34945,6 +31931,44 @@ static CYTHON_INLINE intptr_t __Pyx_PyInt_As_intptr_t(PyObject *x) {
+ return (intptr_t) -1;
+ }
+
++/* CIntToPy */
++static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wconversion"
++#endif
++ const long neg_one = (long) -1, const_zero = (long) 0;
++#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
++#pragma GCC diagnostic pop
++#endif
++ const int is_unsigned = neg_one > const_zero;
++ if (is_unsigned) {
++ if (sizeof(long) < sizeof(long)) {
++ return PyInt_FromLong((long) value);
++ } else if (sizeof(long) <= sizeof(unsigned long)) {
++ return PyLong_FromUnsignedLong((unsigned long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
++ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
++#endif
++ }
++ } else {
++ if (sizeof(long) <= sizeof(long)) {
++ return PyInt_FromLong((long) value);
++#ifdef HAVE_LONG_LONG
++ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
++ return PyLong_FromLongLong((PY_LONG_LONG) value);
++#endif
++ }
++ }
++ {
++ int one = 1; int little = (int)*(unsigned char *)&one;
++ unsigned char *bytes = (unsigned char *)&value;
++ return _PyLong_FromByteArray(bytes, sizeof(long),
++ little, !is_unsigned);
++ }
++}
++
+ /* CheckBinaryVersion */
+ static int __Pyx_check_binary_version(void) {
+ char ctversion[4], rtversion[4];
+@@ -35211,7 +32235,7 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+ }
+ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
+- return __Pyx_PyIndex_AsSsize_t(o);
++ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
+ #if PY_MAJOR_VERSION < 3
+ } else if (likely(PyInt_CheckExact(o))) {
+ return PyInt_AS_LONG(o);
+diff --git a/vidcutter/libs/pympv/mpv.pyx b/vidcutter/libs/pympv/mpv.pyx
+index 540ea649..8af2dcc7 100644
+--- a/vidcutter/libs/pympv/mpv.pyx
++++ b/vidcutter/libs/pympv/mpv.pyx
+@@ -30,8 +30,8 @@ from client cimport *
+ __version__ = "0.3.0"
+ __author__ = "Andre D"
+
+-_REQUIRED_CAPI_MAJOR = 1
+-_MIN_CAPI_MINOR = 9
++_REQUIRED_CAPI_MAJOR = 2
++_MIN_CAPI_MINOR = 0
+
+ cdef unsigned long _CAPI_VERSION
+ with nogil:
+@@ -47,7 +47,7 @@ if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+ )
+
+ cdef extern from "Python.h":
+- void PyEval_InitThreads()
++ void Py_Initialize()
+
+ _is_py3 = sys.version_info >= (3,)
+ _strdec_err = "surrogateescape" if _is_py3 else "strict"
+@@ -67,7 +67,7 @@ def _strenc(s):
+ # In python2, assume bytes and walk right through
+ return s
+
+-PyEval_InitThreads()
++Py_Initialize()
+
+ class Errors:
+ """Set of known error codes from MpvError and Event responses.
+@@ -114,21 +114,21 @@ class Events:
+ start_file = MPV_EVENT_START_FILE
+ end_file = MPV_EVENT_END_FILE
+ file_loaded = MPV_EVENT_FILE_LOADED
+- tracks_changed = MPV_EVENT_TRACKS_CHANGED
+- tracks_switched = MPV_EVENT_TRACK_SWITCHED
++ # tracks_changed = MPV_EVENT_TRACKS_CHANGED
++ # tracks_switched = MPV_EVENT_TRACK_SWITCHED
+ idle = MPV_EVENT_IDLE
+- pause = MPV_EVENT_PAUSE
+- unpause = MPV_EVENT_UNPAUSE
++ # pause = MPV_EVENT_PAUSE
++ # unpause = MPV_EVENT_UNPAUSE
+ tick = MPV_EVENT_TICK
+- script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ client_message = MPV_EVENT_CLIENT_MESSAGE
+ video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+ audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+- metadata_update = MPV_EVENT_METADATA_UPDATE
++ # metadata_update = MPV_EVENT_METADATA_UPDATE
+ seek = MPV_EVENT_SEEK
+ playback_restart = MPV_EVENT_PLAYBACK_RESTART
+ property_change = MPV_EVENT_PROPERTY_CHANGE
+- chapter_change = MPV_EVENT_CHAPTER_CHANGE
++ # chapter_change = MPV_EVENT_CHAPTER_CHANGE
+
+
+ class LogLevels:
+@@ -166,17 +166,17 @@ cdef class EndOfFileReached(object):
+ return self
+
+
+-cdef class InputDispatch(object):
+- """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
++# cdef class InputDispatch(object):
++# """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
+
+- Wraps: mpv_event_script_input_dispatch
+- """
+- cdef public object arg0, type
++# Wraps: mpv_event_script_input_dispatch
++# """
++# cdef public object arg0, type
+
+- cdef _init(self, mpv_event_script_input_dispatch* input):
+- self.arg0 = input.arg0
+- self.type = _strdec(input.type)
+- return self
++# cdef _init(self, mpv_event_script_input_dispatch* input):
++# self.arg0 = input.arg0
++# self.type = _strdec(input.type)
++# return self
+
+
+ cdef class LogMessage(object):
+@@ -276,8 +276,8 @@ cdef class Event(object):
+ return Property()._init(<mpv_event_property*>data)
+ elif self.id == MPV_EVENT_LOG_MESSAGE:
+ return LogMessage()._init(<mpv_event_log_message*>data)
+- elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
+- return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
++ # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+ elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+ climsg = <mpv_event_client_message*>data
+ args = []
+@@ -396,17 +396,17 @@ cdef class Context(object):
+ time = mpv_get_time_us(self._ctx)
+ return time
+
+- def suspend(self):
+- """Wraps: mpv_suspend"""
+- assert self._ctx
+- with nogil:
+- mpv_suspend(self._ctx)
++ # def suspend(self):
++ # """Wraps: mpv_suspend"""
++ # assert self._ctx
++ # with nogil:
++ # mpv_suspend(self._ctx)
+
+- def resume(self):
+- """Wraps: mpv_resume"""
+- assert self._ctx
+- with nogil:
+- mpv_resume(self._ctx)
++ # def resume(self):
++ # """Wraps: mpv_resume"""
++ # assert self._ctx
++ # with nogil:
++ # mpv_resume(self._ctx)
+
+ @_errors
+ def request_event(self, event, enable):
+@@ -798,17 +798,17 @@ cdef class Context(object):
+ self.reply_userdata = None
+ self._ctx = NULL
+
+- def opengl_cb_api(self):
+- cdef void *cb
++ # def opengl_cb_api(self):
++ # cdef void *cb
+
+- _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
+- if not _ctx:
+- raise MPVError("OpenGL API not available")
++ # _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
++ # if not _ctx:
++ # raise MPVError("OpenGL API not available")
+
+- ctx = OpenGLContext()
+- ctx._ctx = <mpv_opengl_cb_context*>_ctx
++ # ctx = OpenGLContext()
++ # ctx._ctx = <mpv_opengl_cb_context*>_ctx
+
+- return ctx
++ # return ctx
+
+ def __dealloc__(self):
+ self.shutdown()
+@@ -819,62 +819,62 @@ cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
+ cdef void _c_updatecb(void *ctx) with gil:
+ (<object>ctx)()
+
+-cdef class OpenGLContext(object):
+- cdef:
+- mpv_opengl_cb_context *_ctx
+- bint inited
+- object update_cb
+-
+- def __init__(self):
+- self.inited = False
+- warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
+-
+- def init_gl(self, exts, get_proc_address):
+- exts = _strenc(exts) if exts is not None else None
+- cdef char* extsc = NULL
+- if exts is not None:
+- extsc = exts
+- with nogil:
+- err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
+- <void *>get_proc_address)
+- if err < 0:
+- raise MPVError(err)
+-
+- self.inited = True
+-
+- def set_update_callback(self, cb):
+- self.update_cb = cb
+- with nogil:
+- mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+-
+- def draw(self, fbo, w, h):
+- cdef:
+- int fboc = fbo
+- int wc = w
+- int hc = h
+- with nogil:
+- err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- if err < 0:
+- raise MPVError(err)
+-
+- def report_flip(self, time):
+- cdef int64_t ctime = time
+- with nogil:
+- err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- if err < 0:
+- raise MPVError(err)
+-
+- def uninit_gl(self):
+- if not self.inited:
+- return
+- with nogil:
+- err = mpv_opengl_cb_uninit_gl(self._ctx)
+- if err < 0:
+- raise MPVError(err)
+- self.inited = False
+-
+- def __dealloc__(self):
+- self.uninit_gl()
++# cdef class OpenGLContext(object):
++# cdef:
++# mpv_opengl_cb_context *_ctx
++# bint inited
++# object update_cb
++
++# def __init__(self):
++# self.inited = False
++# warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
++
++# def init_gl(self, exts, get_proc_address):
++# exts = _strenc(exts) if exts is not None else None
++# cdef char* extsc = NULL
++# if exts is not None:
++# extsc = exts
++# with nogil:
++# err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
++# <void *>get_proc_address)
++# if err < 0:
++# raise MPVError(err)
++
++# self.inited = True
++
++# def set_update_callback(self, cb):
++# self.update_cb = cb
++# with nogil:
++# mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++
++# def draw(self, fbo, w, h):
++# cdef:
++# int fboc = fbo
++# int wc = w
++# int hc = h
++# with nogil:
++# err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
++# if err < 0:
++# raise MPVError(err)
++
++# def report_flip(self, time):
++# cdef int64_t ctime = time
++# with nogil:
++# err = mpv_opengl_cb_report_flip(self._ctx, ctime)
++# if err < 0:
++# raise MPVError(err)
++
++# def uninit_gl(self):
++# if not self.inited:
++# return
++# with nogil:
++# err = mpv_opengl_cb_uninit_gl(self._ctx)
++# if err < 0:
++# raise MPVError(err)
++# self.inited = False
++
++# def __dealloc__(self):
++# self.uninit_gl()
+
+ DEF MAX_RENDER_PARAMS = 32
+
diff --git a/srcpkgs/vidcutter/patches/mpv-0.35-2.patch b/srcpkgs/vidcutter/patches/mpv-0.35-2.patch
new file mode 100644
index 000000000000..c982ded8475a
--- /dev/null
+++ b/srcpkgs/vidcutter/patches/mpv-0.35-2.patch
@@ -0,0 +1,24 @@
+https://github.com/ozmartian/vidcutter/commit/8010f5c64efe68d8130a036f976d2d2ff1c868ad.patch
+
+From 8010f5c64efe68d8130a036f976d2d2ff1c868ad Mon Sep 17 00:00:00 2001
+From: Pete Alexandrou <pete@ozmartians.com>
+Date: Tue, 22 Feb 2022 16:08:24 +1100
+Subject: [PATCH] fix libmpv version number format
+
+---
+ vidcutter/libs/mpvwidget.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vidcutter/libs/mpvwidget.py b/vidcutter/libs/mpvwidget.py
+index 239b6c9c..6661ad85 100644
+--- a/vidcutter/libs/mpvwidget.py
++++ b/vidcutter/libs/mpvwidget.py
+@@ -247,7 +247,7 @@ def format(self, stream: str='video') -> str:
+
+ def version(self) -> str:
+ ver = self.mpv.api_version
+- return '{0}.{1}'.format(ver[0], ver[1])
++ return '{0}.{1}'.format(ver[1], ver[0])
+
+ def option(self, option: str, val):
+ if isinstance(val, bool):
diff --git a/srcpkgs/vidcutter/patches/mpv-0.35-3.patch b/srcpkgs/vidcutter/patches/mpv-0.35-3.patch
new file mode 100644
index 000000000000..7a1b2909b4c4
--- /dev/null
+++ b/srcpkgs/vidcutter/patches/mpv-0.35-3.patch
@@ -0,0 +1,13289 @@
+https://github.com/ozmartian/vidcutter/commit/4cf1458d832e6ac7a824d7963c6dc3a0e5c17574.patch
+
+From 4cf1458d832e6ac7a824d7963c6dc3a0e5c17574 Mon Sep 17 00:00:00 2001
+From: Pete Alexandrou <pete@ozmartians.com>
+Date: Sat, 30 Apr 2022 15:49:17 +1000
+Subject: [PATCH] pympv updates
+
+---
+ vidcutter/libs/pympv/mpv.c | 3792 +++++++++++++++++-----------------
+ vidcutter/libs/pympv/mpv.pyx | 6 +-
+ 2 files changed, 1900 insertions(+), 1898 deletions(-)
+
+diff --git a/vidcutter/libs/pympv/mpv.c b/vidcutter/libs/pympv/mpv.c
+index a3522ef5..26838a03 100644
+--- a/vidcutter/libs/pympv/mpv.c
++++ b/vidcutter/libs/pympv/mpv.c
+@@ -944,7 +944,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext;
+ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors;
+ struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
+
+-/* "vidcutter/libs/pympv/mpv.pyx":890
++/* "vidcutter/libs/pympv/mpv.pyx":892
+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
+@@ -956,7 +956,7 @@ struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp {
+ int owned;
+ };
+
+-/* "vidcutter/libs/pympv/mpv.pyx":156
++/* "vidcutter/libs/pympv/mpv.pyx":158
+ *
+ *
+ * cdef class EndOfFileReached(object): # <<<<<<<<<<<<<<
+@@ -971,7 +971,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":182
++/* "vidcutter/libs/pympv/mpv.pyx":184
+ *
+ *
+ * cdef class LogMessage(object): # <<<<<<<<<<<<<<
+@@ -988,7 +988,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":243
++/* "vidcutter/libs/pympv/mpv.pyx":245
+ *
+ *
+ * cdef class Property(object): # <<<<<<<<<<<<<<
+@@ -1003,7 +1003,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Property {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":256
++/* "vidcutter/libs/pympv/mpv.pyx":258
+ *
+ *
+ * cdef class Event(object): # <<<<<<<<<<<<<<
+@@ -1020,7 +1020,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Event {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":359
++/* "vidcutter/libs/pympv/mpv.pyx":361
+ *
+ *
+ * cdef class Context(object): # <<<<<<<<<<<<<<
+@@ -1037,7 +1037,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Context {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":881
++/* "vidcutter/libs/pympv/mpv.pyx":883
+ * DEF MAX_RENDER_PARAMS = 32
+ *
+ * cdef class _RenderParams(object): # <<<<<<<<<<<<<<
+@@ -1052,7 +1052,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":928
++/* "vidcutter/libs/pympv/mpv.pyx":930
+ *
+ * @cython.internal
+ * cdef class RenderFrameInfo(object): # <<<<<<<<<<<<<<
+@@ -1065,7 +1065,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":937
++/* "vidcutter/libs/pympv/mpv.pyx":939
+ * return self
+ *
+ * cdef class RenderContext(object): # <<<<<<<<<<<<<<
+@@ -1084,7 +1084,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1122
++/* "vidcutter/libs/pympv/mpv.pyx":1124
+ * self.close()
+ *
+ * cdef class OpenGLRenderContext(RenderContext): # <<<<<<<<<<<<<<
+@@ -1096,7 +1096,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext {
+ };
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":318
++/* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+@@ -1110,7 +1110,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors {
+
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":156
++/* "vidcutter/libs/pympv/mpv.pyx":158
+ *
+ *
+ * cdef class EndOfFileReached(object): # <<<<<<<<<<<<<<
+@@ -1124,7 +1124,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":182
++/* "vidcutter/libs/pympv/mpv.pyx":184
+ *
+ *
+ * cdef class LogMessage(object): # <<<<<<<<<<<<<<
+@@ -1138,7 +1138,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *__pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":243
++/* "vidcutter/libs/pympv/mpv.pyx":245
+ *
+ *
+ * cdef class Property(object): # <<<<<<<<<<<<<<
+@@ -1152,7 +1152,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *__pyx_vtabptr_9vidcutter_4libs_3mpv_Property;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":256
++/* "vidcutter/libs/pympv/mpv.pyx":258
+ *
+ *
+ * cdef class Event(object): # <<<<<<<<<<<<<<
+@@ -1167,7 +1167,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *__pyx_vtabptr_9vidcutter_4libs_3mpv_Event;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":359
++/* "vidcutter/libs/pympv/mpv.pyx":361
+ *
+ *
+ * cdef class Context(object): # <<<<<<<<<<<<<<
+@@ -1184,7 +1184,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *__pyx_vtabptr_9vidcutter_4libs_3mpv_Context;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":881
++/* "vidcutter/libs/pympv/mpv.pyx":883
+ * DEF MAX_RENDER_PARAMS = 32
+ *
+ * cdef class _RenderParams(object): # <<<<<<<<<<<<<<
+@@ -1200,7 +1200,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams {
+ static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *__pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams;
+
+
+-/* "vidcutter/libs/pympv/mpv.pyx":928
++/* "vidcutter/libs/pympv/mpv.pyx":930
+ *
+ * @cython.internal
+ * cdef class RenderFrameInfo(object): # <<<<<<<<<<<<<<
+@@ -2522,9 +2522,9 @@ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeOb
+ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+ static PyObject *__pyx_int_0;
+ static PyObject *__pyx_int_1;
+-static PyObject *__pyx_int_2;
+ static PyObject *__pyx_int_3;
+ static PyObject *__pyx_int_32;
++static PyObject *__pyx_int_109;
+ static PyObject *__pyx_int_5713169;
+ static PyObject *__pyx_int_90958262;
+ static PyObject *__pyx_int_142036910;
+@@ -2588,7 +2588,7 @@ static PyObject *__pyx_codeobj__53;
+ static PyObject *__pyx_codeobj__55;
+ /* Late includes */
+
+-/* "vidcutter/libs/pympv/mpv.pyx":55
++/* "vidcutter/libs/pympv/mpv.pyx":57
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ * def _strdec(s): # <<<<<<<<<<<<<<
+@@ -2627,7 +2627,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_strdec", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":56
++ /* "vidcutter/libs/pympv/mpv.pyx":58
+ * # mpv -> Python
+ * def _strdec(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2643,7 +2643,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":57
++ /* "vidcutter/libs/pympv/mpv.pyx":59
+ * def _strdec(s):
+ * try:
+ * return s.decode("utf-8", _strdec_err) # <<<<<<<<<<<<<<
+@@ -2651,9 +2651,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ * # In python2, bail to bytes on failure
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+@@ -2670,7 +2670,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
+- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+@@ -2679,14 +2679,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
+- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+@@ -2697,7 +2697,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
+ __pyx_t_6 = 0;
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+@@ -2706,7 +2706,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ __pyx_t_4 = 0;
+ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":56
++ /* "vidcutter/libs/pympv/mpv.pyx":58
+ * # mpv -> Python
+ * def _strdec(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2721,7 +2721,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":58
++ /* "vidcutter/libs/pympv/mpv.pyx":60
+ * try:
+ * return s.decode("utf-8", _strdec_err)
+ * except UnicodeDecodeError: # <<<<<<<<<<<<<<
+@@ -2731,12 +2731,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("vidcutter.libs.mpv._strdec", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 58, __pyx_L5_except_error)
++ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 60, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_9);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":60
++ /* "vidcutter/libs/pympv/mpv.pyx":62
+ * except UnicodeDecodeError:
+ * # In python2, bail to bytes on failure
+ * return bytes(s) # <<<<<<<<<<<<<<
+@@ -2744,7 +2744,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ * # Python -> mpv
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_s); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __pyx_L5_except_error)
++ __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_s); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+@@ -2756,7 +2756,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":56
++ /* "vidcutter/libs/pympv/mpv.pyx":58
+ * # mpv -> Python
+ * def _strdec(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2782,7 +2782,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ goto __pyx_L0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":55
++ /* "vidcutter/libs/pympv/mpv.pyx":57
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ * def _strdec(s): # <<<<<<<<<<<<<<
+@@ -2805,7 +2805,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":63
++/* "vidcutter/libs/pympv/mpv.pyx":65
+ *
+ * # Python -> mpv
+ * def _strenc(s): # <<<<<<<<<<<<<<
+@@ -2844,7 +2844,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_strenc", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":64
++ /* "vidcutter/libs/pympv/mpv.pyx":66
+ * # Python -> mpv
+ * def _strenc(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2860,7 +2860,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":65
++ /* "vidcutter/libs/pympv/mpv.pyx":67
+ * def _strenc(s):
+ * try:
+ * return s.encode("utf-8", _strdec_err) # <<<<<<<<<<<<<<
+@@ -2868,9 +2868,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ * # In python2, assume bytes and walk right through
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+@@ -2887,7 +2887,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
+- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+@@ -2896,14 +2896,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
+- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+@@ -2914,7 +2914,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
+ __pyx_t_6 = 0;
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+@@ -2923,7 +2923,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ __pyx_t_4 = 0;
+ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":64
++ /* "vidcutter/libs/pympv/mpv.pyx":66
+ * # Python -> mpv
+ * def _strenc(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2938,7 +2938,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":66
++ /* "vidcutter/libs/pympv/mpv.pyx":68
+ * try:
+ * return s.encode("utf-8", _strdec_err)
+ * except UnicodeEncodeError: # <<<<<<<<<<<<<<
+@@ -2948,12 +2948,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeEncodeError);
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("vidcutter.libs.mpv._strenc", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 66, __pyx_L5_except_error)
++ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 68, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_9);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":68
++ /* "vidcutter/libs/pympv/mpv.pyx":70
+ * except UnicodeEncodeError:
+ * # In python2, assume bytes and walk right through
+ * return s # <<<<<<<<<<<<<<
+@@ -2971,7 +2971,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":64
++ /* "vidcutter/libs/pympv/mpv.pyx":66
+ * # Python -> mpv
+ * def _strenc(s):
+ * try: # <<<<<<<<<<<<<<
+@@ -2997,7 +2997,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ goto __pyx_L0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":63
++ /* "vidcutter/libs/pympv/mpv.pyx":65
+ *
+ * # Python -> mpv
+ * def _strenc(s): # <<<<<<<<<<<<<<
+@@ -3020,7 +3020,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":163
++/* "vidcutter/libs/pympv/mpv.pyx":165
+ * cdef public object reason, error
+ *
+ * cdef _init(self, mpv_event_end_file* eof): # <<<<<<<<<<<<<<
+@@ -3037,14 +3037,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":164
++ /* "vidcutter/libs/pympv/mpv.pyx":166
+ *
+ * cdef _init(self, mpv_event_end_file* eof):
+ * self.reason = eof.reason # <<<<<<<<<<<<<<
+ * self.error = eof.error
+ * return self
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->reason); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->reason); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->reason);
+@@ -3052,14 +3052,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
+ __pyx_v_self->reason = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":165
++ /* "vidcutter/libs/pympv/mpv.pyx":167
+ * cdef _init(self, mpv_event_end_file* eof):
+ * self.reason = eof.reason
+ * self.error = eof.error # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->error);
+@@ -3067,7 +3067,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
+ __pyx_v_self->error = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":166
++ /* "vidcutter/libs/pympv/mpv.pyx":168
+ * self.reason = eof.reason
+ * self.error = eof.error
+ * return self # <<<<<<<<<<<<<<
+@@ -3079,7 +3079,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":163
++ /* "vidcutter/libs/pympv/mpv.pyx":165
+ * cdef public object reason, error
+ *
+ * cdef _init(self, mpv_event_end_file* eof): # <<<<<<<<<<<<<<
+@@ -3098,7 +3098,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":161
++/* "vidcutter/libs/pympv/mpv.pyx":163
+ * Wraps: mpv_event_end_file
+ * """
+ * cdef public object reason, error # <<<<<<<<<<<<<<
+@@ -3587,7 +3587,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_2__setstate_c
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":189
++/* "vidcutter/libs/pympv/mpv.pyx":191
+ * cdef public object prefix, level, text, log_level
+ *
+ * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
+@@ -3607,16 +3607,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":190
++ /* "vidcutter/libs/pympv/mpv.pyx":192
+ *
+ * cdef _init(self, mpv_event_log_message* msg):
+ * self.level = _strdec(msg.level) # <<<<<<<<<<<<<<
+ * self.prefix = _strdec(msg.prefix)
+ * self.text = _strdec(msg.text)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -3631,7 +3631,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -3640,16 +3640,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_v_self->level = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":191
++ /* "vidcutter/libs/pympv/mpv.pyx":193
+ * cdef _init(self, mpv_event_log_message* msg):
+ * self.level = _strdec(msg.level)
+ * self.prefix = _strdec(msg.prefix) # <<<<<<<<<<<<<<
+ * self.text = _strdec(msg.text)
+ * self.log_level = msg.log_level
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -3664,7 +3664,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -3673,16 +3673,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_v_self->prefix = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":192
++ /* "vidcutter/libs/pympv/mpv.pyx":194
+ * self.level = _strdec(msg.level)
+ * self.prefix = _strdec(msg.prefix)
+ * self.text = _strdec(msg.text) # <<<<<<<<<<<<<<
+ * self.log_level = msg.log_level
+ * return self
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -3697,7 +3697,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -3706,14 +3706,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_v_self->text = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":193
++ /* "vidcutter/libs/pympv/mpv.pyx":195
+ * self.prefix = _strdec(msg.prefix)
+ * self.text = _strdec(msg.text)
+ * self.log_level = msg.log_level # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->log_level);
+@@ -3721,7 +3721,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_v_self->log_level = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":194
++ /* "vidcutter/libs/pympv/mpv.pyx":196
+ * self.text = _strdec(msg.text)
+ * self.log_level = msg.log_level
+ * return self # <<<<<<<<<<<<<<
+@@ -3733,7 +3733,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":189
++ /* "vidcutter/libs/pympv/mpv.pyx":191
+ * cdef public object prefix, level, text, log_level
+ *
+ * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
+@@ -3755,7 +3755,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":187
++/* "vidcutter/libs/pympv/mpv.pyx":189
+ * Wraps: mpv_event_log_message
+ * """
+ * cdef public object prefix, level, text, log_level # <<<<<<<<<<<<<<
+@@ -4438,7 +4438,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":197
++/* "vidcutter/libs/pympv/mpv.pyx":199
+ *
+ *
+ * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
+@@ -4459,7 +4459,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_convert_node_value", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":198
++ /* "vidcutter/libs/pympv/mpv.pyx":200
+ *
+ * cdef _convert_node_value(mpv_node node):
+ * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+@@ -4469,7 +4469,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ switch (__pyx_v_node.format) {
+ case MPV_FORMAT_STRING:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":199
++ /* "vidcutter/libs/pympv/mpv.pyx":201
+ * cdef _convert_node_value(mpv_node node):
+ * if node.format == MPV_FORMAT_STRING:
+ * return _strdec(node.u.string) # <<<<<<<<<<<<<<
+@@ -4477,9 +4477,9 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ * return not not int(node.u.flag)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -4494,14 +4494,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":198
++ /* "vidcutter/libs/pympv/mpv.pyx":200
+ *
+ * cdef _convert_node_value(mpv_node node):
+ * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+@@ -4511,7 +4511,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ break;
+ case MPV_FORMAT_FLAG:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":201
++ /* "vidcutter/libs/pympv/mpv.pyx":203
+ * return _strdec(node.u.string)
+ * elif node.format == MPV_FORMAT_FLAG:
+ * return not not int(node.u.flag) # <<<<<<<<<<<<<<
+@@ -4519,20 +4519,20 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ * return int(node.u.int64)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":200
++ /* "vidcutter/libs/pympv/mpv.pyx":202
+ * if node.format == MPV_FORMAT_STRING:
+ * return _strdec(node.u.string)
+ * elif node.format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+@@ -4542,7 +4542,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ break;
+ case MPV_FORMAT_INT64:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":203
++ /* "vidcutter/libs/pympv/mpv.pyx":205
+ * return not not int(node.u.flag)
+ * elif node.format == MPV_FORMAT_INT64:
+ * return int(node.u.int64) # <<<<<<<<<<<<<<
+@@ -4550,16 +4550,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ * return float(node.u.double_)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":202
++ /* "vidcutter/libs/pympv/mpv.pyx":204
+ * elif node.format == MPV_FORMAT_FLAG:
+ * return not not int(node.u.flag)
+ * elif node.format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+@@ -4569,7 +4569,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ break;
+ case MPV_FORMAT_DOUBLE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":205
++ /* "vidcutter/libs/pympv/mpv.pyx":207
+ * return int(node.u.int64)
+ * elif node.format == MPV_FORMAT_DOUBLE:
+ * return float(node.u.double_) # <<<<<<<<<<<<<<
+@@ -4577,13 +4577,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ * return _convert_value(node.u.list, node.format)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":204
++ /* "vidcutter/libs/pympv/mpv.pyx":206
+ * elif node.format == MPV_FORMAT_INT64:
+ * return int(node.u.int64)
+ * elif node.format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+@@ -4593,7 +4593,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ break;
+ case MPV_FORMAT_NODE_MAP:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":207
++ /* "vidcutter/libs/pympv/mpv.pyx":209
+ * return float(node.u.double_)
+ * elif node.format == MPV_FORMAT_NODE_MAP:
+ * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
+@@ -4601,13 +4601,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ * return _convert_value(node.u.list, node.format)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":206
++ /* "vidcutter/libs/pympv/mpv.pyx":208
+ * elif node.format == MPV_FORMAT_DOUBLE:
+ * return float(node.u.double_)
+ * elif node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+@@ -4617,7 +4617,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ break;
+ case MPV_FORMAT_NODE_ARRAY:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":209
++ /* "vidcutter/libs/pympv/mpv.pyx":211
+ * return _convert_value(node.u.list, node.format)
+ * elif node.format == MPV_FORMAT_NODE_ARRAY:
+ * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
+@@ -4625,13 +4625,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":208
++ /* "vidcutter/libs/pympv/mpv.pyx":210
+ * elif node.format == MPV_FORMAT_NODE_MAP:
+ * return _convert_value(node.u.list, node.format)
+ * elif node.format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+@@ -4642,7 +4642,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ default: break;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":210
++ /* "vidcutter/libs/pympv/mpv.pyx":212
+ * elif node.format == MPV_FORMAT_NODE_ARRAY:
+ * return _convert_value(node.u.list, node.format)
+ * return None # <<<<<<<<<<<<<<
+@@ -4653,7 +4653,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":197
++ /* "vidcutter/libs/pympv/mpv.pyx":199
+ *
+ *
+ * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
+@@ -4675,7 +4675,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":213
++/* "vidcutter/libs/pympv/mpv.pyx":215
+ *
+ *
+ * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
+@@ -4704,7 +4704,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_convert_value", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":216
++ /* "vidcutter/libs/pympv/mpv.pyx":218
+ * cdef mpv_node node
+ * cdef mpv_node_list nodelist
+ * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
+@@ -4714,7 +4714,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ switch (__pyx_v_format) {
+ case MPV_FORMAT_NODE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":217
++ /* "vidcutter/libs/pympv/mpv.pyx":219
+ * cdef mpv_node_list nodelist
+ * if format == MPV_FORMAT_NODE:
+ * node = (<mpv_node*>data)[0] # <<<<<<<<<<<<<<
+@@ -4723,7 +4723,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ */
+ __pyx_v_node = (((struct mpv_node *)__pyx_v_data)[0]);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":218
++ /* "vidcutter/libs/pympv/mpv.pyx":220
+ * if format == MPV_FORMAT_NODE:
+ * node = (<mpv_node*>data)[0]
+ * return _convert_node_value(node) # <<<<<<<<<<<<<<
+@@ -4731,13 +4731,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ * nodelist = (<mpv_node_list*>data)[0]
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":216
++ /* "vidcutter/libs/pympv/mpv.pyx":218
+ * cdef mpv_node node
+ * cdef mpv_node_list nodelist
+ * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
+@@ -4747,7 +4747,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_NODE_ARRAY:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":220
++ /* "vidcutter/libs/pympv/mpv.pyx":222
+ * return _convert_node_value(node)
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
+@@ -4756,19 +4756,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ */
+ __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":221
++ /* "vidcutter/libs/pympv/mpv.pyx":223
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * nodelist = (<mpv_node_list*>data)[0]
+ * values = [] # <<<<<<<<<<<<<<
+ * for i in range(nodelist.num):
+ * values.append(_convert_node_value(nodelist.values[i]))
+ */
+- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_values = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":222
++ /* "vidcutter/libs/pympv/mpv.pyx":224
+ * nodelist = (<mpv_node_list*>data)[0]
+ * values = []
+ * for i in range(nodelist.num): # <<<<<<<<<<<<<<
+@@ -4780,20 +4780,20 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_i = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":223
++ /* "vidcutter/libs/pympv/mpv.pyx":225
+ * values = []
+ * for i in range(nodelist.num):
+ * values.append(_convert_node_value(nodelist.values[i])) # <<<<<<<<<<<<<<
+ * return values
+ * elif format == MPV_FORMAT_NODE_MAP:
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 225, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":224
++ /* "vidcutter/libs/pympv/mpv.pyx":226
+ * for i in range(nodelist.num):
+ * values.append(_convert_node_value(nodelist.values[i]))
+ * return values # <<<<<<<<<<<<<<
+@@ -4805,7 +4805,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ __pyx_r = __pyx_v_values;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":219
++ /* "vidcutter/libs/pympv/mpv.pyx":221
+ * node = (<mpv_node*>data)[0]
+ * return _convert_node_value(node)
+ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+@@ -4815,7 +4815,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_NODE_MAP:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":226
++ /* "vidcutter/libs/pympv/mpv.pyx":228
+ * return values
+ * elif format == MPV_FORMAT_NODE_MAP:
+ * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
+@@ -4824,19 +4824,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ */
+ __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":227
++ /* "vidcutter/libs/pympv/mpv.pyx":229
+ * elif format == MPV_FORMAT_NODE_MAP:
+ * nodelist = (<mpv_node_list*>data)[0]
+ * values = {} # <<<<<<<<<<<<<<
+ * for i in range(nodelist.num):
+ * value = _convert_node_value(nodelist.values[i])
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_values = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":228
++ /* "vidcutter/libs/pympv/mpv.pyx":230
+ * nodelist = (<mpv_node_list*>data)[0]
+ * values = {}
+ * for i in range(nodelist.num): # <<<<<<<<<<<<<<
+@@ -4848,28 +4848,28 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
+ __pyx_v_i = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":229
++ /* "vidcutter/libs/pympv/mpv.pyx":231
+ * values = {}
+ * for i in range(nodelist.num):
+ * value = _convert_node_value(nodelist.values[i]) # <<<<<<<<<<<<<<
+ * values[_strdec(nodelist.keys[i])] = value
+ * return values
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":230
++ /* "vidcutter/libs/pympv/mpv.pyx":232
+ * for i in range(nodelist.num):
+ * value = _convert_node_value(nodelist.values[i])
+ * values[_strdec(nodelist.keys[i])] = value # <<<<<<<<<<<<<<
+ * return values
+ * elif format == MPV_FORMAT_STRING:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -4884,14 +4884,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
++ if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":231
++ /* "vidcutter/libs/pympv/mpv.pyx":233
+ * value = _convert_node_value(nodelist.values[i])
+ * values[_strdec(nodelist.keys[i])] = value
+ * return values # <<<<<<<<<<<<<<
+@@ -4903,7 +4903,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ __pyx_r = __pyx_v_values;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":225
++ /* "vidcutter/libs/pympv/mpv.pyx":227
+ * values.append(_convert_node_value(nodelist.values[i]))
+ * return values
+ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+@@ -4913,7 +4913,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_STRING:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":233
++ /* "vidcutter/libs/pympv/mpv.pyx":235
+ * return values
+ * elif format == MPV_FORMAT_STRING:
+ * return _strdec(((<char**>data)[0])) # <<<<<<<<<<<<<<
+@@ -4921,9 +4921,9 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ * return not not (<uint64_t*>data)[0]
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -4938,14 +4938,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":232
++ /* "vidcutter/libs/pympv/mpv.pyx":234
+ * values[_strdec(nodelist.keys[i])] = value
+ * return values
+ * elif format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+@@ -4955,7 +4955,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_FLAG:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":235
++ /* "vidcutter/libs/pympv/mpv.pyx":237
+ * return _strdec(((<char**>data)[0]))
+ * elif format == MPV_FORMAT_FLAG:
+ * return not not (<uint64_t*>data)[0] # <<<<<<<<<<<<<<
+@@ -4963,13 +4963,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ * return int((<uint64_t*>data)[0])
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":234
++ /* "vidcutter/libs/pympv/mpv.pyx":236
+ * elif format == MPV_FORMAT_STRING:
+ * return _strdec(((<char**>data)[0]))
+ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+@@ -4979,7 +4979,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_INT64:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":237
++ /* "vidcutter/libs/pympv/mpv.pyx":239
+ * return not not (<uint64_t*>data)[0]
+ * elif format == MPV_FORMAT_INT64:
+ * return int((<uint64_t*>data)[0]) # <<<<<<<<<<<<<<
+@@ -4987,16 +4987,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ * return float((<double*>data)[0])
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":236
++ /* "vidcutter/libs/pympv/mpv.pyx":238
+ * elif format == MPV_FORMAT_FLAG:
+ * return not not (<uint64_t*>data)[0]
+ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+@@ -5006,7 +5006,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ break;
+ case MPV_FORMAT_DOUBLE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":239
++ /* "vidcutter/libs/pympv/mpv.pyx":241
+ * return int((<uint64_t*>data)[0])
+ * elif format == MPV_FORMAT_DOUBLE:
+ * return float((<double*>data)[0]) # <<<<<<<<<<<<<<
+@@ -5014,13 +5014,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
++ __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":238
++ /* "vidcutter/libs/pympv/mpv.pyx":240
+ * elif format == MPV_FORMAT_INT64:
+ * return int((<uint64_t*>data)[0])
+ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+@@ -5031,7 +5031,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ default: break;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":240
++ /* "vidcutter/libs/pympv/mpv.pyx":242
+ * elif format == MPV_FORMAT_DOUBLE:
+ * return float((<double*>data)[0])
+ * return None # <<<<<<<<<<<<<<
+@@ -5042,7 +5042,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":213
++ /* "vidcutter/libs/pympv/mpv.pyx":215
+ *
+ *
+ * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
+@@ -5066,7 +5066,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":250
++/* "vidcutter/libs/pympv/mpv.pyx":252
+ * cdef public object name, data
+ *
+ * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
+@@ -5086,16 +5086,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":251
++ /* "vidcutter/libs/pympv/mpv.pyx":253
+ *
+ * cdef _init(self, mpv_event_property* prop):
+ * self.name = _strdec(prop.name) # <<<<<<<<<<<<<<
+ * self.data = _convert_value(prop.data, prop.format)
+ * return self
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -5110,7 +5110,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -5119,14 +5119,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __pyx_v_self->name = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":252
++ /* "vidcutter/libs/pympv/mpv.pyx":254
+ * cdef _init(self, mpv_event_property* prop):
+ * self.name = _strdec(prop.name)
+ * self.data = _convert_value(prop.data, prop.format) # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->data);
+@@ -5134,7 +5134,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __pyx_v_self->data = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":253
++ /* "vidcutter/libs/pympv/mpv.pyx":255
+ * self.name = _strdec(prop.name)
+ * self.data = _convert_value(prop.data, prop.format)
+ * return self # <<<<<<<<<<<<<<
+@@ -5146,7 +5146,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":250
++ /* "vidcutter/libs/pympv/mpv.pyx":252
+ * cdef public object name, data
+ *
+ * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
+@@ -5168,7 +5168,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":248
++/* "vidcutter/libs/pympv/mpv.pyx":250
+ * Wraps: mpv_event_property
+ * """
+ * cdef public object name, data # <<<<<<<<<<<<<<
+@@ -5657,7 +5657,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(s
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":263
++/* "vidcutter/libs/pympv/mpv.pyx":265
+ *
+ * @property
+ * def error_str(self): # <<<<<<<<<<<<<<
+@@ -5691,7 +5691,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":266
++ /* "vidcutter/libs/pympv/mpv.pyx":268
+ * """mpv_error_string of the error proeprty"""
+ * cdef const char* err_c
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -5706,7 +5706,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":267
++ /* "vidcutter/libs/pympv/mpv.pyx":269
+ * cdef const char* err_c
+ * with nogil:
+ * err_c = mpv_error_string(self.error) # <<<<<<<<<<<<<<
+@@ -5716,7 +5716,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ __pyx_v_err_c = mpv_error_string(__pyx_v_self->error);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":266
++ /* "vidcutter/libs/pympv/mpv.pyx":268
+ * """mpv_error_string of the error proeprty"""
+ * cdef const char* err_c
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -5735,7 +5735,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":268
++ /* "vidcutter/libs/pympv/mpv.pyx":270
+ * with nogil:
+ * err_c = mpv_error_string(self.error)
+ * return _strdec(err_c) # <<<<<<<<<<<<<<
+@@ -5743,9 +5743,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ * cdef _data(self, mpv_event* event):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -5760,14 +5760,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":263
++ /* "vidcutter/libs/pympv/mpv.pyx":265
+ *
+ * @property
+ * def error_str(self): # <<<<<<<<<<<<<<
+@@ -5789,7 +5789,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":270
++/* "vidcutter/libs/pympv/mpv.pyx":272
+ * return _strdec(err_c)
+ *
+ * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
+@@ -5819,7 +5819,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_data", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":271
++ /* "vidcutter/libs/pympv/mpv.pyx":273
+ *
+ * cdef _data(self, mpv_event* event):
+ * cdef void* data = event.data # <<<<<<<<<<<<<<
+@@ -5829,7 +5829,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ __pyx_t_1 = __pyx_v_event->data;
+ __pyx_v_data = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":273
++ /* "vidcutter/libs/pympv/mpv.pyx":275
+ * cdef void* data = event.data
+ * cdef mpv_event_client_message* climsg
+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
+@@ -5839,7 +5839,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ switch (__pyx_v_self->id) {
+ case MPV_EVENT_GET_PROPERTY_REPLY:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":274
++ /* "vidcutter/libs/pympv/mpv.pyx":276
+ * cdef mpv_event_client_message* climsg
+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
+ * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
+@@ -5847,16 +5847,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ * return Property()._init(<mpv_event_property*>data)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":273
++ /* "vidcutter/libs/pympv/mpv.pyx":275
+ * cdef void* data = event.data
+ * cdef mpv_event_client_message* climsg
+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
+@@ -5866,7 +5866,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ break;
+ case MPV_EVENT_PROPERTY_CHANGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":276
++ /* "vidcutter/libs/pympv/mpv.pyx":278
+ * return Property()._init(<mpv_event_property*>data)
+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+ * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
+@@ -5874,16 +5874,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ * return LogMessage()._init(<mpv_event_log_message*>data)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":275
++ /* "vidcutter/libs/pympv/mpv.pyx":277
+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
+ * return Property()._init(<mpv_event_property*>data)
+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+@@ -5893,7 +5893,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ break;
+ case MPV_EVENT_LOG_MESSAGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":278
++ /* "vidcutter/libs/pympv/mpv.pyx":280
+ * return Property()._init(<mpv_event_property*>data)
+ * elif self.id == MPV_EVENT_LOG_MESSAGE:
+ * return LogMessage()._init(<mpv_event_log_message*>data) # <<<<<<<<<<<<<<
+@@ -5901,16 +5901,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":277
++ /* "vidcutter/libs/pympv/mpv.pyx":279
+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
+ * return Property()._init(<mpv_event_property*>data)
+ * elif self.id == MPV_EVENT_LOG_MESSAGE: # <<<<<<<<<<<<<<
+@@ -5920,7 +5920,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ break;
+ case MPV_EVENT_CLIENT_MESSAGE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":282
++ /* "vidcutter/libs/pympv/mpv.pyx":284
+ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+ * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+ * climsg = <mpv_event_client_message*>data # <<<<<<<<<<<<<<
+@@ -5929,19 +5929,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ */
+ __pyx_v_climsg = ((struct mpv_event_client_message *)__pyx_v_data);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":283
++ /* "vidcutter/libs/pympv/mpv.pyx":285
+ * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+ * climsg = <mpv_event_client_message*>data
+ * args = [] # <<<<<<<<<<<<<<
+ * num_args = climsg.num_args
+ * for i in range(num_args):
+ */
+- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
++ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_args = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":284
++ /* "vidcutter/libs/pympv/mpv.pyx":286
+ * climsg = <mpv_event_client_message*>data
+ * args = []
+ * num_args = climsg.num_args # <<<<<<<<<<<<<<
+@@ -5951,7 +5951,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ __pyx_t_4 = __pyx_v_climsg->num_args;
+ __pyx_v_num_args = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":285
++ /* "vidcutter/libs/pympv/mpv.pyx":287
+ * args = []
+ * num_args = climsg.num_args
+ * for i in range(num_args): # <<<<<<<<<<<<<<
+@@ -5963,26 +5963,26 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_i = __pyx_t_6;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":286
++ /* "vidcutter/libs/pympv/mpv.pyx":288
+ * num_args = climsg.num_args
+ * for i in range(num_args):
+ * arg = <char*>climsg.args[i] # <<<<<<<<<<<<<<
+ * arg = _strdec(arg)
+ * args.append(arg)
+ */
+- __pyx_t_3 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":287
++ /* "vidcutter/libs/pympv/mpv.pyx":289
+ * for i in range(num_args):
+ * arg = <char*>climsg.args[i]
+ * arg = _strdec(arg) # <<<<<<<<<<<<<<
+ * args.append(arg)
+ * return args
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -5996,23 +5996,23 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ }
+ __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_arg) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_arg);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":288
++ /* "vidcutter/libs/pympv/mpv.pyx":290
+ * arg = <char*>climsg.args[i]
+ * arg = _strdec(arg)
+ * args.append(arg) # <<<<<<<<<<<<<<
+ * return args
+ * elif self.id == MPV_EVENT_END_FILE:
+ */
+- __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
++ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 290, __pyx_L1_error)
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":289
++ /* "vidcutter/libs/pympv/mpv.pyx":291
+ * arg = _strdec(arg)
+ * args.append(arg)
+ * return args # <<<<<<<<<<<<<<
+@@ -6024,7 +6024,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ __pyx_r = __pyx_v_args;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":281
++ /* "vidcutter/libs/pympv/mpv.pyx":283
+ * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
+ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+ * elif self.id == MPV_EVENT_CLIENT_MESSAGE: # <<<<<<<<<<<<<<
+@@ -6034,7 +6034,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ break;
+ case MPV_EVENT_END_FILE:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":291
++ /* "vidcutter/libs/pympv/mpv.pyx":293
+ * return args
+ * elif self.id == MPV_EVENT_END_FILE:
+ * return EndOfFileReached()._init(<mpv_event_end_file*>data) # <<<<<<<<<<<<<<
+@@ -6042,16 +6042,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":290
++ /* "vidcutter/libs/pympv/mpv.pyx":292
+ * args.append(arg)
+ * return args
+ * elif self.id == MPV_EVENT_END_FILE: # <<<<<<<<<<<<<<
+@@ -6062,7 +6062,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ default: break;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":292
++ /* "vidcutter/libs/pympv/mpv.pyx":294
+ * elif self.id == MPV_EVENT_END_FILE:
+ * return EndOfFileReached()._init(<mpv_event_end_file*>data)
+ * return None # <<<<<<<<<<<<<<
+@@ -6073,7 +6073,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":270
++ /* "vidcutter/libs/pympv/mpv.pyx":272
+ * return _strdec(err_c)
+ *
+ * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
+@@ -6096,7 +6096,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":295
++/* "vidcutter/libs/pympv/mpv.pyx":297
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+@@ -6130,7 +6130,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":298
++ /* "vidcutter/libs/pympv/mpv.pyx":300
+ * """mpv_event_name of the event id"""
+ * cdef const char* name_c
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -6145,7 +6145,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":299
++ /* "vidcutter/libs/pympv/mpv.pyx":301
+ * cdef const char* name_c
+ * with nogil:
+ * name_c = mpv_event_name(self.id) # <<<<<<<<<<<<<<
+@@ -6155,7 +6155,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ __pyx_v_name_c = mpv_event_name(__pyx_v_self->id);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":298
++ /* "vidcutter/libs/pympv/mpv.pyx":300
+ * """mpv_event_name of the event id"""
+ * cdef const char* name_c
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -6174,7 +6174,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":300
++ /* "vidcutter/libs/pympv/mpv.pyx":302
+ * with nogil:
+ * name_c = mpv_event_name(self.id)
+ * return _strdec(name_c) # <<<<<<<<<<<<<<
+@@ -6182,9 +6182,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ * cdef _init(self, mpv_event* event, ctx):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -6199,14 +6199,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":295
++ /* "vidcutter/libs/pympv/mpv.pyx":297
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+@@ -6228,7 +6228,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":302
++/* "vidcutter/libs/pympv/mpv.pyx":304
+ * return _strdec(name_c)
+ *
+ * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
+@@ -6257,20 +6257,20 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_init", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":303
++ /* "vidcutter/libs/pympv/mpv.pyx":305
+ *
+ * cdef _init(self, mpv_event* event, ctx):
+ * cdef uint64_t ctxid = <uint64_t>id(ctx) # <<<<<<<<<<<<<<
+ * self.id = event.event_id
+ * self.data = self._data(event)
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 305, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":304
++ /* "vidcutter/libs/pympv/mpv.pyx":306
+ * cdef _init(self, mpv_event* event, ctx):
+ * cdef uint64_t ctxid = <uint64_t>id(ctx)
+ * self.id = event.event_id # <<<<<<<<<<<<<<
+@@ -6280,14 +6280,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_t_3 = __pyx_v_event->event_id;
+ __pyx_v_self->id = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":305
++ /* "vidcutter/libs/pympv/mpv.pyx":307
+ * cdef uint64_t ctxid = <uint64_t>id(ctx)
+ * self.id = event.event_id
+ * self.data = self._data(event) # <<<<<<<<<<<<<<
+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->data);
+@@ -6295,19 +6295,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_v_self->data = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":306
++ /* "vidcutter/libs/pympv/mpv.pyx":308
+ * self.id = event.event_id
+ * self.data = self._data(event)
+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None) # <<<<<<<<<<<<<<
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+ * userdata.remove()
+ */
+- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+@@ -6324,7 +6324,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+@@ -6333,14 +6333,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+@@ -6351,7 +6351,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_None);
+ __pyx_t_4 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+@@ -6359,7 +6359,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_v_userdata = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":307
++ /* "vidcutter/libs/pympv/mpv.pyx":309
+ * self.data = self._data(event)
+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+@@ -6378,14 +6378,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":308
++ /* "vidcutter/libs/pympv/mpv.pyx":310
+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+ * userdata.remove() # <<<<<<<<<<<<<<
+ * if not userdata.observed and userdata.counter <= 0:
+ * del _reply_userdatas[ctxid][event.reply_userdata]
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+@@ -6399,21 +6399,21 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ }
+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":309
++ /* "vidcutter/libs/pympv/mpv.pyx":311
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+ * userdata.remove()
+ * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
+ * del _reply_userdatas[ctxid][event.reply_userdata]
+ * if userdata is not None:
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = ((!__pyx_t_11) != 0);
+ if (__pyx_t_10) {
+@@ -6421,29 +6421,29 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_t_9 = __pyx_t_10;
+ goto __pyx_L7_bool_binop_done;
+ }
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 311, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_9 = __pyx_t_10;
+ __pyx_L7_bool_binop_done:;
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":310
++ /* "vidcutter/libs/pympv/mpv.pyx":312
+ * userdata.remove()
+ * if not userdata.observed and userdata.counter <= 0:
+ * del _reply_userdatas[ctxid][event.reply_userdata] # <<<<<<<<<<<<<<
+ * if userdata is not None:
+ * userdata = userdata.data
+ */
+- __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+- if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
++ if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 312, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":309
++ /* "vidcutter/libs/pympv/mpv.pyx":311
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
+ * userdata.remove()
+ * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
+@@ -6452,7 +6452,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":307
++ /* "vidcutter/libs/pympv/mpv.pyx":309
+ * self.data = self._data(event)
+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
+@@ -6461,7 +6461,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":311
++ /* "vidcutter/libs/pympv/mpv.pyx":313
+ * if not userdata.observed and userdata.counter <= 0:
+ * del _reply_userdatas[ctxid][event.reply_userdata]
+ * if userdata is not None: # <<<<<<<<<<<<<<
+@@ -6472,19 +6472,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":312
++ /* "vidcutter/libs/pympv/mpv.pyx":314
+ * del _reply_userdatas[ctxid][event.reply_userdata]
+ * if userdata is not None:
+ * userdata = userdata.data # <<<<<<<<<<<<<<
+ * self.reply_userdata = userdata
+ * self.error = event.error
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF_SET(__pyx_v_userdata, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":311
++ /* "vidcutter/libs/pympv/mpv.pyx":313
+ * if not userdata.observed and userdata.counter <= 0:
+ * del _reply_userdatas[ctxid][event.reply_userdata]
+ * if userdata is not None: # <<<<<<<<<<<<<<
+@@ -6493,7 +6493,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":313
++ /* "vidcutter/libs/pympv/mpv.pyx":315
+ * if userdata is not None:
+ * userdata = userdata.data
+ * self.reply_userdata = userdata # <<<<<<<<<<<<<<
+@@ -6506,7 +6506,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __Pyx_DECREF(__pyx_v_self->reply_userdata);
+ __pyx_v_self->reply_userdata = __pyx_v_userdata;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":314
++ /* "vidcutter/libs/pympv/mpv.pyx":316
+ * userdata = userdata.data
+ * self.reply_userdata = userdata
+ * self.error = event.error # <<<<<<<<<<<<<<
+@@ -6516,7 +6516,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_t_7 = __pyx_v_event->error;
+ __pyx_v_self->error = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":315
++ /* "vidcutter/libs/pympv/mpv.pyx":317
+ * self.reply_userdata = userdata
+ * self.error = event.error
+ * return self # <<<<<<<<<<<<<<
+@@ -6528,7 +6528,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":302
++ /* "vidcutter/libs/pympv/mpv.pyx":304
+ * return _strdec(name_c)
+ *
+ * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
+@@ -6552,7 +6552,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":258
++/* "vidcutter/libs/pympv/mpv.pyx":260
+ * cdef class Event(object):
+ * """Wraps: mpv_event"""
+ * cdef public mpv_event_id id # <<<<<<<<<<<<<<
+@@ -6582,7 +6582,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(struct __pyx_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+@@ -6620,7 +6620,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__set__", 0);
+- __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error)
++ __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L1_error)
+ __pyx_v_self->id = __pyx_t_1;
+
+ /* function exit code */
+@@ -6634,7 +6634,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":259
++/* "vidcutter/libs/pympv/mpv.pyx":261
+ * """Wraps: mpv_event"""
+ * cdef public mpv_event_id id
+ * cdef public int error # <<<<<<<<<<<<<<
+@@ -6664,7 +6664,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __p
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+@@ -6702,7 +6702,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_ob
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__set__", 0);
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 261, __pyx_L1_error)
+ __pyx_v_self->error = __pyx_t_1;
+
+ /* function exit code */
+@@ -6716,7 +6716,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_ob
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":260
++/* "vidcutter/libs/pympv/mpv.pyx":262
+ * cdef public mpv_event_id id
+ * cdef public int error
+ * cdef public object data, reply_userdata # <<<<<<<<<<<<<<
+@@ -7215,7 +7215,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(stru
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":318
++/* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+@@ -7237,7 +7237,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, P
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":319
++/* "vidcutter/libs/pympv/mpv.pyx":321
+ *
+ * def _errors(fn):
+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+@@ -7285,42 +7285,42 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
+ __pyx_outer_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *) __Pyx_CyFunction_GetClosure(__pyx_self);
+ __pyx_cur_scope = __pyx_outer_scope;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":320
++ /* "vidcutter/libs/pympv/mpv.pyx":322
+ * def _errors(fn):
+ * def wrapped(*k, **kw):
+ * v = fn(*k, **kw) # <<<<<<<<<<<<<<
+ * if v < 0:
+ * raise MPVError(v)
+ */
+- if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 320, __pyx_L1_error) }
+- __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
++ if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 322, __pyx_L1_error) }
++ __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_v = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":321
++ /* "vidcutter/libs/pympv/mpv.pyx":323
+ * def wrapped(*k, **kw):
+ * v = fn(*k, **kw)
+ * if v < 0: # <<<<<<<<<<<<<<
+ * raise MPVError(v)
+ * return wrapped
+ */
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 321, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 323, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":322
++ /* "vidcutter/libs/pympv/mpv.pyx":324
+ * v = fn(*k, **kw)
+ * if v < 0:
+ * raise MPVError(v) # <<<<<<<<<<<<<<
+ * return wrapped
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+@@ -7334,14 +7334,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
+ }
+ __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_v);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 322, __pyx_L1_error)
++ __PYX_ERR(0, 324, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":321
++ /* "vidcutter/libs/pympv/mpv.pyx":323
+ * def wrapped(*k, **kw):
+ * v = fn(*k, **kw)
+ * if v < 0: # <<<<<<<<<<<<<<
+@@ -7350,7 +7350,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":319
++ /* "vidcutter/libs/pympv/mpv.pyx":321
+ *
+ * def _errors(fn):
+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+@@ -7374,7 +7374,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":318
++/* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+@@ -7396,7 +7396,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)Py_None);
+ __Pyx_INCREF(Py_None);
+- __PYX_ERR(0, 318, __pyx_L1_error)
++ __PYX_ERR(0, 320, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+@@ -7404,19 +7404,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":319
++ /* "vidcutter/libs/pympv/mpv.pyx":321
+ *
+ * def _errors(fn):
+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+ * v = fn(*k, **kw)
+ * if v < 0:
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_wrapped = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":323
++ /* "vidcutter/libs/pympv/mpv.pyx":325
+ * if v < 0:
+ * raise MPVError(v)
+ * return wrapped # <<<<<<<<<<<<<<
+@@ -7428,7 +7428,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
+ __pyx_r = __pyx_v_wrapped;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":318
++ /* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+@@ -7449,7 +7449,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":329
++/* "vidcutter/libs/pympv/mpv.pyx":331
+ * code = None
+ *
+ * def __init__(self, e): # <<<<<<<<<<<<<<
+@@ -7492,11 +7492,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 329, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 331, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 329, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 331, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -7509,7 +7509,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 331, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -7540,16 +7540,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ __Pyx_RefNannySetupContext("__init__", 0);
+ __Pyx_INCREF(__pyx_v_e);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":330
++ /* "vidcutter/libs/pympv/mpv.pyx":332
+ *
+ * def __init__(self, e):
+ * self.code = e # <<<<<<<<<<<<<<
+ * cdef const char* err_c
+ * cdef int e_i
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":333
++ /* "vidcutter/libs/pympv/mpv.pyx":335
+ * cdef const char* err_c
+ * cdef int e_i
+ * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
+@@ -7560,17 +7560,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":334
++ /* "vidcutter/libs/pympv/mpv.pyx":336
+ * cdef int e_i
+ * if not isinstance(e, basestring):
+ * e_i = e # <<<<<<<<<<<<<<
+ * with nogil:
+ * err_c = mpv_error_string(e_i)
+ */
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L1_error)
+ __pyx_v_e_i = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":335
++ /* "vidcutter/libs/pympv/mpv.pyx":337
+ * if not isinstance(e, basestring):
+ * e_i = e
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -7585,7 +7585,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":336
++ /* "vidcutter/libs/pympv/mpv.pyx":338
+ * e_i = e
+ * with nogil:
+ * err_c = mpv_error_string(e_i) # <<<<<<<<<<<<<<
+@@ -7595,7 +7595,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ __pyx_v_err_c = mpv_error_string(__pyx_v_e_i);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":335
++ /* "vidcutter/libs/pympv/mpv.pyx":337
+ * if not isinstance(e, basestring):
+ * e_i = e
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -7614,16 +7614,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":337
++ /* "vidcutter/libs/pympv/mpv.pyx":339
+ * with nogil:
+ * err_c = mpv_error_string(e_i)
+ * e = _strdec(err_c) # <<<<<<<<<<<<<<
+ * Exception.__init__(self, e)
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+@@ -7638,13 +7638,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":333
++ /* "vidcutter/libs/pympv/mpv.pyx":335
+ * cdef const char* err_c
+ * cdef int e_i
+ * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
+@@ -7653,14 +7653,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":338
++ /* "vidcutter/libs/pympv/mpv.pyx":340
+ * err_c = mpv_error_string(e_i)
+ * e = _strdec(err_c)
+ * Exception.__init__(self, e) # <<<<<<<<<<<<<<
+ *
+ * class PyMPVError(Exception):
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_3 = 0;
+@@ -7677,7 +7677,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
+- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+@@ -7685,13 +7685,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
+- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+@@ -7702,14 +7702,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ __Pyx_INCREF(__pyx_v_e);
+ __Pyx_GIVEREF(__pyx_v_e);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_3, __pyx_v_e);
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":329
++ /* "vidcutter/libs/pympv/mpv.pyx":331
+ * code = None
+ *
+ * def __init__(self, e): # <<<<<<<<<<<<<<
+@@ -7734,7 +7734,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":347
++/* "vidcutter/libs/pympv/mpv.pyx":349
+ *
+ * class _ReplyUserData(object):
+ * def __init__(self, data): # <<<<<<<<<<<<<<
+@@ -7777,11 +7777,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObj
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 347, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 349, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 347, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 349, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -7794,7 +7794,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObj
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 347, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 349, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -7815,34 +7815,34 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":348
++ /* "vidcutter/libs/pympv/mpv.pyx":350
+ * class _ReplyUserData(object):
+ * def __init__(self, data):
+ * self.counter = 0 # <<<<<<<<<<<<<<
+ * self.data = data
+ * self.observed = False
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":349
++ /* "vidcutter/libs/pympv/mpv.pyx":351
+ * def __init__(self, data):
+ * self.counter = 0
+ * self.data = data # <<<<<<<<<<<<<<
+ * self.observed = False
+ *
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":350
++ /* "vidcutter/libs/pympv/mpv.pyx":352
+ * self.counter = 0
+ * self.data = data
+ * self.observed = False # <<<<<<<<<<<<<<
+ *
+ * def add(self):
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":347
++ /* "vidcutter/libs/pympv/mpv.pyx":349
+ *
+ * class _ReplyUserData(object):
+ * def __init__(self, data): # <<<<<<<<<<<<<<
+@@ -7862,7 +7862,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":352
++/* "vidcutter/libs/pympv/mpv.pyx":354
+ * self.observed = False
+ *
+ * def add(self): # <<<<<<<<<<<<<<
+@@ -7894,22 +7894,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNU
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("add", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":353
++ /* "vidcutter/libs/pympv/mpv.pyx":355
+ *
+ * def add(self):
+ * self.counter += 1 # <<<<<<<<<<<<<<
+ *
+ * def remove(self):
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":352
++ /* "vidcutter/libs/pympv/mpv.pyx":354
+ * self.observed = False
+ *
+ * def add(self): # <<<<<<<<<<<<<<
+@@ -7931,7 +7931,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNU
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":355
++/* "vidcutter/libs/pympv/mpv.pyx":357
+ * self.counter += 1
+ *
+ * def remove(self): # <<<<<<<<<<<<<<
+@@ -7963,22 +7963,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("remove", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":356
++ /* "vidcutter/libs/pympv/mpv.pyx":358
+ *
+ * def remove(self):
+ * self.counter -= 1 # <<<<<<<<<<<<<<
+ *
+ *
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":355
++ /* "vidcutter/libs/pympv/mpv.pyx":357
+ * self.counter += 1
+ *
+ * def remove(self): # <<<<<<<<<<<<<<
+@@ -8000,7 +8000,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":370
++/* "vidcutter/libs/pympv/mpv.pyx":372
+ *
+ * @property
+ * def api_version(self): # <<<<<<<<<<<<<<
+@@ -8033,7 +8033,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":371
++ /* "vidcutter/libs/pympv/mpv.pyx":373
+ * @property
+ * def api_version(self):
+ * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION # <<<<<<<<<<<<<<
+@@ -8041,13 +8041,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
+ * @property
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
++ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+@@ -8062,7 +8062,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":370
++ /* "vidcutter/libs/pympv/mpv.pyx":372
+ *
+ * @property
+ * def api_version(self): # <<<<<<<<<<<<<<
+@@ -8084,7 +8084,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":374
++/* "vidcutter/libs/pympv/mpv.pyx":376
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+@@ -8118,7 +8118,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":380
++ /* "vidcutter/libs/pympv/mpv.pyx":382
+ * """
+ * cdef const char* name
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -8129,12 +8129,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 380, __pyx_L1_error)
++ __PYX_ERR(0, 382, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":381
++ /* "vidcutter/libs/pympv/mpv.pyx":383
+ * cdef const char* name
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8149,7 +8149,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":382
++ /* "vidcutter/libs/pympv/mpv.pyx":384
+ * assert self._ctx
+ * with nogil:
+ * name = mpv_client_name(self._ctx) # <<<<<<<<<<<<<<
+@@ -8159,7 +8159,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ __pyx_v_name = mpv_client_name(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":381
++ /* "vidcutter/libs/pympv/mpv.pyx":383
+ * cdef const char* name
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8178,7 +8178,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":383
++ /* "vidcutter/libs/pympv/mpv.pyx":385
+ * with nogil:
+ * name = mpv_client_name(self._ctx)
+ * return _strdec(name) # <<<<<<<<<<<<<<
+@@ -8186,9 +8186,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ * @property
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -8203,14 +8203,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":374
++ /* "vidcutter/libs/pympv/mpv.pyx":376
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+@@ -8232,7 +8232,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":386
++/* "vidcutter/libs/pympv/mpv.pyx":388
+ *
+ * @property
+ * def time(self): # <<<<<<<<<<<<<<
+@@ -8263,7 +8263,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__get__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":394
++ /* "vidcutter/libs/pympv/mpv.pyx":396
+ * """
+ * cdef int64_t time
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -8274,12 +8274,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 394, __pyx_L1_error)
++ __PYX_ERR(0, 396, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":395
++ /* "vidcutter/libs/pympv/mpv.pyx":397
+ * cdef int64_t time
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8294,7 +8294,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":396
++ /* "vidcutter/libs/pympv/mpv.pyx":398
+ * assert self._ctx
+ * with nogil:
+ * time = mpv_get_time_us(self._ctx) # <<<<<<<<<<<<<<
+@@ -8304,7 +8304,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ __pyx_v_time = mpv_get_time_us(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":395
++ /* "vidcutter/libs/pympv/mpv.pyx":397
+ * cdef int64_t time
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8323,7 +8323,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":397
++ /* "vidcutter/libs/pympv/mpv.pyx":399
+ * with nogil:
+ * time = mpv_get_time_us(self._ctx)
+ * return time # <<<<<<<<<<<<<<
+@@ -8331,13 +8331,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ * # def suspend(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":386
++ /* "vidcutter/libs/pympv/mpv.pyx":388
+ *
+ * @property
+ * def time(self): # <<<<<<<<<<<<<<
+@@ -8356,7 +8356,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":412
++/* "vidcutter/libs/pympv/mpv.pyx":414
+ *
+ * @_errors
+ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+@@ -8399,11 +8399,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enable)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 412, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 414, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 414, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -8416,7 +8416,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 414, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -8444,7 +8444,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("request_event", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":421
++ /* "vidcutter/libs/pympv/mpv.pyx":423
+ * Wraps: mpv_request_event
+ * """
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -8455,19 +8455,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 421, __pyx_L1_error)
++ __PYX_ERR(0, 423, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":422
++ /* "vidcutter/libs/pympv/mpv.pyx":424
+ * """
+ * assert self._ctx
+ * cdef int enable_i = 1 if enable else 0 # <<<<<<<<<<<<<<
+ * cdef int err
+ * cdef mpv_event_id event_id = event
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 424, __pyx_L1_error)
+ if (__pyx_t_2) {
+ __pyx_t_1 = 1;
+ } else {
+@@ -8475,17 +8475,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ }
+ __pyx_v_enable_i = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":424
++ /* "vidcutter/libs/pympv/mpv.pyx":426
+ * cdef int enable_i = 1 if enable else 0
+ * cdef int err
+ * cdef mpv_event_id event_id = event # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_request_event(self._ctx, event_id, enable_i)
+ */
+- __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
++ __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 426, __pyx_L1_error)
+ __pyx_v_event_id = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":425
++ /* "vidcutter/libs/pympv/mpv.pyx":427
+ * cdef int err
+ * cdef mpv_event_id event_id = event
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8500,7 +8500,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":426
++ /* "vidcutter/libs/pympv/mpv.pyx":428
+ * cdef mpv_event_id event_id = event
+ * with nogil:
+ * err = mpv_request_event(self._ctx, event_id, enable_i) # <<<<<<<<<<<<<<
+@@ -8510,7 +8510,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ __pyx_v_err = mpv_request_event(__pyx_v_self->_ctx, __pyx_v_event_id, __pyx_v_enable_i);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":425
++ /* "vidcutter/libs/pympv/mpv.pyx":427
+ * cdef int err
+ * cdef mpv_event_id event_id = event
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8529,7 +8529,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":427
++ /* "vidcutter/libs/pympv/mpv.pyx":429
+ * with nogil:
+ * err = mpv_request_event(self._ctx, event_id, enable_i)
+ * return err # <<<<<<<<<<<<<<
+@@ -8537,13 +8537,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":412
++ /* "vidcutter/libs/pympv/mpv.pyx":414
+ *
+ * @_errors
+ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+@@ -8562,7 +8562,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":430
++/* "vidcutter/libs/pympv/mpv.pyx":432
+ *
+ * @_errors
+ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+@@ -8599,7 +8599,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ __Pyx_RefNannySetupContext("set_log_level", 0);
+ __Pyx_INCREF(__pyx_v_loglevel);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":432
++ /* "vidcutter/libs/pympv/mpv.pyx":434
+ * def set_log_level(self, loglevel):
+ * """Wraps: mpv_request_log_messages"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -8610,19 +8610,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 432, __pyx_L1_error)
++ __PYX_ERR(0, 434, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":433
++ /* "vidcutter/libs/pympv/mpv.pyx":435
+ * """Wraps: mpv_request_log_messages"""
+ * assert self._ctx
+ * loglevel = _strenc(loglevel) # <<<<<<<<<<<<<<
+ * cdef const char* loglevel_c = loglevel
+ * cdef int err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -8636,23 +8636,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_loglevel) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loglevel);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_loglevel, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":434
++ /* "vidcutter/libs/pympv/mpv.pyx":436
+ * assert self._ctx
+ * loglevel = _strenc(loglevel)
+ * cdef const char* loglevel_c = loglevel # <<<<<<<<<<<<<<
+ * cdef int err
+ * with nogil:
+ */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
+ __pyx_v_loglevel_c = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":436
++ /* "vidcutter/libs/pympv/mpv.pyx":438
+ * cdef const char* loglevel_c = loglevel
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8667,7 +8667,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":437
++ /* "vidcutter/libs/pympv/mpv.pyx":439
+ * cdef int err
+ * with nogil:
+ * err = mpv_request_log_messages(self._ctx, loglevel_c) # <<<<<<<<<<<<<<
+@@ -8677,7 +8677,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ __pyx_v_err = mpv_request_log_messages(__pyx_v_self->_ctx, __pyx_v_loglevel_c);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":436
++ /* "vidcutter/libs/pympv/mpv.pyx":438
+ * cdef const char* loglevel_c = loglevel
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8696,7 +8696,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":438
++ /* "vidcutter/libs/pympv/mpv.pyx":440
+ * with nogil:
+ * err = mpv_request_log_messages(self._ctx, loglevel_c)
+ * return err # <<<<<<<<<<<<<<
+@@ -8704,13 +8704,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":430
++ /* "vidcutter/libs/pympv/mpv.pyx":432
+ *
+ * @_errors
+ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+@@ -8732,7 +8732,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":441
++/* "vidcutter/libs/pympv/mpv.pyx":443
+ *
+ * @_errors
+ * def load_config(self, filename): # <<<<<<<<<<<<<<
+@@ -8769,7 +8769,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ __Pyx_RefNannySetupContext("load_config", 0);
+ __Pyx_INCREF(__pyx_v_filename);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":443
++ /* "vidcutter/libs/pympv/mpv.pyx":445
+ * def load_config(self, filename):
+ * """Wraps: mpv_load_config_file"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -8780,19 +8780,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 443, __pyx_L1_error)
++ __PYX_ERR(0, 445, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":444
++ /* "vidcutter/libs/pympv/mpv.pyx":446
+ * """Wraps: mpv_load_config_file"""
+ * assert self._ctx
+ * filename = _strenc(filename) # <<<<<<<<<<<<<<
+ * cdef const char* _filename = filename
+ * cdef int err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -8806,23 +8806,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":445
++ /* "vidcutter/libs/pympv/mpv.pyx":447
+ * assert self._ctx
+ * filename = _strenc(filename)
+ * cdef const char* _filename = filename # <<<<<<<<<<<<<<
+ * cdef int err
+ * with nogil:
+ */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
+ __pyx_v__filename = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":447
++ /* "vidcutter/libs/pympv/mpv.pyx":449
+ * cdef const char* _filename = filename
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8837,7 +8837,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":448
++ /* "vidcutter/libs/pympv/mpv.pyx":450
+ * cdef int err
+ * with nogil:
+ * err = mpv_load_config_file(self._ctx, _filename) # <<<<<<<<<<<<<<
+@@ -8847,7 +8847,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ __pyx_v_err = mpv_load_config_file(__pyx_v_self->_ctx, __pyx_v__filename);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":447
++ /* "vidcutter/libs/pympv/mpv.pyx":449
+ * cdef const char* _filename = filename
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -8866,7 +8866,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":449
++ /* "vidcutter/libs/pympv/mpv.pyx":451
+ * with nogil:
+ * err = mpv_load_config_file(self._ctx, _filename)
+ * return err # <<<<<<<<<<<<<<
+@@ -8874,13 +8874,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ * def _format_for(self, value):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":441
++ /* "vidcutter/libs/pympv/mpv.pyx":443
+ *
+ * @_errors
+ * def load_config(self, filename): # <<<<<<<<<<<<<<
+@@ -8902,7 +8902,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":451
++/* "vidcutter/libs/pympv/mpv.pyx":453
+ * return err
+ *
+ * def _format_for(self, value): # <<<<<<<<<<<<<<
+@@ -8935,7 +8935,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_format_for", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":452
++ /* "vidcutter/libs/pympv/mpv.pyx":454
+ *
+ * def _format_for(self, value):
+ * if isinstance(value, basestring): # <<<<<<<<<<<<<<
+@@ -8946,7 +8946,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":453
++ /* "vidcutter/libs/pympv/mpv.pyx":455
+ * def _format_for(self, value):
+ * if isinstance(value, basestring):
+ * return MPV_FORMAT_STRING # <<<<<<<<<<<<<<
+@@ -8954,13 +8954,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * return MPV_FORMAT_FLAG
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":452
++ /* "vidcutter/libs/pympv/mpv.pyx":454
+ *
+ * def _format_for(self, value):
+ * if isinstance(value, basestring): # <<<<<<<<<<<<<<
+@@ -8969,7 +8969,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":454
++ /* "vidcutter/libs/pympv/mpv.pyx":456
+ * if isinstance(value, basestring):
+ * return MPV_FORMAT_STRING
+ * elif isinstance(value, bool): # <<<<<<<<<<<<<<
+@@ -8978,12 +8978,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ __pyx_t_3 = ((PyObject*)&PyBool_Type);
+ __Pyx_INCREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 454, __pyx_L1_error)
++ __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 456, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":455
++ /* "vidcutter/libs/pympv/mpv.pyx":457
+ * return MPV_FORMAT_STRING
+ * elif isinstance(value, bool):
+ * return MPV_FORMAT_FLAG # <<<<<<<<<<<<<<
+@@ -8991,13 +8991,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * return MPV_FORMAT_INT64
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":454
++ /* "vidcutter/libs/pympv/mpv.pyx":456
+ * if isinstance(value, basestring):
+ * return MPV_FORMAT_STRING
+ * elif isinstance(value, bool): # <<<<<<<<<<<<<<
+@@ -9006,7 +9006,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":456
++ /* "vidcutter/libs/pympv/mpv.pyx":458
+ * elif isinstance(value, bool):
+ * return MPV_FORMAT_FLAG
+ * elif isinstance(value, int): # <<<<<<<<<<<<<<
+@@ -9017,7 +9017,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":457
++ /* "vidcutter/libs/pympv/mpv.pyx":459
+ * return MPV_FORMAT_FLAG
+ * elif isinstance(value, int):
+ * return MPV_FORMAT_INT64 # <<<<<<<<<<<<<<
+@@ -9025,13 +9025,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * return MPV_FORMAT_DOUBLE
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":456
++ /* "vidcutter/libs/pympv/mpv.pyx":458
+ * elif isinstance(value, bool):
+ * return MPV_FORMAT_FLAG
+ * elif isinstance(value, int): # <<<<<<<<<<<<<<
+@@ -9040,7 +9040,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":458
++ /* "vidcutter/libs/pympv/mpv.pyx":460
+ * elif isinstance(value, int):
+ * return MPV_FORMAT_INT64
+ * elif isinstance(value, float): # <<<<<<<<<<<<<<
+@@ -9051,7 +9051,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":459
++ /* "vidcutter/libs/pympv/mpv.pyx":461
+ * return MPV_FORMAT_INT64
+ * elif isinstance(value, float):
+ * return MPV_FORMAT_DOUBLE # <<<<<<<<<<<<<<
+@@ -9059,13 +9059,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * return MPV_FORMAT_NODE_ARRAY
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":458
++ /* "vidcutter/libs/pympv/mpv.pyx":460
+ * elif isinstance(value, int):
+ * return MPV_FORMAT_INT64
+ * elif isinstance(value, float): # <<<<<<<<<<<<<<
+@@ -9074,7 +9074,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":460
++ /* "vidcutter/libs/pympv/mpv.pyx":462
+ * elif isinstance(value, float):
+ * return MPV_FORMAT_DOUBLE
+ * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
+@@ -9095,7 +9095,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":461
++ /* "vidcutter/libs/pympv/mpv.pyx":463
+ * return MPV_FORMAT_DOUBLE
+ * elif isinstance(value, (tuple, list)):
+ * return MPV_FORMAT_NODE_ARRAY # <<<<<<<<<<<<<<
+@@ -9103,13 +9103,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * return MPV_FORMAT_NODE_MAP
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":460
++ /* "vidcutter/libs/pympv/mpv.pyx":462
+ * elif isinstance(value, float):
+ * return MPV_FORMAT_DOUBLE
+ * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
+@@ -9118,7 +9118,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":462
++ /* "vidcutter/libs/pympv/mpv.pyx":464
+ * elif isinstance(value, (tuple, list)):
+ * return MPV_FORMAT_NODE_ARRAY
+ * elif isinstance(value, dict): # <<<<<<<<<<<<<<
+@@ -9129,7 +9129,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":463
++ /* "vidcutter/libs/pympv/mpv.pyx":465
+ * return MPV_FORMAT_NODE_ARRAY
+ * elif isinstance(value, dict):
+ * return MPV_FORMAT_NODE_MAP # <<<<<<<<<<<<<<
+@@ -9137,13 +9137,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":462
++ /* "vidcutter/libs/pympv/mpv.pyx":464
+ * elif isinstance(value, (tuple, list)):
+ * return MPV_FORMAT_NODE_ARRAY
+ * elif isinstance(value, dict): # <<<<<<<<<<<<<<
+@@ -9152,7 +9152,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":464
++ /* "vidcutter/libs/pympv/mpv.pyx":466
+ * elif isinstance(value, dict):
+ * return MPV_FORMAT_NODE_MAP
+ * return MPV_FORMAT_NONE # <<<<<<<<<<<<<<
+@@ -9160,13 +9160,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ * cdef mpv_node_list* _prep_node_list(self, values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":451
++ /* "vidcutter/libs/pympv/mpv.pyx":453
+ * return err
+ *
+ * def _format_for(self, value): # <<<<<<<<<<<<<<
+@@ -9185,7 +9185,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":466
++/* "vidcutter/libs/pympv/mpv.pyx":468
+ * return MPV_FORMAT_NONE
+ *
+ * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
+@@ -9216,7 +9216,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_prep_node_list", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":469
++ /* "vidcutter/libs/pympv/mpv.pyx":471
+ * cdef mpv_node node
+ * cdef mpv_format format
+ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list)) # <<<<<<<<<<<<<<
+@@ -9225,17 +9225,17 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ */
+ __pyx_v_node_list = ((struct mpv_node_list *)malloc((sizeof(struct mpv_node_list))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":470
++ /* "vidcutter/libs/pympv/mpv.pyx":472
+ * cdef mpv_format format
+ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
+ * node_list.num = len(values) # <<<<<<<<<<<<<<
+ * node_list.values = NULL
+ * node_list.keys = NULL
+ */
+- __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 470, __pyx_L1_error)
++ __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 472, __pyx_L1_error)
+ __pyx_v_node_list->num = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":471
++ /* "vidcutter/libs/pympv/mpv.pyx":473
+ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
+ * node_list.num = len(values)
+ * node_list.values = NULL # <<<<<<<<<<<<<<
+@@ -9244,7 +9244,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ */
+ __pyx_v_node_list->values = NULL;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":472
++ /* "vidcutter/libs/pympv/mpv.pyx":474
+ * node_list.num = len(values)
+ * node_list.values = NULL
+ * node_list.keys = NULL # <<<<<<<<<<<<<<
+@@ -9253,7 +9253,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ */
+ __pyx_v_node_list->keys = NULL;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":473
++ /* "vidcutter/libs/pympv/mpv.pyx":475
+ * node_list.values = NULL
+ * node_list.keys = NULL
+ * if node_list.num: # <<<<<<<<<<<<<<
+@@ -9263,7 +9263,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ __pyx_t_2 = (__pyx_v_node_list->num != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":474
++ /* "vidcutter/libs/pympv/mpv.pyx":476
+ * node_list.keys = NULL
+ * if node_list.num:
+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node)) # <<<<<<<<<<<<<<
+@@ -9272,7 +9272,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ */
+ __pyx_v_node_list->values = ((struct mpv_node *)malloc((__pyx_v_node_list->num * (sizeof(struct mpv_node)))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":473
++ /* "vidcutter/libs/pympv/mpv.pyx":475
+ * node_list.values = NULL
+ * node_list.keys = NULL
+ * if node_list.num: # <<<<<<<<<<<<<<
+@@ -9281,7 +9281,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":475
++ /* "vidcutter/libs/pympv/mpv.pyx":477
+ * if node_list.num:
+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+ * for i, value in enumerate(values): # <<<<<<<<<<<<<<
+@@ -9294,26 +9294,26 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+- __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_4))) {
+ if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 477, __pyx_L1_error)
+ #else
+- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 477, __pyx_L1_error)
+ #else
+- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ }
+@@ -9323,7 +9323,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 475, __pyx_L1_error)
++ else __PYX_ERR(0, 477, __pyx_L1_error)
+ }
+ break;
+ }
+@@ -9333,20 +9333,20 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ __pyx_t_6 = 0;
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+- __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3);
+ __pyx_t_3 = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":476
++ /* "vidcutter/libs/pympv/mpv.pyx":478
+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+ * for i, value in enumerate(values):
+ * format = self._format_for(value) # <<<<<<<<<<<<<<
+ * node = self._prep_native_value(value, format)
+ * node_list.values[i] = node
+ */
+- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 476, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 478, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
+@@ -9360,36 +9360,36 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ }
+ __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
++ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 478, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L1_error)
++ __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_format = __pyx_t_9;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":477
++ /* "vidcutter/libs/pympv/mpv.pyx":479
+ * for i, value in enumerate(values):
+ * format = self._format_for(value)
+ * node = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+ * node_list.values[i] = node
+ * return node_list
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_6);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":478
++ /* "vidcutter/libs/pympv/mpv.pyx":480
+ * format = self._format_for(value)
+ * node = self._prep_native_value(value, format)
+ * node_list.values[i] = node # <<<<<<<<<<<<<<
+ * return node_list
+ *
+ */
+- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 480, __pyx_L1_error)
+ (__pyx_v_node_list->values[__pyx_t_10]) = __pyx_v_node;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":475
++ /* "vidcutter/libs/pympv/mpv.pyx":477
+ * if node_list.num:
+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
+ * for i, value in enumerate(values): # <<<<<<<<<<<<<<
+@@ -9400,7 +9400,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":479
++ /* "vidcutter/libs/pympv/mpv.pyx":481
+ * node = self._prep_native_value(value, format)
+ * node_list.values[i] = node
+ * return node_list # <<<<<<<<<<<<<<
+@@ -9410,7 +9410,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ __pyx_r = __pyx_v_node_list;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":466
++ /* "vidcutter/libs/pympv/mpv.pyx":468
+ * return MPV_FORMAT_NONE
+ *
+ * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
+@@ -9434,7 +9434,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":481
++/* "vidcutter/libs/pympv/mpv.pyx":483
+ * return node_list
+ *
+ * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
+@@ -9466,14 +9466,14 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_prep_node_map", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":484
++ /* "vidcutter/libs/pympv/mpv.pyx":486
+ * cdef char* ckey
+ * cdef mpv_node_list* list
+ * list = self._prep_node_list(map.values()) # <<<<<<<<<<<<<<
+ * keys = map.keys()
+ * if not len(keys):
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -9487,20 +9487,20 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":485
++ /* "vidcutter/libs/pympv/mpv.pyx":487
+ * cdef mpv_node_list* list
+ * list = self._prep_node_list(map.values())
+ * keys = map.keys() # <<<<<<<<<<<<<<
+ * if not len(keys):
+ * return list
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -9514,24 +9514,24 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_keys = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":486
++ /* "vidcutter/libs/pympv/mpv.pyx":488
+ * list = self._prep_node_list(map.values())
+ * keys = map.keys()
+ * if not len(keys): # <<<<<<<<<<<<<<
+ * return list
+ * list.keys = <char**>malloc(list.num)
+ */
+- __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 486, __pyx_L1_error)
++ __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 488, __pyx_L1_error)
+ __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
+ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":487
++ /* "vidcutter/libs/pympv/mpv.pyx":489
+ * keys = map.keys()
+ * if not len(keys):
+ * return list # <<<<<<<<<<<<<<
+@@ -9541,7 +9541,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __pyx_r = __pyx_v_list;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":486
++ /* "vidcutter/libs/pympv/mpv.pyx":488
+ * list = self._prep_node_list(map.values())
+ * keys = map.keys()
+ * if not len(keys): # <<<<<<<<<<<<<<
+@@ -9550,7 +9550,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":488
++ /* "vidcutter/libs/pympv/mpv.pyx":490
+ * if not len(keys):
+ * return list
+ * list.keys = <char**>malloc(list.num) # <<<<<<<<<<<<<<
+@@ -9559,7 +9559,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ */
+ __pyx_v_list->keys = ((char **)malloc(__pyx_v_list->num));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":489
++ /* "vidcutter/libs/pympv/mpv.pyx":491
+ * return list
+ * list.keys = <char**>malloc(list.num)
+ * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
+@@ -9572,26 +9572,26 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __pyx_t_2 = __pyx_v_keys; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
+ __pyx_t_6 = NULL;
+ } else {
+- __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_6)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 491, __pyx_L1_error)
+ #else
+- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 491, __pyx_L1_error)
+ #else
+- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+@@ -9601,7 +9601,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 489, __pyx_L1_error)
++ else __PYX_ERR(0, 491, __pyx_L1_error)
+ }
+ break;
+ }
+@@ -9611,20 +9611,20 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+- __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":490
++ /* "vidcutter/libs/pympv/mpv.pyx":492
+ * list.keys = <char**>malloc(list.num)
+ * for i, key in enumerate(keys):
+ * key = _strenc(key) # <<<<<<<<<<<<<<
+ * ckey = key
+ * list.keys[i] = <char*>malloc(len(key) + 1)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+@@ -9638,44 +9638,44 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ }
+ __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_key);
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":491
++ /* "vidcutter/libs/pympv/mpv.pyx":493
+ * for i, key in enumerate(keys):
+ * key = _strenc(key)
+ * ckey = key # <<<<<<<<<<<<<<
+ * list.keys[i] = <char*>malloc(len(key) + 1)
+ * strcpy(list.keys[i], ckey)
+ */
+- __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L1_error)
++ __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
+ __pyx_v_ckey = __pyx_t_9;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":492
++ /* "vidcutter/libs/pympv/mpv.pyx":494
+ * key = _strenc(key)
+ * ckey = key
+ * list.keys[i] = <char*>malloc(len(key) + 1) # <<<<<<<<<<<<<<
+ * strcpy(list.keys[i], ckey)
+ * return list
+ */
+- __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 492, __pyx_L1_error)
+- __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L1_error)
++ __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 494, __pyx_L1_error)
++ __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 494, __pyx_L1_error)
+ (__pyx_v_list->keys[__pyx_t_11]) = ((char *)malloc((__pyx_t_10 + 1)));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":493
++ /* "vidcutter/libs/pympv/mpv.pyx":495
+ * ckey = key
+ * list.keys[i] = <char*>malloc(len(key) + 1)
+ * strcpy(list.keys[i], ckey) # <<<<<<<<<<<<<<
+ * return list
+ *
+ */
+- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 495, __pyx_L1_error)
+ (void)(strcpy((__pyx_v_list->keys[__pyx_t_10]), __pyx_v_ckey));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":489
++ /* "vidcutter/libs/pympv/mpv.pyx":491
+ * return list
+ * list.keys = <char**>malloc(list.num)
+ * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
+@@ -9686,7 +9686,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":494
++ /* "vidcutter/libs/pympv/mpv.pyx":496
+ * list.keys[i] = <char*>malloc(len(key) + 1)
+ * strcpy(list.keys[i], ckey)
+ * return list # <<<<<<<<<<<<<<
+@@ -9696,7 +9696,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ __pyx_r = __pyx_v_list;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":481
++ /* "vidcutter/libs/pympv/mpv.pyx":483
+ * return node_list
+ *
+ * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
+@@ -9721,7 +9721,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":496
++/* "vidcutter/libs/pympv/mpv.pyx":498
+ * return list
+ *
+ * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
+@@ -9749,39 +9749,39 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ __Pyx_RefNannySetupContext("_prep_native_value", 0);
+ __Pyx_INCREF(__pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":498
++ /* "vidcutter/libs/pympv/mpv.pyx":500
+ * cdef mpv_node _prep_native_value(self, value, format):
+ * cdef mpv_node node
+ * node.format = format # <<<<<<<<<<<<<<
+ * if format == MPV_FORMAT_STRING:
+ * value = _strenc(value)
+ */
+- __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error)
++ __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 500, __pyx_L1_error)
+ __pyx_v_node.format = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":499
++ /* "vidcutter/libs/pympv/mpv.pyx":501
+ * cdef mpv_node node
+ * node.format = format
+ * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+ * value = _strenc(value)
+ * node.u.string = <char*>malloc(len(value) + 1)
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":500
++ /* "vidcutter/libs/pympv/mpv.pyx":502
+ * node.format = format
+ * if format == MPV_FORMAT_STRING:
+ * value = _strenc(value) # <<<<<<<<<<<<<<
+ * node.u.string = <char*>malloc(len(value) + 1)
+ * strcpy(node.u.string, value)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -9795,33 +9795,33 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ }
+ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":501
++ /* "vidcutter/libs/pympv/mpv.pyx":503
+ * if format == MPV_FORMAT_STRING:
+ * value = _strenc(value)
+ * node.u.string = <char*>malloc(len(value) + 1) # <<<<<<<<<<<<<<
+ * strcpy(node.u.string, value)
+ * elif format == MPV_FORMAT_FLAG:
+ */
+- __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 501, __pyx_L1_error)
++ __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 503, __pyx_L1_error)
+ __pyx_v_node.u.string = ((char *)malloc((__pyx_t_6 + 1)));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":502
++ /* "vidcutter/libs/pympv/mpv.pyx":504
+ * value = _strenc(value)
+ * node.u.string = <char*>malloc(len(value) + 1)
+ * strcpy(node.u.string, value) # <<<<<<<<<<<<<<
+ * elif format == MPV_FORMAT_FLAG:
+ * node.u.flag = 1 if value else 0
+ */
+- __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L1_error)
+ (void)(strcpy(__pyx_v_node.u.string, __pyx_t_7));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":499
++ /* "vidcutter/libs/pympv/mpv.pyx":501
+ * cdef mpv_node node
+ * node.format = format
+ * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+@@ -9831,29 +9831,29 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":503
++ /* "vidcutter/libs/pympv/mpv.pyx":505
+ * node.u.string = <char*>malloc(len(value) + 1)
+ * strcpy(node.u.string, value)
+ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+ * node.u.flag = 1 if value else 0
+ * elif format == MPV_FORMAT_INT64:
+ */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":504
++ /* "vidcutter/libs/pympv/mpv.pyx":506
+ * strcpy(node.u.string, value)
+ * elif format == MPV_FORMAT_FLAG:
+ * node.u.flag = 1 if value else 0 # <<<<<<<<<<<<<<
+ * elif format == MPV_FORMAT_INT64:
+ * node.u.int64 = value
+ */
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 504, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 506, __pyx_L1_error)
+ if (__pyx_t_4) {
+ __pyx_t_8 = 1;
+ } else {
+@@ -9861,7 +9861,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ }
+ __pyx_v_node.u.flag = __pyx_t_8;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":503
++ /* "vidcutter/libs/pympv/mpv.pyx":505
+ * node.u.string = <char*>malloc(len(value) + 1)
+ * strcpy(node.u.string, value)
+ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
+@@ -9871,32 +9871,32 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":505
++ /* "vidcutter/libs/pympv/mpv.pyx":507
+ * elif format == MPV_FORMAT_FLAG:
+ * node.u.flag = 1 if value else 0
+ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+ * node.u.int64 = value
+ * elif format == MPV_FORMAT_DOUBLE:
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":506
++ /* "vidcutter/libs/pympv/mpv.pyx":508
+ * node.u.flag = 1 if value else 0
+ * elif format == MPV_FORMAT_INT64:
+ * node.u.int64 = value # <<<<<<<<<<<<<<
+ * elif format == MPV_FORMAT_DOUBLE:
+ * node.u.double_ = value
+ */
+- __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error)
++ __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
+ __pyx_v_node.u.int64 = __pyx_t_9;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":505
++ /* "vidcutter/libs/pympv/mpv.pyx":507
+ * elif format == MPV_FORMAT_FLAG:
+ * node.u.flag = 1 if value else 0
+ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
+@@ -9906,32 +9906,32 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":507
++ /* "vidcutter/libs/pympv/mpv.pyx":509
+ * elif format == MPV_FORMAT_INT64:
+ * node.u.int64 = value
+ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+ * node.u.double_ = value
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":508
++ /* "vidcutter/libs/pympv/mpv.pyx":510
+ * node.u.int64 = value
+ * elif format == MPV_FORMAT_DOUBLE:
+ * node.u.double_ = value # <<<<<<<<<<<<<<
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * node.u.list = self._prep_node_list(value)
+ */
+- __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
++ __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 510, __pyx_L1_error)
+ __pyx_v_node.u.double_ = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":507
++ /* "vidcutter/libs/pympv/mpv.pyx":509
+ * elif format == MPV_FORMAT_INT64:
+ * node.u.int64 = value
+ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
+@@ -9941,22 +9941,22 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":509
++ /* "vidcutter/libs/pympv/mpv.pyx":511
+ * elif format == MPV_FORMAT_DOUBLE:
+ * node.u.double_ = value
+ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+ * node.u.list = self._prep_node_list(value)
+ * elif format == MPV_FORMAT_NODE_MAP:
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":510
++ /* "vidcutter/libs/pympv/mpv.pyx":512
+ * node.u.double_ = value
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * node.u.list = self._prep_node_list(value) # <<<<<<<<<<<<<<
+@@ -9965,7 +9965,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ */
+ __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":509
++ /* "vidcutter/libs/pympv/mpv.pyx":511
+ * elif format == MPV_FORMAT_DOUBLE:
+ * node.u.double_ = value
+ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
+@@ -9975,22 +9975,22 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":511
++ /* "vidcutter/libs/pympv/mpv.pyx":513
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * node.u.list = self._prep_node_list(value)
+ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+ * node.u.list = self._prep_node_map(value)
+ * else:
+ */
+- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":512
++ /* "vidcutter/libs/pympv/mpv.pyx":514
+ * node.u.list = self._prep_node_list(value)
+ * elif format == MPV_FORMAT_NODE_MAP:
+ * node.u.list = self._prep_node_map(value) # <<<<<<<<<<<<<<
+@@ -9999,7 +9999,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ */
+ __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_map(__pyx_v_self, __pyx_v_value);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":511
++ /* "vidcutter/libs/pympv/mpv.pyx":513
+ * elif format == MPV_FORMAT_NODE_ARRAY:
+ * node.u.list = self._prep_node_list(value)
+ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+@@ -10009,7 +10009,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":514
++ /* "vidcutter/libs/pympv/mpv.pyx":516
+ * node.u.list = self._prep_node_map(value)
+ * else:
+ * node.format = MPV_FORMAT_NONE # <<<<<<<<<<<<<<
+@@ -10021,7 +10021,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ }
+ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":515
++ /* "vidcutter/libs/pympv/mpv.pyx":517
+ * else:
+ * node.format = MPV_FORMAT_NONE
+ * return node # <<<<<<<<<<<<<<
+@@ -10031,7 +10031,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ __pyx_r = __pyx_v_node;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":496
++ /* "vidcutter/libs/pympv/mpv.pyx":498
+ * return list
+ *
+ * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
+@@ -10052,7 +10052,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":517
++/* "vidcutter/libs/pympv/mpv.pyx":519
+ * return node
+ *
+ * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
+@@ -10074,7 +10074,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_free_native_value", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":518
++ /* "vidcutter/libs/pympv/mpv.pyx":520
+ *
+ * cdef _free_native_value(self, mpv_node node):
+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
+@@ -10085,7 +10085,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ case MPV_FORMAT_NODE_ARRAY:
+ case MPV_FORMAT_NODE_MAP:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":519
++ /* "vidcutter/libs/pympv/mpv.pyx":521
+ * cdef _free_native_value(self, mpv_node node):
+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+ * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
+@@ -10097,19 +10097,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":520
++ /* "vidcutter/libs/pympv/mpv.pyx":522
+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
+ * for i in range(node.u.list.num):
+ * self._free_native_value(node.u.list.values[i]) # <<<<<<<<<<<<<<
+ * free(node.u.list.values)
+ * if node.format == MPV_FORMAT_NODE_MAP:
+ */
+- __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
++ __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":521
++ /* "vidcutter/libs/pympv/mpv.pyx":523
+ * for i in range(node.u.list.num):
+ * self._free_native_value(node.u.list.values[i])
+ * free(node.u.list.values) # <<<<<<<<<<<<<<
+@@ -10118,7 +10118,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ */
+ free(__pyx_v_node.u.list->values);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":522
++ /* "vidcutter/libs/pympv/mpv.pyx":524
+ * self._free_native_value(node.u.list.values[i])
+ * free(node.u.list.values)
+ * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+@@ -10128,7 +10128,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ __pyx_t_5 = ((__pyx_v_node.format == MPV_FORMAT_NODE_MAP) != 0);
+ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":523
++ /* "vidcutter/libs/pympv/mpv.pyx":525
+ * free(node.u.list.values)
+ * if node.format == MPV_FORMAT_NODE_MAP:
+ * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
+@@ -10140,7 +10140,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
+ __pyx_v_i = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":524
++ /* "vidcutter/libs/pympv/mpv.pyx":526
+ * if node.format == MPV_FORMAT_NODE_MAP:
+ * for i in range(node.u.list.num):
+ * free(node.u.list.keys[i]) # <<<<<<<<<<<<<<
+@@ -10150,7 +10150,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ free((__pyx_v_node.u.list->keys[__pyx_v_i]));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":525
++ /* "vidcutter/libs/pympv/mpv.pyx":527
+ * for i in range(node.u.list.num):
+ * free(node.u.list.keys[i])
+ * free(node.u.list.keys) # <<<<<<<<<<<<<<
+@@ -10159,7 +10159,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ */
+ free(__pyx_v_node.u.list->keys);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":522
++ /* "vidcutter/libs/pympv/mpv.pyx":524
+ * self._free_native_value(node.u.list.values[i])
+ * free(node.u.list.values)
+ * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
+@@ -10168,7 +10168,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":526
++ /* "vidcutter/libs/pympv/mpv.pyx":528
+ * free(node.u.list.keys[i])
+ * free(node.u.list.keys)
+ * free(node.u.list) # <<<<<<<<<<<<<<
+@@ -10177,7 +10177,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ */
+ free(__pyx_v_node.u.list);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":518
++ /* "vidcutter/libs/pympv/mpv.pyx":520
+ *
+ * cdef _free_native_value(self, mpv_node node):
+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
+@@ -10187,7 +10187,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ break;
+ case MPV_FORMAT_STRING:
+
+- /* "vidcutter/libs/pympv/mpv.pyx":528
++ /* "vidcutter/libs/pympv/mpv.pyx":530
+ * free(node.u.list)
+ * elif node.format == MPV_FORMAT_STRING:
+ * free(node.u.string) # <<<<<<<<<<<<<<
+@@ -10196,7 +10196,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ */
+ free(__pyx_v_node.u.string);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":527
++ /* "vidcutter/libs/pympv/mpv.pyx":529
+ * free(node.u.list.keys)
+ * free(node.u.list)
+ * elif node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
+@@ -10207,7 +10207,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ default: break;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":517
++ /* "vidcutter/libs/pympv/mpv.pyx":519
+ * return node
+ *
+ * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
+@@ -10228,7 +10228,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":530
++/* "vidcutter/libs/pympv/mpv.pyx":532
+ * free(node.u.string)
+ *
+ * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+@@ -10280,7 +10280,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__py
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 530, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 532, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 0) {
+ goto __pyx_L5_argtuple_error;
+@@ -10291,7 +10291,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__py
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 530, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 532, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_cmdlist); __pyx_v_cmdlist = 0;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
+@@ -10338,7 +10338,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("command", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":544
++ /* "vidcutter/libs/pympv/mpv.pyx":546
+ * Wraps: mpv_command_node and mpv_command_node_async
+ * """
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -10349,19 +10349,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 544, __pyx_L1_error)
++ __PYX_ERR(0, 546, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":545
++ /* "vidcutter/libs/pympv/mpv.pyx":547
+ * """
+ * assert self._ctx
+ * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist)) # <<<<<<<<<<<<<<
+ * cdef mpv_node noderesult
+ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -10375,13 +10375,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_cmdlist) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cmdlist);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_cmdlist, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":549
++ /* "vidcutter/libs/pympv/mpv.pyx":551
+ * cdef int err
+ * cdef uint64_t data_id
+ * result = None # <<<<<<<<<<<<<<
+@@ -10391,7 +10391,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __Pyx_INCREF(Py_None);
+ __pyx_v_result = Py_None;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":550
++ /* "vidcutter/libs/pympv/mpv.pyx":552
+ * cdef uint64_t data_id
+ * result = None
+ * try: # <<<<<<<<<<<<<<
+@@ -10400,31 +10400,31 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ */
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":551
++ /* "vidcutter/libs/pympv/mpv.pyx":553
+ * result = None
+ * try:
+ * data_id = id(data) # <<<<<<<<<<<<<<
+ * if not asynchronous:
+ * with nogil:
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L4_error)
++ __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L4_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_data_id = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":552
++ /* "vidcutter/libs/pympv/mpv.pyx":554
+ * try:
+ * data_id = id(data)
+ * if not asynchronous: # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_command_node(self._ctx, &node, &noderesult)
+ */
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 552, __pyx_L4_error)
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 554, __pyx_L4_error)
+ __pyx_t_6 = ((!__pyx_t_5) != 0);
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":553
++ /* "vidcutter/libs/pympv/mpv.pyx":555
+ * data_id = id(data)
+ * if not asynchronous:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10439,7 +10439,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":554
++ /* "vidcutter/libs/pympv/mpv.pyx":556
+ * if not asynchronous:
+ * with nogil:
+ * err = mpv_command_node(self._ctx, &node, &noderesult) # <<<<<<<<<<<<<<
+@@ -10449,7 +10449,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_v_err = mpv_command_node(__pyx_v_self->_ctx, (&__pyx_v_node), (&__pyx_v_noderesult));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":553
++ /* "vidcutter/libs/pympv/mpv.pyx":555
+ * data_id = id(data)
+ * if not asynchronous:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10468,7 +10468,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":555
++ /* "vidcutter/libs/pympv/mpv.pyx":557
+ * with nogil:
+ * err = mpv_command_node(self._ctx, &node, &noderesult)
+ * try: # <<<<<<<<<<<<<<
+@@ -10477,7 +10477,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ */
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":556
++ /* "vidcutter/libs/pympv/mpv.pyx":558
+ * err = mpv_command_node(self._ctx, &node, &noderesult)
+ * try:
+ * result = _convert_node_value(noderesult) if err >= 0 else None # <<<<<<<<<<<<<<
+@@ -10485,7 +10485,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ * with nogil:
+ */
+ if (((__pyx_v_err >= 0) != 0)) {
+- __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L11_error)
++ __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L11_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+@@ -10497,7 +10497,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
++ /* "vidcutter/libs/pympv/mpv.pyx":560
+ * result = _convert_node_value(noderesult) if err >= 0 else None
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10514,7 +10514,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":559
++ /* "vidcutter/libs/pympv/mpv.pyx":561
+ * finally:
+ * with nogil:
+ * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
+@@ -10524,7 +10524,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ mpv_free_node_contents((&__pyx_v_noderesult));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
++ /* "vidcutter/libs/pympv/mpv.pyx":560
+ * result = _convert_node_value(noderesult) if err >= 0 else None
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10570,7 +10570,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":559
++ /* "vidcutter/libs/pympv/mpv.pyx":561
+ * finally:
+ * with nogil:
+ * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
+@@ -10580,7 +10580,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ mpv_free_node_contents((&__pyx_v_noderesult));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":558
++ /* "vidcutter/libs/pympv/mpv.pyx":560
+ * result = _convert_node_value(noderesult) if err >= 0 else None
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10616,7 +10616,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_L12:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":552
++ /* "vidcutter/libs/pympv/mpv.pyx":554
+ * try:
+ * data_id = id(data)
+ * if not asynchronous: # <<<<<<<<<<<<<<
+@@ -10626,7 +10626,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ goto __pyx_L6;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":561
++ /* "vidcutter/libs/pympv/mpv.pyx":563
+ * mpv_free_node_contents(&noderesult)
+ * else:
+ * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
+@@ -10634,9 +10634,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+ */
+ /*else*/ {
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_16 = NULL;
+ __pyx_t_8 = 0;
+@@ -10653,7 +10653,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+@@ -10662,14 +10662,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ if (__pyx_t_16) {
+ __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
+@@ -10680,7 +10680,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_8, Py_None);
+ __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ }
+@@ -10688,7 +10688,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_v_userdatas = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":562
++ /* "vidcutter/libs/pympv/mpv.pyx":564
+ * else:
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -10699,14 +10699,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_t_5 = (__pyx_t_6 != 0);
+ if (__pyx_t_5) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":563
++ /* "vidcutter/libs/pympv/mpv.pyx":565
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None:
+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+ * userdatas.add()
+ * with nogil:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_17 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -10720,15 +10720,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ }
+ __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_17, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 563, __pyx_L4_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 565, __pyx_L4_error)
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":562
++ /* "vidcutter/libs/pympv/mpv.pyx":564
+ * else:
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -10737,14 +10737,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":564
++ /* "vidcutter/libs/pympv/mpv.pyx":566
+ * if userdatas is None:
+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add() # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_command_node_async(self._ctx, data_id, &node)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L4_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_17 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -10758,12 +10758,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ }
+ __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L4_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":565
++ /* "vidcutter/libs/pympv/mpv.pyx":567
+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add()
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10778,7 +10778,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":566
++ /* "vidcutter/libs/pympv/mpv.pyx":568
+ * userdatas.add()
+ * with nogil:
+ * err = mpv_command_node_async(self._ctx, data_id, &node) # <<<<<<<<<<<<<<
+@@ -10788,7 +10788,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_v_err = mpv_command_node_async(__pyx_v_self->_ctx, __pyx_v_data_id, (&__pyx_v_node));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":565
++ /* "vidcutter/libs/pympv/mpv.pyx":567
+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add()
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -10810,7 +10810,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_L6:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":568
++ /* "vidcutter/libs/pympv/mpv.pyx":570
+ * err = mpv_command_node_async(self._ctx, data_id, &node)
+ * finally:
+ * self._free_native_value(node) # <<<<<<<<<<<<<<
+@@ -10819,7 +10819,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L5;
+@@ -10844,7 +10844,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __Pyx_XGOTREF(__pyx_t_10);
+ __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
+ {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L26_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L26_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+@@ -10877,7 +10877,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":569
++ /* "vidcutter/libs/pympv/mpv.pyx":571
+ * finally:
+ * self._free_native_value(node)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -10887,16 +10887,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_t_5 = ((__pyx_v_err < 0) != 0);
+ if (unlikely(__pyx_t_5)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":570
++ /* "vidcutter/libs/pympv/mpv.pyx":572
+ * self._free_native_value(node)
+ * if err < 0:
+ * raise MPVError(err) # <<<<<<<<<<<<<<
+ * return result
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 570, __pyx_L1_error)
++ __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 572, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -10911,14 +10911,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 570, __pyx_L1_error)
++ __PYX_ERR(0, 572, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":569
++ /* "vidcutter/libs/pympv/mpv.pyx":571
+ * finally:
+ * self._free_native_value(node)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -10927,7 +10927,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":571
++ /* "vidcutter/libs/pympv/mpv.pyx":573
+ * if err < 0:
+ * raise MPVError(err)
+ * return result # <<<<<<<<<<<<<<
+@@ -10939,7 +10939,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ __pyx_r = __pyx_v_result;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":530
++ /* "vidcutter/libs/pympv/mpv.pyx":532
+ * free(node.u.string)
+ *
+ * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+@@ -10964,7 +10964,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":574
++/* "vidcutter/libs/pympv/mpv.pyx":576
+ *
+ * @_errors
+ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+@@ -11012,7 +11012,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(Py
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 574, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 576, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -11028,7 +11028,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(Py
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 574, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 576, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -11064,7 +11064,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ __Pyx_RefNannySetupContext("get_property_async", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":583
++ /* "vidcutter/libs/pympv/mpv.pyx":585
+ * data: Value to be passed into the reply_userdata of the response event.
+ * Wraps: mpv_get_property_async"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -11075,19 +11075,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 583, __pyx_L1_error)
++ __PYX_ERR(0, 585, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":584
++ /* "vidcutter/libs/pympv/mpv.pyx":586
+ * Wraps: mpv_get_property_async"""
+ * assert self._ctx
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -11101,32 +11101,32 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":585
++ /* "vidcutter/libs/pympv/mpv.pyx":587
+ * assert self._ctx
+ * prop = _strenc(prop)
+ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None:
+ */
+- __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 585, __pyx_L1_error)
++ __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 587, __pyx_L1_error)
+ __pyx_v_id_data = ((uint64_t)__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":586
++ /* "vidcutter/libs/pympv/mpv.pyx":588
+ * prop = _strenc(prop)
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+@@ -11143,7 +11143,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+@@ -11152,14 +11152,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+@@ -11170,7 +11170,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+ __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+@@ -11178,7 +11178,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ __pyx_v_userdatas = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":587
++ /* "vidcutter/libs/pympv/mpv.pyx":589
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -11189,14 +11189,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ __pyx_t_9 = (__pyx_t_8 != 0);
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":588
++ /* "vidcutter/libs/pympv/mpv.pyx":590
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+ * userdatas.add()
+ * cdef const char* prop_c = prop
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -11210,15 +11210,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ }
+ __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 588, __pyx_L1_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":587
++ /* "vidcutter/libs/pympv/mpv.pyx":589
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -11227,14 +11227,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":589
++ /* "vidcutter/libs/pympv/mpv.pyx":591
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ * userdatas.add() # <<<<<<<<<<<<<<
+ * cdef const char* prop_c = prop
+ * with nogil:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -11248,22 +11248,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ }
+ __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":590
++ /* "vidcutter/libs/pympv/mpv.pyx":592
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ * userdatas.add()
+ * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_get_property_async(
+ */
+- __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 590, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 592, __pyx_L1_error)
+ __pyx_v_prop_c = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":591
++ /* "vidcutter/libs/pympv/mpv.pyx":593
+ * userdatas.add()
+ * cdef const char* prop_c = prop
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -11278,7 +11278,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":592
++ /* "vidcutter/libs/pympv/mpv.pyx":594
+ * cdef const char* prop_c = prop
+ * with nogil:
+ * err = mpv_get_property_async( # <<<<<<<<<<<<<<
+@@ -11288,7 +11288,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ __pyx_v_err = mpv_get_property_async(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_prop_c, MPV_FORMAT_NODE);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":591
++ /* "vidcutter/libs/pympv/mpv.pyx":593
+ * userdatas.add()
+ * cdef const char* prop_c = prop
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -11307,7 +11307,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":598
++ /* "vidcutter/libs/pympv/mpv.pyx":600
+ * MPV_FORMAT_NODE,
+ * )
+ * return err # <<<<<<<<<<<<<<
+@@ -11315,13 +11315,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ * def try_get_property_async(self, prop, data=None, default=None):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":574
++ /* "vidcutter/libs/pympv/mpv.pyx":576
+ *
+ * @_errors
+ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+@@ -11346,7 +11346,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":600
++/* "vidcutter/libs/pympv/mpv.pyx":602
+ * return err
+ *
+ * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
+@@ -11403,7 +11403,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_asyn
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 600, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 602, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -11422,7 +11422,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_asyn
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 600, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 602, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -11451,7 +11451,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("try_get_property_async", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
++ /* "vidcutter/libs/pympv/mpv.pyx":603
+ *
+ * def try_get_property_async(self, prop, data=None, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11467,7 +11467,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":602
++ /* "vidcutter/libs/pympv/mpv.pyx":604
+ * def try_get_property_async(self, prop, data=None, default=None):
+ * try:
+ * return self.get_property_async(prop, data=data) # <<<<<<<<<<<<<<
+@@ -11475,17 +11475,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ * return default
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 604, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_prop);
+ __Pyx_GIVEREF(__pyx_v_prop);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_prop);
+- __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L3_error)
++ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 602, __pyx_L3_error)
+- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L3_error)
++ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 604, __pyx_L3_error)
++ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+@@ -11494,7 +11494,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ __pyx_t_7 = 0;
+ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
++ /* "vidcutter/libs/pympv/mpv.pyx":603
+ *
+ * def try_get_property_async(self, prop, data=None, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11508,7 +11508,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":603
++ /* "vidcutter/libs/pympv/mpv.pyx":605
+ * try:
+ * return self.get_property_async(prop, data=data)
+ * except MPVError: # <<<<<<<<<<<<<<
+@@ -11516,7 +11516,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ *
+ */
+ __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L5_except_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 605, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+@@ -11524,12 +11524,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 603, __pyx_L5_except_error)
++ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 605, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":604
++ /* "vidcutter/libs/pympv/mpv.pyx":606
+ * return self.get_property_async(prop, data=data)
+ * except MPVError:
+ * return default # <<<<<<<<<<<<<<
+@@ -11547,7 +11547,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":601
++ /* "vidcutter/libs/pympv/mpv.pyx":603
+ *
+ * def try_get_property_async(self, prop, data=None, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11573,7 +11573,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ goto __pyx_L0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":600
++ /* "vidcutter/libs/pympv/mpv.pyx":602
+ * return err
+ *
+ * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
+@@ -11595,7 +11595,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":606
++/* "vidcutter/libs/pympv/mpv.pyx":608
+ * return default
+ *
+ * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
+@@ -11642,7 +11642,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyOb
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 606, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 608, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -11658,7 +11658,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyOb
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 608, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -11687,7 +11687,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("try_get_property", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":607
++ /* "vidcutter/libs/pympv/mpv.pyx":609
+ *
+ * def try_get_property(self, prop, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11703,7 +11703,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":608
++ /* "vidcutter/libs/pympv/mpv.pyx":610
+ * def try_get_property(self, prop, default=None):
+ * try:
+ * return self.get_property(prop) # <<<<<<<<<<<<<<
+@@ -11711,7 +11711,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ * return default
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L3_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+@@ -11725,14 +11725,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ }
+ __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L3_error)
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L7_try_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":607
++ /* "vidcutter/libs/pympv/mpv.pyx":609
+ *
+ * def try_get_property(self, prop, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11745,7 +11745,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":609
++ /* "vidcutter/libs/pympv/mpv.pyx":611
+ * try:
+ * return self.get_property(prop)
+ * except MPVError: # <<<<<<<<<<<<<<
+@@ -11753,7 +11753,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ *
+ */
+ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L5_except_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+@@ -11761,12 +11761,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 609, __pyx_L5_except_error)
++ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 611, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":610
++ /* "vidcutter/libs/pympv/mpv.pyx":612
+ * return self.get_property(prop)
+ * except MPVError:
+ * return default # <<<<<<<<<<<<<<
+@@ -11784,7 +11784,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":607
++ /* "vidcutter/libs/pympv/mpv.pyx":609
+ *
+ * def try_get_property(self, prop, default=None):
+ * try: # <<<<<<<<<<<<<<
+@@ -11810,7 +11810,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ goto __pyx_L0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":606
++ /* "vidcutter/libs/pympv/mpv.pyx":608
+ * return default
+ *
+ * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
+@@ -11832,7 +11832,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":612
++/* "vidcutter/libs/pympv/mpv.pyx":614
+ * return default
+ *
+ * def get_property(self, prop): # <<<<<<<<<<<<<<
+@@ -11882,7 +11882,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __Pyx_RefNannySetupContext("get_property", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":614
++ /* "vidcutter/libs/pympv/mpv.pyx":616
+ * def get_property(self, prop):
+ * """Wraps: mpv_get_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -11893,19 +11893,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 614, __pyx_L1_error)
++ __PYX_ERR(0, 616, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":616
++ /* "vidcutter/libs/pympv/mpv.pyx":618
+ * assert self._ctx
+ * cdef mpv_node result
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+ * cdef const char* prop_c = prop
+ * cdef int err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -11919,23 +11919,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":617
++ /* "vidcutter/libs/pympv/mpv.pyx":619
+ * cdef mpv_node result
+ * prop = _strenc(prop)
+ * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
+ * cdef int err
+ * with nogil:
+ */
+- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 619, __pyx_L1_error)
+ __pyx_v_prop_c = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":619
++ /* "vidcutter/libs/pympv/mpv.pyx":621
+ * cdef const char* prop_c = prop
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -11950,7 +11950,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":620
++ /* "vidcutter/libs/pympv/mpv.pyx":622
+ * cdef int err
+ * with nogil:
+ * err = mpv_get_property( # <<<<<<<<<<<<<<
+@@ -11960,7 +11960,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __pyx_v_err = mpv_get_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_result));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":619
++ /* "vidcutter/libs/pympv/mpv.pyx":621
+ * cdef const char* prop_c = prop
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -11979,7 +11979,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":626
++ /* "vidcutter/libs/pympv/mpv.pyx":628
+ * &result,
+ * )
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -11989,16 +11989,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __pyx_t_5 = ((__pyx_v_err < 0) != 0);
+ if (unlikely(__pyx_t_5)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":627
++ /* "vidcutter/libs/pympv/mpv.pyx":629
+ * )
+ * if err < 0:
+ * raise MPVError(err) # <<<<<<<<<<<<<<
+ * try:
+ * v = _convert_node_value(result)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -12013,14 +12013,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 627, __pyx_L1_error)
++ __PYX_ERR(0, 629, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":626
++ /* "vidcutter/libs/pympv/mpv.pyx":628
+ * &result,
+ * )
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -12029,7 +12029,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":628
++ /* "vidcutter/libs/pympv/mpv.pyx":630
+ * if err < 0:
+ * raise MPVError(err)
+ * try: # <<<<<<<<<<<<<<
+@@ -12038,20 +12038,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ */
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":629
++ /* "vidcutter/libs/pympv/mpv.pyx":631
+ * raise MPVError(err)
+ * try:
+ * v = _convert_node_value(result) # <<<<<<<<<<<<<<
+ * finally:
+ * with nogil:
+ */
+- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L8_error)
++ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L8_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_v = __pyx_t_1;
+ __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":631
++ /* "vidcutter/libs/pympv/mpv.pyx":633
+ * v = _convert_node_value(result)
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12068,7 +12068,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":632
++ /* "vidcutter/libs/pympv/mpv.pyx":634
+ * finally:
+ * with nogil:
+ * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
+@@ -12078,7 +12078,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ mpv_free_node_contents((&__pyx_v_result));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":631
++ /* "vidcutter/libs/pympv/mpv.pyx":633
+ * v = _convert_node_value(result)
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12125,7 +12125,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":632
++ /* "vidcutter/libs/pympv/mpv.pyx":634
+ * finally:
+ * with nogil:
+ * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
+@@ -12135,7 +12135,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ mpv_free_node_contents((&__pyx_v_result));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":631
++ /* "vidcutter/libs/pympv/mpv.pyx":633
+ * v = _convert_node_value(result)
+ * finally:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12171,7 +12171,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __pyx_L9:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":633
++ /* "vidcutter/libs/pympv/mpv.pyx":635
+ * with nogil:
+ * mpv_free_node_contents(&result)
+ * return v # <<<<<<<<<<<<<<
+@@ -12183,7 +12183,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ __pyx_r = __pyx_v_v;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":612
++ /* "vidcutter/libs/pympv/mpv.pyx":614
+ * return default
+ *
+ * def get_property(self, prop): # <<<<<<<<<<<<<<
+@@ -12207,7 +12207,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":636
++/* "vidcutter/libs/pympv/mpv.pyx":638
+ *
+ * @_errors
+ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+@@ -12275,7 +12275,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 636, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 638, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -12297,7 +12297,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 638, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -12344,7 +12344,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __Pyx_RefNannySetupContext("set_property", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":638
++ /* "vidcutter/libs/pympv/mpv.pyx":640
+ * def set_property(self, prop, value=True, asynchronous=False, data=None):
+ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -12355,19 +12355,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 638, __pyx_L1_error)
++ __PYX_ERR(0, 640, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":639
++ /* "vidcutter/libs/pympv/mpv.pyx":641
+ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ * assert self._ctx
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+ * cdef mpv_format format = self._format_for(value)
+ * cdef mpv_node v = self._prep_native_value(value, format)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -12381,20 +12381,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":640
++ /* "vidcutter/libs/pympv/mpv.pyx":642
+ * assert self._ctx
+ * prop = _strenc(prop)
+ * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
+ * cdef mpv_node v = self._prep_native_value(value, format)
+ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -12408,26 +12408,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error)
++ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_format = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":641
++ /* "vidcutter/libs/pympv/mpv.pyx":643
+ * prop = _strenc(prop)
+ * cdef mpv_format format = self._format_for(value)
+ * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+ * cdef int err
+ * cdef uint64_t data_id
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":645
++ /* "vidcutter/libs/pympv/mpv.pyx":647
+ * cdef uint64_t data_id
+ * cdef const char* prop_c
+ * try: # <<<<<<<<<<<<<<
+@@ -12436,28 +12436,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ */
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":646
++ /* "vidcutter/libs/pympv/mpv.pyx":648
+ * cdef const char* prop_c
+ * try:
+ * prop_c = prop # <<<<<<<<<<<<<<
+ * if not asynchronous:
+ * with nogil:
+ */
+- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 646, __pyx_L4_error)
++ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L4_error)
+ __pyx_v_prop_c = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":647
++ /* "vidcutter/libs/pympv/mpv.pyx":649
+ * try:
+ * prop_c = prop
+ * if not asynchronous: # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_set_property(
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 647, __pyx_L4_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 649, __pyx_L4_error)
+ __pyx_t_7 = ((!__pyx_t_6) != 0);
+ if (__pyx_t_7) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":648
++ /* "vidcutter/libs/pympv/mpv.pyx":650
+ * prop_c = prop
+ * if not asynchronous:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12472,7 +12472,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":649
++ /* "vidcutter/libs/pympv/mpv.pyx":651
+ * if not asynchronous:
+ * with nogil:
+ * err = mpv_set_property( # <<<<<<<<<<<<<<
+@@ -12482,7 +12482,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_v_err = mpv_set_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":648
++ /* "vidcutter/libs/pympv/mpv.pyx":650
+ * prop_c = prop
+ * if not asynchronous:
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12501,7 +12501,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":655
++ /* "vidcutter/libs/pympv/mpv.pyx":657
+ * &v
+ * )
+ * return err # <<<<<<<<<<<<<<
+@@ -12509,13 +12509,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ * userdatas = self.reply_userdata.get(data_id, None)
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L3_return;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":647
++ /* "vidcutter/libs/pympv/mpv.pyx":649
+ * try:
+ * prop_c = prop
+ * if not asynchronous: # <<<<<<<<<<<<<<
+@@ -12524,26 +12524,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":656
++ /* "vidcutter/libs/pympv/mpv.pyx":658
+ * )
+ * return err
+ * data_id = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None:
+ */
+- __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 656, __pyx_L4_error)
++ __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 658, __pyx_L4_error)
+ __pyx_v_data_id = ((uint64_t)__pyx_t_8);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":657
++ /* "vidcutter/libs/pympv/mpv.pyx":659
+ * return err
+ * data_id = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
+ * if userdatas is None:
+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = NULL;
+ __pyx_t_10 = 0;
+@@ -12560,7 +12560,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+@@ -12569,14 +12569,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
+- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
+@@ -12587,7 +12587,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, Py_None);
+ __pyx_t_3 = 0;
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+@@ -12595,7 +12595,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_v_userdatas = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":658
++ /* "vidcutter/libs/pympv/mpv.pyx":660
+ * data_id = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -12606,14 +12606,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_t_6 = (__pyx_t_7 != 0);
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":659
++ /* "vidcutter/libs/pympv/mpv.pyx":661
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None:
+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+ * userdatas.add()
+ * with nogil:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -12627,15 +12627,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 659, __pyx_L4_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 661, __pyx_L4_error)
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":658
++ /* "vidcutter/libs/pympv/mpv.pyx":660
+ * data_id = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(data_id, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -12644,14 +12644,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":660
++ /* "vidcutter/libs/pympv/mpv.pyx":662
+ * if userdatas is None:
+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add() # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_set_property_async(
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L4_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -12665,12 +12665,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L4_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":661
++ /* "vidcutter/libs/pympv/mpv.pyx":663
+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add()
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12685,7 +12685,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":662
++ /* "vidcutter/libs/pympv/mpv.pyx":664
+ * userdatas.add()
+ * with nogil:
+ * err = mpv_set_property_async( # <<<<<<<<<<<<<<
+@@ -12695,7 +12695,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_v_err = mpv_set_property_async(__pyx_v_self->_ctx, __pyx_v_data_id, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":661
++ /* "vidcutter/libs/pympv/mpv.pyx":663
+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
+ * userdatas.add()
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -12715,7 +12715,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":670
++ /* "vidcutter/libs/pympv/mpv.pyx":672
+ * )
+ * finally:
+ * self._free_native_value(v) # <<<<<<<<<<<<<<
+@@ -12724,7 +12724,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L5;
+@@ -12749,7 +12749,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __Pyx_XGOTREF(__pyx_t_19);
+ __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
+ {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L15_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+@@ -12782,7 +12782,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_L3_return: {
+ __pyx_t_19 = __pyx_r;
+ __pyx_r = 0;
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_19;
+@@ -12792,7 +12792,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":671
++ /* "vidcutter/libs/pympv/mpv.pyx":673
+ * finally:
+ * self._free_native_value(v)
+ * return err # <<<<<<<<<<<<<<
+@@ -12800,13 +12800,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":636
++ /* "vidcutter/libs/pympv/mpv.pyx":638
+ *
+ * @_errors
+ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+@@ -12831,7 +12831,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":674
++/* "vidcutter/libs/pympv/mpv.pyx":676
+ *
+ * @_errors
+ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+@@ -12879,7 +12879,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 674, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 676, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -12895,7 +12895,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 674, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 676, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -12935,7 +12935,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ __Pyx_RefNannySetupContext("set_option", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":676
++ /* "vidcutter/libs/pympv/mpv.pyx":678
+ * def set_option(self, prop, value=True):
+ * """Wraps: mpv_set_option"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -12946,19 +12946,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 676, __pyx_L1_error)
++ __PYX_ERR(0, 678, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":677
++ /* "vidcutter/libs/pympv/mpv.pyx":679
+ * """Wraps: mpv_set_option"""
+ * assert self._ctx
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+ * cdef mpv_format format = self._format_for(value)
+ * cdef mpv_node v = self._prep_native_value(value, format)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+@@ -12972,20 +12972,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":678
++ /* "vidcutter/libs/pympv/mpv.pyx":680
+ * assert self._ctx
+ * prop = _strenc(prop)
+ * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
+ * cdef mpv_node v = self._prep_native_value(value, format)
+ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -12999,26 +12999,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
++ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 680, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_format = __pyx_t_4;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":679
++ /* "vidcutter/libs/pympv/mpv.pyx":681
+ * prop = _strenc(prop)
+ * cdef mpv_format format = self._format_for(value)
+ * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
+ * cdef int err
+ * cdef const char* prop_c
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":682
++ /* "vidcutter/libs/pympv/mpv.pyx":684
+ * cdef int err
+ * cdef const char* prop_c
+ * try: # <<<<<<<<<<<<<<
+@@ -13027,17 +13027,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ */
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":683
++ /* "vidcutter/libs/pympv/mpv.pyx":685
+ * cdef const char* prop_c
+ * try:
+ * prop_c = prop # <<<<<<<<<<<<<<
+ * with nogil:
+ * err = mpv_set_option(
+ */
+- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L4_error)
++ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 685, __pyx_L4_error)
+ __pyx_v_prop_c = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":684
++ /* "vidcutter/libs/pympv/mpv.pyx":686
+ * try:
+ * prop_c = prop
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13052,7 +13052,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":685
++ /* "vidcutter/libs/pympv/mpv.pyx":687
+ * prop_c = prop
+ * with nogil:
+ * err = mpv_set_option( # <<<<<<<<<<<<<<
+@@ -13062,7 +13062,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ __pyx_v_err = mpv_set_option(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":684
++ /* "vidcutter/libs/pympv/mpv.pyx":686
+ * try:
+ * prop_c = prop
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13082,7 +13082,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":692
++ /* "vidcutter/libs/pympv/mpv.pyx":694
+ * )
+ * finally:
+ * self._free_native_value(v) # <<<<<<<<<<<<<<
+@@ -13091,7 +13091,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ */
+ /*finally:*/ {
+ /*normal exit:*/{
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L5;
+@@ -13114,7 +13114,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ __Pyx_XGOTREF(__pyx_t_14);
+ __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
+ {
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L10_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L10_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+@@ -13147,7 +13147,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ __pyx_L5:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":693
++ /* "vidcutter/libs/pympv/mpv.pyx":695
+ * finally:
+ * self._free_native_value(v)
+ * return err # <<<<<<<<<<<<<<
+@@ -13155,13 +13155,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":674
++ /* "vidcutter/libs/pympv/mpv.pyx":676
+ *
+ * @_errors
+ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+@@ -13183,7 +13183,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":696
++/* "vidcutter/libs/pympv/mpv.pyx":698
+ *
+ * @_errors
+ * def initialize(self): # <<<<<<<<<<<<<<
+@@ -13215,7 +13215,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("initialize", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":698
++ /* "vidcutter/libs/pympv/mpv.pyx":700
+ * def initialize(self):
+ * """Wraps: mpv_initialize"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -13226,12 +13226,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 698, __pyx_L1_error)
++ __PYX_ERR(0, 700, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":700
++ /* "vidcutter/libs/pympv/mpv.pyx":702
+ * assert self._ctx
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13246,7 +13246,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":701
++ /* "vidcutter/libs/pympv/mpv.pyx":703
+ * cdef int err
+ * with nogil:
+ * err = mpv_initialize(self._ctx) # <<<<<<<<<<<<<<
+@@ -13256,7 +13256,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ __pyx_v_err = mpv_initialize(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":700
++ /* "vidcutter/libs/pympv/mpv.pyx":702
+ * assert self._ctx
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13275,7 +13275,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":702
++ /* "vidcutter/libs/pympv/mpv.pyx":704
+ * with nogil:
+ * err = mpv_initialize(self._ctx)
+ * return err # <<<<<<<<<<<<<<
+@@ -13283,13 +13283,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ * def wait_event(self, timeout=None):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":696
++ /* "vidcutter/libs/pympv/mpv.pyx":698
+ *
+ * @_errors
+ * def initialize(self): # <<<<<<<<<<<<<<
+@@ -13308,7 +13308,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":704
++/* "vidcutter/libs/pympv/mpv.pyx":706
+ * return err
+ *
+ * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
+@@ -13349,7 +13349,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 704, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 706, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -13363,7 +13363,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 704, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 706, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -13391,7 +13391,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("wait_event", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":706
++ /* "vidcutter/libs/pympv/mpv.pyx":708
+ * def wait_event(self, timeout=None):
+ * """Wraps: mpv_wait_event"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -13402,12 +13402,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 706, __pyx_L1_error)
++ __PYX_ERR(0, 708, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":707
++ /* "vidcutter/libs/pympv/mpv.pyx":709
+ * """Wraps: mpv_wait_event"""
+ * assert self._ctx
+ * cdef double timeout_d = timeout if timeout is not None else -1 # <<<<<<<<<<<<<<
+@@ -13416,14 +13416,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ */
+ __pyx_t_2 = (__pyx_v_timeout != Py_None);
+ if ((__pyx_t_2 != 0)) {
+- __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
++ __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 709, __pyx_L1_error)
+ __pyx_t_1 = __pyx_t_3;
+ } else {
+ __pyx_t_1 = -1.0;
+ }
+ __pyx_v_timeout_d = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":709
++ /* "vidcutter/libs/pympv/mpv.pyx":711
+ * cdef double timeout_d = timeout if timeout is not None else -1
+ * cdef mpv_event* event
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13438,7 +13438,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":710
++ /* "vidcutter/libs/pympv/mpv.pyx":712
+ * cdef mpv_event* event
+ * with nogil:
+ * event = mpv_wait_event(self._ctx, timeout_d) # <<<<<<<<<<<<<<
+@@ -13448,7 +13448,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ __pyx_v_event = mpv_wait_event(__pyx_v_self->_ctx, __pyx_v_timeout_d);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":709
++ /* "vidcutter/libs/pympv/mpv.pyx":711
+ * cdef double timeout_d = timeout if timeout is not None else -1
+ * cdef mpv_event* event
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13467,7 +13467,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":711
++ /* "vidcutter/libs/pympv/mpv.pyx":713
+ * with nogil:
+ * event = mpv_wait_event(self._ctx, timeout_d)
+ * return Event()._init(event, self) # <<<<<<<<<<<<<<
+@@ -13475,16 +13475,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ * def wakeup(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
++ __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":704
++ /* "vidcutter/libs/pympv/mpv.pyx":706
+ * return err
+ *
+ * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
+@@ -13504,7 +13504,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":713
++/* "vidcutter/libs/pympv/mpv.pyx":715
+ * return Event()._init(event, self)
+ *
+ * def wakeup(self): # <<<<<<<<<<<<<<
+@@ -13534,7 +13534,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("wakeup", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":715
++ /* "vidcutter/libs/pympv/mpv.pyx":717
+ * def wakeup(self):
+ * """Wraps: mpv_wakeup"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -13545,12 +13545,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 715, __pyx_L1_error)
++ __PYX_ERR(0, 717, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":716
++ /* "vidcutter/libs/pympv/mpv.pyx":718
+ * """Wraps: mpv_wakeup"""
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13565,7 +13565,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":717
++ /* "vidcutter/libs/pympv/mpv.pyx":719
+ * assert self._ctx
+ * with nogil:
+ * mpv_wakeup(self._ctx) # <<<<<<<<<<<<<<
+@@ -13575,7 +13575,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ mpv_wakeup(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":716
++ /* "vidcutter/libs/pympv/mpv.pyx":718
+ * """Wraps: mpv_wakeup"""
+ * assert self._ctx
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13594,7 +13594,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":713
++ /* "vidcutter/libs/pympv/mpv.pyx":715
+ * return Event()._init(event, self)
+ *
+ * def wakeup(self): # <<<<<<<<<<<<<<
+@@ -13614,7 +13614,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":719
++/* "vidcutter/libs/pympv/mpv.pyx":721
+ * mpv_wakeup(self._ctx)
+ *
+ * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
+@@ -13649,7 +13649,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("set_wakeup_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":721
++ /* "vidcutter/libs/pympv/mpv.pyx":723
+ * def set_wakeup_callback(self, callback):
+ * """Wraps: mpv_set_wakeup_callback"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -13660,25 +13660,25 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 721, __pyx_L1_error)
++ __PYX_ERR(0, 723, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":722
++ /* "vidcutter/libs/pympv/mpv.pyx":724
+ * """Wraps: mpv_set_wakeup_callback"""
+ * assert self._ctx
+ * cdef uint64_t name = <uint64_t>id(self) # <<<<<<<<<<<<<<
+ * self.callback = callback
+ * self.callbackthread.set(callback)
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_name = ((uint64_t)__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":723
++ /* "vidcutter/libs/pympv/mpv.pyx":725
+ * assert self._ctx
+ * cdef uint64_t name = <uint64_t>id(self)
+ * self.callback = callback # <<<<<<<<<<<<<<
+@@ -13691,14 +13691,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ __Pyx_DECREF(__pyx_v_self->callback);
+ __pyx_v_self->callback = __pyx_v_callback;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":724
++ /* "vidcutter/libs/pympv/mpv.pyx":726
+ * cdef uint64_t name = <uint64_t>id(self)
+ * self.callback = callback
+ * self.callbackthread.set(callback) # <<<<<<<<<<<<<<
+ * with nogil:
+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+@@ -13712,12 +13712,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ }
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callback);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":725
++ /* "vidcutter/libs/pympv/mpv.pyx":727
+ * self.callback = callback
+ * self.callbackthread.set(callback)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13732,7 +13732,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":726
++ /* "vidcutter/libs/pympv/mpv.pyx":728
+ * self.callbackthread.set(callback)
+ * with nogil:
+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name) # <<<<<<<<<<<<<<
+@@ -13742,7 +13742,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ mpv_set_wakeup_callback(__pyx_v_self->_ctx, __pyx_f_9vidcutter_4libs_3mpv__c_callback, ((void *)__pyx_v_name));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":725
++ /* "vidcutter/libs/pympv/mpv.pyx":727
+ * self.callback = callback
+ * self.callbackthread.set(callback)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13761,7 +13761,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":719
++ /* "vidcutter/libs/pympv/mpv.pyx":721
+ * mpv_wakeup(self._ctx)
+ *
+ * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
+@@ -13784,7 +13784,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":728
++/* "vidcutter/libs/pympv/mpv.pyx":730
+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+ *
+ * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
+@@ -13816,7 +13816,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("get_wakeup_pipe", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":730
++ /* "vidcutter/libs/pympv/mpv.pyx":732
+ * def get_wakeup_pipe(self):
+ * """Wraps: mpv_get_wakeup_pipe"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -13827,12 +13827,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 730, __pyx_L1_error)
++ __PYX_ERR(0, 732, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":732
++ /* "vidcutter/libs/pympv/mpv.pyx":734
+ * assert self._ctx
+ * cdef int pipe
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13847,7 +13847,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":733
++ /* "vidcutter/libs/pympv/mpv.pyx":735
+ * cdef int pipe
+ * with nogil:
+ * pipe = mpv_get_wakeup_pipe(self._ctx) # <<<<<<<<<<<<<<
+@@ -13857,7 +13857,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ __pyx_v_pipe = mpv_get_wakeup_pipe(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":732
++ /* "vidcutter/libs/pympv/mpv.pyx":734
+ * assert self._ctx
+ * cdef int pipe
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13876,7 +13876,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":734
++ /* "vidcutter/libs/pympv/mpv.pyx":736
+ * with nogil:
+ * pipe = mpv_get_wakeup_pipe(self._ctx)
+ * return pipe # <<<<<<<<<<<<<<
+@@ -13884,13 +13884,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ * def __cinit__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":728
++ /* "vidcutter/libs/pympv/mpv.pyx":730
+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
+ *
+ * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
+@@ -13909,7 +13909,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":736
++/* "vidcutter/libs/pympv/mpv.pyx":738
+ * return pipe
+ *
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+@@ -13947,20 +13947,20 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":737
++ /* "vidcutter/libs/pympv/mpv.pyx":739
+ *
+ * def __cinit__(self):
+ * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
+ * with nogil:
+ * self._ctx = mpv_create()
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 739, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":738
++ /* "vidcutter/libs/pympv/mpv.pyx":740
+ * def __cinit__(self):
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -13975,7 +13975,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":739
++ /* "vidcutter/libs/pympv/mpv.pyx":741
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil:
+ * self._ctx = mpv_create() # <<<<<<<<<<<<<<
+@@ -13985,7 +13985,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ __pyx_v_self->_ctx = mpv_create();
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":738
++ /* "vidcutter/libs/pympv/mpv.pyx":740
+ * def __cinit__(self):
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14004,7 +14004,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":740
++ /* "vidcutter/libs/pympv/mpv.pyx":742
+ * with nogil:
+ * self._ctx = mpv_create()
+ * if not self._ctx: # <<<<<<<<<<<<<<
+@@ -14014,14 +14014,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ __pyx_t_3 = ((!(__pyx_v_self->_ctx != 0)) != 0);
+ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":741
++ /* "vidcutter/libs/pympv/mpv.pyx":743
+ * self._ctx = mpv_create()
+ * if not self._ctx:
+ * raise MPVError("Context creation error") # <<<<<<<<<<<<<<
+ * self.callbackthread = CallbackThread()
+ * _callbacks[ctxid] = self.callbackthread
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 743, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+@@ -14035,14 +14035,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ }
+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Context_creation_error) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Context_creation_error);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 741, __pyx_L1_error)
++ __PYX_ERR(0, 743, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":740
++ /* "vidcutter/libs/pympv/mpv.pyx":742
+ * with nogil:
+ * self._ctx = mpv_create()
+ * if not self._ctx: # <<<<<<<<<<<<<<
+@@ -14051,14 +14051,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":742
++ /* "vidcutter/libs/pympv/mpv.pyx":744
+ * if not self._ctx:
+ * raise MPVError("Context creation error")
+ * self.callbackthread = CallbackThread() # <<<<<<<<<<<<<<
+ * _callbacks[ctxid] = self.callbackthread
+ * self.reply_userdata = dict()
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+@@ -14072,7 +14072,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ }
+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -14081,7 +14081,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ __pyx_v_self->callbackthread = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":743
++ /* "vidcutter/libs/pympv/mpv.pyx":745
+ * raise MPVError("Context creation error")
+ * self.callbackthread = CallbackThread()
+ * _callbacks[ctxid] = self.callbackthread # <<<<<<<<<<<<<<
+@@ -14090,17 +14090,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ */
+ __pyx_t_1 = __pyx_v_self->callbackthread;
+ __Pyx_INCREF(__pyx_t_1);
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":744
++ /* "vidcutter/libs/pympv/mpv.pyx":746
+ * self.callbackthread = CallbackThread()
+ * _callbacks[ctxid] = self.callbackthread
+ * self.reply_userdata = dict() # <<<<<<<<<<<<<<
+ * _reply_userdatas[ctxid] = self.reply_userdata
+ * self.callbackthread.start()
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
+@@ -14108,7 +14108,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ __pyx_v_self->reply_userdata = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":745
++ /* "vidcutter/libs/pympv/mpv.pyx":747
+ * _callbacks[ctxid] = self.callbackthread
+ * self.reply_userdata = dict()
+ * _reply_userdatas[ctxid] = self.reply_userdata # <<<<<<<<<<<<<<
+@@ -14117,17 +14117,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ */
+ __pyx_t_1 = __pyx_v_self->reply_userdata;
+ __Pyx_INCREF(__pyx_t_1);
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 747, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":746
++ /* "vidcutter/libs/pympv/mpv.pyx":748
+ * self.reply_userdata = dict()
+ * _reply_userdatas[ctxid] = self.reply_userdata
+ * self.callbackthread.start() # <<<<<<<<<<<<<<
+ *
+ * @_errors
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 748, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+@@ -14141,12 +14141,12 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ }
+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":736
++ /* "vidcutter/libs/pympv/mpv.pyx":738
+ * return pipe
+ *
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+@@ -14168,7 +14168,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":749
++/* "vidcutter/libs/pympv/mpv.pyx":751
+ *
+ * @_errors
+ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+@@ -14216,7 +14216,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyOb
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 749, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 751, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -14232,7 +14232,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyOb
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 749, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 751, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -14268,7 +14268,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ __Pyx_RefNannySetupContext("observe_property", 0);
+ __Pyx_INCREF(__pyx_v_prop);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":751
++ /* "vidcutter/libs/pympv/mpv.pyx":753
+ * def observe_property(self, prop, data=None):
+ * """Wraps: mpv_observe_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -14279,41 +14279,41 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 751, __pyx_L1_error)
++ __PYX_ERR(0, 753, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":752
++ /* "vidcutter/libs/pympv/mpv.pyx":754
+ * """Wraps: mpv_observe_property"""
+ * assert self._ctx
+ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+ * id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 754, __pyx_L1_error)
+ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":753
++ /* "vidcutter/libs/pympv/mpv.pyx":755
+ * assert self._ctx
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None:
+ */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 753, __pyx_L1_error)
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 755, __pyx_L1_error)
+ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":754
++ /* "vidcutter/libs/pympv/mpv.pyx":756
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+@@ -14330,7 +14330,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+@@ -14339,14 +14339,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+@@ -14357,7 +14357,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+ __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+@@ -14365,7 +14365,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ __pyx_v_userdatas = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":755
++ /* "vidcutter/libs/pympv/mpv.pyx":757
+ * id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -14376,14 +14376,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ __pyx_t_9 = (__pyx_t_8 != 0);
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":756
++ /* "vidcutter/libs/pympv/mpv.pyx":758
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
+ * userdatas.observed = True
+ * prop = _strenc(prop)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+@@ -14397,15 +14397,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ }
+ __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
++ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":755
++ /* "vidcutter/libs/pympv/mpv.pyx":757
+ * id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is None: # <<<<<<<<<<<<<<
+@@ -14414,23 +14414,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":757
++ /* "vidcutter/libs/pympv/mpv.pyx":759
+ * if userdatas is None:
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ * userdatas.observed = True # <<<<<<<<<<<<<<
+ * prop = _strenc(prop)
+ * cdef char* propc = prop
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 759, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":758
++ /* "vidcutter/libs/pympv/mpv.pyx":760
+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
+ * userdatas.observed = True
+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
+ * cdef char* propc = prop
+ * cdef int err
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+@@ -14444,23 +14444,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ }
+ __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_prop);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":759
++ /* "vidcutter/libs/pympv/mpv.pyx":761
+ * userdatas.observed = True
+ * prop = _strenc(prop)
+ * cdef char* propc = prop # <<<<<<<<<<<<<<
+ * cdef int err
+ * with nogil:
+ */
+- __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 761, __pyx_L1_error)
+ __pyx_v_propc = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":761
++ /* "vidcutter/libs/pympv/mpv.pyx":763
+ * cdef char* propc = prop
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14475,7 +14475,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":762
++ /* "vidcutter/libs/pympv/mpv.pyx":764
+ * cdef int err
+ * with nogil:
+ * err = mpv_observe_property( # <<<<<<<<<<<<<<
+@@ -14485,7 +14485,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ __pyx_v_err = mpv_observe_property(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_propc, MPV_FORMAT_NODE);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":761
++ /* "vidcutter/libs/pympv/mpv.pyx":763
+ * cdef char* propc = prop
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14504,7 +14504,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":768
++ /* "vidcutter/libs/pympv/mpv.pyx":770
+ * MPV_FORMAT_NODE,
+ * )
+ * return err # <<<<<<<<<<<<<<
+@@ -14512,13 +14512,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":749
++ /* "vidcutter/libs/pympv/mpv.pyx":751
+ *
+ * @_errors
+ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+@@ -14543,7 +14543,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":771
++/* "vidcutter/libs/pympv/mpv.pyx":773
+ *
+ * @_errors
+ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+@@ -14585,7 +14585,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("unobserve_property", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":773
++ /* "vidcutter/libs/pympv/mpv.pyx":775
+ * def unobserve_property(self, data):
+ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx # <<<<<<<<<<<<<<
+@@ -14596,31 +14596,31 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ if (unlikely(!Py_OptimizeFlag)) {
+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+- __PYX_ERR(0, 773, __pyx_L1_error)
++ __PYX_ERR(0, 775, __pyx_L1_error)
+ }
+ }
+ #endif
+
+- /* "vidcutter/libs/pympv/mpv.pyx":774
++ /* "vidcutter/libs/pympv/mpv.pyx":776
+ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx
+ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is not None:
+ */
+- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
++ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 776, __pyx_L1_error)
+ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":775
++ /* "vidcutter/libs/pympv/mpv.pyx":777
+ * assert self._ctx
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
+ * if userdatas is not None:
+ * userdatas.observed = False
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+@@ -14637,7 +14637,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+@@ -14646,14 +14646,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
+- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+@@ -14664,7 +14664,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
+ __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+@@ -14672,7 +14672,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ __pyx_v_userdatas = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":776
++ /* "vidcutter/libs/pympv/mpv.pyx":778
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is not None: # <<<<<<<<<<<<<<
+@@ -14683,40 +14683,40 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ __pyx_t_9 = (__pyx_t_8 != 0);
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":777
++ /* "vidcutter/libs/pympv/mpv.pyx":779
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is not None:
+ * userdatas.observed = False # <<<<<<<<<<<<<<
+ * if userdatas.counter <= 0:
+ * del self.reply_userdata[id_data]
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 779, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":778
++ /* "vidcutter/libs/pympv/mpv.pyx":780
+ * if userdatas is not None:
+ * userdatas.observed = False
+ * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
+ * del self.reply_userdata[id_data]
+ * cdef int err
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 780, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 778, __pyx_L1_error)
++ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 780, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_9) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":779
++ /* "vidcutter/libs/pympv/mpv.pyx":781
+ * userdatas.observed = False
+ * if userdatas.counter <= 0:
+ * del self.reply_userdata[id_data] # <<<<<<<<<<<<<<
+ * cdef int err
+ * with nogil:
+ */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 779, __pyx_L1_error)
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 781, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":778
++ /* "vidcutter/libs/pympv/mpv.pyx":780
+ * if userdatas is not None:
+ * userdatas.observed = False
+ * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
+@@ -14725,7 +14725,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":776
++ /* "vidcutter/libs/pympv/mpv.pyx":778
+ * cdef uint64_t id_data = <uint64_t>hash(data)
+ * userdatas = self.reply_userdata.get(id_data, None)
+ * if userdatas is not None: # <<<<<<<<<<<<<<
+@@ -14734,7 +14734,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":781
++ /* "vidcutter/libs/pympv/mpv.pyx":783
+ * del self.reply_userdata[id_data]
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14749,7 +14749,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":782
++ /* "vidcutter/libs/pympv/mpv.pyx":784
+ * cdef int err
+ * with nogil:
+ * err = mpv_unobserve_property( # <<<<<<<<<<<<<<
+@@ -14759,7 +14759,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ __pyx_v_err = mpv_unobserve_property(__pyx_v_self->_ctx, __pyx_v_id_data);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":781
++ /* "vidcutter/libs/pympv/mpv.pyx":783
+ * del self.reply_userdata[id_data]
+ * cdef int err
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14778,7 +14778,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":786
++ /* "vidcutter/libs/pympv/mpv.pyx":788
+ * id_data,
+ * )
+ * return err # <<<<<<<<<<<<<<
+@@ -14786,13 +14786,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ * def shutdown(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 788, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":771
++ /* "vidcutter/libs/pympv/mpv.pyx":773
+ *
+ * @_errors
+ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+@@ -14816,7 +14816,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":788
++/* "vidcutter/libs/pympv/mpv.pyx":790
+ * return err
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+@@ -14851,7 +14851,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("shutdown", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":789
++ /* "vidcutter/libs/pympv/mpv.pyx":791
+ *
+ * def shutdown(self):
+ * if self._ctx == NULL: # <<<<<<<<<<<<<<
+@@ -14861,7 +14861,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ __pyx_t_1 = ((__pyx_v_self->_ctx == NULL) != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":790
++ /* "vidcutter/libs/pympv/mpv.pyx":792
+ * def shutdown(self):
+ * if self._ctx == NULL:
+ * return # <<<<<<<<<<<<<<
+@@ -14872,7 +14872,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":789
++ /* "vidcutter/libs/pympv/mpv.pyx":791
+ *
+ * def shutdown(self):
+ * if self._ctx == NULL: # <<<<<<<<<<<<<<
+@@ -14881,20 +14881,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":791
++ /* "vidcutter/libs/pympv/mpv.pyx":793
+ * if self._ctx == NULL:
+ * return
+ * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
+ * with nogil:
+ * mpv_terminate_destroy(self._ctx)
+ */
+- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 793, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_ctxid = ((uint64_t)__pyx_t_3);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":792
++ /* "vidcutter/libs/pympv/mpv.pyx":794
+ * return
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14909,7 +14909,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":793
++ /* "vidcutter/libs/pympv/mpv.pyx":795
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil:
+ * mpv_terminate_destroy(self._ctx) # <<<<<<<<<<<<<<
+@@ -14919,7 +14919,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ mpv_terminate_destroy(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":792
++ /* "vidcutter/libs/pympv/mpv.pyx":794
+ * return
+ * cdef uint64_t ctxid = <uint64_t>id(self)
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -14938,14 +14938,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":794
++ /* "vidcutter/libs/pympv/mpv.pyx":796
+ * with nogil:
+ * mpv_terminate_destroy(self._ctx)
+ * self.callbackthread.shutdown() # <<<<<<<<<<<<<<
+ * del _callbacks[ctxid]
+ * del _reply_userdatas[ctxid]
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+@@ -14959,30 +14959,30 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ }
+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":795
++ /* "vidcutter/libs/pympv/mpv.pyx":797
+ * mpv_terminate_destroy(self._ctx)
+ * self.callbackthread.shutdown()
+ * del _callbacks[ctxid] # <<<<<<<<<<<<<<
+ * del _reply_userdatas[ctxid]
+ * self.callback = None
+ */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 797, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":796
++ /* "vidcutter/libs/pympv/mpv.pyx":798
+ * self.callbackthread.shutdown()
+ * del _callbacks[ctxid]
+ * del _reply_userdatas[ctxid] # <<<<<<<<<<<<<<
+ * self.callback = None
+ * self.reply_userdata = None
+ */
+- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 796, __pyx_L1_error)
++ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 798, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":797
++ /* "vidcutter/libs/pympv/mpv.pyx":799
+ * del _callbacks[ctxid]
+ * del _reply_userdatas[ctxid]
+ * self.callback = None # <<<<<<<<<<<<<<
+@@ -14995,7 +14995,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ __Pyx_DECREF(__pyx_v_self->callback);
+ __pyx_v_self->callback = Py_None;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":798
++ /* "vidcutter/libs/pympv/mpv.pyx":800
+ * del _reply_userdatas[ctxid]
+ * self.callback = None
+ * self.reply_userdata = None # <<<<<<<<<<<<<<
+@@ -15008,7 +15008,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ __Pyx_DECREF(__pyx_v_self->reply_userdata);
+ __pyx_v_self->reply_userdata = Py_None;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":799
++ /* "vidcutter/libs/pympv/mpv.pyx":801
+ * self.callback = None
+ * self.reply_userdata = None
+ * self._ctx = NULL # <<<<<<<<<<<<<<
+@@ -15017,7 +15017,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ */
+ __pyx_v_self->_ctx = NULL;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":788
++ /* "vidcutter/libs/pympv/mpv.pyx":790
+ * return err
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+@@ -15040,7 +15040,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":813
++/* "vidcutter/libs/pympv/mpv.pyx":815
+ * # return ctx
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -15069,14 +15069,14 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_o
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":814
++ /* "vidcutter/libs/pympv/mpv.pyx":816
+ *
+ * def __dealloc__(self):
+ * self.shutdown() # <<<<<<<<<<<<<<
+ *
+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -15090,12 +15090,12 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_o
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":813
++ /* "vidcutter/libs/pympv/mpv.pyx":815
+ * # return ctx
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -15227,7 +15227,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(C
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":816
++/* "vidcutter/libs/pympv/mpv.pyx":818
+ * self.shutdown()
+ *
+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
+@@ -15251,14 +15251,14 @@ static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx,
+ #endif
+ __Pyx_RefNannySetupContext("_c_getprocaddress", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":817
++ /* "vidcutter/libs/pympv/mpv.pyx":819
+ *
+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
+ * return <void *><intptr_t>(<object>ctx)(name) # <<<<<<<<<<<<<<
+ *
+ * cdef void _c_updatecb(void *ctx) with gil:
+ */
+- __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
+ __pyx_t_3 = ((PyObject *)__pyx_v_ctx); __pyx_t_4 = NULL;
+@@ -15274,15 +15274,15 @@ static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx,
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = ((void *)((intptr_t)__pyx_t_5));
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":816
++ /* "vidcutter/libs/pympv/mpv.pyx":818
+ * self.shutdown()
+ *
+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
+@@ -15306,7 +15306,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx,
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":819
++/* "vidcutter/libs/pympv/mpv.pyx":821
+ * return <void *><intptr_t>(<object>ctx)(name)
+ *
+ * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
+@@ -15327,7 +15327,7 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
+ #endif
+ __Pyx_RefNannySetupContext("_c_updatecb", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":820
++ /* "vidcutter/libs/pympv/mpv.pyx":822
+ *
+ * cdef void _c_updatecb(void *ctx) with gil:
+ * (<object>ctx)() # <<<<<<<<<<<<<<
+@@ -15347,12 +15347,12 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":819
++ /* "vidcutter/libs/pympv/mpv.pyx":821
+ * return <void *><intptr_t>(<object>ctx)(name)
+ *
+ * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
+@@ -15374,7 +15374,7 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
+ #endif
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":886
++/* "vidcutter/libs/pympv/mpv.pyx":888
+ * object owned
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+@@ -15407,14 +15407,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":887
++ /* "vidcutter/libs/pympv/mpv.pyx":889
+ *
+ * def __init__(self):
+ * self.owned = [] # <<<<<<<<<<<<<<
+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+ */
+- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_v_self->owned);
+@@ -15422,7 +15422,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
+ __pyx_v_self->owned = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":888
++ /* "vidcutter/libs/pympv/mpv.pyx":890
+ * def __init__(self):
+ * self.owned = []
+ * self.params[0].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
+@@ -15431,7 +15431,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
+ */
+ (__pyx_v_self->params[0]).type = MPV_RENDER_PARAM_INVALID;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":886
++ /* "vidcutter/libs/pympv/mpv.pyx":888
+ * object owned
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+@@ -15451,7 +15451,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":890
++/* "vidcutter/libs/pympv/mpv.pyx":892
+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
+@@ -15480,7 +15480,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":891
++ /* "vidcutter/libs/pympv/mpv.pyx":893
+ *
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+ * count = len(self.owned) # <<<<<<<<<<<<<<
+@@ -15489,26 +15489,26 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ */
+ __pyx_t_1 = __pyx_v_self->owned;
+ __Pyx_INCREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 891, __pyx_L1_error)
++ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
++ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_count = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":892
++ /* "vidcutter/libs/pympv/mpv.pyx":894
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+ * count = len(self.owned)
+ * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
+ * if owned:
+ * free(p)
+ */
+- __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
++ __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 894, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":893
++ /* "vidcutter/libs/pympv/mpv.pyx":895
+ * count = len(self.owned)
+ * if count >= MAX_RENDER_PARAMS:
+ * if owned: # <<<<<<<<<<<<<<
+@@ -15518,7 +15518,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ __pyx_t_3 = (__pyx_v_owned != 0);
+ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":894
++ /* "vidcutter/libs/pympv/mpv.pyx":896
+ * if count >= MAX_RENDER_PARAMS:
+ * if owned:
+ * free(p) # <<<<<<<<<<<<<<
+@@ -15527,7 +15527,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ */
+ free(__pyx_v_p);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":893
++ /* "vidcutter/libs/pympv/mpv.pyx":895
+ * count = len(self.owned)
+ * if count >= MAX_RENDER_PARAMS:
+ * if owned: # <<<<<<<<<<<<<<
+@@ -15536,14 +15536,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":895
++ /* "vidcutter/libs/pympv/mpv.pyx":897
+ * if owned:
+ * free(p)
+ * raise PyMPVError("RenderParams overflow") # <<<<<<<<<<<<<<
+ *
+ * self.params[count].type = t
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+@@ -15557,14 +15557,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ }
+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_RenderParams_overflow) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_RenderParams_overflow);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __PYX_ERR(0, 895, __pyx_L1_error)
++ __PYX_ERR(0, 897, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":892
++ /* "vidcutter/libs/pympv/mpv.pyx":894
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
+ * count = len(self.owned)
+ * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
+@@ -15573,52 +15573,52 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":897
++ /* "vidcutter/libs/pympv/mpv.pyx":899
+ * raise PyMPVError("RenderParams overflow")
+ *
+ * self.params[count].type = t # <<<<<<<<<<<<<<
+ * self.params[count].data = p
+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+ */
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
+ (__pyx_v_self->params[__pyx_t_2]).type = __pyx_v_t;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":898
++ /* "vidcutter/libs/pympv/mpv.pyx":900
+ *
+ * self.params[count].type = t
+ * self.params[count].data = p # <<<<<<<<<<<<<<
+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+ * self.owned.append(owned)
+ */
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error)
+ (__pyx_v_self->params[__pyx_t_2]).data = __pyx_v_p;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":899
++ /* "vidcutter/libs/pympv/mpv.pyx":901
+ * self.params[count].type = t
+ * self.params[count].data = p
+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
+ * self.owned.append(owned)
+ *
+ */
+- __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ (__pyx_v_self->params[__pyx_t_2]).type = MPV_RENDER_PARAM_INVALID;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":900
++ /* "vidcutter/libs/pympv/mpv.pyx":902
+ * self.params[count].data = p
+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
+ * self.owned.append(owned) # <<<<<<<<<<<<<<
+ *
+ * cdef add_int(self, mpv_render_param_type t, int val):
+ */
+- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 900, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 902, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":890
++ /* "vidcutter/libs/pympv/mpv.pyx":892
+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
+ *
+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
+@@ -15642,7 +15642,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":902
++/* "vidcutter/libs/pympv/mpv.pyx":904
+ * self.owned.append(owned)
+ *
+ * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
+@@ -15660,7 +15660,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("add_int", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":903
++ /* "vidcutter/libs/pympv/mpv.pyx":905
+ *
+ * cdef add_int(self, mpv_render_param_type t, int val):
+ * cdef int *p = <int *>malloc(sizeof(int)) # <<<<<<<<<<<<<<
+@@ -15669,7 +15669,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
+ */
+ __pyx_v_p = ((int *)malloc((sizeof(int))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":904
++ /* "vidcutter/libs/pympv/mpv.pyx":906
+ * cdef add_int(self, mpv_render_param_type t, int val):
+ * cdef int *p = <int *>malloc(sizeof(int))
+ * p[0] = val # <<<<<<<<<<<<<<
+@@ -15678,18 +15678,18 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
+ */
+ (__pyx_v_p[0]) = __pyx_v_val;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":905
++ /* "vidcutter/libs/pympv/mpv.pyx":907
+ * cdef int *p = <int *>malloc(sizeof(int))
+ * p[0] = val
+ * self.add_voidp(t, p) # <<<<<<<<<<<<<<
+ *
+ * cdef add_string(self, mpv_render_param_type t, char *s):
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":902
++ /* "vidcutter/libs/pympv/mpv.pyx":904
+ * self.owned.append(owned)
+ *
+ * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
+@@ -15710,7 +15710,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":907
++/* "vidcutter/libs/pympv/mpv.pyx":909
+ * self.add_voidp(t, p)
+ *
+ * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
+@@ -15728,7 +15728,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("add_string", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":908
++ /* "vidcutter/libs/pympv/mpv.pyx":910
+ *
+ * cdef add_string(self, mpv_render_param_type t, char *s):
+ * cdef char *p = <char *>malloc(strlen(s) + 1) # <<<<<<<<<<<<<<
+@@ -15737,7 +15737,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
+ */
+ __pyx_v_p = ((char *)malloc((strlen(__pyx_v_s) + 1)));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":909
++ /* "vidcutter/libs/pympv/mpv.pyx":911
+ * cdef add_string(self, mpv_render_param_type t, char *s):
+ * cdef char *p = <char *>malloc(strlen(s) + 1)
+ * strcpy(p, s) # <<<<<<<<<<<<<<
+@@ -15746,18 +15746,18 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
+ */
+ (void)(strcpy(__pyx_v_p, __pyx_v_s));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":910
++ /* "vidcutter/libs/pympv/mpv.pyx":912
+ * cdef char *p = <char *>malloc(strlen(s) + 1)
+ * strcpy(p, s)
+ * self.add_voidp(t, p) # <<<<<<<<<<<<<<
+ *
+ * def __dealloc__(self):
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":907
++ /* "vidcutter/libs/pympv/mpv.pyx":909
+ * self.add_voidp(t, p)
+ *
+ * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
+@@ -15778,7 +15778,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":912
++/* "vidcutter/libs/pympv/mpv.pyx":914
+ * self.add_voidp(t, p)
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -15813,7 +15813,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":913
++ /* "vidcutter/libs/pympv/mpv.pyx":915
+ *
+ * def __dealloc__(self):
+ * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
+@@ -15826,26 +15826,26 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ __pyx_t_2 = __pyx_v_self->owned; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 915, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 915, __pyx_L1_error)
+ #else
+- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ } else {
+ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 915, __pyx_L1_error)
+ #else
+- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ }
+@@ -15855,7 +15855,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+- else __PYX_ERR(0, 913, __pyx_L1_error)
++ else __PYX_ERR(0, 915, __pyx_L1_error)
+ }
+ break;
+ }
+@@ -15865,33 +15865,33 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ __pyx_t_5 = 0;
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+- __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":914
++ /* "vidcutter/libs/pympv/mpv.pyx":916
+ * def __dealloc__(self):
+ * for i, j in enumerate(self.owned):
+ * if j: # <<<<<<<<<<<<<<
+ * free(self.params[i].data)
+ *
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 914, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 916, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":915
++ /* "vidcutter/libs/pympv/mpv.pyx":917
+ * for i, j in enumerate(self.owned):
+ * if j:
+ * free(self.params[i].data) # <<<<<<<<<<<<<<
+ *
+ * cdef void *get_pointer(const char *name, object obj):
+ */
+- __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 917, __pyx_L1_error)
+ free((__pyx_v_self->params[__pyx_t_7]).data);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":914
++ /* "vidcutter/libs/pympv/mpv.pyx":916
+ * def __dealloc__(self):
+ * for i, j in enumerate(self.owned):
+ * if j: # <<<<<<<<<<<<<<
+@@ -15900,7 +15900,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":913
++ /* "vidcutter/libs/pympv/mpv.pyx":915
+ *
+ * def __dealloc__(self):
+ * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
+@@ -15911,7 +15911,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":912
++ /* "vidcutter/libs/pympv/mpv.pyx":914
+ * self.add_voidp(t, p)
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -16045,7 +16045,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cyth
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":917
++/* "vidcutter/libs/pympv/mpv.pyx":919
+ * free(self.params[i].data)
+ *
+ * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
+@@ -16071,7 +16071,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("get_pointer", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":919
++ /* "vidcutter/libs/pympv/mpv.pyx":921
+ * cdef void *get_pointer(const char *name, object obj):
+ * cdef void *p
+ * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
+@@ -16081,17 +16081,17 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ __pyx_t_1 = (PyCapsule_IsValid(__pyx_v_obj, __pyx_v_name) != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":920
++ /* "vidcutter/libs/pympv/mpv.pyx":922
+ * cdef void *p
+ * if PyCapsule_IsValid(obj, name):
+ * p = PyCapsule_GetPointer(obj, name) # <<<<<<<<<<<<<<
+ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+ * p = <void *><intptr_t>obj
+ */
+- __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error)
++ __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
+ __pyx_v_p = __pyx_t_2;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":919
++ /* "vidcutter/libs/pympv/mpv.pyx":921
+ * cdef void *get_pointer(const char *name, object obj):
+ * cdef void *p
+ * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
+@@ -16101,7 +16101,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":921
++ /* "vidcutter/libs/pympv/mpv.pyx":923
+ * if PyCapsule_IsValid(obj, name):
+ * p = PyCapsule_GetPointer(obj, name)
+ * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
+@@ -16122,22 +16122,22 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ __pyx_t_1 = __pyx_t_3;
+ goto __pyx_L4_bool_binop_done;
+ }
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 923, __pyx_L1_error)
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_L4_bool_binop_done:;
+ if (likely(__pyx_t_1)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":922
++ /* "vidcutter/libs/pympv/mpv.pyx":924
+ * p = PyCapsule_GetPointer(obj, name)
+ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
+ * p = <void *><intptr_t>obj # <<<<<<<<<<<<<<
+ * else:
+ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
+ */
+- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 924, __pyx_L1_error)
+ __pyx_v_p = ((void *)((intptr_t)__pyx_t_5));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":921
++ /* "vidcutter/libs/pympv/mpv.pyx":923
+ * if PyCapsule_IsValid(obj, name):
+ * p = PyCapsule_GetPointer(obj, name)
+ * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
+@@ -16147,7 +16147,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":924
++ /* "vidcutter/libs/pympv/mpv.pyx":926
+ * p = <void *><intptr_t>obj
+ * else:
+ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj) # <<<<<<<<<<<<<<
+@@ -16155,9 +16155,9 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ *
+ */
+ /*else*/ {
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
++ __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+@@ -16172,16 +16172,16 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 924, __pyx_L1_error)
++ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- __PYX_ERR(0, 924, __pyx_L1_error)
++ __PYX_ERR(0, 926, __pyx_L1_error)
+ }
+ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":925
++ /* "vidcutter/libs/pympv/mpv.pyx":927
+ * else:
+ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
+ * return p # <<<<<<<<<<<<<<
+@@ -16191,7 +16191,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ __pyx_r = __pyx_v_p;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":917
++ /* "vidcutter/libs/pympv/mpv.pyx":919
+ * free(self.params[i].data)
+ *
+ * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
+@@ -16212,7 +16212,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":929
++/* "vidcutter/libs/pympv/mpv.pyx":931
+ * @cython.internal
+ * cdef class RenderFrameInfo(object):
+ * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
+@@ -16230,83 +16230,83 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(st
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("_from_struct", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":930
++ /* "vidcutter/libs/pympv/mpv.pyx":932
+ * cdef class RenderFrameInfo(object):
+ * cdef _from_struct(self, mpv_render_frame_info *info):
+ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT) # <<<<<<<<<<<<<<
+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":931
++ /* "vidcutter/libs/pympv/mpv.pyx":933
+ * cdef _from_struct(self, mpv_render_frame_info *info):
+ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW) # <<<<<<<<<<<<<<
+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 931, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":932
++ /* "vidcutter/libs/pympv/mpv.pyx":934
+ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT) # <<<<<<<<<<<<<<
+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+ * self.target_time = info[0].target_time
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 934, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":933
++ /* "vidcutter/libs/pympv/mpv.pyx":935
+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC) # <<<<<<<<<<<<<<
+ * self.target_time = info[0].target_time
+ * return self
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 935, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 935, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":934
++ /* "vidcutter/libs/pympv/mpv.pyx":936
+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+ * self.target_time = info[0].target_time # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+- __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 936, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":935
++ /* "vidcutter/libs/pympv/mpv.pyx":937
+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
+ * self.target_time = info[0].target_time
+ * return self # <<<<<<<<<<<<<<
+@@ -16318,7 +16318,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(st
+ __pyx_r = ((PyObject *)__pyx_v_self);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":929
++ /* "vidcutter/libs/pympv/mpv.pyx":931
+ * @cython.internal
+ * cdef class RenderFrameInfo(object):
+ * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
+@@ -16624,7 +16624,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cy
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":950
++/* "vidcutter/libs/pympv/mpv.pyx":952
+ * bint inited
+ *
+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
+@@ -16653,7 +16653,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_api_type,&__pyx_n_s_opengl_init_params,&__pyx_n_s_advanced_control,&__pyx_n_s_x11_display,&__pyx_n_s_wl_display,&__pyx_n_s_drm_display,&__pyx_n_s_drm_osd_size,0};
+ PyObject* values[8] = {0,0,0,0,0,0,0,0};
+
+- /* "vidcutter/libs/pympv/mpv.pyx":952
++ /* "vidcutter/libs/pympv/mpv.pyx":954
+ * def __init__(self, mpv,
+ * api_type,
+ * opengl_init_params=None, # <<<<<<<<<<<<<<
+@@ -16662,7 +16662,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ */
+ values[2] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":953
++ /* "vidcutter/libs/pympv/mpv.pyx":955
+ * api_type,
+ * opengl_init_params=None,
+ * advanced_control=False, # <<<<<<<<<<<<<<
+@@ -16671,7 +16671,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ */
+ values[3] = ((PyObject *)Py_False);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":954
++ /* "vidcutter/libs/pympv/mpv.pyx":956
+ * opengl_init_params=None,
+ * advanced_control=False,
+ * x11_display=None, # <<<<<<<<<<<<<<
+@@ -16680,7 +16680,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ */
+ values[4] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":955
++ /* "vidcutter/libs/pympv/mpv.pyx":957
+ * advanced_control=False,
+ * x11_display=None,
+ * wl_display=None, # <<<<<<<<<<<<<<
+@@ -16689,7 +16689,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ */
+ values[5] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":956
++ /* "vidcutter/libs/pympv/mpv.pyx":958
+ * x11_display=None,
+ * wl_display=None,
+ * drm_display=None, # <<<<<<<<<<<<<<
+@@ -16698,7 +16698,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ */
+ values[6] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":957
++ /* "vidcutter/libs/pympv/mpv.pyx":959
+ * wl_display=None,
+ * drm_display=None,
+ * drm_osd_size=None # <<<<<<<<<<<<<<
+@@ -16738,7 +16738,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_api_type)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 950, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 952, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+@@ -16778,7 +16778,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 950, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 952, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -16811,7 +16811,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 950, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 952, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -16819,7 +16819,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_api_type, __pyx_v_opengl_init_params, __pyx_v_advanced_control, __pyx_v_x11_display, __pyx_v_wl_display, __pyx_v_drm_display, __pyx_v_drm_osd_size);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":950
++ /* "vidcutter/libs/pympv/mpv.pyx":952
+ * bint inited
+ *
+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
+@@ -16856,14 +16856,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":965
++ /* "vidcutter/libs/pympv/mpv.pyx":967
+ * mpv_opengl_drm_osd_size _drm_osd_size
+ *
+ * self._mpv = mpv # <<<<<<<<<<<<<<
+ *
+ * memset(&gl_params, 0, sizeof(gl_params))
+ */
+- if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 965, __pyx_L1_error)
++ if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 967, __pyx_L1_error)
+ __pyx_t_1 = __pyx_v_mpv;
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+@@ -16872,7 +16872,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_v_self->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":967
++ /* "vidcutter/libs/pympv/mpv.pyx":969
+ * self._mpv = mpv
+ *
+ * memset(&gl_params, 0, sizeof(gl_params)) # <<<<<<<<<<<<<<
+@@ -16881,7 +16881,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ (void)(memset((&__pyx_v_gl_params), 0, (sizeof(__pyx_v_gl_params))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":968
++ /* "vidcutter/libs/pympv/mpv.pyx":970
+ *
+ * memset(&gl_params, 0, sizeof(gl_params))
+ * memset(&drm_params, 0, sizeof(drm_params)) # <<<<<<<<<<<<<<
+@@ -16890,7 +16890,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ (void)(memset((&__pyx_v_drm_params), 0, (sizeof(__pyx_v_drm_params))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":969
++ /* "vidcutter/libs/pympv/mpv.pyx":971
+ * memset(&gl_params, 0, sizeof(gl_params))
+ * memset(&drm_params, 0, sizeof(drm_params))
+ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size)) # <<<<<<<<<<<<<<
+@@ -16899,45 +16899,45 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ (void)(memset((&__pyx_v__drm_osd_size), 0, (sizeof(__pyx_v__drm_osd_size))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":971
++ /* "vidcutter/libs/pympv/mpv.pyx":973
+ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
+ *
+ * params = _RenderParams() # <<<<<<<<<<<<<<
+ *
+ * if api_type == self.API_OPENGL:
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":973
++ /* "vidcutter/libs/pympv/mpv.pyx":975
+ * params = _RenderParams()
+ *
+ * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
+ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
+ * else:
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 975, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":974
++ /* "vidcutter/libs/pympv/mpv.pyx":976
+ *
+ * if api_type == self.API_OPENGL:
+ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL) # <<<<<<<<<<<<<<
+ * else:
+ * raise PyMPVError("Unknown api_type %r" % api_type)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":973
++ /* "vidcutter/libs/pympv/mpv.pyx":975
+ * params = _RenderParams()
+ *
+ * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
+@@ -16947,7 +16947,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ goto __pyx_L3;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":976
++ /* "vidcutter/libs/pympv/mpv.pyx":978
+ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
+ * else:
+ * raise PyMPVError("Unknown api_type %r" % api_type) # <<<<<<<<<<<<<<
+@@ -16955,9 +16955,9 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ * if opengl_init_params is not None:
+ */
+ /*else*/ {
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+@@ -16972,16 +16972,16 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 976, __pyx_L1_error)
++ __PYX_ERR(0, 978, __pyx_L1_error)
+ }
+ __pyx_L3:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":978
++ /* "vidcutter/libs/pympv/mpv.pyx":980
+ * raise PyMPVError("Unknown api_type %r" % api_type)
+ *
+ * if opengl_init_params is not None: # <<<<<<<<<<<<<<
+@@ -16992,14 +16992,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_t_6 = (__pyx_t_3 != 0);
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":979
++ /* "vidcutter/libs/pympv/mpv.pyx":981
+ *
+ * if opengl_init_params is not None:
+ * self._get_proc_address = opengl_init_params["get_proc_address"] # <<<<<<<<<<<<<<
+ * gl_params.get_proc_address = &_c_getprocaddress
+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+ */
+- __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_v_self->_get_proc_address);
+@@ -17007,7 +17007,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_v_self->_get_proc_address = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":980
++ /* "vidcutter/libs/pympv/mpv.pyx":982
+ * if opengl_init_params is not None:
+ * self._get_proc_address = opengl_init_params["get_proc_address"]
+ * gl_params.get_proc_address = &_c_getprocaddress # <<<<<<<<<<<<<<
+@@ -17016,7 +17016,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ __pyx_v_gl_params.get_proc_address = (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":981
++ /* "vidcutter/libs/pympv/mpv.pyx":983
+ * self._get_proc_address = opengl_init_params["get_proc_address"]
+ * gl_params.get_proc_address = &_c_getprocaddress
+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address # <<<<<<<<<<<<<<
+@@ -17025,18 +17025,18 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ __pyx_v_gl_params.get_proc_address_ctx = ((void *)__pyx_v_self->_get_proc_address);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":982
++ /* "vidcutter/libs/pympv/mpv.pyx":984
+ * gl_params.get_proc_address = &_c_getprocaddress
+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params) # <<<<<<<<<<<<<<
+ * if advanced_control:
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":978
++ /* "vidcutter/libs/pympv/mpv.pyx":980
+ * raise PyMPVError("Unknown api_type %r" % api_type)
+ *
+ * if opengl_init_params is not None: # <<<<<<<<<<<<<<
+@@ -17045,28 +17045,28 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":983
++ /* "vidcutter/libs/pympv/mpv.pyx":985
+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+ * if advanced_control: # <<<<<<<<<<<<<<
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+ * if x11_display:
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 983, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":984
++ /* "vidcutter/libs/pympv/mpv.pyx":986
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+ * if advanced_control:
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1) # <<<<<<<<<<<<<<
+ * if x11_display:
+ * self._x11_display = x11_display
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":983
++ /* "vidcutter/libs/pympv/mpv.pyx":985
+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
+ * if advanced_control: # <<<<<<<<<<<<<<
+@@ -17075,17 +17075,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":985
++ /* "vidcutter/libs/pympv/mpv.pyx":987
+ * if advanced_control:
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+ * if x11_display: # <<<<<<<<<<<<<<
+ * self._x11_display = x11_display
+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 987, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":986
++ /* "vidcutter/libs/pympv/mpv.pyx":988
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+ * if x11_display:
+ * self._x11_display = x11_display # <<<<<<<<<<<<<<
+@@ -17098,18 +17098,18 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __Pyx_DECREF(__pyx_v_self->_x11_display);
+ __pyx_v_self->_x11_display = __pyx_v_x11_display;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":987
++ /* "vidcutter/libs/pympv/mpv.pyx":989
+ * if x11_display:
+ * self._x11_display = x11_display
+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display)) # <<<<<<<<<<<<<<
+ * if wl_display:
+ * self._wl_display = wl_display
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":985
++ /* "vidcutter/libs/pympv/mpv.pyx":987
+ * if advanced_control:
+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
+ * if x11_display: # <<<<<<<<<<<<<<
+@@ -17118,17 +17118,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":988
++ /* "vidcutter/libs/pympv/mpv.pyx":990
+ * self._x11_display = x11_display
+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ * if wl_display: # <<<<<<<<<<<<<<
+ * self._wl_display = wl_display
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 990, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":989
++ /* "vidcutter/libs/pympv/mpv.pyx":991
+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ * if wl_display:
+ * self._wl_display = wl_display # <<<<<<<<<<<<<<
+@@ -17141,18 +17141,18 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __Pyx_DECREF(__pyx_v_self->_wl_display);
+ __pyx_v_self->_wl_display = __pyx_v_wl_display;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":990
++ /* "vidcutter/libs/pympv/mpv.pyx":992
+ * if wl_display:
+ * self._wl_display = wl_display
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display)) # <<<<<<<<<<<<<<
+ * if drm_display:
+ * drm_params.fd = drm_display.get("fd", -1)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":988
++ /* "vidcutter/libs/pympv/mpv.pyx":990
+ * self._x11_display = x11_display
+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
+ * if wl_display: # <<<<<<<<<<<<<<
+@@ -17161,80 +17161,80 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":991
++ /* "vidcutter/libs/pympv/mpv.pyx":993
+ * self._wl_display = wl_display
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ * if drm_display: # <<<<<<<<<<<<<<
+ * drm_params.fd = drm_display.get("fd", -1)
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 991, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 993, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":992
++ /* "vidcutter/libs/pympv/mpv.pyx":994
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ * if drm_display:
+ * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_drm_params.fd = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":993
++ /* "vidcutter/libs/pympv/mpv.pyx":995
+ * if drm_display:
+ * drm_params.fd = drm_display.get("fd", -1)
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None)
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 993, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 995, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_drm_params.crtc_id = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":994
++ /* "vidcutter/libs/pympv/mpv.pyx":996
+ * drm_params.fd = drm_display.get("fd", -1)
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
+ * arp = drm_display.get("atomic_request_ptr", None)
+ * if arp is not None:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 996, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 996, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_drm_params.connector_id = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":995
++ /* "vidcutter/libs/pympv/mpv.pyx":997
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
+ * if arp is not None:
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_arp = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":996
++ /* "vidcutter/libs/pympv/mpv.pyx":998
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None)
+ * if arp is not None: # <<<<<<<<<<<<<<
+@@ -17245,17 +17245,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_t_3 = (__pyx_t_6 != 0);
+ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":997
++ /* "vidcutter/libs/pympv/mpv.pyx":999
+ * arp = drm_display.get("atomic_request_ptr", None)
+ * if arp is not None:
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*") # <<<<<<<<<<<<<<
+ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ */
+- __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L1_error)
++ __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 999, __pyx_L1_error)
+ __pyx_v_drm_params.atomic_request_ptr = ((struct _drmModeAtomicReq **)__pyx_f_9vidcutter_4libs_3mpv_get_pointer(__pyx_t_8, __pyx_kp_s_drmModeAtomicReq));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":996
++ /* "vidcutter/libs/pympv/mpv.pyx":998
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None)
+ * if arp is not None: # <<<<<<<<<<<<<<
+@@ -17264,34 +17264,34 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":998
++ /* "vidcutter/libs/pympv/mpv.pyx":1000
+ * if arp is not None:
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ * if drm_osd_size:
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1000, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_drm_params.render_fd = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":999
++ /* "vidcutter/libs/pympv/mpv.pyx":1001
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params) # <<<<<<<<<<<<<<
+ * if drm_osd_size:
+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":991
++ /* "vidcutter/libs/pympv/mpv.pyx":993
+ * self._wl_display = wl_display
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ * if drm_display: # <<<<<<<<<<<<<<
+@@ -17300,17 +17300,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1000
++ /* "vidcutter/libs/pympv/mpv.pyx":1002
+ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ * if drm_osd_size: # <<<<<<<<<<<<<<
+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ */
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1000, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1002, __pyx_L1_error)
+ if (__pyx_t_3) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1001
++ /* "vidcutter/libs/pympv/mpv.pyx":1003
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ * if drm_osd_size:
+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size # <<<<<<<<<<<<<<
+@@ -17323,7 +17323,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+- __PYX_ERR(0, 1001, __pyx_L1_error)
++ __PYX_ERR(0, 1003, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+@@ -17336,21 +17336,21 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+- __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+- if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
++ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __pyx_t_9 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L12_unpacking_done;
+@@ -17358,28 +17358,28 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_9 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+- __PYX_ERR(0, 1001, __pyx_L1_error)
++ __PYX_ERR(0, 1003, __pyx_L1_error)
+ __pyx_L12_unpacking_done:;
+ }
+- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
++ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1003, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v__drm_osd_size.width = __pyx_t_7;
+ __pyx_v__drm_osd_size.height = __pyx_t_10;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1002
++ /* "vidcutter/libs/pympv/mpv.pyx":1004
+ * if drm_osd_size:
+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size) # <<<<<<<<<<<<<<
+ *
+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+ */
+- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
++ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1000
++ /* "vidcutter/libs/pympv/mpv.pyx":1002
+ * drm_params.render_fd = drm_display.get("render_fd", -1)
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ * if drm_osd_size: # <<<<<<<<<<<<<<
+@@ -17388,7 +17388,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1004
++ /* "vidcutter/libs/pympv/mpv.pyx":1006
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
+ *
+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params) # <<<<<<<<<<<<<<
+@@ -17397,7 +17397,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ __pyx_v_err = mpv_render_context_create((&__pyx_v_self->_ctx), __pyx_v_self->_mpv->_ctx, __pyx_v_params->params);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1005
++ /* "vidcutter/libs/pympv/mpv.pyx":1007
+ *
+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -17407,16 +17407,16 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_t_3 = ((__pyx_v_err < 0) != 0);
+ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1006
++ /* "vidcutter/libs/pympv/mpv.pyx":1008
+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+ * if err < 0:
+ * raise MPVError(err) # <<<<<<<<<<<<<<
+ * self.inited = True
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1008, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+@@ -17431,14 +17431,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 1006, __pyx_L1_error)
++ __PYX_ERR(0, 1008, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1005
++ /* "vidcutter/libs/pympv/mpv.pyx":1007
+ *
+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -17447,7 +17447,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1007
++ /* "vidcutter/libs/pympv/mpv.pyx":1009
+ * if err < 0:
+ * raise MPVError(err)
+ * self.inited = True # <<<<<<<<<<<<<<
+@@ -17456,7 +17456,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ */
+ __pyx_v_self->inited = 1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":950
++ /* "vidcutter/libs/pympv/mpv.pyx":952
+ * bint inited
+ *
+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
+@@ -17481,7 +17481,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1010
++/* "vidcutter/libs/pympv/mpv.pyx":1012
+ *
+ * @_errors
+ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+@@ -17520,7 +17520,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("set_icc_profile", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1016
++ /* "vidcutter/libs/pympv/mpv.pyx":1018
+ * int err
+ *
+ * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
+@@ -17531,14 +17531,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
+ if (unlikely(__pyx_t_2)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1017
++ /* "vidcutter/libs/pympv/mpv.pyx":1019
+ *
+ * if not isinstance(icc_blob, bytes):
+ * raise PyMPVError("icc_blob should be a bytes instance") # <<<<<<<<<<<<<<
+ * val.data = <void *><char *>icc_blob
+ * val.size = len(icc_blob)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1019, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+@@ -17552,14 +17552,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ }
+ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_icc_blob_should_be_a_bytes_insta) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_icc_blob_should_be_a_bytes_insta);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- __PYX_ERR(0, 1017, __pyx_L1_error)
++ __PYX_ERR(0, 1019, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1016
++ /* "vidcutter/libs/pympv/mpv.pyx":1018
+ * int err
+ *
+ * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
+@@ -17568,27 +17568,27 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1018
++ /* "vidcutter/libs/pympv/mpv.pyx":1020
+ * if not isinstance(icc_blob, bytes):
+ * raise PyMPVError("icc_blob should be a bytes instance")
+ * val.data = <void *><char *>icc_blob # <<<<<<<<<<<<<<
+ * val.size = len(icc_blob)
+ *
+ */
+- __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1020, __pyx_L1_error)
+ __pyx_v_val.data = ((void *)((char *)__pyx_t_6));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1019
++ /* "vidcutter/libs/pympv/mpv.pyx":1021
+ * raise PyMPVError("icc_blob should be a bytes instance")
+ * val.data = <void *><char *>icc_blob
+ * val.size = len(icc_blob) # <<<<<<<<<<<<<<
+ *
+ * param.type = MPV_RENDER_PARAM_ICC_PROFILE
+ */
+- __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1019, __pyx_L1_error)
++ __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1021, __pyx_L1_error)
+ __pyx_v_val.size = __pyx_t_7;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1021
++ /* "vidcutter/libs/pympv/mpv.pyx":1023
+ * val.size = len(icc_blob)
+ *
+ * param.type = MPV_RENDER_PARAM_ICC_PROFILE # <<<<<<<<<<<<<<
+@@ -17597,7 +17597,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ */
+ __pyx_v_param.type = MPV_RENDER_PARAM_ICC_PROFILE;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1022
++ /* "vidcutter/libs/pympv/mpv.pyx":1024
+ *
+ * param.type = MPV_RENDER_PARAM_ICC_PROFILE
+ * param.data = &val # <<<<<<<<<<<<<<
+@@ -17606,7 +17606,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ */
+ __pyx_v_param.data = (&__pyx_v_val);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1024
++ /* "vidcutter/libs/pympv/mpv.pyx":1026
+ * param.data = &val
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17621,7 +17621,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1025
++ /* "vidcutter/libs/pympv/mpv.pyx":1027
+ *
+ * with nogil:
+ * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
+@@ -17631,7 +17631,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1024
++ /* "vidcutter/libs/pympv/mpv.pyx":1026
+ * param.data = &val
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17650,7 +17650,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1026
++ /* "vidcutter/libs/pympv/mpv.pyx":1028
+ * with nogil:
+ * err = mpv_render_context_set_parameter(self._ctx, param)
+ * return err # <<<<<<<<<<<<<<
+@@ -17658,13 +17658,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1028, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1010
++ /* "vidcutter/libs/pympv/mpv.pyx":1012
+ *
+ * @_errors
+ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+@@ -17685,7 +17685,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1029
++/* "vidcutter/libs/pympv/mpv.pyx":1031
+ *
+ * @_errors
+ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+@@ -17719,17 +17719,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("set_ambient_light", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1035
++ /* "vidcutter/libs/pympv/mpv.pyx":1037
+ * int err
+ *
+ * val = lux # <<<<<<<<<<<<<<
+ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
+ * param.data = &val
+ */
+- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1037, __pyx_L1_error)
+ __pyx_v_val = __pyx_t_1;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1036
++ /* "vidcutter/libs/pympv/mpv.pyx":1038
+ *
+ * val = lux
+ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT # <<<<<<<<<<<<<<
+@@ -17738,7 +17738,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ */
+ __pyx_v_param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1037
++ /* "vidcutter/libs/pympv/mpv.pyx":1039
+ * val = lux
+ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
+ * param.data = &val # <<<<<<<<<<<<<<
+@@ -17747,7 +17747,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ */
+ __pyx_v_param.data = (&__pyx_v_val);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1039
++ /* "vidcutter/libs/pympv/mpv.pyx":1041
+ * param.data = &val
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17762,7 +17762,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1040
++ /* "vidcutter/libs/pympv/mpv.pyx":1042
+ *
+ * with nogil:
+ * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
+@@ -17772,7 +17772,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1039
++ /* "vidcutter/libs/pympv/mpv.pyx":1041
+ * param.data = &val
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17791,7 +17791,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1041
++ /* "vidcutter/libs/pympv/mpv.pyx":1043
+ * with nogil:
+ * err = mpv_render_context_set_parameter(self._ctx, param)
+ * return err # <<<<<<<<<<<<<<
+@@ -17799,13 +17799,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ * def get_next_frame_info(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1029
++ /* "vidcutter/libs/pympv/mpv.pyx":1031
+ *
+ * @_errors
+ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+@@ -17824,7 +17824,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1043
++/* "vidcutter/libs/pympv/mpv.pyx":1045
+ * return err
+ *
+ * def get_next_frame_info(self): # <<<<<<<<<<<<<<
+@@ -17861,7 +17861,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("get_next_frame_info", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1048
++ /* "vidcutter/libs/pympv/mpv.pyx":1050
+ * mpv_render_param param
+ *
+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO # <<<<<<<<<<<<<<
+@@ -17870,7 +17870,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ */
+ __pyx_v_param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1049
++ /* "vidcutter/libs/pympv/mpv.pyx":1051
+ *
+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+ * param.data = &info # <<<<<<<<<<<<<<
+@@ -17879,7 +17879,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ */
+ __pyx_v_param.data = (&__pyx_v_info);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1050
++ /* "vidcutter/libs/pympv/mpv.pyx":1052
+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+ * param.data = &info
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17894,7 +17894,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1051
++ /* "vidcutter/libs/pympv/mpv.pyx":1053
+ * param.data = &info
+ * with nogil:
+ * err = mpv_render_context_get_info(self._ctx, param) # <<<<<<<<<<<<<<
+@@ -17904,7 +17904,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ __pyx_v_err = mpv_render_context_get_info(__pyx_v_self->_ctx, __pyx_v_param);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1050
++ /* "vidcutter/libs/pympv/mpv.pyx":1052
+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
+ * param.data = &info
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -17923,7 +17923,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1052
++ /* "vidcutter/libs/pympv/mpv.pyx":1054
+ * with nogil:
+ * err = mpv_render_context_get_info(self._ctx, param)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -17933,16 +17933,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ __pyx_t_1 = ((__pyx_v_err < 0) != 0);
+ if (unlikely(__pyx_t_1)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1053
++ /* "vidcutter/libs/pympv/mpv.pyx":1055
+ * err = mpv_render_context_get_info(self._ctx, param)
+ * if err < 0:
+ * raise MPVError(err) # <<<<<<<<<<<<<<
+ *
+ * return RenderFrameInfo()._from_struct(&info)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+@@ -17957,14 +17957,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error)
++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+- __PYX_ERR(0, 1053, __pyx_L1_error)
++ __PYX_ERR(0, 1055, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1052
++ /* "vidcutter/libs/pympv/mpv.pyx":1054
+ * with nogil:
+ * err = mpv_render_context_get_info(self._ctx, param)
+ * if err < 0: # <<<<<<<<<<<<<<
+@@ -17973,7 +17973,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1055
++ /* "vidcutter/libs/pympv/mpv.pyx":1057
+ * raise MPVError(err)
+ *
+ * return RenderFrameInfo()._from_struct(&info) # <<<<<<<<<<<<<<
+@@ -17981,16 +17981,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ * def set_update_callback(self, cb):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
++ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1043
++ /* "vidcutter/libs/pympv/mpv.pyx":1045
+ * return err
+ *
+ * def get_next_frame_info(self): # <<<<<<<<<<<<<<
+@@ -18012,7 +18012,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1057
++/* "vidcutter/libs/pympv/mpv.pyx":1059
+ * return RenderFrameInfo()._from_struct(&info)
+ *
+ * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+@@ -18038,7 +18038,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("set_update_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1058
++ /* "vidcutter/libs/pympv/mpv.pyx":1060
+ *
+ * def set_update_callback(self, cb):
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18053,7 +18053,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1059
++ /* "vidcutter/libs/pympv/mpv.pyx":1061
+ * def set_update_callback(self, cb):
+ * with nogil:
+ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
+@@ -18063,7 +18063,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ mpv_render_context_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1058
++ /* "vidcutter/libs/pympv/mpv.pyx":1060
+ *
+ * def set_update_callback(self, cb):
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18082,7 +18082,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1060
++ /* "vidcutter/libs/pympv/mpv.pyx":1062
+ * with nogil:
+ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+ * self.update_cb = cb # <<<<<<<<<<<<<<
+@@ -18095,7 +18095,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ __Pyx_DECREF(__pyx_v_self->update_cb);
+ __pyx_v_self->update_cb = __pyx_v_cb;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1057
++ /* "vidcutter/libs/pympv/mpv.pyx":1059
+ * return RenderFrameInfo()._from_struct(&info)
+ *
+ * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
+@@ -18110,7 +18110,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1062
++/* "vidcutter/libs/pympv/mpv.pyx":1064
+ * self.update_cb = cb
+ *
+ * def update(self): # <<<<<<<<<<<<<<
+@@ -18141,7 +18141,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("update", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1064
++ /* "vidcutter/libs/pympv/mpv.pyx":1066
+ * def update(self):
+ * cdef uint64_t ret
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18156,7 +18156,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1065
++ /* "vidcutter/libs/pympv/mpv.pyx":1067
+ * cdef uint64_t ret
+ * with nogil:
+ * ret = mpv_render_context_update(self._ctx) # <<<<<<<<<<<<<<
+@@ -18166,7 +18166,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ __pyx_v_ret = mpv_render_context_update(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1064
++ /* "vidcutter/libs/pympv/mpv.pyx":1066
+ * def update(self):
+ * cdef uint64_t ret
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18185,7 +18185,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1066
++ /* "vidcutter/libs/pympv/mpv.pyx":1068
+ * with nogil:
+ * ret = mpv_render_context_update(self._ctx)
+ * return ret # <<<<<<<<<<<<<<
+@@ -18193,13 +18193,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ * @_errors
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1062
++ /* "vidcutter/libs/pympv/mpv.pyx":1064
+ * self.update_cb = cb
+ *
+ * def update(self): # <<<<<<<<<<<<<<
+@@ -18218,7 +18218,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1069
++/* "vidcutter/libs/pympv/mpv.pyx":1071
+ *
+ * @_errors
+ * def render(self, # <<<<<<<<<<<<<<
+@@ -18244,7 +18244,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_opengl_fbo,&__pyx_n_s_flip_y,&__pyx_n_s_depth,&__pyx_n_s_block_for_target_time,&__pyx_n_s_skip_rendering,0};
+ PyObject* values[5] = {0,0,0,0,0};
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1070
++ /* "vidcutter/libs/pympv/mpv.pyx":1072
+ * @_errors
+ * def render(self,
+ * opengl_fbo=None, # <<<<<<<<<<<<<<
+@@ -18253,7 +18253,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ */
+ values[0] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1071
++ /* "vidcutter/libs/pympv/mpv.pyx":1073
+ * def render(self,
+ * opengl_fbo=None,
+ * flip_y=False, # <<<<<<<<<<<<<<
+@@ -18262,7 +18262,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ */
+ values[1] = ((PyObject *)Py_False);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1072
++ /* "vidcutter/libs/pympv/mpv.pyx":1074
+ * opengl_fbo=None,
+ * flip_y=False,
+ * depth=None, # <<<<<<<<<<<<<<
+@@ -18271,7 +18271,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ */
+ values[2] = ((PyObject *)Py_None);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1073
++ /* "vidcutter/libs/pympv/mpv.pyx":1075
+ * flip_y=False,
+ * depth=None,
+ * block_for_target_time=True, # <<<<<<<<<<<<<<
+@@ -18280,7 +18280,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ */
+ values[3] = ((PyObject *)Py_True);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1074
++ /* "vidcutter/libs/pympv/mpv.pyx":1076
+ * depth=None,
+ * block_for_target_time=True,
+ * skip_rendering=False): # <<<<<<<<<<<<<<
+@@ -18338,7 +18338,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1069, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1071, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+@@ -18364,7 +18364,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1069, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1071, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -18372,7 +18372,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_opengl_fbo, __pyx_v_flip_y, __pyx_v_depth, __pyx_v_block_for_target_time, __pyx_v_skip_rendering);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
++ /* "vidcutter/libs/pympv/mpv.pyx":1071
+ *
+ * @_errors
+ * def render(self, # <<<<<<<<<<<<<<
+@@ -18402,29 +18402,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("render", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1079
++ /* "vidcutter/libs/pympv/mpv.pyx":1081
+ * mpv_opengl_fbo fbo
+ *
+ * params = _RenderParams() # <<<<<<<<<<<<<<
+ *
+ * if opengl_fbo:
+ */
+- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1081
++ /* "vidcutter/libs/pympv/mpv.pyx":1083
+ * params = _RenderParams()
+ *
+ * if opengl_fbo: # <<<<<<<<<<<<<<
+ * memset(&fbo, 0, sizeof(fbo))
+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1082
++ /* "vidcutter/libs/pympv/mpv.pyx":1084
+ *
+ * if opengl_fbo:
+ * memset(&fbo, 0, sizeof(fbo)) # <<<<<<<<<<<<<<
+@@ -18433,23 +18433,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ (void)(memset((&__pyx_v_fbo), 0, (sizeof(__pyx_v_fbo))));
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1083
++ /* "vidcutter/libs/pympv/mpv.pyx":1085
+ * if opengl_fbo:
+ * memset(&fbo, 0, sizeof(fbo))
+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
+ * fbo.w = opengl_fbo["w"]
+ * fbo.h = opengl_fbo["h"]
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ if (!__pyx_t_2) {
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __pyx_t_3 = __pyx_t_5;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L4_bool_binop_done;
+@@ -18458,49 +18458,49 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ __pyx_L4_bool_binop_done:;
+ __pyx_v_fbo.fbo = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1084
++ /* "vidcutter/libs/pympv/mpv.pyx":1086
+ * memset(&fbo, 0, sizeof(fbo))
+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ * fbo.w = opengl_fbo["w"] # <<<<<<<<<<<<<<
+ * fbo.h = opengl_fbo["h"]
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ */
+- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_fbo.w = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1085
++ /* "vidcutter/libs/pympv/mpv.pyx":1087
+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
+ * fbo.w = opengl_fbo["w"]
+ * fbo.h = opengl_fbo["h"] # <<<<<<<<<<<<<<
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ */
+- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1087, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_fbo.h = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1086
++ /* "vidcutter/libs/pympv/mpv.pyx":1088
+ * fbo.w = opengl_fbo["w"]
+ * fbo.h = opengl_fbo["h"]
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ * if flip_y:
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
+ if (!__pyx_t_2) {
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1088, __pyx_L1_error)
+ __pyx_t_3 = __pyx_t_5;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L6_bool_binop_done;
+@@ -18509,18 +18509,18 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ __pyx_L6_bool_binop_done:;
+ __pyx_v_fbo.internal_format = __pyx_t_3;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1087
++ /* "vidcutter/libs/pympv/mpv.pyx":1089
+ * fbo.h = opengl_fbo["h"]
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo) # <<<<<<<<<<<<<<
+ * if flip_y:
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1081
++ /* "vidcutter/libs/pympv/mpv.pyx":1083
+ * params = _RenderParams()
+ *
+ * if opengl_fbo: # <<<<<<<<<<<<<<
+@@ -18529,28 +18529,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1088
++ /* "vidcutter/libs/pympv/mpv.pyx":1090
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ * if flip_y: # <<<<<<<<<<<<<<
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+ * if depth is not None:
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1090, __pyx_L1_error)
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1089
++ /* "vidcutter/libs/pympv/mpv.pyx":1091
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ * if flip_y:
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1) # <<<<<<<<<<<<<<
+ * if depth is not None:
+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1088
++ /* "vidcutter/libs/pympv/mpv.pyx":1090
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ * if flip_y: # <<<<<<<<<<<<<<
+@@ -18559,7 +18559,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1090
++ /* "vidcutter/libs/pympv/mpv.pyx":1092
+ * if flip_y:
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+ * if depth is not None: # <<<<<<<<<<<<<<
+@@ -18570,19 +18570,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ __pyx_t_6 = (__pyx_t_2 != 0);
+ if (__pyx_t_6) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1091
++ /* "vidcutter/libs/pympv/mpv.pyx":1093
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+ * if depth is not None:
+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth) # <<<<<<<<<<<<<<
+ * if not block_for_target_time:
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ */
+- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1093, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1090
++ /* "vidcutter/libs/pympv/mpv.pyx":1092
+ * if flip_y:
+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
+ * if depth is not None: # <<<<<<<<<<<<<<
+@@ -18591,29 +18591,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1092
++ /* "vidcutter/libs/pympv/mpv.pyx":1094
+ * if depth is not None:
+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+ * if not block_for_target_time: # <<<<<<<<<<<<<<
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ * if skip_rendering:
+ */
+- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __pyx_t_2 = ((!__pyx_t_6) != 0);
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1093
++ /* "vidcutter/libs/pympv/mpv.pyx":1095
+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+ * if not block_for_target_time:
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0) # <<<<<<<<<<<<<<
+ * if skip_rendering:
+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1092
++ /* "vidcutter/libs/pympv/mpv.pyx":1094
+ * if depth is not None:
+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
+ * if not block_for_target_time: # <<<<<<<<<<<<<<
+@@ -18622,28 +18622,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1094
++ /* "vidcutter/libs/pympv/mpv.pyx":1096
+ * if not block_for_target_time:
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ * if skip_rendering: # <<<<<<<<<<<<<<
+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+ *
+ */
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1096, __pyx_L1_error)
+ if (__pyx_t_2) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1095
++ /* "vidcutter/libs/pympv/mpv.pyx":1097
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ * if skip_rendering:
+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1) # <<<<<<<<<<<<<<
+ *
+ * with nogil:
+ */
+- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
++ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1094
++ /* "vidcutter/libs/pympv/mpv.pyx":1096
+ * if not block_for_target_time:
+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
+ * if skip_rendering: # <<<<<<<<<<<<<<
+@@ -18652,7 +18652,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1097
++ /* "vidcutter/libs/pympv/mpv.pyx":1099
+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18667,7 +18667,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1098
++ /* "vidcutter/libs/pympv/mpv.pyx":1100
+ *
+ * with nogil:
+ * ret = mpv_render_context_render(self._ctx, params.params) # <<<<<<<<<<<<<<
+@@ -18677,7 +18677,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ __pyx_v_ret = mpv_render_context_render(__pyx_v_self->_ctx, __pyx_v_params->params);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1097
++ /* "vidcutter/libs/pympv/mpv.pyx":1099
+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
+ *
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18696,7 +18696,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1099
++ /* "vidcutter/libs/pympv/mpv.pyx":1101
+ * with nogil:
+ * ret = mpv_render_context_render(self._ctx, params.params)
+ * return ret # <<<<<<<<<<<<<<
+@@ -18704,13 +18704,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ * def report_swap(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
++ /* "vidcutter/libs/pympv/mpv.pyx":1071
+ *
+ * @_errors
+ * def render(self, # <<<<<<<<<<<<<<
+@@ -18731,7 +18731,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1101
++/* "vidcutter/libs/pympv/mpv.pyx":1103
+ * return ret
+ *
+ * def report_swap(self): # <<<<<<<<<<<<<<
+@@ -18757,7 +18757,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("report_swap", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1102
++ /* "vidcutter/libs/pympv/mpv.pyx":1104
+ *
+ * def report_swap(self):
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18772,7 +18772,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1103
++ /* "vidcutter/libs/pympv/mpv.pyx":1105
+ * def report_swap(self):
+ * with nogil:
+ * mpv_render_context_report_swap(self._ctx) # <<<<<<<<<<<<<<
+@@ -18782,7 +18782,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
+ mpv_render_context_report_swap(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1102
++ /* "vidcutter/libs/pympv/mpv.pyx":1104
+ *
+ * def report_swap(self):
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18801,7 +18801,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1101
++ /* "vidcutter/libs/pympv/mpv.pyx":1103
+ * return ret
+ *
+ * def report_swap(self): # <<<<<<<<<<<<<<
+@@ -18816,7 +18816,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1105
++/* "vidcutter/libs/pympv/mpv.pyx":1107
+ * mpv_render_context_report_swap(self._ctx)
+ *
+ * def free(self): # <<<<<<<<<<<<<<
+@@ -18843,7 +18843,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("free", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1106
++ /* "vidcutter/libs/pympv/mpv.pyx":1108
+ *
+ * def free(self):
+ * if not self.inited: # <<<<<<<<<<<<<<
+@@ -18853,7 +18853,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1107
++ /* "vidcutter/libs/pympv/mpv.pyx":1109
+ * def free(self):
+ * if not self.inited:
+ * return # <<<<<<<<<<<<<<
+@@ -18864,7 +18864,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1106
++ /* "vidcutter/libs/pympv/mpv.pyx":1108
+ *
+ * def free(self):
+ * if not self.inited: # <<<<<<<<<<<<<<
+@@ -18873,7 +18873,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1108
++ /* "vidcutter/libs/pympv/mpv.pyx":1110
+ * if not self.inited:
+ * return
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18888,7 +18888,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1109
++ /* "vidcutter/libs/pympv/mpv.pyx":1111
+ * return
+ * with nogil:
+ * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
+@@ -18898,7 +18898,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ mpv_render_context_free(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1108
++ /* "vidcutter/libs/pympv/mpv.pyx":1110
+ * if not self.inited:
+ * return
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -18917,7 +18917,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1110
++ /* "vidcutter/libs/pympv/mpv.pyx":1112
+ * with nogil:
+ * mpv_render_context_free(self._ctx)
+ * self.inited = False # <<<<<<<<<<<<<<
+@@ -18926,7 +18926,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ */
+ __pyx_v_self->inited = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1105
++ /* "vidcutter/libs/pympv/mpv.pyx":1107
+ * mpv_render_context_report_swap(self._ctx)
+ *
+ * def free(self): # <<<<<<<<<<<<<<
+@@ -18942,7 +18942,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1112
++/* "vidcutter/libs/pympv/mpv.pyx":1114
+ * self.inited = False
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+@@ -18969,7 +18969,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("close", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1113
++ /* "vidcutter/libs/pympv/mpv.pyx":1115
+ *
+ * def close(self):
+ * if not self.inited: # <<<<<<<<<<<<<<
+@@ -18979,7 +18979,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
+ if (__pyx_t_1) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1114
++ /* "vidcutter/libs/pympv/mpv.pyx":1116
+ * def close(self):
+ * if not self.inited:
+ * return # <<<<<<<<<<<<<<
+@@ -18990,7 +18990,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1113
++ /* "vidcutter/libs/pympv/mpv.pyx":1115
+ *
+ * def close(self):
+ * if not self.inited: # <<<<<<<<<<<<<<
+@@ -18999,7 +18999,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1115
++ /* "vidcutter/libs/pympv/mpv.pyx":1117
+ * if not self.inited:
+ * return
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -19014,7 +19014,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1116
++ /* "vidcutter/libs/pympv/mpv.pyx":1118
+ * return
+ * with nogil:
+ * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
+@@ -19024,7 +19024,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ mpv_render_context_free(__pyx_v_self->_ctx);
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1115
++ /* "vidcutter/libs/pympv/mpv.pyx":1117
+ * if not self.inited:
+ * return
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -19043,7 +19043,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1117
++ /* "vidcutter/libs/pympv/mpv.pyx":1119
+ * with nogil:
+ * mpv_render_context_free(self._ctx)
+ * self.inited = False # <<<<<<<<<<<<<<
+@@ -19052,7 +19052,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ */
+ __pyx_v_self->inited = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1112
++ /* "vidcutter/libs/pympv/mpv.pyx":1114
+ * self.inited = False
+ *
+ * def close(self): # <<<<<<<<<<<<<<
+@@ -19068,7 +19068,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1119
++/* "vidcutter/libs/pympv/mpv.pyx":1121
+ * self.inited = False
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -19097,14 +19097,14 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1120
++ /* "vidcutter/libs/pympv/mpv.pyx":1122
+ *
+ * def __dealloc__(self):
+ * self.close() # <<<<<<<<<<<<<<
+ *
+ * cdef class OpenGLRenderContext(RenderContext):
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -19118,12 +19118,12 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1119
++ /* "vidcutter/libs/pympv/mpv.pyx":1121
+ * self.inited = False
+ *
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+@@ -19255,7 +19255,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cyt
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1123
++/* "vidcutter/libs/pympv/mpv.pyx":1125
+ *
+ * cdef class OpenGLRenderContext(RenderContext):
+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
+@@ -19312,12 +19312,12 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObje
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1123, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1125, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1123, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1125, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -19330,7 +19330,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObje
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1123, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1125, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
+@@ -19360,39 +19360,39 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1127
++ /* "vidcutter/libs/pympv/mpv.pyx":1129
+ * *args, **kwargs):
+ * init_params = {
+ * "get_proc_address": get_proc_address # <<<<<<<<<<<<<<
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
+ */
+- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1127, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1129, __pyx_L1_error)
+ __pyx_v_init_params = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1129
++ /* "vidcutter/libs/pympv/mpv.pyx":1131
+ * "get_proc_address": get_proc_address
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
+ * init_params, *args, **kwargs)
+ *
+ */
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1130
++ /* "vidcutter/libs/pympv/mpv.pyx":1132
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
+ * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
+ *
+ * class CallbackThread(Thread):
+ */
+- __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
+@@ -19407,42 +19407,42 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct
+ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_init_params);
+ __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1129
++ /* "vidcutter/libs/pympv/mpv.pyx":1131
+ * "get_proc_address": get_proc_address
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
+ * init_params, *args, **kwargs)
+ *
+ */
+- __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1130
++ /* "vidcutter/libs/pympv/mpv.pyx":1132
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
+ * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
+ *
+ * class CallbackThread(Thread):
+ */
+- __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error)
++ __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1129
++ /* "vidcutter/libs/pympv/mpv.pyx":1131
+ * "get_proc_address": get_proc_address
+ * }
+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
+ * init_params, *args, **kwargs)
+ *
+ */
+- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1123
++ /* "vidcutter/libs/pympv/mpv.pyx":1125
+ *
+ * cdef class OpenGLRenderContext(RenderContext):
+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
+@@ -19579,7 +19579,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstat
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1133
++/* "vidcutter/libs/pympv/mpv.pyx":1135
+ *
+ * class CallbackThread(Thread):
+ * def __init__(self): # <<<<<<<<<<<<<<
+@@ -19612,16 +19612,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1134
++ /* "vidcutter/libs/pympv/mpv.pyx":1136
+ * class CallbackThread(Thread):
+ * def __init__(self):
+ * Thread.__init__(self) # <<<<<<<<<<<<<<
+ * self.daemon = True
+ * self.lock = Semaphore()
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+@@ -19636,28 +19636,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
+ }
+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self);
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1135
++ /* "vidcutter/libs/pympv/mpv.pyx":1137
+ * def __init__(self):
+ * Thread.__init__(self)
+ * self.daemon = True # <<<<<<<<<<<<<<
+ * self.lock = Semaphore()
+ * self.lock.acquire(True)
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1137, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1136
++ /* "vidcutter/libs/pympv/mpv.pyx":1138
+ * Thread.__init__(self)
+ * self.daemon = True
+ * self.lock = Semaphore() # <<<<<<<<<<<<<<
+ * self.lock.acquire(True)
+ * self.callback = None
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+@@ -19671,22 +19671,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
+ }
+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1137
++ /* "vidcutter/libs/pympv/mpv.pyx":1139
+ * self.daemon = True
+ * self.lock = Semaphore()
+ * self.lock.acquire(True) # <<<<<<<<<<<<<<
+ * self.callback = None
+ * self.isshutdown = False
+ */
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+@@ -19701,30 +19701,30 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_True);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1138
++ /* "vidcutter/libs/pympv/mpv.pyx":1140
+ * self.lock = Semaphore()
+ * self.lock.acquire(True)
+ * self.callback = None # <<<<<<<<<<<<<<
+ * self.isshutdown = False
+ *
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1140, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1139
++ /* "vidcutter/libs/pympv/mpv.pyx":1141
+ * self.lock.acquire(True)
+ * self.callback = None
+ * self.isshutdown = False # <<<<<<<<<<<<<<
+ *
+ * def shutdown(self):
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
++ /* "vidcutter/libs/pympv/mpv.pyx":1135
+ *
+ * class CallbackThread(Thread):
+ * def __init__(self): # <<<<<<<<<<<<<<
+@@ -19747,7 +19747,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1141
++/* "vidcutter/libs/pympv/mpv.pyx":1143
+ * self.isshutdown = False
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+@@ -19780,34 +19780,34 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHO
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("shutdown", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1142
++ /* "vidcutter/libs/pympv/mpv.pyx":1144
+ *
+ * def shutdown(self):
+ * self.isshutdown = True # <<<<<<<<<<<<<<
+ * self.callback = None
+ * self.lock.release()
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1144, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1143
++ /* "vidcutter/libs/pympv/mpv.pyx":1145
+ * def shutdown(self):
+ * self.isshutdown = True
+ * self.callback = None # <<<<<<<<<<<<<<
+ * self.lock.release()
+ *
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1145, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1144
++ /* "vidcutter/libs/pympv/mpv.pyx":1146
+ * self.isshutdown = True
+ * self.callback = None
+ * self.lock.release() # <<<<<<<<<<<<<<
+ *
+ * def call(self):
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+@@ -19822,12 +19822,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHO
+ }
+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
++ /* "vidcutter/libs/pympv/mpv.pyx":1143
+ * self.isshutdown = False
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+@@ -19850,7 +19850,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHO
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1146
++/* "vidcutter/libs/pympv/mpv.pyx":1148
+ * self.lock.release()
+ *
+ * def call(self): # <<<<<<<<<<<<<<
+@@ -19883,16 +19883,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("call", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1147
++ /* "vidcutter/libs/pympv/mpv.pyx":1149
+ *
+ * def call(self):
+ * self.lock.release() # <<<<<<<<<<<<<<
+ *
+ * def set(self, callback):
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+@@ -19907,12 +19907,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
+ }
+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
++ /* "vidcutter/libs/pympv/mpv.pyx":1148
+ * self.lock.release()
+ *
+ * def call(self): # <<<<<<<<<<<<<<
+@@ -19935,7 +19935,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1149
++/* "vidcutter/libs/pympv/mpv.pyx":1151
+ * self.lock.release()
+ *
+ * def set(self, callback): # <<<<<<<<<<<<<<
+@@ -19978,11 +19978,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1149, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1151, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1149, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1151, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -19995,7 +19995,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1149, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1151, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -20016,16 +20016,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNU
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("set", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1150
++ /* "vidcutter/libs/pympv/mpv.pyx":1152
+ *
+ * def set(self, callback):
+ * self.callback = callback # <<<<<<<<<<<<<<
+ *
+ * def run(self):
+ */
+- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
++ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
++ /* "vidcutter/libs/pympv/mpv.pyx":1151
+ * self.lock.release()
+ *
+ * def set(self, callback): # <<<<<<<<<<<<<<
+@@ -20045,7 +20045,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNU
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1152
++/* "vidcutter/libs/pympv/mpv.pyx":1154
+ * self.callback = callback
+ *
+ * def run(self): # <<<<<<<<<<<<<<
+@@ -20082,7 +20082,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("run", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1153
++ /* "vidcutter/libs/pympv/mpv.pyx":1155
+ *
+ * def run(self):
+ * while not self.isshutdown: # <<<<<<<<<<<<<<
+@@ -20090,23 +20090,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ * self.mpv_callback(self.callback) if self.callback else None
+ */
+ while (1) {
+- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((!__pyx_t_2) != 0);
+ if (!__pyx_t_3) break;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1154
++ /* "vidcutter/libs/pympv/mpv.pyx":1156
+ * def run(self):
+ * while not self.isshutdown:
+ * self.lock.acquire(True) # <<<<<<<<<<<<<<
+ * self.mpv_callback(self.callback) if self.callback else None
+ *
+ */
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+@@ -20121,26 +20121,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ }
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_True);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1155
++ /* "vidcutter/libs/pympv/mpv.pyx":1157
+ * while not self.isshutdown:
+ * self.lock.acquire(True)
+ * self.mpv_callback(self.callback) if self.callback else None # <<<<<<<<<<<<<<
+ *
+ * def mpv_callback(self, callback):
+ */
+- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1157, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_3) {
+- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+@@ -20155,7 +20155,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
++ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = __pyx_t_5;
+@@ -20167,7 +20167,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
++ /* "vidcutter/libs/pympv/mpv.pyx":1154
+ * self.callback = callback
+ *
+ * def run(self): # <<<<<<<<<<<<<<
+@@ -20192,7 +20192,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1157
++/* "vidcutter/libs/pympv/mpv.pyx":1159
+ * self.mpv_callback(self.callback) if self.callback else None
+ *
+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+@@ -20235,11 +20235,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
+ else {
+- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1157, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1159, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error)
++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1159, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+@@ -20252,7 +20252,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1157, __pyx_L3_error)
++ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1159, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+@@ -20285,7 +20285,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("mpv_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
++ /* "vidcutter/libs/pympv/mpv.pyx":1160
+ *
+ * def mpv_callback(self, callback):
+ * try: # <<<<<<<<<<<<<<
+@@ -20301,7 +20301,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1159
++ /* "vidcutter/libs/pympv/mpv.pyx":1161
+ * def mpv_callback(self, callback):
+ * try:
+ * callback() # <<<<<<<<<<<<<<
+@@ -20321,12 +20321,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ }
+ __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L3_error)
++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1161, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
++ /* "vidcutter/libs/pympv/mpv.pyx":1160
+ *
+ * def mpv_callback(self, callback):
+ * try: # <<<<<<<<<<<<<<
+@@ -20343,7 +20343,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1160
++ /* "vidcutter/libs/pympv/mpv.pyx":1162
+ * try:
+ * callback()
+ * except Exception as e: # <<<<<<<<<<<<<<
+@@ -20353,29 +20353,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ if (__pyx_t_7) {
+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
+- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1160, __pyx_L5_except_error)
++ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1162, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_5);
+ __pyx_v_e = __pyx_t_5;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1161
++ /* "vidcutter/libs/pympv/mpv.pyx":1163
+ * callback()
+ * except Exception as e:
+ * sys.stderr.write("pympv error during callback: %s\n" % e) # <<<<<<<<<<<<<<
+ *
+ * cdef void _c_callback(void* d) with gil:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+- __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+@@ -20390,7 +20390,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
++ if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+@@ -20402,7 +20402,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1158
++ /* "vidcutter/libs/pympv/mpv.pyx":1160
+ *
+ * def mpv_callback(self, callback):
+ * try: # <<<<<<<<<<<<<<
+@@ -20422,7 +20422,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ __pyx_L8_try_end:;
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
++ /* "vidcutter/libs/pympv/mpv.pyx":1159
+ * self.mpv_callback(self.callback) if self.callback else None
+ *
+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+@@ -20450,7 +20450,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
+ return __pyx_r;
+ }
+
+-/* "vidcutter/libs/pympv/mpv.pyx":1163
++/* "vidcutter/libs/pympv/mpv.pyx":1165
+ * sys.stderr.write("pympv error during callback: %s\n" % e)
+ *
+ * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
+@@ -20474,7 +20474,7 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
+ #endif
+ __Pyx_RefNannySetupContext("_c_callback", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1164
++ /* "vidcutter/libs/pympv/mpv.pyx":1166
+ *
+ * cdef void _c_callback(void* d) with gil:
+ * cdef uint64_t name = <uint64_t>d # <<<<<<<<<<<<<<
+@@ -20483,15 +20483,15 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
+ */
+ __pyx_v_name = ((uint64_t)__pyx_v_d);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1165
++ /* "vidcutter/libs/pympv/mpv.pyx":1167
+ * cdef void _c_callback(void* d) with gil:
+ * cdef uint64_t name = <uint64_t>d
+ * callback = _callbacks.get(name) # <<<<<<<<<<<<<<
+ * callback.call()
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -20506,18 +20506,18 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_callback = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1166
++ /* "vidcutter/libs/pympv/mpv.pyx":1168
+ * cdef uint64_t name = <uint64_t>d
+ * callback = _callbacks.get(name)
+ * callback.call() # <<<<<<<<<<<<<<
+ */
+- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+@@ -20531,12 +20531,12 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
+ }
+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1163
++ /* "vidcutter/libs/pympv/mpv.pyx":1165
+ * sys.stderr.write("pympv error during callback: %s\n" % e)
+ *
+ * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
+@@ -24444,13 +24444,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
+ {0, 0, 0, 0, 0, 0, 0}
+ };
+ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
+- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 44, __pyx_L1_error)
+- __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 346, __pyx_L1_error)
+- __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 58, __pyx_L1_error)
+- __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 66, __pyx_L1_error)
+- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 222, __pyx_L1_error)
+- __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 303, __pyx_L1_error)
+- __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 475, __pyx_L1_error)
++ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 46, __pyx_L1_error)
++ __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 348, __pyx_L1_error)
++ __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 60, __pyx_L1_error)
++ __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 68, __pyx_L1_error)
++ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 224, __pyx_L1_error)
++ __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 305, __pyx_L1_error)
++ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 477, __pyx_L1_error)
+ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+@@ -24461,17 +24461,17 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":319
++ /* "vidcutter/libs/pympv/mpv.pyx":321
+ *
+ * def _errors(fn):
+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
+ * v = fn(*k, **kw)
+ * if v < 0:
+ */
+- __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 319, __pyx_L1_error)
++ __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 321, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple_);
+ __Pyx_GIVEREF(__pyx_tuple_);
+- __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 319, __pyx_L1_error)
++ __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 321, __pyx_L1_error)
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+@@ -24511,80 +24511,80 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
+ __Pyx_GOTREF(__pyx_tuple__6);
+ __Pyx_GIVEREF(__pyx_tuple__6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":992
++ /* "vidcutter/libs/pympv/mpv.pyx":994
+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
+ * if drm_display:
+ * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ */
+- __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 992, __pyx_L1_error)
++ __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__7);
+ __Pyx_GIVEREF(__pyx_tuple__7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":993
++ /* "vidcutter/libs/pympv/mpv.pyx":995
+ * if drm_display:
+ * drm_params.fd = drm_display.get("fd", -1)
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None)
+ */
+- __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 993, __pyx_L1_error)
++ __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 995, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__8);
+ __Pyx_GIVEREF(__pyx_tuple__8);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":994
++ /* "vidcutter/libs/pympv/mpv.pyx":996
+ * drm_params.fd = drm_display.get("fd", -1)
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
+ * arp = drm_display.get("atomic_request_ptr", None)
+ * if arp is not None:
+ */
+- __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 994, __pyx_L1_error)
++ __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 996, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__9);
+ __Pyx_GIVEREF(__pyx_tuple__9);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":995
++ /* "vidcutter/libs/pympv/mpv.pyx":997
+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
+ * drm_params.connector_id = drm_display.get("connector_id", -1)
+ * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
+ * if arp is not None:
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ */
+- __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 995, __pyx_L1_error)
++ __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 997, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__10);
+ __Pyx_GIVEREF(__pyx_tuple__10);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":998
++ /* "vidcutter/libs/pympv/mpv.pyx":1000
+ * if arp is not None:
+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
+ * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
+ * if drm_osd_size:
+ */
+- __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 998, __pyx_L1_error)
++ __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 1000, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__11);
+ __Pyx_GIVEREF(__pyx_tuple__11);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1083
++ /* "vidcutter/libs/pympv/mpv.pyx":1085
+ * if opengl_fbo:
+ * memset(&fbo, 0, sizeof(fbo))
+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
+ * fbo.w = opengl_fbo["w"]
+ * fbo.h = opengl_fbo["h"]
+ */
+- __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 1083, __pyx_L1_error)
++ __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__12);
+ __Pyx_GIVEREF(__pyx_tuple__12);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1086
++ /* "vidcutter/libs/pympv/mpv.pyx":1088
+ * fbo.w = opengl_fbo["w"]
+ * fbo.h = opengl_fbo["h"]
+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
+ * if flip_y:
+ */
+- __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1086, __pyx_L1_error)
++ __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__13);
+ __Pyx_GIVEREF(__pyx_tuple__13);
+
+@@ -24626,183 +24626,183 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
+ __Pyx_GOTREF(__pyx_tuple__17);
+ __Pyx_GIVEREF(__pyx_tuple__17);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":52
++ /* "vidcutter/libs/pympv/mpv.pyx":54
+ * void Py_Initialize()
+ *
+ * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ */
+- __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 54, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__18);
+ __Pyx_GIVEREF(__pyx_tuple__18);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":55
++ /* "vidcutter/libs/pympv/mpv.pyx":57
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ * def _strdec(s): # <<<<<<<<<<<<<<
+ * try:
+ * return s.decode("utf-8", _strdec_err)
+ */
+- __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 55, __pyx_L1_error)
++ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__19);
+ __Pyx_GIVEREF(__pyx_tuple__19);
+- __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 55, __pyx_L1_error)
++ __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 57, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":63
++ /* "vidcutter/libs/pympv/mpv.pyx":65
+ *
+ * # Python -> mpv
+ * def _strenc(s): # <<<<<<<<<<<<<<
+ * try:
+ * return s.encode("utf-8", _strdec_err)
+ */
+- __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 63, __pyx_L1_error)
++ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 65, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__21);
+ __Pyx_GIVEREF(__pyx_tuple__21);
+- __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 63, __pyx_L1_error)
++ __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 65, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":318
++ /* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+ * def wrapped(*k, **kw):
+ * v = fn(*k, **kw)
+ */
+- __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 318, __pyx_L1_error)
++ __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__23);
+ __Pyx_GIVEREF(__pyx_tuple__23);
+- __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 318, __pyx_L1_error)
++ __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 320, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":329
++ /* "vidcutter/libs/pympv/mpv.pyx":331
+ * code = None
+ *
+ * def __init__(self, e): # <<<<<<<<<<<<<<
+ * self.code = e
+ * cdef const char* err_c
+ */
+- __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 329, __pyx_L1_error)
++ __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__25);
+ __Pyx_GIVEREF(__pyx_tuple__25);
+- __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 329, __pyx_L1_error)
++ __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 331, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":346
++ /* "vidcutter/libs/pympv/mpv.pyx":348
+ * cdef _reply_userdatas = dict()
+ *
+ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+ * def __init__(self, data):
+ * self.counter = 0
+ */
+- __pyx_tuple__27 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__27);
+ __Pyx_GIVEREF(__pyx_tuple__27);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":347
++ /* "vidcutter/libs/pympv/mpv.pyx":349
+ *
+ * class _ReplyUserData(object):
+ * def __init__(self, data): # <<<<<<<<<<<<<<
+ * self.counter = 0
+ * self.data = data
+ */
+- __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 347, __pyx_L1_error)
++ __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__28);
+ __Pyx_GIVEREF(__pyx_tuple__28);
+- __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 347, __pyx_L1_error)
++ __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 349, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":352
++ /* "vidcutter/libs/pympv/mpv.pyx":354
+ * self.observed = False
+ *
+ * def add(self): # <<<<<<<<<<<<<<
+ * self.counter += 1
+ *
+ */
+- __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 352, __pyx_L1_error)
++ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__30);
+ __Pyx_GIVEREF(__pyx_tuple__30);
+- __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 352, __pyx_L1_error)
++ __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 354, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 354, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":355
++ /* "vidcutter/libs/pympv/mpv.pyx":357
+ * self.counter += 1
+ *
+ * def remove(self): # <<<<<<<<<<<<<<
+ * self.counter -= 1
+ *
+ */
+- __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 355, __pyx_L1_error)
++ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__32);
+ __Pyx_GIVEREF(__pyx_tuple__32);
+- __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 355, __pyx_L1_error)
++ __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 357, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 357, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
++ /* "vidcutter/libs/pympv/mpv.pyx":1135
+ *
+ * class CallbackThread(Thread):
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * Thread.__init__(self)
+ * self.daemon = True
+ */
+- __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__34);
+ __Pyx_GIVEREF(__pyx_tuple__34);
+- __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1135, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
++ /* "vidcutter/libs/pympv/mpv.pyx":1143
+ * self.isshutdown = False
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+ * self.isshutdown = True
+ * self.callback = None
+ */
+- __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__36);
+ __Pyx_GIVEREF(__pyx_tuple__36);
+- __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1143, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
++ /* "vidcutter/libs/pympv/mpv.pyx":1148
+ * self.lock.release()
+ *
+ * def call(self): # <<<<<<<<<<<<<<
+ * self.lock.release()
+ *
+ */
+- __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1148, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__38);
+ __Pyx_GIVEREF(__pyx_tuple__38);
+- __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1148, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
++ /* "vidcutter/libs/pympv/mpv.pyx":1151
+ * self.lock.release()
+ *
+ * def set(self, callback): # <<<<<<<<<<<<<<
+ * self.callback = callback
+ *
+ */
+- __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__40);
+ __Pyx_GIVEREF(__pyx_tuple__40);
+- __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1151, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1151, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
++ /* "vidcutter/libs/pympv/mpv.pyx":1154
+ * self.callback = callback
+ *
+ * def run(self): # <<<<<<<<<<<<<<
+ * while not self.isshutdown:
+ * self.lock.acquire(True)
+ */
+- __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__42);
+ __Pyx_GIVEREF(__pyx_tuple__42);
+- __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 1154, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
++ /* "vidcutter/libs/pympv/mpv.pyx":1159
+ * self.mpv_callback(self.callback) if self.callback else None
+ *
+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+ * try:
+ * callback()
+ */
+- __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1159, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__44);
+ __Pyx_GIVEREF(__pyx_tuple__44);
+- __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1159, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
+@@ -24840,9 +24840,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
+ if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+- __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
++ __pyx_int_109 = PyInt_FromLong(109); if (unlikely(!__pyx_int_109)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_5713169 = PyInt_FromLong(5713169L); if (unlikely(!__pyx_int_5713169)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_90958262 = PyInt_FromLong(90958262L); if (unlikely(!__pyx_int_90958262)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_142036910 = PyInt_FromLong(142036910L); if (unlikely(!__pyx_int_142036910)) __PYX_ERR(0, 1, __pyx_L1_error)
+@@ -24897,122 +24897,122 @@ static int __Pyx_modinit_type_init_code(void) {
+ /*--- Type init code ---*/
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
+ __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, struct mpv_event_end_file *))__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage = &__pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
+ __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, struct mpv_event_log_message *))__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = &__pyx_type_9vidcutter_4libs_3mpv_LogMessage;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_Property = &__pyx_vtable_9vidcutter_4libs_3mpv_Property;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Property._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, struct mpv_event_property *))__pyx_f_9vidcutter_4libs_3mpv_8Property__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_Property.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_Property = &__pyx_type_9vidcutter_4libs_3mpv_Property;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_Event = &__pyx_vtable_9vidcutter_4libs_3mpv_Event;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Event._data = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *))__pyx_f_9vidcutter_4libs_3mpv_5Event__data;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Event._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_5Event__init;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_Event.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_Event = &__pyx_type_9vidcutter_4libs_3mpv_Event;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_Context = &__pyx_vtable_9vidcutter_4libs_3mpv_Context;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_list = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_map = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_native_value = (struct mpv_node (*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value;
+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._free_native_value = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, struct mpv_node))__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_Context.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_Context = &__pyx_type_9vidcutter_4libs_3mpv_Context;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams = &__pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
+ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_voidp = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, void *, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
+ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_int = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, int))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int;
+ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_string = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, char *))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = &__pyx_type_9vidcutter_4libs_3mpv__RenderParams;
+ __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
+ __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo._from_struct = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *, struct mpv_render_frame_info *))__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
++ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = &__pyx_type_9vidcutter_4libs_3mpv_RenderContext;
+ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_base = __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
+- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
+ __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLRenderContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext;
+- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
++ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_print = 0;
+ #endif
+@@ -25315,29 +25315,29 @@ if (!__Pyx_RefNanny) {
+ * __version__ = "0.3.0"
+ * __author__ = "Andre D" # <<<<<<<<<<<<<<
+ *
+- * _REQUIRED_CAPI_MAJOR = 2
++ * #_REQUIRED_CAPI_MAJOR = 2
+ */
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_s_Andre_D) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":33
+- * __author__ = "Andre D"
+- *
+- * _REQUIRED_CAPI_MAJOR = 2 # <<<<<<<<<<<<<<
+- * _MIN_CAPI_MINOR = 0
++ /* "vidcutter/libs/pympv/mpv.pyx":35
++ * #_REQUIRED_CAPI_MAJOR = 2
++ * #_MIN_CAPI_MINOR = 0
++ * _REQUIRED_CAPI_MAJOR = 1 # <<<<<<<<<<<<<<
++ * _MIN_CAPI_MINOR = 109
+ *
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":34
+- *
+- * _REQUIRED_CAPI_MAJOR = 2
+- * _MIN_CAPI_MINOR = 0 # <<<<<<<<<<<<<<
++ /* "vidcutter/libs/pympv/mpv.pyx":36
++ * #_MIN_CAPI_MINOR = 0
++ * _REQUIRED_CAPI_MAJOR = 1
++ * _MIN_CAPI_MINOR = 109 # <<<<<<<<<<<<<<
+ *
+ * cdef unsigned long _CAPI_VERSION
+ */
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_0) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_109) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":37
++ /* "vidcutter/libs/pympv/mpv.pyx":39
+ *
+ * cdef unsigned long _CAPI_VERSION
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -25352,7 +25352,7 @@ if (!__Pyx_RefNanny) {
+ #endif
+ /*try:*/ {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":38
++ /* "vidcutter/libs/pympv/mpv.pyx":40
+ * cdef unsigned long _CAPI_VERSION
+ * with nogil:
+ * _CAPI_VERSION = mpv_client_api_version() # <<<<<<<<<<<<<<
+@@ -25362,7 +25362,7 @@ if (!__Pyx_RefNanny) {
+ __pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION = mpv_client_api_version();
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":37
++ /* "vidcutter/libs/pympv/mpv.pyx":39
+ *
+ * cdef unsigned long _CAPI_VERSION
+ * with nogil: # <<<<<<<<<<<<<<
+@@ -25381,80 +25381,80 @@ if (!__Pyx_RefNanny) {
+ }
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":40
++ /* "vidcutter/libs/pympv/mpv.pyx":42
+ * _CAPI_VERSION = mpv_client_api_version()
+ *
+ * _CAPI_MAJOR = _CAPI_VERSION >> 16 # <<<<<<<<<<<<<<
+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+ *
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":41
++ /* "vidcutter/libs/pympv/mpv.pyx":43
+ *
+ * _CAPI_MAJOR = _CAPI_VERSION >> 16
+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF # <<<<<<<<<<<<<<
+ *
+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+ */
+- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
++ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":43
++ /* "vidcutter/libs/pympv/mpv.pyx":45
+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+ *
+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
+ * raise ImportError(
+ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L6_bool_binop_done;
+ }
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L6_bool_binop_done:;
+ if (unlikely(__pyx_t_3)) {
+
+- /* "vidcutter/libs/pympv/mpv.pyx":46
++ /* "vidcutter/libs/pympv/mpv.pyx":48
+ * raise ImportError(
+ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR) # <<<<<<<<<<<<<<
+ * )
+ *
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
+@@ -25469,32 +25469,32 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_4 = 0;
+ __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":45
++ /* "vidcutter/libs/pympv/mpv.pyx":47
+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+ * raise ImportError(
+ * "libmpv version is incorrect. Required %d.%d got %d.%d." % # <<<<<<<<<<<<<<
+ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
+ * )
+ */
+- __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":44
++ /* "vidcutter/libs/pympv/mpv.pyx":46
+ *
+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+ * raise ImportError( # <<<<<<<<<<<<<<
+ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
+ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
+ */
+- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_Raise(__pyx_t_7, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __PYX_ERR(0, 44, __pyx_L1_error)
++ __PYX_ERR(0, 46, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":43
++ /* "vidcutter/libs/pympv/mpv.pyx":45
+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
+ *
+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
+@@ -25503,33 +25503,33 @@ if (!__Pyx_RefNanny) {
+ */
+ }
+
+- /* "vidcutter/libs/pympv/mpv.pyx":52
++ /* "vidcutter/libs/pympv/mpv.pyx":54
+ * void Py_Initialize()
+ *
+ * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+- __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__18, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
++ __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__18, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":53
++ /* "vidcutter/libs/pympv/mpv.pyx":55
+ *
+ * _is_py3 = sys.version_info >= (3,)
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict" # <<<<<<<<<<<<<<
+ * # mpv -> Python
+ * def _strdec(s):
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 55, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 53, __pyx_L1_error)
++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 55, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_3) {
+ __Pyx_INCREF(__pyx_n_s_surrogateescape);
+@@ -25538,34 +25538,34 @@ if (!__Pyx_RefNanny) {
+ __Pyx_INCREF(__pyx_n_s_strict);
+ __pyx_t_7 = __pyx_n_s_strict;
+ }
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":55
++ /* "vidcutter/libs/pympv/mpv.pyx":57
+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
+ * # mpv -> Python
+ * def _strdec(s): # <<<<<<<<<<<<<<
+ * try:
+ * return s.decode("utf-8", _strdec_err)
+ */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error)
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":63
++ /* "vidcutter/libs/pympv/mpv.pyx":65
+ *
+ * # Python -> mpv
+ * def _strenc(s): # <<<<<<<<<<<<<<
+ * try:
+ * return s.encode("utf-8", _strdec_err)
+ */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error)
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 65, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":70
++ /* "vidcutter/libs/pympv/mpv.pyx":72
+ * return s
+ *
+ * Py_Initialize() # <<<<<<<<<<<<<<
+@@ -25574,883 +25574,883 @@ if (!__Pyx_RefNanny) {
+ */
+ Py_Initialize();
+
+- /* "vidcutter/libs/pympv/mpv.pyx":72
++ /* "vidcutter/libs/pympv/mpv.pyx":74
+ * Py_Initialize()
+ *
+ * class Errors: # <<<<<<<<<<<<<<
+ * """Set of known error codes from MpvError and Event responses.
+ *
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 72, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 74, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":79
++ /* "vidcutter/libs/pympv/mpv.pyx":81
+ * You should handle the possibility that error codes may not be any of these values.
+ * """
+ * success = MPV_ERROR_SUCCESS # <<<<<<<<<<<<<<
+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+ * nomem = MPV_ERROR_NOMEM
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":80
++ /* "vidcutter/libs/pympv/mpv.pyx":82
+ * """
+ * success = MPV_ERROR_SUCCESS
+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL # <<<<<<<<<<<<<<
+ * nomem = MPV_ERROR_NOMEM
+ * uninitialized = MPV_ERROR_UNINITIALIZED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":81
++ /* "vidcutter/libs/pympv/mpv.pyx":83
+ * success = MPV_ERROR_SUCCESS
+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+ * nomem = MPV_ERROR_NOMEM # <<<<<<<<<<<<<<
+ * uninitialized = MPV_ERROR_UNINITIALIZED
+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":82
++ /* "vidcutter/libs/pympv/mpv.pyx":84
+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
+ * nomem = MPV_ERROR_NOMEM
+ * uninitialized = MPV_ERROR_UNINITIALIZED # <<<<<<<<<<<<<<
+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":83
++ /* "vidcutter/libs/pympv/mpv.pyx":85
+ * nomem = MPV_ERROR_NOMEM
+ * uninitialized = MPV_ERROR_UNINITIALIZED
+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER # <<<<<<<<<<<<<<
+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
+ * option_format = MPV_ERROR_OPTION_FORMAT
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":84
++ /* "vidcutter/libs/pympv/mpv.pyx":86
+ * uninitialized = MPV_ERROR_UNINITIALIZED
+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+ * not_found = MPV_ERROR_OPTION_NOT_FOUND # <<<<<<<<<<<<<<
+ * option_format = MPV_ERROR_OPTION_FORMAT
+ * option_error = MPV_ERROR_OPTION_ERROR
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":85
++ /* "vidcutter/libs/pympv/mpv.pyx":87
+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
+ * option_format = MPV_ERROR_OPTION_FORMAT # <<<<<<<<<<<<<<
+ * option_error = MPV_ERROR_OPTION_ERROR
+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":86
++ /* "vidcutter/libs/pympv/mpv.pyx":88
+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
+ * option_format = MPV_ERROR_OPTION_FORMAT
+ * option_error = MPV_ERROR_OPTION_ERROR # <<<<<<<<<<<<<<
+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+ * property_format = MPV_ERROR_PROPERTY_FORMAT
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":87
++ /* "vidcutter/libs/pympv/mpv.pyx":89
+ * option_format = MPV_ERROR_OPTION_FORMAT
+ * option_error = MPV_ERROR_OPTION_ERROR
+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND # <<<<<<<<<<<<<<
+ * property_format = MPV_ERROR_PROPERTY_FORMAT
+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":88
++ /* "vidcutter/libs/pympv/mpv.pyx":90
+ * option_error = MPV_ERROR_OPTION_ERROR
+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+ * property_format = MPV_ERROR_PROPERTY_FORMAT # <<<<<<<<<<<<<<
+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+ * property_error = MPV_ERROR_PROPERTY_ERROR
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":89
++ /* "vidcutter/libs/pympv/mpv.pyx":91
+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
+ * property_format = MPV_ERROR_PROPERTY_FORMAT
+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE # <<<<<<<<<<<<<<
+ * property_error = MPV_ERROR_PROPERTY_ERROR
+ * command_error = MPV_ERROR_COMMAND
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":90
++ /* "vidcutter/libs/pympv/mpv.pyx":92
+ * property_format = MPV_ERROR_PROPERTY_FORMAT
+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+ * property_error = MPV_ERROR_PROPERTY_ERROR # <<<<<<<<<<<<<<
+ * command_error = MPV_ERROR_COMMAND
+ * loading_failed = MPV_ERROR_LOADING_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":91
++ /* "vidcutter/libs/pympv/mpv.pyx":93
+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
+ * property_error = MPV_ERROR_PROPERTY_ERROR
+ * command_error = MPV_ERROR_COMMAND # <<<<<<<<<<<<<<
+ * loading_failed = MPV_ERROR_LOADING_FAILED
+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":92
++ /* "vidcutter/libs/pympv/mpv.pyx":94
+ * property_error = MPV_ERROR_PROPERTY_ERROR
+ * command_error = MPV_ERROR_COMMAND
+ * loading_failed = MPV_ERROR_LOADING_FAILED # <<<<<<<<<<<<<<
+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":93
++ /* "vidcutter/libs/pympv/mpv.pyx":95
+ * command_error = MPV_ERROR_COMMAND
+ * loading_failed = MPV_ERROR_LOADING_FAILED
+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED # <<<<<<<<<<<<<<
+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":94
++ /* "vidcutter/libs/pympv/mpv.pyx":96
+ * loading_failed = MPV_ERROR_LOADING_FAILED
+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED # <<<<<<<<<<<<<<
+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":95
++ /* "vidcutter/libs/pympv/mpv.pyx":97
+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY # <<<<<<<<<<<<<<
+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+ * unsupported = MPV_ERROR_UNSUPPORTED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":96
++ /* "vidcutter/libs/pympv/mpv.pyx":98
+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT # <<<<<<<<<<<<<<
+ * unsupported = MPV_ERROR_UNSUPPORTED
+ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":97
++ /* "vidcutter/libs/pympv/mpv.pyx":99
+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+ * unsupported = MPV_ERROR_UNSUPPORTED # <<<<<<<<<<<<<<
+ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":98
++ /* "vidcutter/libs/pympv/mpv.pyx":100
+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
+ * unsupported = MPV_ERROR_UNSUPPORTED
+ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED # <<<<<<<<<<<<<<
+ *
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":72
++ /* "vidcutter/libs/pympv/mpv.pyx":74
+ * Py_Initialize()
+ *
+ * class Errors: # <<<<<<<<<<<<<<
+ * """Set of known error codes from MpvError and Event responses.
+ *
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":101
++ /* "vidcutter/libs/pympv/mpv.pyx":103
+ *
+ *
+ * class Events: # <<<<<<<<<<<<<<
+ * """Set of known values for Event ids.
+ *
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 103, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":108
++ /* "vidcutter/libs/pympv/mpv.pyx":110
+ * You should handle the possibility that event ids may not be any of these values.
+ * """
+ * none = MPV_EVENT_NONE # <<<<<<<<<<<<<<
+ * shutdown = MPV_EVENT_SHUTDOWN
+ * log_message = MPV_EVENT_LOG_MESSAGE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":109
++ /* "vidcutter/libs/pympv/mpv.pyx":111
+ * """
+ * none = MPV_EVENT_NONE
+ * shutdown = MPV_EVENT_SHUTDOWN # <<<<<<<<<<<<<<
+ * log_message = MPV_EVENT_LOG_MESSAGE
+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 109, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":110
++ /* "vidcutter/libs/pympv/mpv.pyx":112
+ * none = MPV_EVENT_NONE
+ * shutdown = MPV_EVENT_SHUTDOWN
+ * log_message = MPV_EVENT_LOG_MESSAGE # <<<<<<<<<<<<<<
+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":111
++ /* "vidcutter/libs/pympv/mpv.pyx":113
+ * shutdown = MPV_EVENT_SHUTDOWN
+ * log_message = MPV_EVENT_LOG_MESSAGE
+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY # <<<<<<<<<<<<<<
+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+ * command_reply = MPV_EVENT_COMMAND_REPLY
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":112
++ /* "vidcutter/libs/pympv/mpv.pyx":114
+ * log_message = MPV_EVENT_LOG_MESSAGE
+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY # <<<<<<<<<<<<<<
+ * command_reply = MPV_EVENT_COMMAND_REPLY
+ * start_file = MPV_EVENT_START_FILE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":113
++ /* "vidcutter/libs/pympv/mpv.pyx":115
+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+ * command_reply = MPV_EVENT_COMMAND_REPLY # <<<<<<<<<<<<<<
+ * start_file = MPV_EVENT_START_FILE
+ * end_file = MPV_EVENT_END_FILE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":114
++ /* "vidcutter/libs/pympv/mpv.pyx":116
+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
+ * command_reply = MPV_EVENT_COMMAND_REPLY
+ * start_file = MPV_EVENT_START_FILE # <<<<<<<<<<<<<<
+ * end_file = MPV_EVENT_END_FILE
+ * file_loaded = MPV_EVENT_FILE_LOADED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":115
++ /* "vidcutter/libs/pympv/mpv.pyx":117
+ * command_reply = MPV_EVENT_COMMAND_REPLY
+ * start_file = MPV_EVENT_START_FILE
+ * end_file = MPV_EVENT_END_FILE # <<<<<<<<<<<<<<
+ * file_loaded = MPV_EVENT_FILE_LOADED
+ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":116
++ /* "vidcutter/libs/pympv/mpv.pyx":118
+ * start_file = MPV_EVENT_START_FILE
+ * end_file = MPV_EVENT_END_FILE
+ * file_loaded = MPV_EVENT_FILE_LOADED # <<<<<<<<<<<<<<
+ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
+ * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 118, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":119
++ /* "vidcutter/libs/pympv/mpv.pyx":121
+ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
+ * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
+ * idle = MPV_EVENT_IDLE # <<<<<<<<<<<<<<
+ * # pause = MPV_EVENT_PAUSE
+ * # unpause = MPV_EVENT_UNPAUSE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 121, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":122
++ /* "vidcutter/libs/pympv/mpv.pyx":124
+ * # pause = MPV_EVENT_PAUSE
+ * # unpause = MPV_EVENT_UNPAUSE
+ * tick = MPV_EVENT_TICK # <<<<<<<<<<<<<<
+ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ * client_message = MPV_EVENT_CLIENT_MESSAGE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":124
++ /* "vidcutter/libs/pympv/mpv.pyx":126
+ * tick = MPV_EVENT_TICK
+ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ * client_message = MPV_EVENT_CLIENT_MESSAGE # <<<<<<<<<<<<<<
+ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":125
++ /* "vidcutter/libs/pympv/mpv.pyx":127
+ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ * client_message = MPV_EVENT_CLIENT_MESSAGE
+ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG # <<<<<<<<<<<<<<
+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":126
++ /* "vidcutter/libs/pympv/mpv.pyx":128
+ * client_message = MPV_EVENT_CLIENT_MESSAGE
+ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG # <<<<<<<<<<<<<<
+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
+ * seek = MPV_EVENT_SEEK
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":128
++ /* "vidcutter/libs/pympv/mpv.pyx":130
+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
+ * seek = MPV_EVENT_SEEK # <<<<<<<<<<<<<<
+ * playback_restart = MPV_EVENT_PLAYBACK_RESTART
+ * property_change = MPV_EVENT_PROPERTY_CHANGE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":129
++ /* "vidcutter/libs/pympv/mpv.pyx":131
+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
+ * seek = MPV_EVENT_SEEK
+ * playback_restart = MPV_EVENT_PLAYBACK_RESTART # <<<<<<<<<<<<<<
+ * property_change = MPV_EVENT_PROPERTY_CHANGE
+ * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":130
++ /* "vidcutter/libs/pympv/mpv.pyx":132
+ * seek = MPV_EVENT_SEEK
+ * playback_restart = MPV_EVENT_PLAYBACK_RESTART
+ * property_change = MPV_EVENT_PROPERTY_CHANGE # <<<<<<<<<<<<<<
+ * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":101
++ /* "vidcutter/libs/pympv/mpv.pyx":103
+ *
+ *
+ * class Events: # <<<<<<<<<<<<<<
+ * """Set of known values for Event ids.
+ *
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 103, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":134
++ /* "vidcutter/libs/pympv/mpv.pyx":136
+ *
+ *
+ * class LogLevels: # <<<<<<<<<<<<<<
+ * no = MPV_LOG_LEVEL_NONE
+ * fatal = MPV_LOG_LEVEL_FATAL
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":135
++ /* "vidcutter/libs/pympv/mpv.pyx":137
+ *
+ * class LogLevels:
+ * no = MPV_LOG_LEVEL_NONE # <<<<<<<<<<<<<<
+ * fatal = MPV_LOG_LEVEL_FATAL
+ * error = MPV_LOG_LEVEL_ERROR
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":136
++ /* "vidcutter/libs/pympv/mpv.pyx":138
+ * class LogLevels:
+ * no = MPV_LOG_LEVEL_NONE
+ * fatal = MPV_LOG_LEVEL_FATAL # <<<<<<<<<<<<<<
+ * error = MPV_LOG_LEVEL_ERROR
+ * warn = MPV_LOG_LEVEL_WARN
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":137
++ /* "vidcutter/libs/pympv/mpv.pyx":139
+ * no = MPV_LOG_LEVEL_NONE
+ * fatal = MPV_LOG_LEVEL_FATAL
+ * error = MPV_LOG_LEVEL_ERROR # <<<<<<<<<<<<<<
+ * warn = MPV_LOG_LEVEL_WARN
+ * info = MPV_LOG_LEVEL_INFO
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":138
++ /* "vidcutter/libs/pympv/mpv.pyx":140
+ * fatal = MPV_LOG_LEVEL_FATAL
+ * error = MPV_LOG_LEVEL_ERROR
+ * warn = MPV_LOG_LEVEL_WARN # <<<<<<<<<<<<<<
+ * info = MPV_LOG_LEVEL_INFO
+ * v = MPV_LOG_LEVEL_V
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":139
++ /* "vidcutter/libs/pympv/mpv.pyx":141
+ * error = MPV_LOG_LEVEL_ERROR
+ * warn = MPV_LOG_LEVEL_WARN
+ * info = MPV_LOG_LEVEL_INFO # <<<<<<<<<<<<<<
+ * v = MPV_LOG_LEVEL_V
+ * debug = MPV_LOG_LEVEL_DEBUG
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":140
++ /* "vidcutter/libs/pympv/mpv.pyx":142
+ * warn = MPV_LOG_LEVEL_WARN
+ * info = MPV_LOG_LEVEL_INFO
+ * v = MPV_LOG_LEVEL_V # <<<<<<<<<<<<<<
+ * debug = MPV_LOG_LEVEL_DEBUG
+ * trace = MPV_LOG_LEVEL_TRACE
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":141
++ /* "vidcutter/libs/pympv/mpv.pyx":143
+ * info = MPV_LOG_LEVEL_INFO
+ * v = MPV_LOG_LEVEL_V
+ * debug = MPV_LOG_LEVEL_DEBUG # <<<<<<<<<<<<<<
+ * trace = MPV_LOG_LEVEL_TRACE
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":142
++ /* "vidcutter/libs/pympv/mpv.pyx":144
+ * v = MPV_LOG_LEVEL_V
+ * debug = MPV_LOG_LEVEL_DEBUG
+ * trace = MPV_LOG_LEVEL_TRACE # <<<<<<<<<<<<<<
+ *
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":134
++ /* "vidcutter/libs/pympv/mpv.pyx":136
+ *
+ *
+ * class LogLevels: # <<<<<<<<<<<<<<
+ * no = MPV_LOG_LEVEL_NONE
+ * fatal = MPV_LOG_LEVEL_FATAL
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":145
++ /* "vidcutter/libs/pympv/mpv.pyx":147
+ *
+ *
+ * class EOFReasons: # <<<<<<<<<<<<<<
+ * """Known possible values for EndOfFileReached reason.
+ *
+ */
+- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 147, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":150
++ /* "vidcutter/libs/pympv/mpv.pyx":152
+ * You should handle the possibility that the reason may not be any of these values.
+ * """
+ * eof = MPV_END_FILE_REASON_EOF # <<<<<<<<<<<<<<
+ * aborted = MPV_END_FILE_REASON_STOP
+ * quit = MPV_END_FILE_REASON_QUIT
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":151
++ /* "vidcutter/libs/pympv/mpv.pyx":153
+ * """
+ * eof = MPV_END_FILE_REASON_EOF
+ * aborted = MPV_END_FILE_REASON_STOP # <<<<<<<<<<<<<<
+ * quit = MPV_END_FILE_REASON_QUIT
+ * error = MPV_END_FILE_REASON_ERROR
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":152
++ /* "vidcutter/libs/pympv/mpv.pyx":154
+ * eof = MPV_END_FILE_REASON_EOF
+ * aborted = MPV_END_FILE_REASON_STOP
+ * quit = MPV_END_FILE_REASON_QUIT # <<<<<<<<<<<<<<
+ * error = MPV_END_FILE_REASON_ERROR
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":153
++ /* "vidcutter/libs/pympv/mpv.pyx":155
+ * aborted = MPV_END_FILE_REASON_STOP
+ * quit = MPV_END_FILE_REASON_QUIT
+ * error = MPV_END_FILE_REASON_ERROR # <<<<<<<<<<<<<<
+ *
+ *
+ */
+- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":145
++ /* "vidcutter/libs/pympv/mpv.pyx":147
+ *
+ *
+ * class EOFReasons: # <<<<<<<<<<<<<<
+ * """Known possible values for EndOfFileReached reason.
+ *
+ */
+- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":318
++ /* "vidcutter/libs/pympv/mpv.pyx":320
+ *
+ *
+ * def _errors(fn): # <<<<<<<<<<<<<<
+ * def wrapped(*k, **kw):
+ * v = fn(*k, **kw)
+ */
+- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
++ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":326
++ /* "vidcutter/libs/pympv/mpv.pyx":328
+ *
+ *
+ * class MPVError(Exception): # <<<<<<<<<<<<<<
+ * code = None
+ *
+ */
+- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":327
++ /* "vidcutter/libs/pympv/mpv.pyx":329
+ *
+ * class MPVError(Exception):
+ * code = None # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, e):
+ */
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
+
+- /* "vidcutter/libs/pympv/mpv.pyx":329
++ /* "vidcutter/libs/pympv/mpv.pyx":331
+ * code = None
+ *
+ * def __init__(self, e): # <<<<<<<<<<<<<<
+ * self.code = e
+ * cdef const char* err_c
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":326
++ /* "vidcutter/libs/pympv/mpv.pyx":328
+ *
+ *
+ * class MPVError(Exception): # <<<<<<<<<<<<<<
+ * code = None
+ *
+ */
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":340
++ /* "vidcutter/libs/pympv/mpv.pyx":342
+ * Exception.__init__(self, e)
+ *
+ * class PyMPVError(Exception): # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 340, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 342, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":343
++ /* "vidcutter/libs/pympv/mpv.pyx":345
+ * pass
+ *
+ * cdef _callbacks = dict() # <<<<<<<<<<<<<<
+ * cdef _reply_userdatas = dict()
+ *
+ */
+- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 345, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__callbacks);
+ __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":344
++ /* "vidcutter/libs/pympv/mpv.pyx":346
+ *
+ * cdef _callbacks = dict()
+ * cdef _reply_userdatas = dict() # <<<<<<<<<<<<<<
+ *
+ * class _ReplyUserData(object):
+ */
+- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas);
+ __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_7);
+ __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":346
++ /* "vidcutter/libs/pympv/mpv.pyx":348
+ * cdef _reply_userdatas = dict()
+ *
+ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+ * def __init__(self, data):
+ * self.counter = 0
+ */
+- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__27); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__27); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__27, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__27, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":347
++ /* "vidcutter/libs/pympv/mpv.pyx":349
+ *
+ * class _ReplyUserData(object):
+ * def __init__(self, data): # <<<<<<<<<<<<<<
+ * self.counter = 0
+ * self.data = data
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":352
++ /* "vidcutter/libs/pympv/mpv.pyx":354
+ * self.observed = False
+ *
+ * def add(self): # <<<<<<<<<<<<<<
+ * self.counter += 1
+ *
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":355
++ /* "vidcutter/libs/pympv/mpv.pyx":357
+ * self.counter += 1
+ *
+ * def remove(self): # <<<<<<<<<<<<<<
+ * self.counter -= 1
+ *
+ */
+- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":346
++ /* "vidcutter/libs/pympv/mpv.pyx":348
+ * cdef _reply_userdatas = dict()
+ *
+ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
+ * def __init__(self, data):
+ * self.counter = 0
+ */
+- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__27, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__27, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":411
++ /* "vidcutter/libs/pympv/mpv.pyx":413
+ * # mpv_resume(self._ctx)
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def request_event(self, event, enable):
+ * """Enable or disable a given event.
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":412
++ /* "vidcutter/libs/pympv/mpv.pyx":414
+ *
+ * @_errors
+ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
+ * """Enable or disable a given event.
+ *
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26465,31 +26465,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 413, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":429
++ /* "vidcutter/libs/pympv/mpv.pyx":431
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def set_log_level(self, loglevel):
+ * """Wraps: mpv_request_log_messages"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":430
++ /* "vidcutter/libs/pympv/mpv.pyx":432
+ *
+ * @_errors
+ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_request_log_messages"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26504,31 +26504,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 432, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":440
++ /* "vidcutter/libs/pympv/mpv.pyx":442
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def load_config(self, filename):
+ * """Wraps: mpv_load_config_file"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":441
++ /* "vidcutter/libs/pympv/mpv.pyx":443
+ *
+ * @_errors
+ * def load_config(self, filename): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_load_config_file"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26543,31 +26543,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 442, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":573
++ /* "vidcutter/libs/pympv/mpv.pyx":575
+ * return result
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def get_property_async(self, prop, data=None):
+ * """Gets the value of a property asynchronously.
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":574
++ /* "vidcutter/libs/pympv/mpv.pyx":576
+ *
+ * @_errors
+ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
+ * """Gets the value of a property asynchronously.
+ *
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26582,31 +26582,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 576, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":635
++ /* "vidcutter/libs/pympv/mpv.pyx":637
+ * return v
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def set_property(self, prop, value=True, asynchronous=False, data=None):
+ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 637, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":636
++ /* "vidcutter/libs/pympv/mpv.pyx":638
+ *
+ * @_errors
+ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_set_property and mpv_set_property_async"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26621,31 +26621,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 637, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":673
++ /* "vidcutter/libs/pympv/mpv.pyx":675
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def set_option(self, prop, value=True):
+ * """Wraps: mpv_set_option"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 675, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":674
++ /* "vidcutter/libs/pympv/mpv.pyx":676
+ *
+ * @_errors
+ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_set_option"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 674, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26660,31 +26660,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":695
++ /* "vidcutter/libs/pympv/mpv.pyx":697
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def initialize(self):
+ * """Wraps: mpv_initialize"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 697, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":696
++ /* "vidcutter/libs/pympv/mpv.pyx":698
+ *
+ * @_errors
+ * def initialize(self): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_initialize"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26699,31 +26699,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 697, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 698, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":748
++ /* "vidcutter/libs/pympv/mpv.pyx":750
+ * self.callbackthread.start()
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def observe_property(self, prop, data=None):
+ * """Wraps: mpv_observe_property"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":749
++ /* "vidcutter/libs/pympv/mpv.pyx":751
+ *
+ * @_errors
+ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_observe_property"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26738,31 +26738,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 751, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":770
++ /* "vidcutter/libs/pympv/mpv.pyx":772
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def unobserve_property(self, data):
+ * """Wraps: mpv_unobserve_property"""
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":771
++ /* "vidcutter/libs/pympv/mpv.pyx":773
+ *
+ * @_errors
+ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
+ * """Wraps: mpv_unobserve_property"""
+ * assert self._ctx
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 773, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26777,54 +26777,54 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 773, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":938
++ /* "vidcutter/libs/pympv/mpv.pyx":940
+ *
+ * cdef class RenderContext(object):
+ * API_OPENGL = "opengl" # <<<<<<<<<<<<<<
+ * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME
+ *
+ */
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 940, __pyx_L1_error)
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":939
++ /* "vidcutter/libs/pympv/mpv.pyx":941
+ * cdef class RenderContext(object):
+ * API_OPENGL = "opengl"
+ * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME # <<<<<<<<<<<<<<
+ *
+ * cdef:
+ */
+- __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 939, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 941, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 941, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1009
++ /* "vidcutter/libs/pympv/mpv.pyx":1011
+ * self.inited = True
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def set_icc_profile(self, icc_blob):
+ * cdef:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1009, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1011, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1010
++ /* "vidcutter/libs/pympv/mpv.pyx":1012
+ *
+ * @_errors
+ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
+ * cdef:
+ * mpv_render_param param
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1012, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26839,31 +26839,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1009, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1011, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1012, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1028
++ /* "vidcutter/libs/pympv/mpv.pyx":1030
+ * return err
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def set_ambient_light(self, lux):
+ * cdef:
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1030, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1029
++ /* "vidcutter/libs/pympv/mpv.pyx":1031
+ *
+ * @_errors
+ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
+ * cdef:
+ * mpv_render_param param
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26878,31 +26878,31 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1030, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1031, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1068
++ /* "vidcutter/libs/pympv/mpv.pyx":1070
+ * return ret
+ *
+ * @_errors # <<<<<<<<<<<<<<
+ * def render(self,
+ * opengl_fbo=None,
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1070, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1069
++ /* "vidcutter/libs/pympv/mpv.pyx":1071
+ *
+ * @_errors
+ * def render(self, # <<<<<<<<<<<<<<
+ * opengl_fbo=None,
+ * flip_y=False,
+ */
+- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error)
++ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+@@ -26917,114 +26917,114 @@ if (!__Pyx_RefNanny) {
+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error)
++ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1070, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
++ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1071, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1132
++ /* "vidcutter/libs/pympv/mpv.pyx":1134
+ * init_params, *args, **kwargs)
+ *
+ * class CallbackThread(Thread): # <<<<<<<<<<<<<<
+ * def __init__(self):
+ * Thread.__init__(self)
+ */
+- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
+ __pyx_t_7 = 0;
+- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1133
++ /* "vidcutter/libs/pympv/mpv.pyx":1135
+ *
+ * class CallbackThread(Thread):
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * Thread.__init__(self)
+ * self.daemon = True
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1133, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1141
++ /* "vidcutter/libs/pympv/mpv.pyx":1143
+ * self.isshutdown = False
+ *
+ * def shutdown(self): # <<<<<<<<<<<<<<
+ * self.isshutdown = True
+ * self.callback = None
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1146
++ /* "vidcutter/libs/pympv/mpv.pyx":1148
+ * self.lock.release()
+ *
+ * def call(self): # <<<<<<<<<<<<<<
+ * self.lock.release()
+ *
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1146, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1148, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1149
++ /* "vidcutter/libs/pympv/mpv.pyx":1151
+ * self.lock.release()
+ *
+ * def set(self, callback): # <<<<<<<<<<<<<<
+ * self.callback = callback
+ *
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1151, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1152
++ /* "vidcutter/libs/pympv/mpv.pyx":1154
+ * self.callback = callback
+ *
+ * def run(self): # <<<<<<<<<<<<<<
+ * while not self.isshutdown:
+ * self.lock.acquire(True)
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1157
++ /* "vidcutter/libs/pympv/mpv.pyx":1159
+ * self.mpv_callback(self.callback) if self.callback else None
+ *
+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
+ * try:
+ * callback()
+ */
+- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1157, __pyx_L1_error)
++ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+- /* "vidcutter/libs/pympv/mpv.pyx":1132
++ /* "vidcutter/libs/pympv/mpv.pyx":1134
+ * init_params, *args, **kwargs)
+ *
+ * class CallbackThread(Thread): # <<<<<<<<<<<<<<
+ * def __init__(self):
+ * Thread.__init__(self)
+ */
+- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
++ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1132, __pyx_L1_error)
++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+diff --git a/vidcutter/libs/pympv/mpv.pyx b/vidcutter/libs/pympv/mpv.pyx
+index 8af2dcc7..1decdda8 100644
+--- a/vidcutter/libs/pympv/mpv.pyx
++++ b/vidcutter/libs/pympv/mpv.pyx
+@@ -30,8 +30,10 @@ from client cimport *
+ __version__ = "0.3.0"
+ __author__ = "Andre D"
+
+-_REQUIRED_CAPI_MAJOR = 2
+-_MIN_CAPI_MINOR = 0
++#_REQUIRED_CAPI_MAJOR = 2
++#_MIN_CAPI_MINOR = 0
++_REQUIRED_CAPI_MAJOR = 1
++_MIN_CAPI_MINOR = 109
+
+ cdef unsigned long _CAPI_VERSION
+ with nogil:
diff --git a/srcpkgs/vidcutter/template b/srcpkgs/vidcutter/template
index 07bda50c917c..93e6dbefaacc 100644
--- a/srcpkgs/vidcutter/template
+++ b/srcpkgs/vidcutter/template
@@ -1,7 +1,7 @@
# Template file for 'vidcutter'
pkgname=vidcutter
-version=6.0.0
-revision=6
+version=6.0.5.1
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython"
makedepends="mpv-devel python3-devel"
@@ -12,7 +12,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/ozmartian/vidcutter"
distfiles="https://github.com/ozmartian/vidcutter/archive/refs/tags/${version}.tar.gz"
-checksum=c09be7eceaf42ff7211fe3b8125279c4fec7f7d251d272b61d579e426bd4e2c2
+checksum=c6374eaedb845f9e580e555dd12c1db1cf2ffa28d3756b08e2ae28c1a4cd4a96
pre_build() {
rm -f vidcutter/libs/pympv/mpv.c
From 96306bf8f59a1dcd6fa068f4aed371d9925dd850 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Mon, 14 Nov 2022 08:08:31 -0600
Subject: [PATCH 8/9] stremio-shell: rebuild for mpv-0.35.0
---
srcpkgs/stremio-shell/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/stremio-shell/template b/srcpkgs/stremio-shell/template
index 641000d6fe64..2b0c0b23af69 100644
--- a/srcpkgs/stremio-shell/template
+++ b/srcpkgs/stremio-shell/template
@@ -1,7 +1,7 @@
# Template file for 'stremio-shell'
pkgname=stremio-shell
version=4.4.159
-revision=2
+revision=3
_singleapplication_hash=f1e15081dc57a9c03f7f4f165677f18802e1437a
_libmpv_hash=822a41a1087daf2911fc336fbd9509f962158fef
create_wrksrc=yes
From 3db5e28de693603ffdbb8b27912b966159a2b3c8 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Mon, 14 Nov 2022 08:08:31 -0600
Subject: [PATCH 9/9] vidcutter: use system mpv headers
---
srcpkgs/vidcutter/patches/mpv-0.35-1.patch | 52271 -------------------
srcpkgs/vidcutter/patches/mpv-0.35-3.patch | 13260 -----
srcpkgs/vidcutter/template | 14 +-
3 files changed, 10 insertions(+), 65535 deletions(-)
diff --git a/srcpkgs/vidcutter/patches/mpv-0.35-1.patch b/srcpkgs/vidcutter/patches/mpv-0.35-1.patch
index c33bad4a82bb..759b787f7a69 100644
--- a/srcpkgs/vidcutter/patches/mpv-0.35-1.patch
+++ b/srcpkgs/vidcutter/patches/mpv-0.35-1.patch
@@ -8,7 +8,6 @@ Subject: [PATCH] Patches to pympv to workaround opengl_cb deprecation from
---
vidcutter/libs/pympv/client.pxd | 54 +-
- vidcutter/libs/pympv/mpv.c | 46394 ++++++++++++++----------------
vidcutter/libs/pympv/mpv.pyx | 192 +-
3 files changed, 21832 insertions(+), 24808 deletions(-)
@@ -113,52276 +112,6 @@ index befe219e..d9a8816f 100644
cdef extern from "mpv/render.h":
-diff --git a/vidcutter/libs/pympv/mpv.c b/vidcutter/libs/pympv/mpv.c
-index 202aae8c..a3522ef5 100644
---- a/vidcutter/libs/pympv/mpv.c
-+++ b/vidcutter/libs/pympv/mpv.c
-@@ -1,4 +1,4 @@
--/* Generated by Cython 0.29.21 */
-+/* Generated by Cython 0.29.28 */
-
- /* BEGIN: Cython Metadata
- {
-@@ -19,15 +19,17 @@
- }
- END: Cython Metadata */
-
-+#ifndef PY_SSIZE_T_CLEAN
- #define PY_SSIZE_T_CLEAN
-+#endif /* PY_SSIZE_T_CLEAN */
- #include "Python.h"
- #ifndef Py_PYTHON_H
- #error Python headers needed to compile C extensions, please install development version of Python.
- #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
- #error Cython requires Python 2.6+ or Python 3.3+.
- #else
--#define CYTHON_ABI "0_29_21"
--#define CYTHON_HEX_VERSION 0x001D15F0
-+#define CYTHON_ABI "0_29_28"
-+#define CYTHON_HEX_VERSION 0x001D1CF0
- #define CYTHON_FUTURE_DIVISION 0
- #include <stddef.h>
- #ifndef offsetof
-@@ -174,7 +176,7 @@ END: Cython Metadata */
- #ifndef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 1
- #endif
-- #if PY_VERSION_HEX < 0x030300F0
-+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #elif !defined(CYTHON_USE_UNICODE_WRITER)
-@@ -189,11 +191,14 @@ END: Cython Metadata */
- #ifndef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 1
- #endif
-- #ifndef CYTHON_FAST_THREAD_STATE
-+ #if PY_VERSION_HEX >= 0x030B00A4
-+ #undef CYTHON_FAST_THREAD_STATE
-+ #define CYTHON_FAST_THREAD_STATE 0
-+ #elif !defined(CYTHON_FAST_THREAD_STATE)
- #define CYTHON_FAST_THREAD_STATE 1
- #endif
- #ifndef CYTHON_FAST_PYCALL
-- #define CYTHON_FAST_PYCALL 1
-+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1)
- #endif
- #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
- #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
-@@ -204,7 +209,10 @@ END: Cython Metadata */
- #ifndef CYTHON_USE_DICT_VERSIONS
- #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
- #endif
-- #ifndef CYTHON_USE_EXC_INFO_STACK
-+ #if PY_VERSION_HEX >= 0x030B00A4
-+ #undef CYTHON_USE_EXC_INFO_STACK
-+ #define CYTHON_USE_EXC_INFO_STACK 0
-+ #elif !defined(CYTHON_USE_EXC_INFO_STACK)
- #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
- #endif
- #endif
-@@ -212,7 +220,9 @@ END: Cython Metadata */
- #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
- #endif
- #if CYTHON_USE_PYLONG_INTERNALS
-- #include "longintrepr.h"
-+ #if PY_MAJOR_VERSION < 3
-+ #include "longintrepr.h"
-+ #endif
- #undef SHIFT
- #undef BASE
- #undef MASK
-@@ -329,9 +339,68 @@ END: Cython Metadata */
- #define __Pyx_DefaultClassType PyClass_Type
- #else
- #define __Pyx_BUILTIN_MODULE_NAME "builtins"
--#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
-- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
-- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
-+ #define __Pyx_DefaultClassType PyType_Type
-+#if PY_VERSION_HEX >= 0x030B00A1
-+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
-+ PyObject *code, PyObject *c, PyObject* n, PyObject *v,
-+ PyObject *fv, PyObject *cell, PyObject* fn,
-+ PyObject *name, int fline, PyObject *lnos) {
-+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
-+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
-+ const char *fn_cstr=NULL;
-+ const char *name_cstr=NULL;
-+ PyCodeObject* co=NULL;
-+ PyObject *type, *value, *traceback;
-+ PyErr_Fetch(&type, &value, &traceback);
-+ if (!(kwds=PyDict_New())) goto end;
-+ if (!(argcount=PyLong_FromLong(a))) goto end;
-+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
-+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
-+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
-+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
-+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
-+ if (!(nlocals=PyLong_FromLong(l))) goto end;
-+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
-+ if (!(stacksize=PyLong_FromLong(s))) goto end;
-+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
-+ if (!(flags=PyLong_FromLong(f))) goto end;
-+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
-+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
-+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
-+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
-+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
-+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
-+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
-+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
-+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
-+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
-+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
-+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
-+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
-+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
-+ Py_XDECREF((PyObject*)co);
-+ co = (PyCodeObject*)call_result;
-+ call_result = NULL;
-+ if (0) {
-+ cleanup_code_too:
-+ Py_XDECREF((PyObject*)co);
-+ co = NULL;
-+ }
-+ end:
-+ Py_XDECREF(kwds);
-+ Py_XDECREF(argcount);
-+ Py_XDECREF(posonlyargcount);
-+ Py_XDECREF(kwonlyargcount);
-+ Py_XDECREF(nlocals);
-+ Py_XDECREF(stacksize);
-+ Py_XDECREF(replace);
-+ Py_XDECREF(call_result);
-+ Py_XDECREF(empty);
-+ if (type) {
-+ PyErr_Restore(type, value, traceback);
-+ }
-+ return co;
-+ }
- #else
- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
- PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
-@@ -445,8 +514,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
- #endif
- #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
- #define CYTHON_PEP393_ENABLED 1
-+ #if defined(PyUnicode_IS_READY)
- #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
- 0 : _PyUnicode_Ready((PyObject *)(op)))
-+ #else
-+ #define __Pyx_PyUnicode_READY(op) (0)
-+ #endif
- #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
- #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
- #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
-@@ -455,7 +528,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
- #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
- #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
- #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
-+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
-+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
-+ #else
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
-+ #endif
- #else
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
- #endif
-@@ -627,7 +704,6 @@ static CYTHON_INLINE float __PYX_NAN() {
- #include <string.h>
- #include <stdlib.h>
- #include "mpv/client.h"
--#include "mpv/opengl_cb.h"
- #include "mpv/render.h"
- #include "mpv/render_gl.h"
- #ifdef _OPENMP
-@@ -857,12 +933,10 @@ static const char *__pyx_f[] = {
-
- /*--- Type declarations ---*/
- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached;
--struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch;
- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage;
- struct __pyx_obj_9vidcutter_4libs_3mpv_Property;
- struct __pyx_obj_9vidcutter_4libs_3mpv_Event;
- struct __pyx_obj_9vidcutter_4libs_3mpv_Context;
--struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext;
- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams;
- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo;
- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext;
-@@ -897,21 +971,6 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached {
- };
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":169
-- *
-- *
-- * cdef class InputDispatch(object): # <<<<<<<<<<<<<<
-- * """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
-- *
-- */
--struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch {
-- PyObject_HEAD
-- struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch *__pyx_vtab;
-- PyObject *arg0;
-- PyObject *type;
--};
--
--
- /* "vidcutter/libs/pympv/mpv.pyx":182
- *
- *
-@@ -978,21 +1037,6 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Context {
- };
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":822
-- * (<object>ctx)()
-- *
-- * cdef class OpenGLContext(object): # <<<<<<<<<<<<<<
-- * cdef:
-- * mpv_opengl_cb_context *_ctx
-- */
--struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext {
-- PyObject_HEAD
-- struct mpv_opengl_cb_context *_ctx;
-- int inited;
-- PyObject *update_cb;
--};
--
--
- /* "vidcutter/libs/pympv/mpv.pyx":881
- * DEF MAX_RENDER_PARAMS = 32
- *
-@@ -1080,20 +1124,6 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached {
- static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":169
-- *
-- *
-- * cdef class InputDispatch(object): # <<<<<<<<<<<<<<
-- * """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
-- *
-- */
--
--struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch {
-- PyObject *(*_init)(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *, struct mpv_event_script_input_dispatch *);
--};
--static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch *__pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch;
--
--
- /* "vidcutter/libs/pympv/mpv.pyx":182
- *
- *
-@@ -1318,6 +1348,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args,
- #ifndef Py_MEMBER_SIZE
- #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
- #endif
-+#if CYTHON_FAST_PYCALL
- static size_t __pyx_pyframe_localsplus_offset = 0;
- #include "frameobject.h"
- #define __Pxy_PyFrame_Initialize_Offsets()\
-@@ -1325,6 +1356,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args,
- (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
- #define __Pyx_PyFrame_GetLocalsplus(frame)\
- (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
-+#endif // CYTHON_FAST_PYCALL
- #endif
-
- /* PyCFunctionFastCall.proto */
-@@ -1747,12 +1779,23 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
- static void __Pyx_AddTraceback(const char *funcname, int c_line,
- int py_line, const char *filename);
-
-+/* GCCDiagnostics.proto */
-+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
-+#define __Pyx_HAS_GCC_DIAGNOSTIC
-+#endif
-+
- /* CIntToPy.proto */
- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
-
-+/* CIntFromPy.proto */
-+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
-+
- /* CIntToPy.proto */
- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_event_id(enum mpv_event_id value);
-
-+/* CIntFromPy.proto */
-+static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObject *);
-+
- /* CIntToPy.proto */
- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value);
-
-@@ -1768,30 +1811,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_end_file_reason(enum m
- /* CIntToPy.proto */
- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_render_update_flag(enum mpv_render_update_flag value);
-
-+/* CIntFromPy.proto */
-+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
-+
- /* CIntToPy.proto */
- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);
-
- /* CIntToPy.proto */
- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);
-
--/* CIntToPy.proto */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value);
--
--/* CIntToPy.proto */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
--
--/* CIntFromPy.proto */
--static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
--
--/* CIntFromPy.proto */
--static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObject *);
--
--/* CIntFromPy.proto */
--static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
--
- /* CIntFromPy.proto */
- static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);
-
-+/* CIntToPy.proto */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value);
-+
- /* CIntFromPy.proto */
- static CYTHON_INLINE enum mpv_format __Pyx_PyInt_As_enum__mpv_format(PyObject *);
-
-@@ -1801,6 +1835,9 @@ static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);
- /* CIntFromPy.proto */
- static CYTHON_INLINE intptr_t __Pyx_PyInt_As_intptr_t(PyObject *);
-
-+/* CIntToPy.proto */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
-+
- /* CheckBinaryVersion.proto */
- static int __Pyx_check_binary_version(void);
-
-@@ -1808,7 +1845,6 @@ static int __Pyx_check_binary_version(void);
- static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
-
- static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self, struct mpv_event_end_file *__pyx_v_eof); /* proto*/
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, struct mpv_event_script_input_dispatch *__pyx_v_input); /* proto*/
- static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, struct mpv_event_log_message *__pyx_v_msg); /* proto*/
- static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, struct mpv_event_property *__pyx_v_prop); /* proto*/
- static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event); /* proto*/
-@@ -1834,12 +1870,10 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(st
-
- /* Module declarations from 'vidcutter.libs.mpv' */
- static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = 0;
--static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch = 0;
- static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = 0;
- static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_Property = 0;
- static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_Event = 0;
- static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_Context = 0;
--static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_OpenGLContext = 0;
- static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = 0;
- static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = 0;
- static PyTypeObject *__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = 0;
-@@ -1855,7 +1889,6 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *); /*proto*/
- static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *, PyObject *); /*proto*/
- static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *); /*proto*/
- static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, PyObject *); /*proto*/
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *, PyObject *); /*proto*/
- static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, PyObject *); /*proto*/
- static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, PyObject *); /*proto*/
- static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, PyObject *); /*proto*/
-@@ -1873,7 +1906,6 @@ static PyObject *__pyx_builtin_range;
- static PyObject *__pyx_builtin_id;
- static PyObject *__pyx_builtin_enumerate;
- static PyObject *__pyx_builtin_TypeError;
--static PyObject *__pyx_builtin_DeprecationWarning;
- static const char __pyx_k_e[] = "e";
- static const char __pyx_k_h[] = "h";
- static const char __pyx_k_k[] = "k";
-@@ -1900,7 +1932,6 @@ static const char __pyx_k_call[] = "call";
- static const char __pyx_k_code[] = "code";
- static const char __pyx_k_data[] = "data";
- static const char __pyx_k_dict[] = "__dict__";
--static const char __pyx_k_exts[] = "exts";
- static const char __pyx_k_idle[] = "idle";
- static const char __pyx_k_info[] = "info";
- static const char __pyx_k_init[] = "__init__";
-@@ -1926,7 +1957,6 @@ static const char __pyx_k_error[] = "error";
- static const char __pyx_k_event[] = "event";
- static const char __pyx_k_fatal[] = "fatal";
- static const char __pyx_k_nomem[] = "nomem";
--static const char __pyx_k_pause[] = "pause";
- static const char __pyx_k_range[] = "range";
- static const char __pyx_k_start[] = "start";
- static const char __pyx_k_trace[] = "trace";
-@@ -1973,7 +2003,6 @@ static const char __pyx_k_present[] = "present";
- static const char __pyx_k_release[] = "release";
- static const char __pyx_k_success[] = "success";
- static const char __pyx_k_timeout[] = "timeout";
--static const char __pyx_k_unpause[] = "unpause";
- static const char __pyx_k_version[] = "__version__";
- static const char __pyx_k_wrapped[] = "wrapped";
- static const char __pyx_k_MPVError[] = "MPVError";
-@@ -1998,7 +2027,6 @@ static const char __pyx_k_pyx_state[] = "__pyx_state";
- static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
- static const char __pyx_k_render_fd[] = "render_fd";
- static const char __pyx_k_threading[] = "threading";
--static const char __pyx_k_uninit_gl[] = "uninit_gl";
- static const char __pyx_k_API_OPENGL[] = "API_OPENGL";
- static const char __pyx_k_CAPI_MAJOR[] = "_CAPI_MAJOR";
- static const char __pyx_k_CAPI_MINOR[] = "_CAPI_MINOR";
-@@ -2038,8 +2066,6 @@ static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
- static const char __pyx_k_set_property[] = "set_property";
- static const char __pyx_k_stringsource[] = "stringsource";
- static const char __pyx_k_version_info[] = "version_info";
--static const char __pyx_k_InputDispatch[] = "InputDispatch";
--static const char __pyx_k_OpenGLContext[] = "OpenGLContext";
- static const char __pyx_k_RenderContext[] = "RenderContext";
- static const char __pyx_k_ReplyUserData[] = "_ReplyUserData";
- static const char __pyx_k_command_error[] = "command_error";
-@@ -2053,18 +2079,15 @@ static const char __pyx_k_CallbackThread[] = "CallbackThread";
- static const char __pyx_k_MIN_CAPI_MINOR[] = "_MIN_CAPI_MINOR";
- static const char __pyx_k_ao_init_failed[] = "ao_init_failed";
- static const char __pyx_k_audio_reconfig[] = "audio_reconfig";
--static const char __pyx_k_chapter_change[] = "chapter_change";
- static const char __pyx_k_client_message[] = "client_message";
- static const char __pyx_k_loading_failed[] = "loading_failed";
- static const char __pyx_k_property_error[] = "property_error";
- static const char __pyx_k_skip_rendering[] = "skip_rendering";
--static const char __pyx_k_tracks_changed[] = "tracks_changed";
- static const char __pyx_k_unknown_format[] = "unknown_format";
- static const char __pyx_k_video_reconfig[] = "video_reconfig";
- static const char __pyx_k_vo_init_failed[] = "vo_init_failed";
- static const char __pyx_k_MPVError___init[] = "MPVError.__init__";
- static const char __pyx_k_internal_format[] = "internal_format";
--static const char __pyx_k_metadata_update[] = "metadata_update";
- static const char __pyx_k_not_implemented[] = "not_implemented";
- static const char __pyx_k_nothing_to_play[] = "nothing_to_play";
- static const char __pyx_k_property_change[] = "property_change";
-@@ -2073,7 +2096,6 @@ static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
- static const char __pyx_k_set_icc_profile[] = "set_icc_profile";
- static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
- static const char __pyx_k_surrogateescape[] = "surrogateescape";
--static const char __pyx_k_tracks_switched[] = "tracks_switched";
- static const char __pyx_k_EndOfFileReached[] = "EndOfFileReached";
- static const char __pyx_k_advanced_control[] = "advanced_control";
- static const char __pyx_k_drmModeAtomicReq[] = "drmModeAtomicReq*";
-@@ -2085,7 +2107,6 @@ static const char __pyx_k_invalid_parameter[] = "invalid_parameter";
- static const char __pyx_k_set_ambient_light[] = "set_ambient_light";
- static const char __pyx_k_CallbackThread_run[] = "CallbackThread.run";
- static const char __pyx_k_CallbackThread_set[] = "CallbackThread.set";
--static const char __pyx_k_DeprecationWarning[] = "DeprecationWarning";
- static const char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError";
- static const char __pyx_k_UnicodeEncodeError[] = "UnicodeEncodeError";
- static const char __pyx_k_Unknown_api_type_r[] = "Unknown api_type %r";
-@@ -2109,12 +2130,9 @@ static const char __pyx_k_RenderParams_overflow[] = "RenderParams overflow";
- static const char __pyx_k_block_for_target_time[] = "block_for_target_time";
- static const char __pyx_k_errors_locals_wrapped[] = "_errors.<locals>.wrapped";
- static const char __pyx_k_pyx_unpickle_Property[] = "__pyx_unpickle_Property";
--static const char __pyx_k_script_input_dispatch[] = "script_input_dispatch";
- static const char __pyx_k_Context_creation_error[] = "Context creation error";
- static const char __pyx_k_CallbackThread_shutdown[] = "CallbackThread.shutdown";
- static const char __pyx_k_pyx_unpickle_LogMessage[] = "__pyx_unpickle_LogMessage";
--static const char __pyx_k_OpenGL_API_not_available[] = "OpenGL API not available";
--static const char __pyx_k_pyx_unpickle_InputDispatch[] = "__pyx_unpickle_InputDispatch";
- static const char __pyx_k_CallbackThread_mpv_callback[] = "CallbackThread.mpv_callback";
- static const char __pyx_k_pyx_unpickle_RenderFrameInfo[] = "__pyx_unpickle_RenderFrameInfo";
- static const char __pyx_k_vidcutter_libs_pympv_mpv_pyx[] = "vidcutter/libs/pympv/mpv.pyx";
-@@ -2125,11 +2143,9 @@ static const char __pyx_k_self_params_cannot_be_converted[] = "self.params canno
- static const char __pyx_k_Incompatible_checksums_s_vs_0x05[] = "Incompatible checksums (%s vs 0x0572d11 = (data, name))";
- static const char __pyx_k_Incompatible_checksums_s_vs_0x56[] = "Incompatible checksums (%s vs 0x56be9b6 = (error, reason))";
- static const char __pyx_k_Incompatible_checksums_s_vs_0x87[] = "Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))";
--static const char __pyx_k_Incompatible_checksums_s_vs_0xbf[] = "Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))";
- static const char __pyx_k_Incompatible_checksums_s_vs_0xd4[] = "Incompatible checksums (%s vs 0xd41d8cd = ())";
- static const char __pyx_k_Incompatible_checksums_s_vs_0xda[] = "Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))";
- static const char __pyx_k_Known_possible_values_for_EndOfF[] = "Known possible values for EndOfFileReached reason.\n\n You should handle the possibility that the reason may not be any of these values.\n ";
--static const char __pyx_k_OpenGLContext_is_deprecated_plea[] = "OpenGLContext is deprecated, please switch to RenderContext";
- static const char __pyx_k_Set_of_known_error_codes_from_Mp[] = "Set of known error codes from MpvError and Event responses.\n\n Mostly wraps the enum mpv_error.\n Values might not always be integers in the future.\n You should handle the possibility that error codes may not be any of these values.\n ";
- static const char __pyx_k_Set_of_known_values_for_Event_id[] = "Set of known values for Event ids.\n\n Mostly wraps the enum mpv_event_id.\n Values might not always be integers in the future.\n You should handle the possibility that event ids may not be any of these values.\n ";
- static const char __pyx_k_Unknown_or_invalid_pointer_objec[] = "Unknown or invalid pointer object: %r";
-@@ -2151,7 +2167,6 @@ static PyObject *__pyx_n_s_CallbackThread_set;
- static PyObject *__pyx_n_s_CallbackThread_shutdown;
- static PyObject *__pyx_n_s_Context;
- static PyObject *__pyx_kp_s_Context_creation_error;
--static PyObject *__pyx_n_s_DeprecationWarning;
- static PyObject *__pyx_n_s_EOFReasons;
- static PyObject *__pyx_n_s_EndOfFileReached;
- static PyObject *__pyx_n_s_Errors;
-@@ -2161,20 +2176,15 @@ static PyObject *__pyx_n_s_ImportError;
- static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x05;
- static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x56;
- static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x87;
--static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xbf;
- static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xd4;
- static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xda;
--static PyObject *__pyx_n_s_InputDispatch;
- static PyObject *__pyx_kp_s_Known_possible_values_for_EndOfF;
- static PyObject *__pyx_n_s_LogLevels;
- static PyObject *__pyx_n_s_LogMessage;
- static PyObject *__pyx_n_s_MIN_CAPI_MINOR;
- static PyObject *__pyx_n_s_MPVError;
- static PyObject *__pyx_n_s_MPVError___init;
--static PyObject *__pyx_n_s_OpenGLContext;
--static PyObject *__pyx_kp_s_OpenGLContext_is_deprecated_plea;
- static PyObject *__pyx_n_s_OpenGLRenderContext;
--static PyObject *__pyx_kp_s_OpenGL_API_not_available;
- static PyObject *__pyx_n_s_PickleError;
- static PyObject *__pyx_n_s_Property;
- static PyObject *__pyx_n_s_PyMPVError;
-@@ -2211,7 +2221,6 @@ static PyObject *__pyx_n_s_block_for_target_time;
- static PyObject *__pyx_n_s_block_vsync;
- static PyObject *__pyx_n_s_call;
- static PyObject *__pyx_n_s_callback;
--static PyObject *__pyx_n_s_chapter_change;
- static PyObject *__pyx_n_s_client_message;
- static PyObject *__pyx_n_s_cline_in_traceback;
- static PyObject *__pyx_n_s_close;
-@@ -2244,7 +2253,6 @@ static PyObject *__pyx_n_s_error;
- static PyObject *__pyx_n_s_errors;
- static PyObject *__pyx_n_s_errors_locals_wrapped;
- static PyObject *__pyx_n_s_event;
--static PyObject *__pyx_n_s_exts;
- static PyObject *__pyx_n_s_fatal;
- static PyObject *__pyx_n_s_fbo;
- static PyObject *__pyx_n_s_fd;
-@@ -2280,7 +2288,6 @@ static PyObject *__pyx_n_s_lock;
- static PyObject *__pyx_n_s_log_message;
- static PyObject *__pyx_n_s_main;
- static PyObject *__pyx_n_s_metaclass;
--static PyObject *__pyx_n_s_metadata_update;
- static PyObject *__pyx_n_s_module;
- static PyObject *__pyx_n_s_mpv;
- static PyObject *__pyx_n_s_mpv_callback;
-@@ -2301,7 +2308,6 @@ static PyObject *__pyx_n_s_opengl_fbo;
- static PyObject *__pyx_n_s_opengl_init_params;
- static PyObject *__pyx_n_s_option_error;
- static PyObject *__pyx_n_s_option_format;
--static PyObject *__pyx_n_s_pause;
- static PyObject *__pyx_n_s_pickle;
- static PyObject *__pyx_n_s_playback_restart;
- static PyObject *__pyx_n_s_prepare;
-@@ -2319,7 +2325,6 @@ static PyObject *__pyx_n_s_pyx_state;
- static PyObject *__pyx_n_s_pyx_type;
- static PyObject *__pyx_n_s_pyx_unpickle_EndOfFileReached;
- static PyObject *__pyx_n_s_pyx_unpickle_Event;
--static PyObject *__pyx_n_s_pyx_unpickle_InputDispatch;
- static PyObject *__pyx_n_s_pyx_unpickle_LogMessage;
- static PyObject *__pyx_n_s_pyx_unpickle_Property;
- static PyObject *__pyx_n_s_pyx_unpickle_RenderFrameInfo;
-@@ -2340,7 +2345,6 @@ static PyObject *__pyx_n_s_repeat;
- static PyObject *__pyx_n_s_request_event;
- static PyObject *__pyx_n_s_run;
- static PyObject *__pyx_n_s_s;
--static PyObject *__pyx_n_s_script_input_dispatch;
- static PyObject *__pyx_n_s_seek;
- static PyObject *__pyx_n_s_self;
- static PyObject *__pyx_kp_s_self__ctx_cannot_be_converted_to;
-@@ -2373,13 +2377,9 @@ static PyObject *__pyx_n_s_threading;
- static PyObject *__pyx_n_s_tick;
- static PyObject *__pyx_n_s_timeout;
- static PyObject *__pyx_n_s_trace;
--static PyObject *__pyx_n_s_tracks_changed;
--static PyObject *__pyx_n_s_tracks_switched;
--static PyObject *__pyx_n_s_uninit_gl;
- static PyObject *__pyx_n_s_uninitialized;
- static PyObject *__pyx_n_s_unknown_format;
- static PyObject *__pyx_n_s_unobserve_property;
--static PyObject *__pyx_n_s_unpause;
- static PyObject *__pyx_n_s_unsupported;
- static PyObject *__pyx_n_s_update;
- static PyObject *__pyx_kp_s_utf_8;
-@@ -2409,14 +2409,6 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_2__set__(str
- static int __pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
--static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
--static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
--static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
--static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
- static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self); /* proto */
- static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
- static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self); /* proto */
-@@ -2462,41 +2454,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_
- static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_suspend(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2resume(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
--static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_40unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44opengl_cb_api(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
--static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
--static int __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_2init_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_exts, PyObject *__pyx_v_get_proc_address); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_4set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_cb); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_6draw(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_fbo, PyObject *__pyx_v_w, PyObject *__pyx_v_h); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_8report_flip(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_time); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_10uninit_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
--static void __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_12__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
-+static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
-+static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
- static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self); /* proto */
- static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self); /* proto */
-@@ -2526,18 +2506,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNU
- static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
- static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
- static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_InputDispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
- static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_InputDispatch(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
- static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
- static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Property(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
- static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Event(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
- static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Context(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
- static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
- static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
- static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-@@ -2545,13 +2522,12 @@ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeOb
- static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
- static PyObject *__pyx_int_0;
- static PyObject *__pyx_int_1;
-+static PyObject *__pyx_int_2;
- static PyObject *__pyx_int_3;
--static PyObject *__pyx_int_9;
- static PyObject *__pyx_int_32;
- static PyObject *__pyx_int_5713169;
- static PyObject *__pyx_int_90958262;
- static PyObject *__pyx_int_142036910;
--static PyObject *__pyx_int_200688041;
- static PyObject *__pyx_int_222419149;
- static PyObject *__pyx_int_228822053;
- static PyObject *__pyx_int_neg_1;
-@@ -2573,48 +2549,43 @@ static PyObject *__pyx_tuple__16;
- static PyObject *__pyx_tuple__17;
- static PyObject *__pyx_tuple__18;
- static PyObject *__pyx_tuple__19;
--static PyObject *__pyx_tuple__20;
- static PyObject *__pyx_tuple__21;
--static PyObject *__pyx_tuple__22;
--static PyObject *__pyx_tuple__24;
--static PyObject *__pyx_tuple__26;
-+static PyObject *__pyx_tuple__23;
-+static PyObject *__pyx_tuple__25;
-+static PyObject *__pyx_tuple__27;
- static PyObject *__pyx_tuple__28;
- static PyObject *__pyx_tuple__30;
--static PyObject *__pyx_tuple__31;
--static PyObject *__pyx_tuple__33;
--static PyObject *__pyx_tuple__35;
--static PyObject *__pyx_tuple__37;
--static PyObject *__pyx_tuple__39;
--static PyObject *__pyx_tuple__41;
--static PyObject *__pyx_tuple__43;
--static PyObject *__pyx_tuple__45;
--static PyObject *__pyx_tuple__47;
--static PyObject *__pyx_tuple__49;
--static PyObject *__pyx_tuple__51;
--static PyObject *__pyx_tuple__53;
--static PyObject *__pyx_tuple__55;
--static PyObject *__pyx_tuple__57;
--static PyObject *__pyx_tuple__59;
-+static PyObject *__pyx_tuple__32;
-+static PyObject *__pyx_tuple__34;
-+static PyObject *__pyx_tuple__36;
-+static PyObject *__pyx_tuple__38;
-+static PyObject *__pyx_tuple__40;
-+static PyObject *__pyx_tuple__42;
-+static PyObject *__pyx_tuple__44;
-+static PyObject *__pyx_tuple__46;
-+static PyObject *__pyx_tuple__48;
-+static PyObject *__pyx_tuple__50;
-+static PyObject *__pyx_tuple__52;
-+static PyObject *__pyx_tuple__54;
- static PyObject *__pyx_codeobj__2;
--static PyObject *__pyx_codeobj__23;
--static PyObject *__pyx_codeobj__25;
--static PyObject *__pyx_codeobj__27;
-+static PyObject *__pyx_codeobj__20;
-+static PyObject *__pyx_codeobj__22;
-+static PyObject *__pyx_codeobj__24;
-+static PyObject *__pyx_codeobj__26;
- static PyObject *__pyx_codeobj__29;
--static PyObject *__pyx_codeobj__32;
--static PyObject *__pyx_codeobj__34;
--static PyObject *__pyx_codeobj__36;
--static PyObject *__pyx_codeobj__38;
--static PyObject *__pyx_codeobj__40;
--static PyObject *__pyx_codeobj__42;
--static PyObject *__pyx_codeobj__44;
--static PyObject *__pyx_codeobj__46;
--static PyObject *__pyx_codeobj__48;
--static PyObject *__pyx_codeobj__50;
--static PyObject *__pyx_codeobj__52;
--static PyObject *__pyx_codeobj__54;
--static PyObject *__pyx_codeobj__56;
--static PyObject *__pyx_codeobj__58;
--static PyObject *__pyx_codeobj__60;
-+static PyObject *__pyx_codeobj__31;
-+static PyObject *__pyx_codeobj__33;
-+static PyObject *__pyx_codeobj__35;
-+static PyObject *__pyx_codeobj__37;
-+static PyObject *__pyx_codeobj__39;
-+static PyObject *__pyx_codeobj__41;
-+static PyObject *__pyx_codeobj__43;
-+static PyObject *__pyx_codeobj__45;
-+static PyObject *__pyx_codeobj__47;
-+static PyObject *__pyx_codeobj__49;
-+static PyObject *__pyx_codeobj__51;
-+static PyObject *__pyx_codeobj__53;
-+static PyObject *__pyx_codeobj__55;
- /* Late includes */
-
- /* "vidcutter/libs/pympv/mpv.pyx":55
-@@ -2987,7 +2958,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- * # In python2, assume bytes and walk right through
- * return s # <<<<<<<<<<<<<<
- *
-- * PyEval_InitThreads()
-+ * Py_Initialize()
- */
- __Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_s);
-@@ -3616,15 +3587,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_2__setstate_c
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":176
-- * cdef public object arg0, type
-+/* "vidcutter/libs/pympv/mpv.pyx":189
-+ * cdef public object prefix, level, text, log_level
- *
-- * cdef _init(self, mpv_event_script_input_dispatch* input): # <<<<<<<<<<<<<<
-- * self.arg0 = input.arg0
-- * self.type = _strdec(input.type)
-+ * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
-+ * self.level = _strdec(msg.level)
-+ * self.prefix = _strdec(msg.prefix)
- */
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, struct mpv_event_script_input_dispatch *__pyx_v_input) {
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, struct mpv_event_log_message *__pyx_v_msg) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-@@ -3636,31 +3607,82 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_init", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":177
-+ /* "vidcutter/libs/pympv/mpv.pyx":190
- *
-- * cdef _init(self, mpv_event_script_input_dispatch* input):
-- * self.arg0 = input.arg0 # <<<<<<<<<<<<<<
-- * self.type = _strdec(input.type)
-- * return self
-+ * cdef _init(self, mpv_event_log_message* msg):
-+ * self.level = _strdec(msg.level) # <<<<<<<<<<<<<<
-+ * self.prefix = _strdec(msg.prefix)
-+ * self.text = _strdec(msg.text)
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v_self->level);
-+ __Pyx_DECREF(__pyx_v_self->level);
-+ __pyx_v_self->level = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":191
-+ * cdef _init(self, mpv_event_log_message* msg):
-+ * self.level = _strdec(msg.level)
-+ * self.prefix = _strdec(msg.prefix) # <<<<<<<<<<<<<<
-+ * self.text = _strdec(msg.text)
-+ * self.log_level = msg.log_level
- */
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_input->arg0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->arg0);
-- __Pyx_DECREF(__pyx_v_self->arg0);
-- __pyx_v_self->arg0 = __pyx_t_1;
-+ __Pyx_GOTREF(__pyx_v_self->prefix);
-+ __Pyx_DECREF(__pyx_v_self->prefix);
-+ __pyx_v_self->prefix = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":178
-- * cdef _init(self, mpv_event_script_input_dispatch* input):
-- * self.arg0 = input.arg0
-- * self.type = _strdec(input.type) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":192
-+ * self.level = _strdec(msg.level)
-+ * self.prefix = _strdec(msg.prefix)
-+ * self.text = _strdec(msg.text) # <<<<<<<<<<<<<<
-+ * self.log_level = msg.log_level
- * return self
-- *
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_input->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -3675,18 +3697,33 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->type);
-- __Pyx_DECREF(__pyx_v_self->type);
-- __pyx_v_self->type = __pyx_t_1;
-+ __Pyx_GOTREF(__pyx_v_self->text);
-+ __Pyx_DECREF(__pyx_v_self->text);
-+ __pyx_v_self->text = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":193
-+ * self.prefix = _strdec(msg.prefix)
-+ * self.text = _strdec(msg.text)
-+ * self.log_level = msg.log_level # <<<<<<<<<<<<<<
-+ * return self
-+ *
-+ */
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v_self->log_level);
-+ __Pyx_DECREF(__pyx_v_self->log_level);
-+ __pyx_v_self->log_level = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":179
-- * self.arg0 = input.arg0
-- * self.type = _strdec(input.type)
-+ /* "vidcutter/libs/pympv/mpv.pyx":194
-+ * self.text = _strdec(msg.text)
-+ * self.log_level = msg.log_level
- * return self # <<<<<<<<<<<<<<
- *
- *
-@@ -3696,12 +3733,12 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
- __pyx_r = ((PyObject *)__pyx_v_self);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":176
-- * cdef public object arg0, type
-+ /* "vidcutter/libs/pympv/mpv.pyx":189
-+ * cdef public object prefix, level, text, log_level
- *
-- * cdef _init(self, mpv_event_script_input_dispatch* input): # <<<<<<<<<<<<<<
-- * self.arg0 = input.arg0
-- * self.type = _strdec(input.type)
-+ * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
-+ * self.level = _strdec(msg.level)
-+ * self.prefix = _strdec(msg.prefix)
- */
-
- /* function exit code */
-@@ -3710,7 +3747,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.InputDispatch._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
-@@ -3718,34 +3755,34 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init(struct __py
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":174
-- * Wraps: mpv_event_script_input_dispatch
-+/* "vidcutter/libs/pympv/mpv.pyx":187
-+ * Wraps: mpv_event_log_message
- * """
-- * cdef public object arg0, type # <<<<<<<<<<<<<<
-+ * cdef public object prefix, level, text, log_level # <<<<<<<<<<<<<<
- *
-- * cdef _init(self, mpv_event_script_input_dispatch* input):
-+ * cdef _init(self, mpv_event_log_message* msg):
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_1__get__(PyObject *__pyx_v_self) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_self->arg0);
-- __pyx_r = __pyx_v_self->arg0;
-+ __Pyx_INCREF(__pyx_v_self->prefix);
-+ __pyx_r = __pyx_v_self->prefix;
- goto __pyx_L0;
-
- /* function exit code */
-@@ -3756,27 +3793,27 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0___get__(st
- }
-
- /* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value) {
-+static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_INCREF(__pyx_v_value);
- __Pyx_GIVEREF(__pyx_v_value);
-- __Pyx_GOTREF(__pyx_v_self->arg0);
-- __Pyx_DECREF(__pyx_v_self->arg0);
-- __pyx_v_self->arg0 = __pyx_v_value;
-+ __Pyx_GOTREF(__pyx_v_self->prefix);
-+ __Pyx_DECREF(__pyx_v_self->prefix);
-+ __pyx_v_self->prefix = __pyx_v_value;
-
- /* function exit code */
- __pyx_r = 0;
-@@ -3785,27 +3822,27 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_2__set__(struct
- }
-
- /* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_5__del__(PyObject *__pyx_v_self); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_5__del__(PyObject *__pyx_v_self) {
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
-+static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__del__", 0);
- __Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->arg0);
-- __Pyx_DECREF(__pyx_v_self->arg0);
-- __pyx_v_self->arg0 = Py_None;
-+ __Pyx_GOTREF(__pyx_v_self->prefix);
-+ __Pyx_DECREF(__pyx_v_self->prefix);
-+ __pyx_v_self->prefix = Py_None;
-
- /* function exit code */
- __pyx_r = 0;
-@@ -3814,25 +3851,25 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_4__del__(struct
- }
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_1__get__(PyObject *__pyx_v_self) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_self->type);
-- __pyx_r = __pyx_v_self->type;
-+ __Pyx_INCREF(__pyx_v_self->level);
-+ __pyx_r = __pyx_v_self->level;
- goto __pyx_L0;
-
- /* function exit code */
-@@ -3843,27 +3880,27 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type___get__(st
- }
-
- /* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v_value) {
-+static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__set__", 0);
- __Pyx_INCREF(__pyx_v_value);
- __Pyx_GIVEREF(__pyx_v_value);
-- __Pyx_GOTREF(__pyx_v_self->type);
-- __Pyx_DECREF(__pyx_v_self->type);
-- __pyx_v_self->type = __pyx_v_value;
-+ __Pyx_GOTREF(__pyx_v_self->level);
-+ __Pyx_DECREF(__pyx_v_self->level);
-+ __pyx_v_self->level = __pyx_v_value;
-
- /* function exit code */
- __pyx_r = 0;
-@@ -3872,27 +3909,27 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_2__set__(struct
- }
-
- /* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_5__del__(PyObject *__pyx_v_self); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_5__del__(PyObject *__pyx_v_self) {
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
-+static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__del__", 0);
- __Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->type);
-- __Pyx_DECREF(__pyx_v_self->type);
-- __pyx_v_self->type = Py_None;
-+ __Pyx_GOTREF(__pyx_v_self->level);
-+ __Pyx_DECREF(__pyx_v_self->level);
-+ __pyx_v_self->level = Py_None;
-
- /* function exit code */
- __pyx_r = 0;
-@@ -3900,63 +3937,243 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_4type_4__del__(struct
- return __pyx_r;
- }
-
--/* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * cdef tuple state
-- * cdef object _dict
-- */
--
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self) {
-- PyObject *__pyx_v_state = 0;
-- PyObject *__pyx_v__dict = 0;
-- int __pyx_v_use_setstate;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- int __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- int __pyx_t_5;
-- PyObject *__pyx_t_6 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-+ __Pyx_RefNannySetupContext("__get__", 0);
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v_self->text);
-+ __pyx_r = __pyx_v_self->text;
-+ goto __pyx_L0;
-
-- /* "(tree fragment)":5
-- * cdef object _dict
-- * cdef bint use_setstate
-- * state = (self.arg0, self.type) # <<<<<<<<<<<<<<
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None:
-- */
-- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(__pyx_v_self->arg0);
-- __Pyx_GIVEREF(__pyx_v_self->arg0);
-- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->arg0);
-- __Pyx_INCREF(__pyx_v_self->type);
-- __Pyx_GIVEREF(__pyx_v_self->type);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->type);
-+ /* function exit code */
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__set__", 0);
-+ __Pyx_INCREF(__pyx_v_value);
-+ __Pyx_GIVEREF(__pyx_v_value);
-+ __Pyx_GOTREF(__pyx_v_self->text);
-+ __Pyx_DECREF(__pyx_v_self->text);
-+ __pyx_v_self->text = __pyx_v_value;
-+
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__del__", 0);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ __Pyx_GOTREF(__pyx_v_self->text);
-+ __Pyx_DECREF(__pyx_v_self->text);
-+ __pyx_v_self->text = Py_None;
-+
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__get__", 0);
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v_self->log_level);
-+ __pyx_r = __pyx_v_self->log_level;
-+ goto __pyx_L0;
-+
-+ /* function exit code */
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__set__", 0);
-+ __Pyx_INCREF(__pyx_v_value);
-+ __Pyx_GIVEREF(__pyx_v_value);
-+ __Pyx_GOTREF(__pyx_v_self->log_level);
-+ __Pyx_DECREF(__pyx_v_self->log_level);
-+ __pyx_v_self->log_level = __pyx_v_value;
-+
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__del__", 0);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ __Pyx_GOTREF(__pyx_v_self->log_level);
-+ __Pyx_DECREF(__pyx_v_self->log_level);
-+ __pyx_v_self->log_level = Py_None;
-+
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * cdef tuple state
-+ * cdef object _dict
-+ */
-+
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-+ PyObject *__pyx_v_state = 0;
-+ PyObject *__pyx_v__dict = 0;
-+ int __pyx_v_use_setstate;
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_2;
-+ int __pyx_t_3;
-+ PyObject *__pyx_t_4 = NULL;
-+ int __pyx_t_5;
-+ PyObject *__pyx_t_6 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-+
-+ /* "(tree fragment)":5
-+ * cdef object _dict
-+ * cdef bint use_setstate
-+ * state = (self.level, self.log_level, self.prefix, self.text) # <<<<<<<<<<<<<<
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None:
-+ */
-+ __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_INCREF(__pyx_v_self->level);
-+ __Pyx_GIVEREF(__pyx_v_self->level);
-+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->level);
-+ __Pyx_INCREF(__pyx_v_self->log_level);
-+ __Pyx_GIVEREF(__pyx_v_self->log_level);
-+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->log_level);
-+ __Pyx_INCREF(__pyx_v_self->prefix);
-+ __Pyx_GIVEREF(__pyx_v_self->prefix);
-+ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->prefix);
-+ __Pyx_INCREF(__pyx_v_self->text);
-+ __Pyx_GIVEREF(__pyx_v_self->text);
-+ PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->text);
- __pyx_v_state = ((PyObject*)__pyx_t_1);
- __pyx_t_1 = 0;
-
- /* "(tree fragment)":6
- * cdef bint use_setstate
-- * state = (self.arg0, self.type)
-+ * state = (self.level, self.log_level, self.prefix, self.text)
- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
- * if _dict is not None:
- * state += (_dict,)
-@@ -3967,7 +4184,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
- __pyx_t_1 = 0;
-
- /* "(tree fragment)":7
-- * state = (self.arg0, self.type)
-+ * state = (self.level, self.log_level, self.prefix, self.text)
- * _dict = getattr(self, '__dict__', None)
- * if _dict is not None: # <<<<<<<<<<<<<<
- * state += (_dict,)
-@@ -4000,12 +4217,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
- * state += (_dict,)
- * use_setstate = True # <<<<<<<<<<<<<<
- * else:
-- * use_setstate = self.arg0 is not None or self.type is not None
-+ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
- */
- __pyx_v_use_setstate = 1;
-
- /* "(tree fragment)":7
-- * state = (self.arg0, self.type)
-+ * state = (self.level, self.log_level, self.prefix, self.text)
- * _dict = getattr(self, '__dict__', None)
- * if _dict is not None: # <<<<<<<<<<<<<<
- * state += (_dict,)
-@@ -4017,19 +4234,33 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
- /* "(tree fragment)":11
- * use_setstate = True
- * else:
-- * use_setstate = self.arg0 is not None or self.type is not None # <<<<<<<<<<<<<<
-+ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None # <<<<<<<<<<<<<<
- * if use_setstate:
-- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
-+ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
- */
- /*else*/ {
-- __pyx_t_2 = (__pyx_v_self->arg0 != Py_None);
-+ __pyx_t_2 = (__pyx_v_self->level != Py_None);
-+ __pyx_t_5 = (__pyx_t_2 != 0);
-+ if (!__pyx_t_5) {
-+ } else {
-+ __pyx_t_3 = __pyx_t_5;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_5 = (__pyx_v_self->log_level != Py_None);
-+ __pyx_t_2 = (__pyx_t_5 != 0);
-+ if (!__pyx_t_2) {
-+ } else {
-+ __pyx_t_3 = __pyx_t_2;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_2 = (__pyx_v_self->prefix != Py_None);
- __pyx_t_5 = (__pyx_t_2 != 0);
- if (!__pyx_t_5) {
- } else {
- __pyx_t_3 = __pyx_t_5;
- goto __pyx_L4_bool_binop_done;
- }
-- __pyx_t_5 = (__pyx_v_self->type != Py_None);
-+ __pyx_t_5 = (__pyx_v_self->text != Py_None);
- __pyx_t_2 = (__pyx_t_5 != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L4_bool_binop_done:;
-@@ -4039,32 +4270,32 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
-
- /* "(tree fragment)":12
- * else:
-- * use_setstate = self.arg0 is not None or self.type is not None
-+ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
- * if use_setstate: # <<<<<<<<<<<<<<
-- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
-+ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
- * else:
- */
- __pyx_t_3 = (__pyx_v_use_setstate != 0);
- if (__pyx_t_3) {
-
- /* "(tree fragment)":13
-- * use_setstate = self.arg0 is not None or self.type is not None
-+ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
- * if use_setstate:
-- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state # <<<<<<<<<<<<<<
-+ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state # <<<<<<<<<<<<<<
- * else:
-- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
-+ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
- */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_InputDispatch); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_INCREF(__pyx_int_200688041);
-- __Pyx_GIVEREF(__pyx_int_200688041);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_200688041);
-+ __Pyx_INCREF(__pyx_int_142036910);
-+ __Pyx_GIVEREF(__pyx_int_142036910);
-+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
- __Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
-@@ -4085,32 +4316,32 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
-
- /* "(tree fragment)":12
- * else:
-- * use_setstate = self.arg0 is not None or self.type is not None
-+ * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
- * if use_setstate: # <<<<<<<<<<<<<<
-- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
-+ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
- * else:
- */
- }
-
- /* "(tree fragment)":15
-- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, None), state
-+ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
- * else:
-- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state) # <<<<<<<<<<<<<<
-+ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state) # <<<<<<<<<<<<<<
- * def __setstate_cython__(self, __pyx_state):
-- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state)
-+ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
- */
- /*else*/ {
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_InputDispatch); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_INCREF(__pyx_int_200688041);
-- __Pyx_GIVEREF(__pyx_int_200688041);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_200688041);
-+ __Pyx_INCREF(__pyx_int_142036910);
-+ __Pyx_GIVEREF(__pyx_int_142036910);
-+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
- __Pyx_INCREF(__pyx_v_state);
- __Pyx_GIVEREF(__pyx_v_state);
- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
-@@ -4138,7 +4369,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.InputDispatch.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XDECREF(__pyx_v_state);
-@@ -4150,25 +4381,25 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch___reduce_cython_
-
- /* "(tree fragment)":16
- * else:
-- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
-+ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state)
-+ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-@@ -4178,20 +4409,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cyth
- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-
- /* "(tree fragment)":17
-- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
-+ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
- * def __setstate_cython__(self, __pyx_state):
-- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
- */
- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
- /* "(tree fragment)":16
- * else:
-- * return __pyx_unpickle_InputDispatch, (type(self), 0xbf641a9, state)
-+ * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_unpickle_InputDispatch__set_state(self, __pyx_state)
-+ * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
- */
-
- /* function exit code */
-@@ -4199,7 +4430,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cyth
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.InputDispatch.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
-@@ -4207,1494 +4438,1687 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13InputDispatch_2__setstate_cyth
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":189
-- * cdef public object prefix, level, text, log_level
-+/* "vidcutter/libs/pympv/mpv.pyx":197
- *
-- * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
-- * self.level = _strdec(msg.level)
-- * self.prefix = _strdec(msg.prefix)
-+ *
-+ * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
-+ * if node.format == MPV_FORMAT_STRING:
-+ * return _strdec(node.u.string)
- */
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, struct mpv_event_log_message *__pyx_v_msg) {
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_node __pyx_v_node) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
-+ int __pyx_t_5;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_init", 0);
-+ __Pyx_RefNannySetupContext("_convert_node_value", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":190
-+ /* "vidcutter/libs/pympv/mpv.pyx":198
- *
-- * cdef _init(self, mpv_event_log_message* msg):
-- * self.level = _strdec(msg.level) # <<<<<<<<<<<<<<
-- * self.prefix = _strdec(msg.prefix)
-- * self.text = _strdec(msg.text)
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->level);
-- __Pyx_DECREF(__pyx_v_self->level);
-- __pyx_v_self->level = __pyx_t_1;
-- __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":191
-- * cdef _init(self, mpv_event_log_message* msg):
-- * self.level = _strdec(msg.level)
-- * self.prefix = _strdec(msg.prefix) # <<<<<<<<<<<<<<
-- * self.text = _strdec(msg.text)
-- * self.log_level = msg.log_level
-+ * cdef _convert_node_value(mpv_node node):
-+ * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-+ * return _strdec(node.u.string)
-+ * elif node.format == MPV_FORMAT_FLAG:
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->prefix);
-- __Pyx_DECREF(__pyx_v_self->prefix);
-- __pyx_v_self->prefix = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ switch (__pyx_v_node.format) {
-+ case MPV_FORMAT_STRING:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":192
-- * self.level = _strdec(msg.level)
-- * self.prefix = _strdec(msg.prefix)
-- * self.text = _strdec(msg.text) # <<<<<<<<<<<<<<
-- * self.log_level = msg.log_level
-- * return self
-+ /* "vidcutter/libs/pympv/mpv.pyx":199
-+ * cdef _convert_node_value(mpv_node node):
-+ * if node.format == MPV_FORMAT_STRING:
-+ * return _strdec(node.u.string) # <<<<<<<<<<<<<<
-+ * elif node.format == MPV_FORMAT_FLAG:
-+ * return not not int(node.u.flag)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
- }
-- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->text);
-- __Pyx_DECREF(__pyx_v_self->text);
-- __pyx_v_self->text = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":193
-- * self.prefix = _strdec(msg.prefix)
-- * self.text = _strdec(msg.text)
-- * self.log_level = msg.log_level # <<<<<<<<<<<<<<
-- * return self
-+ /* "vidcutter/libs/pympv/mpv.pyx":198
- *
-+ * cdef _convert_node_value(mpv_node node):
-+ * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-+ * return _strdec(node.u.string)
-+ * elif node.format == MPV_FORMAT_FLAG:
- */
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->log_level);
-- __Pyx_DECREF(__pyx_v_self->log_level);
-- __pyx_v_self->log_level = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ break;
-+ case MPV_FORMAT_FLAG:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":194
-- * self.text = _strdec(msg.text)
-- * self.log_level = msg.log_level
-- * return self # <<<<<<<<<<<<<<
-- *
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":201
-+ * return _strdec(node.u.string)
-+ * elif node.format == MPV_FORMAT_FLAG:
-+ * return not not int(node.u.flag) # <<<<<<<<<<<<<<
-+ * elif node.format == MPV_FORMAT_INT64:
-+ * return int(node.u.int64)
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(((PyObject *)__pyx_v_self));
-- __pyx_r = ((PyObject *)__pyx_v_self);
-- goto __pyx_L0;
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_r = __pyx_t_2;
-+ __pyx_t_2 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":189
-- * cdef public object prefix, level, text, log_level
-- *
-- * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
-- * self.level = _strdec(msg.level)
-- * self.prefix = _strdec(msg.prefix)
-+ /* "vidcutter/libs/pympv/mpv.pyx":200
-+ * if node.format == MPV_FORMAT_STRING:
-+ * return _strdec(node.u.string)
-+ * elif node.format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
-+ * return not not int(node.u.flag)
-+ * elif node.format == MPV_FORMAT_INT64:
- */
-+ break;
-+ case MPV_FORMAT_INT64:
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":203
-+ * return not not int(node.u.flag)
-+ * elif node.format == MPV_FORMAT_INT64:
-+ * return int(node.u.int64) # <<<<<<<<<<<<<<
-+ * elif node.format == MPV_FORMAT_DOUBLE:
-+ * return float(node.u.double_)
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
--/* "vidcutter/libs/pympv/mpv.pyx":187
-- * Wraps: mpv_event_log_message
-- * """
-- * cdef public object prefix, level, text, log_level # <<<<<<<<<<<<<<
-- *
-- * cdef _init(self, mpv_event_log_message* msg):
-+ /* "vidcutter/libs/pympv/mpv.pyx":202
-+ * elif node.format == MPV_FORMAT_FLAG:
-+ * return not not int(node.u.flag)
-+ * elif node.format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
-+ * return int(node.u.int64)
-+ * elif node.format == MPV_FORMAT_DOUBLE:
- */
-+ break;
-+ case MPV_FORMAT_DOUBLE:
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__", 0);
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_self->prefix);
-- __pyx_r = __pyx_v_self->prefix;
-- goto __pyx_L0;
--
-- /* function exit code */
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":205
-+ * return int(node.u.int64)
-+ * elif node.format == MPV_FORMAT_DOUBLE:
-+ * return float(node.u.double_) # <<<<<<<<<<<<<<
-+ * elif node.format == MPV_FORMAT_NODE_MAP:
-+ * return _convert_value(node.u.list, node.format)
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+ /* "vidcutter/libs/pympv/mpv.pyx":204
-+ * elif node.format == MPV_FORMAT_INT64:
-+ * return int(node.u.int64)
-+ * elif node.format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
-+ * return float(node.u.double_)
-+ * elif node.format == MPV_FORMAT_NODE_MAP:
-+ */
-+ break;
-+ case MPV_FORMAT_NODE_MAP:
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":207
-+ * return float(node.u.double_)
-+ * elif node.format == MPV_FORMAT_NODE_MAP:
-+ * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
-+ * elif node.format == MPV_FORMAT_NODE_ARRAY:
-+ * return _convert_value(node.u.list, node.format)
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__", 0);
-- __Pyx_INCREF(__pyx_v_value);
-- __Pyx_GIVEREF(__pyx_v_value);
-- __Pyx_GOTREF(__pyx_v_self->prefix);
-- __Pyx_DECREF(__pyx_v_self->prefix);
-- __pyx_v_self->prefix = __pyx_v_value;
-+ /* "vidcutter/libs/pympv/mpv.pyx":206
-+ * elif node.format == MPV_FORMAT_DOUBLE:
-+ * return float(node.u.double_)
-+ * elif node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-+ * return _convert_value(node.u.list, node.format)
-+ * elif node.format == MPV_FORMAT_NODE_ARRAY:
-+ */
-+ break;
-+ case MPV_FORMAT_NODE_ARRAY:
-
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":209
-+ * return _convert_value(node.u.list, node.format)
-+ * elif node.format == MPV_FORMAT_NODE_ARRAY:
-+ * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
-+ * return None
-+ *
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(PyObject *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-+ /* "vidcutter/libs/pympv/mpv.pyx":208
-+ * elif node.format == MPV_FORMAT_NODE_MAP:
-+ * return _convert_value(node.u.list, node.format)
-+ * elif node.format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
-+ * return _convert_value(node.u.list, node.format)
-+ * return None
-+ */
-+ break;
-+ default: break;
-+ }
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":210
-+ * elif node.format == MPV_FORMAT_NODE_ARRAY:
-+ * return _convert_value(node.u.list, node.format)
-+ * return None # <<<<<<<<<<<<<<
-+ *
-+ *
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_6prefix_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__", 0);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->prefix);
-- __Pyx_DECREF(__pyx_v_self->prefix);
-- __pyx_v_self->prefix = Py_None;
-+ /* "vidcutter/libs/pympv/mpv.pyx":197
-+ *
-+ *
-+ * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
-+ * if node.format == MPV_FORMAT_STRING:
-+ * return _strdec(node.u.string)
-+ */
-
- /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._convert_node_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+/* "vidcutter/libs/pympv/mpv.pyx":213
-+ *
-+ *
-+ * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
-+ * cdef mpv_node node
-+ * cdef mpv_node_list nodelist
-+ */
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data, enum mpv_format __pyx_v_format) {
-+ struct mpv_node __pyx_v_node;
-+ struct mpv_node_list __pyx_v_nodelist;
-+ PyObject *__pyx_v_values = NULL;
-+ int __pyx_v_i;
-+ PyObject *__pyx_v_value = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__", 0);
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_self->level);
-- __pyx_r = __pyx_v_self->level;
-- goto __pyx_L0;
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_2;
-+ int __pyx_t_3;
-+ int __pyx_t_4;
-+ int __pyx_t_5;
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ PyObject *__pyx_t_8 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("_convert_value", 0);
-
-- /* function exit code */
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":216
-+ * cdef mpv_node node
-+ * cdef mpv_node_list nodelist
-+ * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
-+ * node = (<mpv_node*>data)[0]
-+ * return _convert_node_value(node)
-+ */
-+ switch (__pyx_v_format) {
-+ case MPV_FORMAT_NODE:
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+ /* "vidcutter/libs/pympv/mpv.pyx":217
-+ * cdef mpv_node_list nodelist
-+ * if format == MPV_FORMAT_NODE:
-+ * node = (<mpv_node*>data)[0] # <<<<<<<<<<<<<<
-+ * return _convert_node_value(node)
-+ * elif format == MPV_FORMAT_NODE_ARRAY:
-+ */
-+ __pyx_v_node = (((struct mpv_node *)__pyx_v_data)[0]);
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":218
-+ * if format == MPV_FORMAT_NODE:
-+ * node = (<mpv_node*>data)[0]
-+ * return _convert_node_value(node) # <<<<<<<<<<<<<<
-+ * elif format == MPV_FORMAT_NODE_ARRAY:
-+ * nodelist = (<mpv_node_list*>data)[0]
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__", 0);
-- __Pyx_INCREF(__pyx_v_value);
-- __Pyx_GIVEREF(__pyx_v_value);
-- __Pyx_GOTREF(__pyx_v_self->level);
-- __Pyx_DECREF(__pyx_v_self->level);
-- __pyx_v_self->level = __pyx_v_value;
-+ /* "vidcutter/libs/pympv/mpv.pyx":216
-+ * cdef mpv_node node
-+ * cdef mpv_node_list nodelist
-+ * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
-+ * node = (<mpv_node*>data)[0]
-+ * return _convert_node_value(node)
-+ */
-+ break;
-+ case MPV_FORMAT_NODE_ARRAY:
-
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":220
-+ * return _convert_node_value(node)
-+ * elif format == MPV_FORMAT_NODE_ARRAY:
-+ * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
-+ * values = []
-+ * for i in range(nodelist.num):
-+ */
-+ __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(PyObject *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-+ /* "vidcutter/libs/pympv/mpv.pyx":221
-+ * elif format == MPV_FORMAT_NODE_ARRAY:
-+ * nodelist = (<mpv_node_list*>data)[0]
-+ * values = [] # <<<<<<<<<<<<<<
-+ * for i in range(nodelist.num):
-+ * values.append(_convert_node_value(nodelist.values[i]))
-+ */
-+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_v_values = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":222
-+ * nodelist = (<mpv_node_list*>data)[0]
-+ * values = []
-+ * for i in range(nodelist.num): # <<<<<<<<<<<<<<
-+ * values.append(_convert_node_value(nodelist.values[i]))
-+ * return values
-+ */
-+ __pyx_t_2 = __pyx_v_nodelist.num;
-+ __pyx_t_3 = __pyx_t_2;
-+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
-+ __pyx_v_i = __pyx_t_4;
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_5level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__", 0);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->level);
-- __Pyx_DECREF(__pyx_v_self->level);
-- __pyx_v_self->level = Py_None;
-+ /* "vidcutter/libs/pympv/mpv.pyx":223
-+ * values = []
-+ * for i in range(nodelist.num):
-+ * values.append(_convert_node_value(nodelist.values[i])) # <<<<<<<<<<<<<<
-+ * return values
-+ * elif format == MPV_FORMAT_NODE_MAP:
-+ */
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ }
-
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":224
-+ * for i in range(nodelist.num):
-+ * values.append(_convert_node_value(nodelist.values[i]))
-+ * return values # <<<<<<<<<<<<<<
-+ * elif format == MPV_FORMAT_NODE_MAP:
-+ * nodelist = (<mpv_node_list*>data)[0]
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v_values);
-+ __pyx_r = __pyx_v_values;
-+ goto __pyx_L0;
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-+ /* "vidcutter/libs/pympv/mpv.pyx":219
-+ * node = (<mpv_node*>data)[0]
-+ * return _convert_node_value(node)
-+ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
-+ * nodelist = (<mpv_node_list*>data)[0]
-+ * values = []
-+ */
-+ break;
-+ case MPV_FORMAT_NODE_MAP:
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":226
-+ * return values
-+ * elif format == MPV_FORMAT_NODE_MAP:
-+ * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
-+ * values = {}
-+ * for i in range(nodelist.num):
-+ */
-+ __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__", 0);
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_self->text);
-- __pyx_r = __pyx_v_self->text;
-- goto __pyx_L0;
-+ /* "vidcutter/libs/pympv/mpv.pyx":227
-+ * elif format == MPV_FORMAT_NODE_MAP:
-+ * nodelist = (<mpv_node_list*>data)[0]
-+ * values = {} # <<<<<<<<<<<<<<
-+ * for i in range(nodelist.num):
-+ * value = _convert_node_value(nodelist.values[i])
-+ */
-+ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_v_values = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
-- /* function exit code */
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":228
-+ * nodelist = (<mpv_node_list*>data)[0]
-+ * values = {}
-+ * for i in range(nodelist.num): # <<<<<<<<<<<<<<
-+ * value = _convert_node_value(nodelist.values[i])
-+ * values[_strdec(nodelist.keys[i])] = value
-+ */
-+ __pyx_t_2 = __pyx_v_nodelist.num;
-+ __pyx_t_3 = __pyx_t_2;
-+ for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
-+ __pyx_v_i = __pyx_t_4;
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+ /* "vidcutter/libs/pympv/mpv.pyx":229
-+ * values = {}
-+ * for i in range(nodelist.num):
-+ * value = _convert_node_value(nodelist.values[i]) # <<<<<<<<<<<<<<
-+ * values[_strdec(nodelist.keys[i])] = value
-+ * return values
-+ */
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
-+ __pyx_t_1 = 0;
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":230
-+ * for i in range(nodelist.num):
-+ * value = _convert_node_value(nodelist.values[i])
-+ * values[_strdec(nodelist.keys[i])] = value # <<<<<<<<<<<<<<
-+ * return values
-+ * elif format == MPV_FORMAT_STRING:
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_8 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_8)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_8);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
-+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__", 0);
-- __Pyx_INCREF(__pyx_v_value);
-- __Pyx_GIVEREF(__pyx_v_value);
-- __Pyx_GOTREF(__pyx_v_self->text);
-- __Pyx_DECREF(__pyx_v_self->text);
-- __pyx_v_self->text = __pyx_v_value;
-+ /* "vidcutter/libs/pympv/mpv.pyx":231
-+ * value = _convert_node_value(nodelist.values[i])
-+ * values[_strdec(nodelist.keys[i])] = value
-+ * return values # <<<<<<<<<<<<<<
-+ * elif format == MPV_FORMAT_STRING:
-+ * return _strdec(((<char**>data)[0]))
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v_values);
-+ __pyx_r = __pyx_v_values;
-+ goto __pyx_L0;
-
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":225
-+ * values.append(_convert_node_value(nodelist.values[i]))
-+ * return values
-+ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-+ * nodelist = (<mpv_node_list*>data)[0]
-+ * values = {}
-+ */
-+ break;
-+ case MPV_FORMAT_STRING:
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(PyObject *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_4text_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__", 0);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->text);
-- __Pyx_DECREF(__pyx_v_self->text);
-- __pyx_v_self->text = Py_None;
--
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":233
-+ * return values
-+ * elif format == MPV_FORMAT_STRING:
-+ * return _strdec(((<char**>data)[0])) # <<<<<<<<<<<<<<
-+ * elif format == MPV_FORMAT_FLAG:
-+ * return not not (<uint64_t*>data)[0]
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_8 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_8)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_8);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
-+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__", 0);
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_self->log_level);
-- __pyx_r = __pyx_v_self->log_level;
-- goto __pyx_L0;
-+ /* "vidcutter/libs/pympv/mpv.pyx":232
-+ * values[_strdec(nodelist.keys[i])] = value
-+ * return values
-+ * elif format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-+ * return _strdec(((<char**>data)[0]))
-+ * elif format == MPV_FORMAT_FLAG:
-+ */
-+ break;
-+ case MPV_FORMAT_FLAG:
-
-- /* function exit code */
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":235
-+ * return _strdec(((<char**>data)[0]))
-+ * elif format == MPV_FORMAT_FLAG:
-+ * return not not (<uint64_t*>data)[0] # <<<<<<<<<<<<<<
-+ * elif format == MPV_FORMAT_INT64:
-+ * return int((<uint64_t*>data)[0])
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+ /* "vidcutter/libs/pympv/mpv.pyx":234
-+ * elif format == MPV_FORMAT_STRING:
-+ * return _strdec(((<char**>data)[0]))
-+ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
-+ * return not not (<uint64_t*>data)[0]
-+ * elif format == MPV_FORMAT_INT64:
-+ */
-+ break;
-+ case MPV_FORMAT_INT64:
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":237
-+ * return not not (<uint64_t*>data)[0]
-+ * elif format == MPV_FORMAT_INT64:
-+ * return int((<uint64_t*>data)[0]) # <<<<<<<<<<<<<<
-+ * elif format == MPV_FORMAT_DOUBLE:
-+ * return float((<double*>data)[0])
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_r = __pyx_t_6;
-+ __pyx_t_6 = 0;
-+ goto __pyx_L0;
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__", 0);
-- __Pyx_INCREF(__pyx_v_value);
-- __Pyx_GIVEREF(__pyx_v_value);
-- __Pyx_GOTREF(__pyx_v_self->log_level);
-- __Pyx_DECREF(__pyx_v_self->log_level);
-- __pyx_v_self->log_level = __pyx_v_value;
-+ /* "vidcutter/libs/pympv/mpv.pyx":236
-+ * elif format == MPV_FORMAT_FLAG:
-+ * return not not (<uint64_t*>data)[0]
-+ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
-+ * return int((<uint64_t*>data)[0])
-+ * elif format == MPV_FORMAT_DOUBLE:
-+ */
-+ break;
-+ case MPV_FORMAT_DOUBLE:
-
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":239
-+ * return int((<uint64_t*>data)[0])
-+ * elif format == MPV_FORMAT_DOUBLE:
-+ * return float((<double*>data)[0]) # <<<<<<<<<<<<<<
-+ * return None
-+ *
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_r = __pyx_t_6;
-+ __pyx_t_6 = 0;
-+ goto __pyx_L0;
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(PyObject *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-+ /* "vidcutter/libs/pympv/mpv.pyx":238
-+ * elif format == MPV_FORMAT_INT64:
-+ * return int((<uint64_t*>data)[0])
-+ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
-+ * return float((<double*>data)[0])
-+ * return None
-+ */
-+ break;
-+ default: break;
-+ }
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":240
-+ * elif format == MPV_FORMAT_DOUBLE:
-+ * return float((<double*>data)[0])
-+ * return None # <<<<<<<<<<<<<<
-+ *
-+ *
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_9log_level_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__", 0);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->log_level);
-- __Pyx_DECREF(__pyx_v_self->log_level);
-- __pyx_v_self->log_level = Py_None;
-+ /* "vidcutter/libs/pympv/mpv.pyx":213
-+ *
-+ *
-+ * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
-+ * cdef mpv_node node
-+ * cdef mpv_node_list nodelist
-+ */
-
- /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_XDECREF(__pyx_t_8);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._convert_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
-+ __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_values);
-+ __Pyx_XDECREF(__pyx_v_value);
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * cdef tuple state
-- * cdef object _dict
-+/* "vidcutter/libs/pympv/mpv.pyx":250
-+ * cdef public object name, data
-+ *
-+ * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
-+ * self.name = _strdec(prop.name)
-+ * self.data = _convert_value(prop.data, prop.format)
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-- PyObject *__pyx_r = 0;
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, struct mpv_event_property *__pyx_v_prop) {
-+ PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self));
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("_init", 0);
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self) {
-- PyObject *__pyx_v_state = 0;
-- PyObject *__pyx_v__dict = 0;
-- int __pyx_v_use_setstate;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- int __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- int __pyx_t_5;
-- PyObject *__pyx_t_6 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
--
-- /* "(tree fragment)":5
-- * cdef object _dict
-- * cdef bint use_setstate
-- * state = (self.level, self.log_level, self.prefix, self.text) # <<<<<<<<<<<<<<
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None:
-+ /* "vidcutter/libs/pympv/mpv.pyx":251
-+ *
-+ * cdef _init(self, mpv_event_property* prop):
-+ * self.name = _strdec(prop.name) # <<<<<<<<<<<<<<
-+ * self.data = _convert_value(prop.data, prop.format)
-+ * return self
- */
-- __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(__pyx_v_self->level);
-- __Pyx_GIVEREF(__pyx_v_self->level);
-- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->level);
-- __Pyx_INCREF(__pyx_v_self->log_level);
-- __Pyx_GIVEREF(__pyx_v_self->log_level);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->log_level);
-- __Pyx_INCREF(__pyx_v_self->prefix);
-- __Pyx_GIVEREF(__pyx_v_self->prefix);
-- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->prefix);
-- __Pyx_INCREF(__pyx_v_self->text);
-- __Pyx_GIVEREF(__pyx_v_self->text);
-- PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->text);
-- __pyx_v_state = ((PyObject*)__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v_self->name);
-+ __Pyx_DECREF(__pyx_v_self->name);
-+ __pyx_v_self->name = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "(tree fragment)":6
-- * cdef bint use_setstate
-- * state = (self.level, self.log_level, self.prefix, self.text)
-- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
-- * if _dict is not None:
-- * state += (_dict,)
-+ /* "vidcutter/libs/pympv/mpv.pyx":252
-+ * cdef _init(self, mpv_event_property* prop):
-+ * self.name = _strdec(prop.name)
-+ * self.data = _convert_value(prop.data, prop.format) # <<<<<<<<<<<<<<
-+ * return self
-+ *
- */
-- __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v__dict = __pyx_t_1;
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v_self->data);
-+ __Pyx_DECREF(__pyx_v_self->data);
-+ __pyx_v_self->data = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "(tree fragment)":7
-- * state = (self.level, self.log_level, self.prefix, self.text)
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None: # <<<<<<<<<<<<<<
-- * state += (_dict,)
-- * use_setstate = True
-+ /* "vidcutter/libs/pympv/mpv.pyx":253
-+ * self.name = _strdec(prop.name)
-+ * self.data = _convert_value(prop.data, prop.format)
-+ * return self # <<<<<<<<<<<<<<
-+ *
-+ *
- */
-- __pyx_t_2 = (__pyx_v__dict != Py_None);
-- __pyx_t_3 = (__pyx_t_2 != 0);
-- if (__pyx_t_3) {
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
-+ __pyx_r = ((PyObject *)__pyx_v_self);
-+ goto __pyx_L0;
-
-- /* "(tree fragment)":8
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None:
-- * state += (_dict,) # <<<<<<<<<<<<<<
-- * use_setstate = True
-- * else:
-+ /* "vidcutter/libs/pympv/mpv.pyx":250
-+ * cdef public object name, data
-+ *
-+ * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
-+ * self.name = _strdec(prop.name)
-+ * self.data = _convert_value(prop.data, prop.format)
- */
-- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(__pyx_v__dict);
-- __Pyx_GIVEREF(__pyx_v__dict);
-- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
-- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
-- __pyx_t_4 = 0;
-
-- /* "(tree fragment)":9
-- * if _dict is not None:
-- * state += (_dict,)
-- * use_setstate = True # <<<<<<<<<<<<<<
-- * else:
-- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
-- */
-- __pyx_v_use_setstate = 1;
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Property._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "(tree fragment)":7
-- * state = (self.level, self.log_level, self.prefix, self.text)
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None: # <<<<<<<<<<<<<<
-- * state += (_dict,)
-- * use_setstate = True
-+/* "vidcutter/libs/pympv/mpv.pyx":248
-+ * Wraps: mpv_event_property
-+ * """
-+ * cdef public object name, data # <<<<<<<<<<<<<<
-+ *
-+ * cdef _init(self, mpv_event_property* prop):
- */
-- goto __pyx_L3;
-- }
-
-- /* "(tree fragment)":11
-- * use_setstate = True
-- * else:
-- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None # <<<<<<<<<<<<<<
-- * if use_setstate:
-- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
-- */
-- /*else*/ {
-- __pyx_t_2 = (__pyx_v_self->level != Py_None);
-- __pyx_t_5 = (__pyx_t_2 != 0);
-- if (!__pyx_t_5) {
-- } else {
-- __pyx_t_3 = __pyx_t_5;
-- goto __pyx_L4_bool_binop_done;
-- }
-- __pyx_t_5 = (__pyx_v_self->log_level != Py_None);
-- __pyx_t_2 = (__pyx_t_5 != 0);
-- if (!__pyx_t_2) {
-- } else {
-- __pyx_t_3 = __pyx_t_2;
-- goto __pyx_L4_bool_binop_done;
-- }
-- __pyx_t_2 = (__pyx_v_self->prefix != Py_None);
-- __pyx_t_5 = (__pyx_t_2 != 0);
-- if (!__pyx_t_5) {
-- } else {
-- __pyx_t_3 = __pyx_t_5;
-- goto __pyx_L4_bool_binop_done;
-- }
-- __pyx_t_5 = (__pyx_v_self->text != Py_None);
-- __pyx_t_2 = (__pyx_t_5 != 0);
-- __pyx_t_3 = __pyx_t_2;
-- __pyx_L4_bool_binop_done:;
-- __pyx_v_use_setstate = __pyx_t_3;
-- }
-- __pyx_L3:;
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
-
-- /* "(tree fragment)":12
-- * else:
-- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
-- * if use_setstate: # <<<<<<<<<<<<<<
-- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
-- * else:
-- */
-- __pyx_t_3 = (__pyx_v_use_setstate != 0);
-- if (__pyx_t_3) {
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "(tree fragment)":13
-- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
-- * if use_setstate:
-- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state # <<<<<<<<<<<<<<
-- * else:
-- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_INCREF(__pyx_int_142036910);
-- __Pyx_GIVEREF(__pyx_int_142036910);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
-- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_GIVEREF(__pyx_t_4);
-- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
-- __Pyx_GIVEREF(__pyx_t_1);
-- PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
-- __Pyx_INCREF(__pyx_v_state);
-- __Pyx_GIVEREF(__pyx_v_state);
-- PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
-- __pyx_t_4 = 0;
-- __pyx_t_1 = 0;
-- __pyx_r = __pyx_t_6;
-- __pyx_t_6 = 0;
-- goto __pyx_L0;
--
-- /* "(tree fragment)":12
-- * else:
-- * use_setstate = self.level is not None or self.log_level is not None or self.prefix is not None or self.text is not None
-- * if use_setstate: # <<<<<<<<<<<<<<
-- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
-- * else:
-- */
-- }
--
-- /* "(tree fragment)":15
-- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, None), state
-- * else:
-- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state) # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
-- */
-- /*else*/ {
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_LogMessage); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_INCREF(__pyx_int_142036910);
-- __Pyx_GIVEREF(__pyx_int_142036910);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_142036910);
-- __Pyx_INCREF(__pyx_v_state);
-- __Pyx_GIVEREF(__pyx_v_state);
-- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
-- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_GIVEREF(__pyx_t_6);
-- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
-- __Pyx_GIVEREF(__pyx_t_1);
-- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
-- __pyx_t_6 = 0;
-- __pyx_t_1 = 0;
-- __pyx_r = __pyx_t_4;
-- __pyx_t_4 = 0;
-- goto __pyx_L0;
-- }
--
-- /* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * cdef tuple state
-- * cdef object _dict
-- */
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__get__", 0);
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v_self->name);
-+ __pyx_r = __pyx_v_self->name;
-+ goto __pyx_L0;
-
- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_state);
-- __Pyx_XDECREF(__pyx_v__dict);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "(tree fragment)":16
-- * else:
-- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
-- */
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__set__", 0);
-+ __Pyx_INCREF(__pyx_v_value);
-+ __Pyx_GIVEREF(__pyx_v_value);
-+ __Pyx_GOTREF(__pyx_v_self->name);
-+ __Pyx_DECREF(__pyx_v_self->name);
-+ __pyx_v_self->name = __pyx_v_value;
-+
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = 0;
-+static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self) {
-+ int __pyx_r;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = NULL;
-+static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
-+ int __pyx_r;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-+ __Pyx_RefNannySetupContext("__del__", 0);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ __Pyx_GOTREF(__pyx_v_self->name);
-+ __Pyx_DECREF(__pyx_v_self->name);
-+ __pyx_v_self->name = Py_None;
-
-- /* "(tree fragment)":17
-- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
-- * def __setstate_cython__(self, __pyx_state):
-- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
-- */
-- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "(tree fragment)":16
-- * else:
-- * return __pyx_unpickle_LogMessage, (type(self), 0x8774fae, state)
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_unpickle_LogMessage__set_state(self, __pyx_state)
-- */
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__get__", 0);
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v_self->data);
-+ __pyx_r = __pyx_v_self->data;
- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.LogMessage.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+
-+ /* function exit code */
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":197
-- *
-- *
-- * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
-- * if node.format == MPV_FORMAT_STRING:
-- * return _strdec(node.u.string)
-- */
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_node __pyx_v_node) {
-- PyObject *__pyx_r = NULL;
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- int __pyx_t_5;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_convert_node_value", 0);
-+ __Pyx_RefNannySetupContext("__set__", 0);
-+ __Pyx_INCREF(__pyx_v_value);
-+ __Pyx_GIVEREF(__pyx_v_value);
-+ __Pyx_GOTREF(__pyx_v_self->data);
-+ __Pyx_DECREF(__pyx_v_self->data);
-+ __pyx_v_self->data = __pyx_v_value;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":198
-- *
-- * cdef _convert_node_value(mpv_node node):
-- * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-- * return _strdec(node.u.string)
-- * elif node.format == MPV_FORMAT_FLAG:
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__del__", 0);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ __Pyx_GOTREF(__pyx_v_self->data);
-+ __Pyx_DECREF(__pyx_v_self->data);
-+ __pyx_v_self->data = Py_None;
-+
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * cdef tuple state
-+ * cdef object _dict
- */
-- switch (__pyx_v_node.format) {
-- case MPV_FORMAT_STRING:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":199
-- * cdef _convert_node_value(mpv_node node):
-- * if node.format == MPV_FORMAT_STRING:
-- * return _strdec(node.u.string) # <<<<<<<<<<<<<<
-- * elif node.format == MPV_FORMAT_FLAG:
-- * return not not int(node.u.flag)
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
-+ PyObject *__pyx_v_state = 0;
-+ PyObject *__pyx_v__dict = 0;
-+ int __pyx_v_use_setstate;
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_2;
-+ int __pyx_t_3;
-+ PyObject *__pyx_t_4 = NULL;
-+ int __pyx_t_5;
-+ PyObject *__pyx_t_6 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-+
-+ /* "(tree fragment)":5
-+ * cdef object _dict
-+ * cdef bint use_setstate
-+ * state = (self.data, self.name) # <<<<<<<<<<<<<<
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None:
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_INCREF(__pyx_v_self->data);
-+ __Pyx_GIVEREF(__pyx_v_self->data);
-+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->data);
-+ __Pyx_INCREF(__pyx_v_self->name);
-+ __Pyx_GIVEREF(__pyx_v_self->name);
-+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name);
-+ __pyx_v_state = ((PyObject*)__pyx_t_1);
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":198
-- *
-- * cdef _convert_node_value(mpv_node node):
-- * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-- * return _strdec(node.u.string)
-- * elif node.format == MPV_FORMAT_FLAG:
-+ /* "(tree fragment)":6
-+ * cdef bint use_setstate
-+ * state = (self.data, self.name)
-+ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
-+ * if _dict is not None:
-+ * state += (_dict,)
- */
-- break;
-- case MPV_FORMAT_FLAG:
-+ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_v__dict = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":201
-- * return _strdec(node.u.string)
-- * elif node.format == MPV_FORMAT_FLAG:
-- * return not not int(node.u.flag) # <<<<<<<<<<<<<<
-- * elif node.format == MPV_FORMAT_INT64:
-- * return int(node.u.int64)
-+ /* "(tree fragment)":7
-+ * state = (self.data, self.name)
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None: # <<<<<<<<<<<<<<
-+ * state += (_dict,)
-+ * use_setstate = True
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
-+ __pyx_t_2 = (__pyx_v__dict != Py_None);
-+ __pyx_t_3 = (__pyx_t_2 != 0);
-+ if (__pyx_t_3) {
-+
-+ /* "(tree fragment)":8
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None:
-+ * state += (_dict,) # <<<<<<<<<<<<<<
-+ * use_setstate = True
-+ * else:
-+ */
-+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_v__dict);
-+ __Pyx_GIVEREF(__pyx_v__dict);
-+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
-+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_r = __pyx_t_2;
-- __pyx_t_2 = 0;
-- goto __pyx_L0;
-+ __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
-+ __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":200
-- * if node.format == MPV_FORMAT_STRING:
-- * return _strdec(node.u.string)
-- * elif node.format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
-- * return not not int(node.u.flag)
-- * elif node.format == MPV_FORMAT_INT64:
-+ /* "(tree fragment)":9
-+ * if _dict is not None:
-+ * state += (_dict,)
-+ * use_setstate = True # <<<<<<<<<<<<<<
-+ * else:
-+ * use_setstate = self.data is not None or self.name is not None
- */
-- break;
-- case MPV_FORMAT_INT64:
-+ __pyx_v_use_setstate = 1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":203
-- * return not not int(node.u.flag)
-- * elif node.format == MPV_FORMAT_INT64:
-- * return int(node.u.int64) # <<<<<<<<<<<<<<
-- * elif node.format == MPV_FORMAT_DOUBLE:
-- * return float(node.u.double_)
-+ /* "(tree fragment)":7
-+ * state = (self.data, self.name)
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None: # <<<<<<<<<<<<<<
-+ * state += (_dict,)
-+ * use_setstate = True
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ goto __pyx_L3;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":202
-- * elif node.format == MPV_FORMAT_FLAG:
-- * return not not int(node.u.flag)
-- * elif node.format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
-- * return int(node.u.int64)
-- * elif node.format == MPV_FORMAT_DOUBLE:
-+ /* "(tree fragment)":11
-+ * use_setstate = True
-+ * else:
-+ * use_setstate = self.data is not None or self.name is not None # <<<<<<<<<<<<<<
-+ * if use_setstate:
-+ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
- */
-- break;
-- case MPV_FORMAT_DOUBLE:
-+ /*else*/ {
-+ __pyx_t_2 = (__pyx_v_self->data != Py_None);
-+ __pyx_t_5 = (__pyx_t_2 != 0);
-+ if (!__pyx_t_5) {
-+ } else {
-+ __pyx_t_3 = __pyx_t_5;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_5 = (__pyx_v_self->name != Py_None);
-+ __pyx_t_2 = (__pyx_t_5 != 0);
-+ __pyx_t_3 = __pyx_t_2;
-+ __pyx_L4_bool_binop_done:;
-+ __pyx_v_use_setstate = __pyx_t_3;
-+ }
-+ __pyx_L3:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":205
-- * return int(node.u.int64)
-- * elif node.format == MPV_FORMAT_DOUBLE:
-- * return float(node.u.double_) # <<<<<<<<<<<<<<
-- * elif node.format == MPV_FORMAT_NODE_MAP:
-- * return _convert_value(node.u.list, node.format)
-+ /* "(tree fragment)":12
-+ * else:
-+ * use_setstate = self.data is not None or self.name is not None
-+ * if use_setstate: # <<<<<<<<<<<<<<
-+ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
-+ * else:
-+ */
-+ __pyx_t_3 = (__pyx_v_use_setstate != 0);
-+ if (__pyx_t_3) {
-+
-+ /* "(tree fragment)":13
-+ * use_setstate = self.data is not None or self.name is not None
-+ * if use_setstate:
-+ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state # <<<<<<<<<<<<<<
-+ * else:
-+ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_INCREF(__pyx_int_5713169);
-+ __Pyx_GIVEREF(__pyx_int_5713169);
-+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
-+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __Pyx_GIVEREF(__pyx_t_4);
-+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
-+ __Pyx_INCREF(__pyx_v_state);
-+ __Pyx_GIVEREF(__pyx_v_state);
-+ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
-+ __pyx_t_4 = 0;
- __pyx_t_1 = 0;
-+ __pyx_r = __pyx_t_6;
-+ __pyx_t_6 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":204
-- * elif node.format == MPV_FORMAT_INT64:
-- * return int(node.u.int64)
-- * elif node.format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
-- * return float(node.u.double_)
-- * elif node.format == MPV_FORMAT_NODE_MAP:
-+ /* "(tree fragment)":12
-+ * else:
-+ * use_setstate = self.data is not None or self.name is not None
-+ * if use_setstate: # <<<<<<<<<<<<<<
-+ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
-+ * else:
- */
-- break;
-- case MPV_FORMAT_NODE_MAP:
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":207
-- * return float(node.u.double_)
-- * elif node.format == MPV_FORMAT_NODE_MAP:
-- * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
-- * elif node.format == MPV_FORMAT_NODE_ARRAY:
-- * return _convert_value(node.u.list, node.format)
-+ /* "(tree fragment)":15
-+ * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
-+ * else:
-+ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state) # <<<<<<<<<<<<<<
-+ * def __setstate_cython__(self, __pyx_state):
-+ * __pyx_unpickle_Property__set_state(self, __pyx_state)
- */
-+ /*else*/ {
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_INCREF(__pyx_int_5713169);
-+ __Pyx_GIVEREF(__pyx_int_5713169);
-+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
-+ __Pyx_INCREF(__pyx_v_state);
-+ __Pyx_GIVEREF(__pyx_v_state);
-+ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
-+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_GIVEREF(__pyx_t_6);
-+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
-+ __pyx_t_6 = 0;
- __pyx_t_1 = 0;
-+ __pyx_r = __pyx_t_4;
-+ __pyx_t_4 = 0;
- goto __pyx_L0;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":206
-- * elif node.format == MPV_FORMAT_DOUBLE:
-- * return float(node.u.double_)
-- * elif node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-- * return _convert_value(node.u.list, node.format)
-- * elif node.format == MPV_FORMAT_NODE_ARRAY:
-+ /* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * cdef tuple state
-+ * cdef object _dict
- */
-- break;
-- case MPV_FORMAT_NODE_ARRAY:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":209
-- * return _convert_value(node.u.list, node.format)
-- * elif node.format == MPV_FORMAT_NODE_ARRAY:
-- * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
-- * return None
-- *
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_state);
-+ __Pyx_XDECREF(__pyx_v__dict);
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":208
-- * elif node.format == MPV_FORMAT_NODE_MAP:
-- * return _convert_value(node.u.list, node.format)
-- * elif node.format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
-- * return _convert_value(node.u.list, node.format)
-- * return None
-+/* "(tree fragment)":16
-+ * else:
-+ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_Property__set_state(self, __pyx_state)
- */
-- break;
-- default: break;
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":210
-- * elif node.format == MPV_FORMAT_NODE_ARRAY:
-- * return _convert_value(node.u.list, node.format)
-- * return None # <<<<<<<<<<<<<<
-- *
-- *
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-+
-+ /* "(tree fragment)":17
-+ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
-+ * def __setstate_cython__(self, __pyx_state):
-+ * __pyx_unpickle_Property__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":197
-- *
-- *
-- * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
-- * if node.format == MPV_FORMAT_STRING:
-- * return _strdec(node.u.string)
-+ /* "(tree fragment)":16
-+ * else:
-+ * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_Property__set_state(self, __pyx_state)
- */
-
- /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._convert_node_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":213
-- *
-+/* "vidcutter/libs/pympv/mpv.pyx":263
- *
-- * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
-- * cdef mpv_node node
-- * cdef mpv_node_list nodelist
-+ * @property
-+ * def error_str(self): # <<<<<<<<<<<<<<
-+ * """mpv_error_string of the error proeprty"""
-+ * cdef const char* err_c
- */
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data, enum mpv_format __pyx_v_format) {
-- struct mpv_node __pyx_v_node;
-- struct mpv_node_list __pyx_v_nodelist;
-- PyObject *__pyx_v_values = NULL;
-- int __pyx_v_i;
-- PyObject *__pyx_v_value = NULL;
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-+ char const *__pyx_v_err_c;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- int __pyx_t_3;
-- int __pyx_t_4;
-- int __pyx_t_5;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-- PyObject *__pyx_t_8 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_convert_value", 0);
-+ __Pyx_RefNannySetupContext("__get__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":216
-- * cdef mpv_node node
-- * cdef mpv_node_list nodelist
-- * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
-- * node = (<mpv_node*>data)[0]
-- * return _convert_node_value(node)
-+ /* "vidcutter/libs/pympv/mpv.pyx":266
-+ * """mpv_error_string of the error proeprty"""
-+ * cdef const char* err_c
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err_c = mpv_error_string(self.error)
-+ * return _strdec(err_c)
- */
-- switch (__pyx_v_format) {
-- case MPV_FORMAT_NODE:
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":217
-- * cdef mpv_node_list nodelist
-- * if format == MPV_FORMAT_NODE:
-- * node = (<mpv_node*>data)[0] # <<<<<<<<<<<<<<
-- * return _convert_node_value(node)
-- * elif format == MPV_FORMAT_NODE_ARRAY:
-+ /* "vidcutter/libs/pympv/mpv.pyx":267
-+ * cdef const char* err_c
-+ * with nogil:
-+ * err_c = mpv_error_string(self.error) # <<<<<<<<<<<<<<
-+ * return _strdec(err_c)
-+ *
- */
-- __pyx_v_node = (((struct mpv_node *)__pyx_v_data)[0]);
-+ __pyx_v_err_c = mpv_error_string(__pyx_v_self->error);
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":218
-- * if format == MPV_FORMAT_NODE:
-- * node = (<mpv_node*>data)[0]
-- * return _convert_node_value(node) # <<<<<<<<<<<<<<
-- * elif format == MPV_FORMAT_NODE_ARRAY:
-- * nodelist = (<mpv_node_list*>data)[0]
-+ /* "vidcutter/libs/pympv/mpv.pyx":266
-+ * """mpv_error_string of the error proeprty"""
-+ * cdef const char* err_c
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err_c = mpv_error_string(self.error)
-+ * return _strdec(err_c)
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":216
-- * cdef mpv_node node
-- * cdef mpv_node_list nodelist
-- * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
-- * node = (<mpv_node*>data)[0]
-- * return _convert_node_value(node)
-+ /* "vidcutter/libs/pympv/mpv.pyx":268
-+ * with nogil:
-+ * err_c = mpv_error_string(self.error)
-+ * return _strdec(err_c) # <<<<<<<<<<<<<<
-+ *
-+ * cdef _data(self, mpv_event* event):
- */
-- break;
-- case MPV_FORMAT_NODE_ARRAY:
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":220
-- * return _convert_node_value(node)
-- * elif format == MPV_FORMAT_NODE_ARRAY:
-- * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
-- * values = []
-- * for i in range(nodelist.num):
-+ /* "vidcutter/libs/pympv/mpv.pyx":263
-+ *
-+ * @property
-+ * def error_str(self): # <<<<<<<<<<<<<<
-+ * """mpv_error_string of the error proeprty"""
-+ * cdef const char* err_c
- */
-- __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":221
-- * elif format == MPV_FORMAT_NODE_ARRAY:
-- * nodelist = (<mpv_node_list*>data)[0]
-- * values = [] # <<<<<<<<<<<<<<
-- * for i in range(nodelist.num):
-- * values.append(_convert_node_value(nodelist.values[i]))
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error_str.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* "vidcutter/libs/pympv/mpv.pyx":270
-+ * return _strdec(err_c)
-+ *
-+ * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
-+ * cdef void* data = event.data
-+ * cdef mpv_event_client_message* climsg
- */
-- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v_values = __pyx_t_1;
-- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":222
-- * nodelist = (<mpv_node_list*>data)[0]
-- * values = []
-- * for i in range(nodelist.num): # <<<<<<<<<<<<<<
-- * values.append(_convert_node_value(nodelist.values[i]))
-- * return values
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event) {
-+ void *__pyx_v_data;
-+ struct mpv_event_client_message *__pyx_v_climsg;
-+ PyObject *__pyx_v_args = NULL;
-+ int __pyx_v_num_args;
-+ int __pyx_v_i;
-+ PyObject *__pyx_v_arg = NULL;
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ void *__pyx_t_1;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ int __pyx_t_4;
-+ int __pyx_t_5;
-+ int __pyx_t_6;
-+ PyObject *__pyx_t_7 = NULL;
-+ int __pyx_t_8;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("_data", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":271
-+ *
-+ * cdef _data(self, mpv_event* event):
-+ * cdef void* data = event.data # <<<<<<<<<<<<<<
-+ * cdef mpv_event_client_message* climsg
-+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
- */
-- __pyx_t_2 = __pyx_v_nodelist.num;
-- __pyx_t_3 = __pyx_t_2;
-- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
-- __pyx_v_i = __pyx_t_4;
-+ __pyx_t_1 = __pyx_v_event->data;
-+ __pyx_v_data = __pyx_t_1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":223
-- * values = []
-- * for i in range(nodelist.num):
-- * values.append(_convert_node_value(nodelist.values[i])) # <<<<<<<<<<<<<<
-- * return values
-- * elif format == MPV_FORMAT_NODE_MAP:
-+ /* "vidcutter/libs/pympv/mpv.pyx":273
-+ * cdef void* data = event.data
-+ * cdef mpv_event_client_message* climsg
-+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
-+ * return Property()._init(<mpv_event_property*>data)
-+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
- */
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- }
-+ switch (__pyx_v_self->id) {
-+ case MPV_EVENT_GET_PROPERTY_REPLY:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":224
-- * for i in range(nodelist.num):
-- * values.append(_convert_node_value(nodelist.values[i]))
-- * return values # <<<<<<<<<<<<<<
-- * elif format == MPV_FORMAT_NODE_MAP:
-- * nodelist = (<mpv_node_list*>data)[0]
-+ /* "vidcutter/libs/pympv/mpv.pyx":274
-+ * cdef mpv_event_client_message* climsg
-+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
-+ * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
-+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
-+ * return Property()._init(<mpv_event_property*>data)
- */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_values);
-- __pyx_r = __pyx_v_values;
-+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":219
-- * node = (<mpv_node*>data)[0]
-- * return _convert_node_value(node)
-- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
-- * nodelist = (<mpv_node_list*>data)[0]
-- * values = []
-+ /* "vidcutter/libs/pympv/mpv.pyx":273
-+ * cdef void* data = event.data
-+ * cdef mpv_event_client_message* climsg
-+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
-+ * return Property()._init(<mpv_event_property*>data)
-+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
- */
- break;
-- case MPV_FORMAT_NODE_MAP:
-+ case MPV_EVENT_PROPERTY_CHANGE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":226
-- * return values
-- * elif format == MPV_FORMAT_NODE_MAP:
-- * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
-- * values = {}
-- * for i in range(nodelist.num):
-+ /* "vidcutter/libs/pympv/mpv.pyx":276
-+ * return Property()._init(<mpv_event_property*>data)
-+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
-+ * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
-+ * elif self.id == MPV_EVENT_LOG_MESSAGE:
-+ * return LogMessage()._init(<mpv_event_log_message*>data)
- */
-- __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __pyx_r = __pyx_t_2;
-+ __pyx_t_2 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":227
-- * elif format == MPV_FORMAT_NODE_MAP:
-- * nodelist = (<mpv_node_list*>data)[0]
-- * values = {} # <<<<<<<<<<<<<<
-- * for i in range(nodelist.num):
-- * value = _convert_node_value(nodelist.values[i])
-+ /* "vidcutter/libs/pympv/mpv.pyx":275
-+ * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
-+ * return Property()._init(<mpv_event_property*>data)
-+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
-+ * return Property()._init(<mpv_event_property*>data)
-+ * elif self.id == MPV_EVENT_LOG_MESSAGE:
- */
-- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v_values = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ break;
-+ case MPV_EVENT_LOG_MESSAGE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":228
-- * nodelist = (<mpv_node_list*>data)[0]
-- * values = {}
-- * for i in range(nodelist.num): # <<<<<<<<<<<<<<
-- * value = _convert_node_value(nodelist.values[i])
-- * values[_strdec(nodelist.keys[i])] = value
-+ /* "vidcutter/libs/pympv/mpv.pyx":278
-+ * return Property()._init(<mpv_event_property*>data)
-+ * elif self.id == MPV_EVENT_LOG_MESSAGE:
-+ * return LogMessage()._init(<mpv_event_log_message*>data) # <<<<<<<<<<<<<<
-+ * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
-+ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
- */
-- __pyx_t_2 = __pyx_v_nodelist.num;
-- __pyx_t_3 = __pyx_t_2;
-- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
-- __pyx_v_i = __pyx_t_4;
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":229
-- * values = {}
-- * for i in range(nodelist.num):
-- * value = _convert_node_value(nodelist.values[i]) # <<<<<<<<<<<<<<
-- * values[_strdec(nodelist.keys[i])] = value
-- * return values
-- */
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
-- __pyx_t_1 = 0;
-+ /* "vidcutter/libs/pympv/mpv.pyx":277
-+ * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
-+ * return Property()._init(<mpv_event_property*>data)
-+ * elif self.id == MPV_EVENT_LOG_MESSAGE: # <<<<<<<<<<<<<<
-+ * return LogMessage()._init(<mpv_event_log_message*>data)
-+ * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
-+ */
-+ break;
-+ case MPV_EVENT_CLIENT_MESSAGE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":230
-- * for i in range(nodelist.num):
-- * value = _convert_node_value(nodelist.values[i])
-- * values[_strdec(nodelist.keys[i])] = value # <<<<<<<<<<<<<<
-- * return values
-- * elif format == MPV_FORMAT_STRING:
-+ /* "vidcutter/libs/pympv/mpv.pyx":282
-+ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
-+ * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
-+ * climsg = <mpv_event_client_message*>data # <<<<<<<<<<<<<<
-+ * args = []
-+ * num_args = climsg.num_args
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_8 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_8)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_8);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
-- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- }
-+ __pyx_v_climsg = ((struct mpv_event_client_message *)__pyx_v_data);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":231
-- * value = _convert_node_value(nodelist.values[i])
-- * values[_strdec(nodelist.keys[i])] = value
-- * return values # <<<<<<<<<<<<<<
-- * elif format == MPV_FORMAT_STRING:
-- * return _strdec(((<char**>data)[0]))
-+ /* "vidcutter/libs/pympv/mpv.pyx":283
-+ * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
-+ * climsg = <mpv_event_client_message*>data
-+ * args = [] # <<<<<<<<<<<<<<
-+ * num_args = climsg.num_args
-+ * for i in range(num_args):
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_values);
-- __pyx_r = __pyx_v_values;
-- goto __pyx_L0;
-+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_v_args = ((PyObject*)__pyx_t_3);
-+ __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":225
-- * values.append(_convert_node_value(nodelist.values[i]))
-- * return values
-- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-- * nodelist = (<mpv_node_list*>data)[0]
-- * values = {}
-+ /* "vidcutter/libs/pympv/mpv.pyx":284
-+ * climsg = <mpv_event_client_message*>data
-+ * args = []
-+ * num_args = climsg.num_args # <<<<<<<<<<<<<<
-+ * for i in range(num_args):
-+ * arg = <char*>climsg.args[i]
- */
-- break;
-- case MPV_FORMAT_STRING:
-+ __pyx_t_4 = __pyx_v_climsg->num_args;
-+ __pyx_v_num_args = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":233
-- * return values
-- * elif format == MPV_FORMAT_STRING:
-- * return _strdec(((<char**>data)[0])) # <<<<<<<<<<<<<<
-- * elif format == MPV_FORMAT_FLAG:
-- * return not not (<uint64_t*>data)[0]
-+ /* "vidcutter/libs/pympv/mpv.pyx":285
-+ * args = []
-+ * num_args = climsg.num_args
-+ * for i in range(num_args): # <<<<<<<<<<<<<<
-+ * arg = <char*>climsg.args[i]
-+ * arg = _strdec(arg)
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_8 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_8)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_8);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
-- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ __pyx_t_4 = __pyx_v_num_args;
-+ __pyx_t_5 = __pyx_t_4;
-+ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
-+ __pyx_v_i = __pyx_t_6;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":232
-- * values[_strdec(nodelist.keys[i])] = value
-- * return values
-- * elif format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-- * return _strdec(((<char**>data)[0]))
-- * elif format == MPV_FORMAT_FLAG:
-+ /* "vidcutter/libs/pympv/mpv.pyx":286
-+ * num_args = climsg.num_args
-+ * for i in range(num_args):
-+ * arg = <char*>climsg.args[i] # <<<<<<<<<<<<<<
-+ * arg = _strdec(arg)
-+ * args.append(arg)
- */
-- break;
-- case MPV_FORMAT_FLAG:
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_3);
-+ __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":235
-- * return _strdec(((<char**>data)[0]))
-- * elif format == MPV_FORMAT_FLAG:
-- * return not not (<uint64_t*>data)[0] # <<<<<<<<<<<<<<
-- * elif format == MPV_FORMAT_INT64:
-- * return int((<uint64_t*>data)[0])
-+ /* "vidcutter/libs/pympv/mpv.pyx":287
-+ * for i in range(num_args):
-+ * arg = <char*>climsg.args[i]
-+ * arg = _strdec(arg) # <<<<<<<<<<<<<<
-+ * args.append(arg)
-+ * return args
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_7 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_7)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_7);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_arg) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_arg);
-+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_3);
-+ __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":234
-- * elif format == MPV_FORMAT_STRING:
-- * return _strdec(((<char**>data)[0]))
-- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
-- * return not not (<uint64_t*>data)[0]
-- * elif format == MPV_FORMAT_INT64:
-+ /* "vidcutter/libs/pympv/mpv.pyx":288
-+ * arg = <char*>climsg.args[i]
-+ * arg = _strdec(arg)
-+ * args.append(arg) # <<<<<<<<<<<<<<
-+ * return args
-+ * elif self.id == MPV_EVENT_END_FILE:
- */
-- break;
-- case MPV_FORMAT_INT64:
-+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":237
-- * return not not (<uint64_t*>data)[0]
-- * elif format == MPV_FORMAT_INT64:
-- * return int((<uint64_t*>data)[0]) # <<<<<<<<<<<<<<
-- * elif format == MPV_FORMAT_DOUBLE:
-- * return float((<double*>data)[0])
-+ /* "vidcutter/libs/pympv/mpv.pyx":289
-+ * arg = _strdec(arg)
-+ * args.append(arg)
-+ * return args # <<<<<<<<<<<<<<
-+ * elif self.id == MPV_EVENT_END_FILE:
-+ * return EndOfFileReached()._init(<mpv_event_end_file*>data)
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_r = __pyx_t_6;
-- __pyx_t_6 = 0;
-+ __Pyx_INCREF(__pyx_v_args);
-+ __pyx_r = __pyx_v_args;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":236
-- * elif format == MPV_FORMAT_FLAG:
-- * return not not (<uint64_t*>data)[0]
-- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
-- * return int((<uint64_t*>data)[0])
-- * elif format == MPV_FORMAT_DOUBLE:
-+ /* "vidcutter/libs/pympv/mpv.pyx":281
-+ * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
-+ * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
-+ * elif self.id == MPV_EVENT_CLIENT_MESSAGE: # <<<<<<<<<<<<<<
-+ * climsg = <mpv_event_client_message*>data
-+ * args = []
- */
- break;
-- case MPV_FORMAT_DOUBLE:
-+ case MPV_EVENT_END_FILE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":239
-- * return int((<uint64_t*>data)[0])
-- * elif format == MPV_FORMAT_DOUBLE:
-- * return float((<double*>data)[0]) # <<<<<<<<<<<<<<
-- * return None
-+ /* "vidcutter/libs/pympv/mpv.pyx":291
-+ * return args
-+ * elif self.id == MPV_EVENT_END_FILE:
-+ * return EndOfFileReached()._init(<mpv_event_end_file*>data) # <<<<<<<<<<<<<<
-+ * return None
- *
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_r = __pyx_t_6;
-- __pyx_t_6 = 0;
-+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __pyx_r = __pyx_t_2;
-+ __pyx_t_2 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":238
-- * elif format == MPV_FORMAT_INT64:
-- * return int((<uint64_t*>data)[0])
-- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
-- * return float((<double*>data)[0])
-- * return None
-+ /* "vidcutter/libs/pympv/mpv.pyx":290
-+ * args.append(arg)
-+ * return args
-+ * elif self.id == MPV_EVENT_END_FILE: # <<<<<<<<<<<<<<
-+ * return EndOfFileReached()._init(<mpv_event_end_file*>data)
-+ * return None
- */
- break;
- default: break;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":240
-- * elif format == MPV_FORMAT_DOUBLE:
-- * return float((<double*>data)[0])
-- * return None # <<<<<<<<<<<<<<
-- *
-- *
-- */
-+ /* "vidcutter/libs/pympv/mpv.pyx":292
-+ * elif self.id == MPV_EVENT_END_FILE:
-+ * return EndOfFileReached()._init(<mpv_event_end_file*>data)
-+ * return None # <<<<<<<<<<<<<<
-+ *
-+ * @property
-+ */
- __Pyx_XDECREF(__pyx_r);
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":213
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":270
-+ * return _strdec(err_c)
- *
-- * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
-- * cdef mpv_node node
-- * cdef mpv_node_list nodelist
-+ * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
-+ * cdef void* data = event.data
-+ * cdef mpv_event_client_message* climsg
- */
-
- /* function exit code */
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._convert_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Event._data", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = 0;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_values);
-- __Pyx_XDECREF(__pyx_v_value);
-+ __Pyx_XDECREF(__pyx_v_args);
-+ __Pyx_XDECREF(__pyx_v_arg);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":250
-- * cdef public object name, data
-+/* "vidcutter/libs/pympv/mpv.pyx":295
- *
-- * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
-- * self.name = _strdec(prop.name)
-- * self.data = _convert_value(prop.data, prop.format)
-+ * @property
-+ * def name(self): # <<<<<<<<<<<<<<
-+ * """mpv_event_name of the event id"""
-+ * cdef const char* name_c
- */
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, struct mpv_event_property *__pyx_v_prop) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-+ char const *__pyx_v_name_c;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-@@ -5704,18 +6128,63 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_init", 0);
-+ __Pyx_RefNannySetupContext("__get__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":251
-+ /* "vidcutter/libs/pympv/mpv.pyx":298
-+ * """mpv_event_name of the event id"""
-+ * cdef const char* name_c
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * name_c = mpv_event_name(self.id)
-+ * return _strdec(name_c)
-+ */
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":299
-+ * cdef const char* name_c
-+ * with nogil:
-+ * name_c = mpv_event_name(self.id) # <<<<<<<<<<<<<<
-+ * return _strdec(name_c)
- *
-- * cdef _init(self, mpv_event_property* prop):
-- * self.name = _strdec(prop.name) # <<<<<<<<<<<<<<
-- * self.data = _convert_value(prop.data, prop.format)
-- * return self
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
-+ __pyx_v_name_c = mpv_event_name(__pyx_v_self->id);
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":298
-+ * """mpv_event_name of the event id"""
-+ * cdef const char* name_c
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * name_c = mpv_event_name(self.id)
-+ * return _strdec(name_c)
-+ */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":300
-+ * with nogil:
-+ * name_c = mpv_event_name(self.id)
-+ * return _strdec(name_c) # <<<<<<<<<<<<<<
-+ *
-+ * cdef _init(self, mpv_event* event, ctx):
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -5730,48 +6199,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->name);
-- __Pyx_DECREF(__pyx_v_self->name);
-- __pyx_v_self->name = __pyx_t_1;
-- __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":252
-- * cdef _init(self, mpv_event_property* prop):
-- * self.name = _strdec(prop.name)
-- * self.data = _convert_value(prop.data, prop.format) # <<<<<<<<<<<<<<
-- * return self
-- *
-- */
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->data);
-- __Pyx_DECREF(__pyx_v_self->data);
-- __pyx_v_self->data = __pyx_t_1;
-+ __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":253
-- * self.name = _strdec(prop.name)
-- * self.data = _convert_value(prop.data, prop.format)
-- * return self # <<<<<<<<<<<<<<
-- *
-- *
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(((PyObject *)__pyx_v_self));
-- __pyx_r = ((PyObject *)__pyx_v_self);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":250
-- * cdef public object name, data
-+ /* "vidcutter/libs/pympv/mpv.pyx":295
- *
-- * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
-- * self.name = _strdec(prop.name)
-- * self.data = _convert_value(prop.data, prop.format)
-+ * @property
-+ * def name(self): # <<<<<<<<<<<<<<
-+ * """mpv_event_name of the event id"""
-+ * cdef const char* name_c
- */
-
- /* function exit code */
-@@ -5780,1547 +6220,1710 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Property._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":248
-- * Wraps: mpv_event_property
-- * """
-- * cdef public object name, data # <<<<<<<<<<<<<<
-+/* "vidcutter/libs/pympv/mpv.pyx":302
-+ * return _strdec(name_c)
- *
-- * cdef _init(self, mpv_event_property* prop):
-+ * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
-+ * cdef uint64_t ctxid = <uint64_t>id(ctx)
-+ * self.id = event.event_id
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event, PyObject *__pyx_v_ctx) {
-+ uint64_t __pyx_v_ctxid;
-+ PyObject *__pyx_v_userdata = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__", 0);
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_self->name);
-- __pyx_r = __pyx_v_self->name;
-- goto __pyx_L0;
--
-- /* function exit code */
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ PyObject *__pyx_t_1 = NULL;
-+ uint64_t __pyx_t_2;
-+ enum mpv_event_id __pyx_t_3;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ PyObject *__pyx_t_6 = NULL;
-+ int __pyx_t_7;
-+ PyObject *__pyx_t_8 = NULL;
-+ int __pyx_t_9;
-+ int __pyx_t_10;
-+ int __pyx_t_11;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("_init", 0);
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+ /* "vidcutter/libs/pympv/mpv.pyx":303
-+ *
-+ * cdef _init(self, mpv_event* event, ctx):
-+ * cdef uint64_t ctxid = <uint64_t>id(ctx) # <<<<<<<<<<<<<<
-+ * self.id = event.event_id
-+ * self.data = self._data(event)
-+ */
-+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":304
-+ * cdef _init(self, mpv_event* event, ctx):
-+ * cdef uint64_t ctxid = <uint64_t>id(ctx)
-+ * self.id = event.event_id # <<<<<<<<<<<<<<
-+ * self.data = self._data(event)
-+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
-+ */
-+ __pyx_t_3 = __pyx_v_event->event_id;
-+ __pyx_v_self->id = __pyx_t_3;
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__", 0);
-- __Pyx_INCREF(__pyx_v_value);
-- __Pyx_GIVEREF(__pyx_v_value);
-- __Pyx_GOTREF(__pyx_v_self->name);
-- __Pyx_DECREF(__pyx_v_self->name);
-- __pyx_v_self->name = __pyx_v_value;
-+ /* "vidcutter/libs/pympv/mpv.pyx":305
-+ * cdef uint64_t ctxid = <uint64_t>id(ctx)
-+ * self.id = event.event_id
-+ * self.data = self._data(event) # <<<<<<<<<<<<<<
-+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
-+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
-+ */
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v_self->data);
-+ __Pyx_DECREF(__pyx_v_self->data);
-+ __pyx_v_self->data = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":306
-+ * self.id = event.event_id
-+ * self.data = self._data(event)
-+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None) # <<<<<<<<<<<<<<
-+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
-+ * userdata.remove()
-+ */
-+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_6 = NULL;
-+ __pyx_t_7 = 0;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
-+ if (likely(__pyx_t_6)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-+ __Pyx_INCREF(__pyx_t_6);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_5, function);
-+ __pyx_t_7 = 1;
-+ }
-+ }
-+ #if CYTHON_FAST_PYCALL
-+ if (PyFunction_Check(__pyx_t_5)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
-+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ } else
-+ #endif
-+ #if CYTHON_FAST_PYCCALL
-+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
-+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ } else
-+ #endif
-+ {
-+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_8);
-+ if (__pyx_t_6) {
-+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
-+ }
-+ __Pyx_GIVEREF(__pyx_t_4);
-+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_None);
-+ __pyx_t_4 = 0;
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ }
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __pyx_v_userdata = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(PyObject *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
-+ /* "vidcutter/libs/pympv/mpv.pyx":307
-+ * self.data = self._data(event)
-+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
-+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
-+ * userdata.remove()
-+ * if not userdata.observed and userdata.counter <= 0:
-+ */
-+ __pyx_t_10 = (__pyx_v_userdata != Py_None);
-+ __pyx_t_11 = (__pyx_t_10 != 0);
-+ if (__pyx_t_11) {
-+ } else {
-+ __pyx_t_9 = __pyx_t_11;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_11 = ((__pyx_v_self->id != MPV_EVENT_PROPERTY_CHANGE) != 0);
-+ __pyx_t_9 = __pyx_t_11;
-+ __pyx_L4_bool_binop_done:;
-+ if (__pyx_t_9) {
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":308
-+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
-+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
-+ * userdata.remove() # <<<<<<<<<<<<<<
-+ * if not userdata.observed and userdata.counter <= 0:
-+ * del _reply_userdatas[ctxid][event.reply_userdata]
-+ */
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __pyx_t_8 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
-+ if (likely(__pyx_t_8)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-+ __Pyx_INCREF(__pyx_t_8);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_5, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
-+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4name_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__", 0);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->name);
-- __Pyx_DECREF(__pyx_v_self->name);
-- __pyx_v_self->name = Py_None;
-+ /* "vidcutter/libs/pympv/mpv.pyx":309
-+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
-+ * userdata.remove()
-+ * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
-+ * del _reply_userdatas[ctxid][event.reply_userdata]
-+ * if userdata is not None:
-+ */
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_10 = ((!__pyx_t_11) != 0);
-+ if (__pyx_t_10) {
-+ } else {
-+ __pyx_t_9 = __pyx_t_10;
-+ goto __pyx_L7_bool_binop_done;
-+ }
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __pyx_t_9 = __pyx_t_10;
-+ __pyx_L7_bool_binop_done:;
-+ if (__pyx_t_9) {
-
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":310
-+ * userdata.remove()
-+ * if not userdata.observed and userdata.counter <= 0:
-+ * del _reply_userdatas[ctxid][event.reply_userdata] # <<<<<<<<<<<<<<
-+ * if userdata is not None:
-+ * userdata = userdata.data
-+ */
-+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
-+ /* "vidcutter/libs/pympv/mpv.pyx":309
-+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
-+ * userdata.remove()
-+ * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
-+ * del _reply_userdatas[ctxid][event.reply_userdata]
-+ * if userdata is not None:
-+ */
-+ }
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":307
-+ * self.data = self._data(event)
-+ * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
-+ * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
-+ * userdata.remove()
-+ * if not userdata.observed and userdata.counter <= 0:
-+ */
-+ }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__", 0);
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_self->data);
-- __pyx_r = __pyx_v_self->data;
-- goto __pyx_L0;
-+ /* "vidcutter/libs/pympv/mpv.pyx":311
-+ * if not userdata.observed and userdata.counter <= 0:
-+ * del _reply_userdatas[ctxid][event.reply_userdata]
-+ * if userdata is not None: # <<<<<<<<<<<<<<
-+ * userdata = userdata.data
-+ * self.reply_userdata = userdata
-+ */
-+ __pyx_t_9 = (__pyx_v_userdata != Py_None);
-+ __pyx_t_10 = (__pyx_t_9 != 0);
-+ if (__pyx_t_10) {
-
-- /* function exit code */
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":312
-+ * del _reply_userdatas[ctxid][event.reply_userdata]
-+ * if userdata is not None:
-+ * userdata = userdata.data # <<<<<<<<<<<<<<
-+ * self.reply_userdata = userdata
-+ * self.error = event.error
-+ */
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_DECREF_SET(__pyx_v_userdata, __pyx_t_5);
-+ __pyx_t_5 = 0;
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+ /* "vidcutter/libs/pympv/mpv.pyx":311
-+ * if not userdata.observed and userdata.counter <= 0:
-+ * del _reply_userdatas[ctxid][event.reply_userdata]
-+ * if userdata is not None: # <<<<<<<<<<<<<<
-+ * userdata = userdata.data
-+ * self.reply_userdata = userdata
-+ */
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":313
-+ * if userdata is not None:
-+ * userdata = userdata.data
-+ * self.reply_userdata = userdata # <<<<<<<<<<<<<<
-+ * self.error = event.error
-+ * return self
-+ */
-+ __Pyx_INCREF(__pyx_v_userdata);
-+ __Pyx_GIVEREF(__pyx_v_userdata);
-+ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
-+ __Pyx_DECREF(__pyx_v_self->reply_userdata);
-+ __pyx_v_self->reply_userdata = __pyx_v_userdata;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":314
-+ * userdata = userdata.data
-+ * self.reply_userdata = userdata
-+ * self.error = event.error # <<<<<<<<<<<<<<
-+ * return self
-+ *
-+ */
-+ __pyx_t_7 = __pyx_v_event->error;
-+ __pyx_v_self->error = __pyx_t_7;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":315
-+ * self.reply_userdata = userdata
-+ * self.error = event.error
-+ * return self # <<<<<<<<<<<<<<
-+ *
-+ *
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
-+ __pyx_r = ((PyObject *)__pyx_v_self);
-+ goto __pyx_L0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":302
-+ * return _strdec(name_c)
-+ *
-+ * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
-+ * cdef uint64_t ctxid = <uint64_t>id(ctx)
-+ * self.id = event.event_id
-+ */
-
- /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_8);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Event._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
-+ __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_userdata);
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-+/* "vidcutter/libs/pympv/mpv.pyx":258
-+ * cdef class Event(object):
-+ * """Wraps: mpv_event"""
-+ * cdef public mpv_event_id id # <<<<<<<<<<<<<<
-+ * cdef public int error
-+ * cdef public object data, reply_userdata
-+ */
-+
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__", 0);
-- __Pyx_INCREF(__pyx_v_value);
-- __Pyx_GIVEREF(__pyx_v_value);
-- __Pyx_GOTREF(__pyx_v_self->data);
-- __Pyx_DECREF(__pyx_v_self->data);
-- __pyx_v_self->data = __pyx_v_value;
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-
- /* function exit code */
-- __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__get__", 0);
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-+
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
- /* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(PyObject *__pyx_v_self) {
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_8Property_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
-+static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
- int __pyx_r;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__", 0);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->data);
-- __Pyx_DECREF(__pyx_v_self->data);
-- __pyx_v_self->data = Py_None;
-+ enum mpv_event_id __pyx_t_1;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__set__", 0);
-+ __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error)
-+ __pyx_v_self->id = __pyx_t_1;
-
- /* function exit code */
- __pyx_r = 0;
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = -1;
-+ __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * cdef tuple state
-- * cdef object _dict
-+/* "vidcutter/libs/pympv/mpv.pyx":259
-+ * """Wraps: mpv_event"""
-+ * cdef public mpv_event_id id
-+ * cdef public int error # <<<<<<<<<<<<<<
-+ * cdef public object data, reply_userdata
-+ *
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self) {
-- PyObject *__pyx_v_state = 0;
-- PyObject *__pyx_v__dict = 0;
-- int __pyx_v_use_setstate;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- int __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- int __pyx_t_5;
-- PyObject *__pyx_t_6 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
--
-- /* "(tree fragment)":5
-- * cdef object _dict
-- * cdef bint use_setstate
-- * state = (self.data, self.name) # <<<<<<<<<<<<<<
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None:
-- */
-- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_RefNannySetupContext("__get__", 0);
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(__pyx_v_self->data);
-- __Pyx_GIVEREF(__pyx_v_self->data);
-- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->data);
-- __Pyx_INCREF(__pyx_v_self->name);
-- __Pyx_GIVEREF(__pyx_v_self->name);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name);
-- __pyx_v_state = ((PyObject*)__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
-- /* "(tree fragment)":6
-- * cdef bint use_setstate
-- * state = (self.data, self.name)
-- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
-- * if _dict is not None:
-- * state += (_dict,)
-- */
-- __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v__dict = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "(tree fragment)":7
-- * state = (self.data, self.name)
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None: # <<<<<<<<<<<<<<
-- * state += (_dict,)
-- * use_setstate = True
-- */
-- __pyx_t_2 = (__pyx_v__dict != Py_None);
-- __pyx_t_3 = (__pyx_t_2 != 0);
-- if (__pyx_t_3) {
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-
-- /* "(tree fragment)":8
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None:
-- * state += (_dict,) # <<<<<<<<<<<<<<
-- * use_setstate = True
-- * else:
-- */
-- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(__pyx_v__dict);
-- __Pyx_GIVEREF(__pyx_v__dict);
-- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
-- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
-- __pyx_t_4 = 0;
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "(tree fragment)":9
-- * if _dict is not None:
-- * state += (_dict,)
-- * use_setstate = True # <<<<<<<<<<<<<<
-- * else:
-- * use_setstate = self.data is not None or self.name is not None
-- */
-- __pyx_v_use_setstate = 1;
--
-- /* "(tree fragment)":7
-- * state = (self.data, self.name)
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None: # <<<<<<<<<<<<<<
-- * state += (_dict,)
-- * use_setstate = True
-- */
-- goto __pyx_L3;
-- }
--
-- /* "(tree fragment)":11
-- * use_setstate = True
-- * else:
-- * use_setstate = self.data is not None or self.name is not None # <<<<<<<<<<<<<<
-- * if use_setstate:
-- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
-- */
-- /*else*/ {
-- __pyx_t_2 = (__pyx_v_self->data != Py_None);
-- __pyx_t_5 = (__pyx_t_2 != 0);
-- if (!__pyx_t_5) {
-- } else {
-- __pyx_t_3 = __pyx_t_5;
-- goto __pyx_L4_bool_binop_done;
-- }
-- __pyx_t_5 = (__pyx_v_self->name != Py_None);
-- __pyx_t_2 = (__pyx_t_5 != 0);
-- __pyx_t_3 = __pyx_t_2;
-- __pyx_L4_bool_binop_done:;
-- __pyx_v_use_setstate = __pyx_t_3;
-- }
-- __pyx_L3:;
--
-- /* "(tree fragment)":12
-- * else:
-- * use_setstate = self.data is not None or self.name is not None
-- * if use_setstate: # <<<<<<<<<<<<<<
-- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
-- * else:
-- */
-- __pyx_t_3 = (__pyx_v_use_setstate != 0);
-- if (__pyx_t_3) {
--
-- /* "(tree fragment)":13
-- * use_setstate = self.data is not None or self.name is not None
-- * if use_setstate:
-- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state # <<<<<<<<<<<<<<
-- * else:
-- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_INCREF(__pyx_int_5713169);
-- __Pyx_GIVEREF(__pyx_int_5713169);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
-- __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_GIVEREF(__pyx_t_4);
-- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
-- __Pyx_GIVEREF(__pyx_t_1);
-- PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
-- __Pyx_INCREF(__pyx_v_state);
-- __Pyx_GIVEREF(__pyx_v_state);
-- PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
-- __pyx_t_4 = 0;
-- __pyx_t_1 = 0;
-- __pyx_r = __pyx_t_6;
-- __pyx_t_6 = 0;
-- goto __pyx_L0;
--
-- /* "(tree fragment)":12
-- * else:
-- * use_setstate = self.data is not None or self.name is not None
-- * if use_setstate: # <<<<<<<<<<<<<<
-- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
-- * else:
-- */
-- }
--
-- /* "(tree fragment)":15
-- * return __pyx_unpickle_Property, (type(self), 0x0572d11, None), state
-- * else:
-- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state) # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * __pyx_unpickle_Property__set_state(self, __pyx_state)
-- */
-- /*else*/ {
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Property); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_INCREF(__pyx_int_5713169);
-- __Pyx_GIVEREF(__pyx_int_5713169);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_5713169);
-- __Pyx_INCREF(__pyx_v_state);
-- __Pyx_GIVEREF(__pyx_v_state);
-- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
-- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_GIVEREF(__pyx_t_6);
-- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
-- __Pyx_GIVEREF(__pyx_t_1);
-- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
-- __pyx_t_6 = 0;
-- __pyx_t_1 = 0;
-- __pyx_r = __pyx_t_4;
-- __pyx_t_4 = 0;
-- goto __pyx_L0;
-- }
--
-- /* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * cdef tuple state
-- * cdef object _dict
-- */
-+static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ int __pyx_t_1;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__set__", 0);
-+ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error)
-+ __pyx_v_self->error = __pyx_t_1;
-
- /* function exit code */
-+ __pyx_r = 0;
-+ goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = -1;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_state);
-- __Pyx_XDECREF(__pyx_v__dict);
-- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "(tree fragment)":16
-- * else:
-- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_unpickle_Property__set_state(self, __pyx_state)
-+/* "vidcutter/libs/pympv/mpv.pyx":260
-+ * cdef public mpv_event_id id
-+ * cdef public int error
-+ * cdef public object data, reply_userdata # <<<<<<<<<<<<<<
-+ *
-+ * @property
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
--
-- /* "(tree fragment)":17
-- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
-- * def __setstate_cython__(self, __pyx_state):
-- * __pyx_unpickle_Property__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
-- */
-- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "(tree fragment)":16
-- * else:
-- * return __pyx_unpickle_Property, (type(self), 0x0572d11, state)
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_unpickle_Property__set_state(self, __pyx_state)
-- */
-+ __Pyx_RefNannySetupContext("__get__", 0);
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v_self->data);
-+ __pyx_r = __pyx_v_self->data;
-+ goto __pyx_L0;
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Property.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":263
-- *
-- * @property
-- * def error_str(self): # <<<<<<<<<<<<<<
-- * """mpv_error_string of the error proeprty"""
-- * cdef const char* err_c
-- */
--
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-- char const *__pyx_v_err_c;
-- PyObject *__pyx_r = NULL;
-+static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__get__", 0);
-+ __Pyx_RefNannySetupContext("__set__", 0);
-+ __Pyx_INCREF(__pyx_v_value);
-+ __Pyx_GIVEREF(__pyx_v_value);
-+ __Pyx_GOTREF(__pyx_v_self->data);
-+ __Pyx_DECREF(__pyx_v_self->data);
-+ __pyx_v_self->data = __pyx_v_value;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":266
-- * """mpv_error_string of the error proeprty"""
-- * cdef const char* err_c
-- * with nogil: # <<<<<<<<<<<<<<
-- * err_c = mpv_error_string(self.error)
-- * return _strdec(err_c)
-- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":267
-- * cdef const char* err_c
-- * with nogil:
-- * err_c = mpv_error_string(self.error) # <<<<<<<<<<<<<<
-- * return _strdec(err_c)
-- *
-- */
-- __pyx_v_err_c = mpv_error_string(__pyx_v_self->error);
-- }
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":266
-- * """mpv_error_string of the error proeprty"""
-- * cdef const char* err_c
-- * with nogil: # <<<<<<<<<<<<<<
-- * err_c = mpv_error_string(self.error)
-- * return _strdec(err_c)
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-- }
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":268
-- * with nogil:
-- * err_c = mpv_error_string(self.error)
-- * return _strdec(err_c) # <<<<<<<<<<<<<<
-- *
-- * cdef _data(self, mpv_event* event):
-- */
-+static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__del__", 0);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ __Pyx_GOTREF(__pyx_v_self->data);
-+ __Pyx_DECREF(__pyx_v_self->data);
-+ __pyx_v_self->data = Py_None;
-+
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ __Pyx_INCREF(__pyx_v_self->reply_userdata);
-+ __pyx_r = __pyx_v_self->reply_userdata;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":263
-- *
-- * @property
-- * def error_str(self): # <<<<<<<<<<<<<<
-- * """mpv_error_string of the error proeprty"""
-- * cdef const char* err_c
-- */
--
- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error_str.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":270
-- * return _strdec(err_c)
-- *
-- * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
-- * cdef void* data = event.data
-- * cdef mpv_event_client_message* climsg
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__set__", 0);
-+ __Pyx_INCREF(__pyx_v_value);
-+ __Pyx_GIVEREF(__pyx_v_value);
-+ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
-+ __Pyx_DECREF(__pyx_v_self->reply_userdata);
-+ __pyx_v_self->reply_userdata = __pyx_v_value;
-+
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__del__", 0);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
-+ __Pyx_DECREF(__pyx_v_self->reply_userdata);
-+ __pyx_v_self->reply_userdata = Py_None;
-+
-+ /* function exit code */
-+ __pyx_r = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * cdef tuple state
-+ * cdef object _dict
- */
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event) {
-- void *__pyx_v_data;
-- struct mpv_event_client_message *__pyx_v_climsg;
-- PyObject *__pyx_v_args = NULL;
-- int __pyx_v_num_args;
-- int __pyx_v_i;
-- PyObject *__pyx_v_arg = NULL;
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-+ PyObject *__pyx_v_state = 0;
-+ PyObject *__pyx_v__dict = 0;
-+ int __pyx_v_use_setstate;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- void *__pyx_t_1;
-+ PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- int __pyx_t_4;
- int __pyx_t_5;
- int __pyx_t_6;
-- PyObject *__pyx_t_7 = NULL;
-- int __pyx_t_8;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_data", 0);
-+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":271
-- *
-- * cdef _data(self, mpv_event* event):
-- * cdef void* data = event.data # <<<<<<<<<<<<<<
-- * cdef mpv_event_client_message* climsg
-- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
-+ /* "(tree fragment)":5
-+ * cdef object _dict
-+ * cdef bint use_setstate
-+ * state = (self.data, self.error, self.id, self.reply_userdata) # <<<<<<<<<<<<<<
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None:
- */
-- __pyx_t_1 = __pyx_v_event->data;
-- __pyx_v_data = __pyx_t_1;
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_v_self->data);
-+ __Pyx_GIVEREF(__pyx_v_self->data);
-+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->data);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_2);
-+ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
-+ __Pyx_INCREF(__pyx_v_self->reply_userdata);
-+ __Pyx_GIVEREF(__pyx_v_self->reply_userdata);
-+ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->reply_userdata);
-+ __pyx_t_1 = 0;
-+ __pyx_t_2 = 0;
-+ __pyx_v_state = ((PyObject*)__pyx_t_3);
-+ __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":273
-- * cdef void* data = event.data
-- * cdef mpv_event_client_message* climsg
-- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
-- * return Property()._init(<mpv_event_property*>data)
-- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
-- */
-- switch (__pyx_v_self->id) {
-- case MPV_EVENT_GET_PROPERTY_REPLY:
--
-- /* "vidcutter/libs/pympv/mpv.pyx":274
-- * cdef mpv_event_client_message* climsg
-- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
-- * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
-- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
-- * return Property()._init(<mpv_event_property*>data)
-+ /* "(tree fragment)":6
-+ * cdef bint use_setstate
-+ * state = (self.data, self.error, self.id, self.reply_userdata)
-+ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
-+ * if _dict is not None:
-+ * state += (_dict,)
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-- goto __pyx_L0;
-+ __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_v__dict = __pyx_t_3;
-+ __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":273
-- * cdef void* data = event.data
-- * cdef mpv_event_client_message* climsg
-- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
-- * return Property()._init(<mpv_event_property*>data)
-- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
-+ /* "(tree fragment)":7
-+ * state = (self.data, self.error, self.id, self.reply_userdata)
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None: # <<<<<<<<<<<<<<
-+ * state += (_dict,)
-+ * use_setstate = True
- */
-- break;
-- case MPV_EVENT_PROPERTY_CHANGE:
-+ __pyx_t_4 = (__pyx_v__dict != Py_None);
-+ __pyx_t_5 = (__pyx_t_4 != 0);
-+ if (__pyx_t_5) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":276
-- * return Property()._init(<mpv_event_property*>data)
-- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
-- * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
-- * elif self.id == MPV_EVENT_LOG_MESSAGE:
-- * return LogMessage()._init(<mpv_event_log_message*>data)
-+ /* "(tree fragment)":8
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None:
-+ * state += (_dict,) # <<<<<<<<<<<<<<
-+ * use_setstate = True
-+ * else:
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
-+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
-+ __Pyx_INCREF(__pyx_v__dict);
-+ __Pyx_GIVEREF(__pyx_v__dict);
-+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
-+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_r = __pyx_t_2;
-+ __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
- __pyx_t_2 = 0;
-- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":275
-- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
-- * return Property()._init(<mpv_event_property*>data)
-- * elif self.id == MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
-- * return Property()._init(<mpv_event_property*>data)
-- * elif self.id == MPV_EVENT_LOG_MESSAGE:
-+ /* "(tree fragment)":9
-+ * if _dict is not None:
-+ * state += (_dict,)
-+ * use_setstate = True # <<<<<<<<<<<<<<
-+ * else:
-+ * use_setstate = self.data is not None or self.reply_userdata is not None
- */
-- break;
-- case MPV_EVENT_LOG_MESSAGE:
-+ __pyx_v_use_setstate = 1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":278
-- * return Property()._init(<mpv_event_property*>data)
-- * elif self.id == MPV_EVENT_LOG_MESSAGE:
-- * return LogMessage()._init(<mpv_event_log_message*>data) # <<<<<<<<<<<<<<
-- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
-- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
-+ /* "(tree fragment)":7
-+ * state = (self.data, self.error, self.id, self.reply_userdata)
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None: # <<<<<<<<<<<<<<
-+ * state += (_dict,)
-+ * use_setstate = True
-+ */
-+ goto __pyx_L3;
-+ }
-+
-+ /* "(tree fragment)":11
-+ * use_setstate = True
-+ * else:
-+ * use_setstate = self.data is not None or self.reply_userdata is not None # <<<<<<<<<<<<<<
-+ * if use_setstate:
-+ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
-+ */
-+ /*else*/ {
-+ __pyx_t_4 = (__pyx_v_self->data != Py_None);
-+ __pyx_t_6 = (__pyx_t_4 != 0);
-+ if (!__pyx_t_6) {
-+ } else {
-+ __pyx_t_5 = __pyx_t_6;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_6 = (__pyx_v_self->reply_userdata != Py_None);
-+ __pyx_t_4 = (__pyx_t_6 != 0);
-+ __pyx_t_5 = __pyx_t_4;
-+ __pyx_L4_bool_binop_done:;
-+ __pyx_v_use_setstate = __pyx_t_5;
-+ }
-+ __pyx_L3:;
-+
-+ /* "(tree fragment)":12
-+ * else:
-+ * use_setstate = self.data is not None or self.reply_userdata is not None
-+ * if use_setstate: # <<<<<<<<<<<<<<
-+ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
-+ * else:
-+ */
-+ __pyx_t_5 = (__pyx_v_use_setstate != 0);
-+ if (__pyx_t_5) {
-+
-+ /* "(tree fragment)":13
-+ * use_setstate = self.data is not None or self.reply_userdata is not None
-+ * if use_setstate:
-+ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state # <<<<<<<<<<<<<<
-+ * else:
-+ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
-+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_r = __pyx_t_3;
-+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_INCREF(__pyx_int_228822053);
-+ __Pyx_GIVEREF(__pyx_int_228822053);
-+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
-+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_2);
-+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
-+ __Pyx_GIVEREF(__pyx_t_3);
-+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
-+ __Pyx_INCREF(__pyx_v_state);
-+ __Pyx_GIVEREF(__pyx_v_state);
-+ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
-+ __pyx_t_2 = 0;
- __pyx_t_3 = 0;
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":277
-- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
-- * return Property()._init(<mpv_event_property*>data)
-- * elif self.id == MPV_EVENT_LOG_MESSAGE: # <<<<<<<<<<<<<<
-- * return LogMessage()._init(<mpv_event_log_message*>data)
-- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
-+ /* "(tree fragment)":12
-+ * else:
-+ * use_setstate = self.data is not None or self.reply_userdata is not None
-+ * if use_setstate: # <<<<<<<<<<<<<<
-+ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
-+ * else:
- */
-- break;
-- case MPV_EVENT_SCRIPT_INPUT_DISPATCH:
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":280
-- * return LogMessage()._init(<mpv_event_log_message*>data)
-- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
-- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data) # <<<<<<<<<<<<<<
-- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
-- * climsg = <mpv_event_client_message*>data
-+ /* "(tree fragment)":15
-+ * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
-+ * else:
-+ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state) # <<<<<<<<<<<<<<
-+ * def __setstate_cython__(self, __pyx_state):
-+ * __pyx_unpickle_Event__set_state(self, __pyx_state)
- */
-+ /*else*/ {
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch *)((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_t_3), ((struct mpv_event_script_input_dispatch *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
-+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_INCREF(__pyx_int_228822053);
-+ __Pyx_GIVEREF(__pyx_int_228822053);
-+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
-+ __Pyx_INCREF(__pyx_v_state);
-+ __Pyx_GIVEREF(__pyx_v_state);
-+ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
-+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_3);
-+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
-+ __pyx_t_1 = 0;
-+ __pyx_t_3 = 0;
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":279
-- * elif self.id == MPV_EVENT_LOG_MESSAGE:
-- * return LogMessage()._init(<mpv_event_log_message*>data)
-- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH: # <<<<<<<<<<<<<<
-- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
-- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
-+ /* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * cdef tuple state
-+ * cdef object _dict
- */
-- break;
-- case MPV_EVENT_CLIENT_MESSAGE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":282
-- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
-- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
-- * climsg = <mpv_event_client_message*>data # <<<<<<<<<<<<<<
-- * args = []
-- * num_args = climsg.num_args
-- */
-- __pyx_v_climsg = ((struct mpv_event_client_message *)__pyx_v_data);
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_state);
-+ __Pyx_XDECREF(__pyx_v__dict);
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":283
-- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
-- * climsg = <mpv_event_client_message*>data
-- * args = [] # <<<<<<<<<<<<<<
-- * num_args = climsg.num_args
-- * for i in range(num_args):
-+/* "(tree fragment)":16
-+ * else:
-+ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_Event__set_state(self, __pyx_state)
- */
-- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_v_args = ((PyObject*)__pyx_t_2);
-- __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":284
-- * climsg = <mpv_event_client_message*>data
-- * args = []
-- * num_args = climsg.num_args # <<<<<<<<<<<<<<
-- * for i in range(num_args):
-- * arg = <char*>climsg.args[i]
-- */
-- __pyx_t_4 = __pyx_v_climsg->num_args;
-- __pyx_v_num_args = __pyx_t_4;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":285
-- * args = []
-- * num_args = climsg.num_args
-- * for i in range(num_args): # <<<<<<<<<<<<<<
-- * arg = <char*>climsg.args[i]
-- * arg = _strdec(arg)
-- */
-- __pyx_t_4 = __pyx_v_num_args;
-- __pyx_t_5 = __pyx_t_4;
-- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
-- __pyx_v_i = __pyx_t_6;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":286
-- * num_args = climsg.num_args
-- * for i in range(num_args):
-- * arg = <char*>climsg.args[i] # <<<<<<<<<<<<<<
-- * arg = _strdec(arg)
-- * args.append(arg)
-- */
-- __pyx_t_2 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_2);
-- __pyx_t_2 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":287
-- * for i in range(num_args):
-- * arg = <char*>climsg.args[i]
-- * arg = _strdec(arg) # <<<<<<<<<<<<<<
-- * args.append(arg)
-- * return args
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strdec); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_7 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_7)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_7);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- }
-- }
-- __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_arg) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_arg);
-- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_2);
-- __pyx_t_2 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":288
-- * arg = <char*>climsg.args[i]
-- * arg = _strdec(arg)
-- * args.append(arg) # <<<<<<<<<<<<<<
-- * return args
-- * elif self.id == MPV_EVENT_END_FILE:
-- */
-- __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
-- }
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":289
-- * arg = _strdec(arg)
-- * args.append(arg)
-- * return args # <<<<<<<<<<<<<<
-- * elif self.id == MPV_EVENT_END_FILE:
-- * return EndOfFileReached()._init(<mpv_event_end_file*>data)
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_args);
-- __pyx_r = __pyx_v_args;
-- goto __pyx_L0;
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":281
-- * elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
-- * return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
-- * elif self.id == MPV_EVENT_CLIENT_MESSAGE: # <<<<<<<<<<<<<<
-- * climsg = <mpv_event_client_message*>data
-- * args = []
-- */
-- break;
-- case MPV_EVENT_END_FILE:
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":291
-- * return args
-- * elif self.id == MPV_EVENT_END_FILE:
-- * return EndOfFileReached()._init(<mpv_event_end_file*>data) # <<<<<<<<<<<<<<
-- * return None
-- *
-+ /* "(tree fragment)":17
-+ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
-+ * def __setstate_cython__(self, __pyx_state):
-+ * __pyx_unpickle_Event__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_2), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-- goto __pyx_L0;
-+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":290
-- * args.append(arg)
-- * return args
-- * elif self.id == MPV_EVENT_END_FILE: # <<<<<<<<<<<<<<
-- * return EndOfFileReached()._init(<mpv_event_end_file*>data)
-- * return None
-+ /* "(tree fragment)":16
-+ * else:
-+ * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_Event__set_state(self, __pyx_state)
- */
-- break;
-- default: break;
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":292
-- * elif self.id == MPV_EVENT_END_FILE:
-- * return EndOfFileReached()._init(<mpv_event_end_file*>data)
-- * return None # <<<<<<<<<<<<<<
-- *
-- * @property
-- */
-- __Pyx_XDECREF(__pyx_r);
-+ /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":270
-- * return _strdec(err_c)
-+/* "vidcutter/libs/pympv/mpv.pyx":318
- *
-- * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
-- * cdef void* data = event.data
-- * cdef mpv_event_client_message* climsg
-+ *
-+ * def _errors(fn): # <<<<<<<<<<<<<<
-+ * def wrapped(*k, **kw):
-+ * v = fn(*k, **kw)
- */
-
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_5_errors = {"_errors", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5_errors, METH_O, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("_errors (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_4_errors(__pyx_self, ((PyObject *)__pyx_v_fn));
-+
- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Event._data", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_args);
-- __Pyx_XDECREF(__pyx_v_arg);
-- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":295
-+/* "vidcutter/libs/pympv/mpv.pyx":319
- *
-- * @property
-- * def name(self): # <<<<<<<<<<<<<<
-- * """mpv_event_name of the event id"""
-- * cdef const char* name_c
-+ * def _errors(fn):
-+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
-+ * v = fn(*k, **kw)
-+ * if v < 0:
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(PyObject *__pyx_v_self) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped = {"wrapped", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped, METH_VARARGS|METH_KEYWORDS, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_k = 0;
-+ PyObject *__pyx_v_kw = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("wrapped (wrapper)", 0);
-+ if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "wrapped", 1))) return NULL;
-+ __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
-+ __Pyx_GOTREF(__pyx_v_kw);
-+ __Pyx_INCREF(__pyx_args);
-+ __pyx_v_k = __pyx_args;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(__pyx_self, __pyx_v_k, __pyx_v_kw);
-
- /* function exit code */
-+ __Pyx_XDECREF(__pyx_v_k);
-+ __Pyx_XDECREF(__pyx_v_kw);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-- char const *__pyx_v_name_c;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_kw) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_outer_scope;
-+ PyObject *__pyx_v_v = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-+ int __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__get__", 0);
-+ __Pyx_RefNannySetupContext("wrapped", 0);
-+ __pyx_outer_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *) __Pyx_CyFunction_GetClosure(__pyx_self);
-+ __pyx_cur_scope = __pyx_outer_scope;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":298
-- * """mpv_event_name of the event id"""
-- * cdef const char* name_c
-- * with nogil: # <<<<<<<<<<<<<<
-- * name_c = mpv_event_name(self.id)
-- * return _strdec(name_c)
-+ /* "vidcutter/libs/pympv/mpv.pyx":320
-+ * def _errors(fn):
-+ * def wrapped(*k, **kw):
-+ * v = fn(*k, **kw) # <<<<<<<<<<<<<<
-+ * if v < 0:
-+ * raise MPVError(v)
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 320, __pyx_L1_error) }
-+ __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v_v = __pyx_t_2;
-+ __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":299
-- * cdef const char* name_c
-- * with nogil:
-- * name_c = mpv_event_name(self.id) # <<<<<<<<<<<<<<
-- * return _strdec(name_c)
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":321
-+ * def wrapped(*k, **kw):
-+ * v = fn(*k, **kw)
-+ * if v < 0: # <<<<<<<<<<<<<<
-+ * raise MPVError(v)
-+ * return wrapped
- */
-- __pyx_v_name_c = mpv_event_name(__pyx_v_self->id);
-- }
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 321, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (unlikely(__pyx_t_3)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":298
-- * """mpv_event_name of the event id"""
-- * cdef const char* name_c
-- * with nogil: # <<<<<<<<<<<<<<
-- * name_c = mpv_event_name(self.id)
-- * return _strdec(name_c)
-+ /* "vidcutter/libs/pympv/mpv.pyx":322
-+ * v = fn(*k, **kw)
-+ * if v < 0:
-+ * raise MPVError(v) # <<<<<<<<<<<<<<
-+ * return wrapped
-+ *
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_1, function);
- }
-- }
-+ }
-+ __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_v);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __PYX_ERR(0, 322, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":300
-- * with nogil:
-- * name_c = mpv_event_name(self.id)
-- * return _strdec(name_c) # <<<<<<<<<<<<<<
-- *
-- * cdef _init(self, mpv_event* event, ctx):
-+ /* "vidcutter/libs/pympv/mpv.pyx":321
-+ * def wrapped(*k, **kw):
-+ * v = fn(*k, **kw)
-+ * if v < 0: # <<<<<<<<<<<<<<
-+ * raise MPVError(v)
-+ * return wrapped
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":295
-+ /* "vidcutter/libs/pympv/mpv.pyx":319
- *
-- * @property
-- * def name(self): # <<<<<<<<<<<<<<
-- * """mpv_event_name of the event id"""
-- * cdef const char* name_c
-+ * def _errors(fn):
-+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
-+ * v = fn(*k, **kw)
-+ * if v < 0:
- */
-
- /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._errors.wrapped", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_v);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":302
-- * return _strdec(name_c)
-+/* "vidcutter/libs/pympv/mpv.pyx":318
- *
-- * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
-- * cdef uint64_t ctxid = <uint64_t>id(ctx)
-- * self.id = event.event_id
-+ *
-+ * def _errors(fn): # <<<<<<<<<<<<<<
-+ * def wrapped(*k, **kw):
-+ * v = fn(*k, **kw)
- */
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, struct mpv_event *__pyx_v_event, PyObject *__pyx_v_ctx) {
-- uint64_t __pyx_v_ctxid;
-- PyObject *__pyx_v_userdata = NULL;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
-+ PyObject *__pyx_v_wrapped = 0;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- uint64_t __pyx_t_2;
-- enum mpv_event_id __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- PyObject *__pyx_t_6 = NULL;
-- int __pyx_t_7;
-- PyObject *__pyx_t_8 = NULL;
-- int __pyx_t_9;
-- int __pyx_t_10;
-- int __pyx_t_11;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_init", 0);
-+ __Pyx_RefNannySetupContext("_errors", 0);
-+ __pyx_cur_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(__pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, __pyx_empty_tuple, NULL);
-+ if (unlikely(!__pyx_cur_scope)) {
-+ __pyx_cur_scope = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)Py_None);
-+ __Pyx_INCREF(Py_None);
-+ __PYX_ERR(0, 318, __pyx_L1_error)
-+ } else {
-+ __Pyx_GOTREF(__pyx_cur_scope);
-+ }
-+ __pyx_cur_scope->__pyx_v_fn = __pyx_v_fn;
-+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn);
-+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":303
-+ /* "vidcutter/libs/pympv/mpv.pyx":319
- *
-- * cdef _init(self, mpv_event* event, ctx):
-- * cdef uint64_t ctxid = <uint64_t>id(ctx) # <<<<<<<<<<<<<<
-- * self.id = event.event_id
-- * self.data = self._data(event)
-+ * def _errors(fn):
-+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
-+ * v = fn(*k, **kw)
-+ * if v < 0:
- */
-- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
-+ __pyx_v_wrapped = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":304
-- * cdef _init(self, mpv_event* event, ctx):
-- * cdef uint64_t ctxid = <uint64_t>id(ctx)
-- * self.id = event.event_id # <<<<<<<<<<<<<<
-- * self.data = self._data(event)
-- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
-+ /* "vidcutter/libs/pympv/mpv.pyx":323
-+ * if v < 0:
-+ * raise MPVError(v)
-+ * return wrapped # <<<<<<<<<<<<<<
-+ *
-+ *
- */
-- __pyx_t_3 = __pyx_v_event->event_id;
-- __pyx_v_self->id = __pyx_t_3;
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v_wrapped);
-+ __pyx_r = __pyx_v_wrapped;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":305
-- * cdef uint64_t ctxid = <uint64_t>id(ctx)
-- * self.id = event.event_id
-- * self.data = self._data(event) # <<<<<<<<<<<<<<
-- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
-- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
-+ /* "vidcutter/libs/pympv/mpv.pyx":318
-+ *
-+ *
-+ * def _errors(fn): # <<<<<<<<<<<<<<
-+ * def wrapped(*k, **kw):
-+ * v = fn(*k, **kw)
- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->data);
-- __Pyx_DECREF(__pyx_v_self->data);
-- __pyx_v_self->data = __pyx_t_1;
-- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":306
-- * self.id = event.event_id
-- * self.data = self._data(event)
-- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None) # <<<<<<<<<<<<<<
-- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
-- * userdata.remove()
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._errors", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_wrapped);
-+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* "vidcutter/libs/pympv/mpv.pyx":329
-+ * code = None
-+ *
-+ * def __init__(self, e): # <<<<<<<<<<<<<<
-+ * self.code = e
-+ * cdef const char* err_c
- */
-- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_6 = NULL;
-- __pyx_t_7 = 0;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
-- if (likely(__pyx_t_6)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-- __Pyx_INCREF(__pyx_t_6);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_5, function);
-- __pyx_t_7 = 1;
-- }
-- }
-- #if CYTHON_FAST_PYCALL
-- if (PyFunction_Check(__pyx_t_5)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
-- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- } else
-- #endif
-- #if CYTHON_FAST_PYCCALL
-- if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
-- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- } else
-- #endif
-+
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_self = 0;
-+ PyObject *__pyx_v_e = 0;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
- {
-- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_8);
-- if (__pyx_t_6) {
-- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_e,0};
-+ PyObject* values[2] = {0,0};
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 329, __pyx_L3_error)
-+ }
-+ }
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 329, __pyx_L3_error)
-+ }
-+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-+ goto __pyx_L5_argtuple_error;
-+ } else {
-+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- }
-- __Pyx_GIVEREF(__pyx_t_4);
-- PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_None);
-- __pyx_t_4 = 0;
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ __pyx_v_self = values[0];
-+ __pyx_v_e = values[1];
- }
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __pyx_v_userdata = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(__pyx_self, __pyx_v_self, __pyx_v_e);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":307
-- * self.data = self._data(event)
-- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
-- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
-- * userdata.remove()
-- * if not userdata.observed and userdata.counter <= 0:
-- */
-- __pyx_t_10 = (__pyx_v_userdata != Py_None);
-- __pyx_t_11 = (__pyx_t_10 != 0);
-- if (__pyx_t_11) {
-- } else {
-- __pyx_t_9 = __pyx_t_11;
-- goto __pyx_L4_bool_binop_done;
-- }
-- __pyx_t_11 = ((__pyx_v_self->id != MPV_EVENT_PROPERTY_CHANGE) != 0);
-- __pyx_t_9 = __pyx_t_11;
-- __pyx_L4_bool_binop_done:;
-- if (__pyx_t_9) {
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":308
-- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
-- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
-- * userdata.remove() # <<<<<<<<<<<<<<
-- * if not userdata.observed and userdata.counter <= 0:
-- * del _reply_userdatas[ctxid][event.reply_userdata]
-- */
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __pyx_t_8 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
-- if (likely(__pyx_t_8)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-- __Pyx_INCREF(__pyx_t_8);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_5, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_e) {
-+ char const *__pyx_v_err_c;
-+ int __pyx_v_e_i;
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ int __pyx_t_1;
-+ int __pyx_t_2;
-+ int __pyx_t_3;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__init__", 0);
-+ __Pyx_INCREF(__pyx_v_e);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":309
-- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
-- * userdata.remove()
-- * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
-- * del _reply_userdatas[ctxid][event.reply_userdata]
-- * if userdata is not None:
-+ /* "vidcutter/libs/pympv/mpv.pyx":330
-+ *
-+ * def __init__(self, e):
-+ * self.code = e # <<<<<<<<<<<<<<
-+ * cdef const char* err_c
-+ * cdef int e_i
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_10 = ((!__pyx_t_11) != 0);
-- if (__pyx_t_10) {
-- } else {
-- __pyx_t_9 = __pyx_t_10;
-- goto __pyx_L7_bool_binop_done;
-- }
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __pyx_t_9 = __pyx_t_10;
-- __pyx_L7_bool_binop_done:;
-- if (__pyx_t_9) {
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":310
-- * userdata.remove()
-- * if not userdata.observed and userdata.counter <= 0:
-- * del _reply_userdatas[ctxid][event.reply_userdata] # <<<<<<<<<<<<<<
-- * if userdata is not None:
-- * userdata = userdata.data
-+ /* "vidcutter/libs/pympv/mpv.pyx":333
-+ * cdef const char* err_c
-+ * cdef int e_i
-+ * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
-+ * e_i = e
-+ * with nogil:
- */
-- __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_e);
-+ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
-+ if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":309
-- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
-- * userdata.remove()
-- * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
-- * del _reply_userdatas[ctxid][event.reply_userdata]
-- * if userdata is not None:
-+ /* "vidcutter/libs/pympv/mpv.pyx":334
-+ * cdef int e_i
-+ * if not isinstance(e, basestring):
-+ * e_i = e # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * err_c = mpv_error_string(e_i)
- */
-- }
-+ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
-+ __pyx_v_e_i = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":307
-- * self.data = self._data(event)
-- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
-- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
-- * userdata.remove()
-- * if not userdata.observed and userdata.counter <= 0:
-+ /* "vidcutter/libs/pympv/mpv.pyx":335
-+ * if not isinstance(e, basestring):
-+ * e_i = e
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err_c = mpv_error_string(e_i)
-+ * e = _strdec(err_c)
- */
-- }
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":311
-- * if not userdata.observed and userdata.counter <= 0:
-- * del _reply_userdatas[ctxid][event.reply_userdata]
-- * if userdata is not None: # <<<<<<<<<<<<<<
-- * userdata = userdata.data
-- * self.reply_userdata = userdata
-+ /* "vidcutter/libs/pympv/mpv.pyx":336
-+ * e_i = e
-+ * with nogil:
-+ * err_c = mpv_error_string(e_i) # <<<<<<<<<<<<<<
-+ * e = _strdec(err_c)
-+ * Exception.__init__(self, e)
- */
-- __pyx_t_9 = (__pyx_v_userdata != Py_None);
-- __pyx_t_10 = (__pyx_t_9 != 0);
-- if (__pyx_t_10) {
-+ __pyx_v_err_c = mpv_error_string(__pyx_v_e_i);
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":312
-- * del _reply_userdatas[ctxid][event.reply_userdata]
-- * if userdata is not None:
-- * userdata = userdata.data # <<<<<<<<<<<<<<
-- * self.reply_userdata = userdata
-- * self.error = event.error
-+ /* "vidcutter/libs/pympv/mpv.pyx":335
-+ * if not isinstance(e, basestring):
-+ * e_i = e
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err_c = mpv_error_string(e_i)
-+ * e = _strdec(err_c)
- */
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_DECREF_SET(__pyx_v_userdata, __pyx_t_5);
-- __pyx_t_5 = 0;
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L6;
-+ }
-+ __pyx_L6:;
-+ }
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":311
-- * if not userdata.observed and userdata.counter <= 0:
-- * del _reply_userdatas[ctxid][event.reply_userdata]
-- * if userdata is not None: # <<<<<<<<<<<<<<
-- * userdata = userdata.data
-- * self.reply_userdata = userdata
-- */
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":313
-- * if userdata is not None:
-- * userdata = userdata.data
-- * self.reply_userdata = userdata # <<<<<<<<<<<<<<
-- * self.error = event.error
-- * return self
-+ /* "vidcutter/libs/pympv/mpv.pyx":337
-+ * with nogil:
-+ * err_c = mpv_error_string(e_i)
-+ * e = _strdec(err_c) # <<<<<<<<<<<<<<
-+ * Exception.__init__(self, e)
-+ *
- */
-- __Pyx_INCREF(__pyx_v_userdata);
-- __Pyx_GIVEREF(__pyx_v_userdata);
-- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
-- __Pyx_DECREF(__pyx_v_self->reply_userdata);
-- __pyx_v_self->reply_userdata = __pyx_v_userdata;
-+ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_7 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
-+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
-+ if (likely(__pyx_t_7)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-+ __Pyx_INCREF(__pyx_t_7);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_5, function);
-+ }
-+ }
-+ __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_4);
-+ __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":314
-- * userdata = userdata.data
-- * self.reply_userdata = userdata
-- * self.error = event.error # <<<<<<<<<<<<<<
-- * return self
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":333
-+ * cdef const char* err_c
-+ * cdef int e_i
-+ * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
-+ * e_i = e
-+ * with nogil:
- */
-- __pyx_t_7 = __pyx_v_event->error;
-- __pyx_v_self->error = __pyx_t_7;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":315
-- * self.reply_userdata = userdata
-- * self.error = event.error
-- * return self # <<<<<<<<<<<<<<
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":338
-+ * err_c = mpv_error_string(e_i)
-+ * e = _strdec(err_c)
-+ * Exception.__init__(self, e) # <<<<<<<<<<<<<<
- *
-+ * class PyMPVError(Exception):
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(((PyObject *)__pyx_v_self));
-- __pyx_r = ((PyObject *)__pyx_v_self);
-- goto __pyx_L0;
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __pyx_t_6 = NULL;
-+ __pyx_t_3 = 0;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
-+ if (likely(__pyx_t_6)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-+ __Pyx_INCREF(__pyx_t_6);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_5, function);
-+ __pyx_t_3 = 1;
-+ }
-+ }
-+ #if CYTHON_FAST_PYCALL
-+ if (PyFunction_Check(__pyx_t_5)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
-+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_GOTREF(__pyx_t_4);
-+ } else
-+ #endif
-+ #if CYTHON_FAST_PYCCALL
-+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
-+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_GOTREF(__pyx_t_4);
-+ } else
-+ #endif
-+ {
-+ __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ if (__pyx_t_6) {
-+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
-+ }
-+ __Pyx_INCREF(__pyx_v_self);
-+ __Pyx_GIVEREF(__pyx_v_self);
-+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_3, __pyx_v_self);
-+ __Pyx_INCREF(__pyx_v_e);
-+ __Pyx_GIVEREF(__pyx_v_e);
-+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_3, __pyx_v_e);
-+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ }
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":302
-- * return _strdec(name_c)
-+ /* "vidcutter/libs/pympv/mpv.pyx":329
-+ * code = None
- *
-- * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
-- * cdef uint64_t ctxid = <uint64_t>id(ctx)
-- * self.id = event.event_id
-+ * def __init__(self, e): # <<<<<<<<<<<<<<
-+ * self.code = e
-+ * cdef const char* err_c
- */
-
- /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Event._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_userdata);
-+ __Pyx_XDECREF(__pyx_v_e);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":258
-- * cdef class Event(object):
-- * """Wraps: mpv_event"""
-- * cdef public mpv_event_id id # <<<<<<<<<<<<<<
-- * cdef public int error
-- * cdef public object data, reply_userdata
-+/* "vidcutter/libs/pympv/mpv.pyx":347
-+ *
-+ * class _ReplyUserData(object):
-+ * def __init__(self, data): # <<<<<<<<<<<<<<
-+ * self.counter = 0
-+ * self.data = data
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(PyObject *__pyx_v_self) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_self = 0;
-+ PyObject *__pyx_v_data = 0;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
-+ PyObject* values[2] = {0,0};
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 347, __pyx_L3_error)
-+ }
-+ }
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 347, __pyx_L3_error)
-+ }
-+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-+ goto __pyx_L5_argtuple_error;
-+ } else {
-+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ }
-+ __pyx_v_self = values[0];
-+ __pyx_v_data = values[1];
-+ }
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 347, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(__pyx_self, __pyx_v_self, __pyx_v_data);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__get__", 0);
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
--
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ __Pyx_RefNannySetupContext("__init__", 0);
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+ /* "vidcutter/libs/pympv/mpv.pyx":348
-+ * class _ReplyUserData(object):
-+ * def __init__(self, data):
-+ * self.counter = 0 # <<<<<<<<<<<<<<
-+ * self.data = data
-+ * self.observed = False
-+ */
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":349
-+ * def __init__(self, data):
-+ * self.counter = 0
-+ * self.data = data # <<<<<<<<<<<<<<
-+ * self.observed = False
-+ *
-+ */
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- enum mpv_event_id __pyx_t_1;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__set__", 0);
-- __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error)
-- __pyx_v_self->id = __pyx_t_1;
-+ /* "vidcutter/libs/pympv/mpv.pyx":350
-+ * self.counter = 0
-+ * self.data = data
-+ * self.observed = False # <<<<<<<<<<<<<<
-+ *
-+ * def add(self):
-+ */
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":347
-+ *
-+ * class _ReplyUserData(object):
-+ * def __init__(self, data): # <<<<<<<<<<<<<<
-+ * self.counter = 0
-+ * self.data = data
-+ */
-
- /* function exit code */
-- __pyx_r = 0;
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = -1;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":259
-- * """Wraps: mpv_event"""
-- * cdef public mpv_event_id id
-- * cdef public int error # <<<<<<<<<<<<<<
-- * cdef public object data, reply_userdata
-+/* "vidcutter/libs/pympv/mpv.pyx":352
-+ * self.observed = False
-+ *
-+ * def add(self): # <<<<<<<<<<<<<<
-+ * self.counter += 1
- *
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(PyObject *__pyx_v_self) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add = {"add", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, METH_O, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("add (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(__pyx_self, ((PyObject *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__get__", 0);
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
-+ __Pyx_RefNannySetupContext("add", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":353
-+ *
-+ * def add(self):
-+ * self.counter += 1 # <<<<<<<<<<<<<<
-+ *
-+ * def remove(self):
-+ */
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":352
-+ * self.observed = False
-+ *
-+ * def add(self): # <<<<<<<<<<<<<<
-+ * self.counter += 1
-+ *
-+ */
-
- /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
-@@ -7328,1181 +7931,1253 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __p
- return __pyx_r;
- }
-
-+/* "vidcutter/libs/pympv/mpv.pyx":355
-+ * self.counter += 1
-+ *
-+ * def remove(self): # <<<<<<<<<<<<<<
-+ * self.counter -= 1
-+ *
-+ */
-+
- /* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove = {"remove", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, METH_O, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+ __Pyx_RefNannySetupContext("remove (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(__pyx_self, ((PyObject *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__set__", 0);
-- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error)
-- __pyx_v_self->error = __pyx_t_1;
-+ __Pyx_RefNannySetupContext("remove", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":356
-+ *
-+ * def remove(self):
-+ * self.counter -= 1 # <<<<<<<<<<<<<<
-+ *
-+ *
-+ */
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":355
-+ * self.counter += 1
-+ *
-+ * def remove(self): # <<<<<<<<<<<<<<
-+ * self.counter -= 1
-+ *
-+ */
-
- /* function exit code */
-- __pyx_r = 0;
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.error.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = -1;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":260
-- * cdef public mpv_event_id id
-- * cdef public int error
-- * cdef public object data, reply_userdata # <<<<<<<<<<<<<<
-+/* "vidcutter/libs/pympv/mpv.pyx":370
- *
- * @property
-+ * def api_version(self): # <<<<<<<<<<<<<<
-+ * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
-+ *
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(PyObject *__pyx_v_self) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4data___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":371
-+ * @property
-+ * def api_version(self):
-+ * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION # <<<<<<<<<<<<<<
-+ *
-+ * @property
-+ */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_self->data);
-- __pyx_r = __pyx_v_self->data;
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_2);
-+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
-+ __Pyx_GIVEREF(__pyx_t_3);
-+ PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
-+ __pyx_t_1 = 0;
-+ __pyx_t_2 = 0;
-+ __pyx_t_3 = 0;
-+ __pyx_r = __pyx_t_4;
-+ __pyx_t_4 = 0;
- goto __pyx_L0;
-
-+ /* "vidcutter/libs/pympv/mpv.pyx":370
-+ *
-+ * @property
-+ * def api_version(self): # <<<<<<<<<<<<<<
-+ * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
-+ *
-+ */
-+
- /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.api_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
-+/* "vidcutter/libs/pympv/mpv.pyx":374
-+ *
-+ * @property
-+ * def name(self): # <<<<<<<<<<<<<<
-+ * """Unique name for every context created.
-+ *
-+ */
-+
- /* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-+ char const *__pyx_v_name;
-+ PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__", 0);
-- __Pyx_INCREF(__pyx_v_value);
-- __Pyx_GIVEREF(__pyx_v_value);
-- __Pyx_GOTREF(__pyx_v_self->data);
-- __Pyx_DECREF(__pyx_v_self->data);
-- __pyx_v_self->data = __pyx_v_value;
--
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(PyObject *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__get__", 0);
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_4data_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__", 0);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->data);
-- __Pyx_DECREF(__pyx_v_self->data);
-- __pyx_v_self->data = Py_None;
-+ /* "vidcutter/libs/pympv/mpv.pyx":380
-+ * """
-+ * cdef const char* name
-+ * assert self._ctx # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * name = mpv_client_name(self._ctx)
-+ */
-+ #ifndef CYTHON_WITHOUT_ASSERTIONS
-+ if (unlikely(!Py_OptimizeFlag)) {
-+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-+ PyErr_SetNone(PyExc_AssertionError);
-+ __PYX_ERR(0, 380, __pyx_L1_error)
-+ }
-+ }
-+ #endif
-
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":381
-+ * cdef const char* name
-+ * assert self._ctx
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * name = mpv_client_name(self._ctx)
-+ * return _strdec(name)
-+ */
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+ /* "vidcutter/libs/pympv/mpv.pyx":382
-+ * assert self._ctx
-+ * with nogil:
-+ * name = mpv_client_name(self._ctx) # <<<<<<<<<<<<<<
-+ * return _strdec(name)
-+ *
-+ */
-+ __pyx_v_name = mpv_client_name(__pyx_v_self->_ctx);
-+ }
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":381
-+ * cdef const char* name
-+ * assert self._ctx
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * name = mpv_client_name(self._ctx)
-+ * return _strdec(name)
-+ */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
-+ }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__", 0);
-+ /* "vidcutter/libs/pympv/mpv.pyx":383
-+ * with nogil:
-+ * name = mpv_client_name(self._ctx)
-+ * return _strdec(name) # <<<<<<<<<<<<<<
-+ *
-+ * @property
-+ */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_self->reply_userdata);
-- __pyx_r = __pyx_v_self->reply_userdata;
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
- goto __pyx_L0;
-
-+ /* "vidcutter/libs/pympv/mpv.pyx":374
-+ *
-+ * @property
-+ * def name(self): # <<<<<<<<<<<<<<
-+ * """Unique name for every context created.
-+ *
-+ */
-+
- /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v_value));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_2__set__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v_value) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__set__", 0);
-- __Pyx_INCREF(__pyx_v_value);
-- __Pyx_GIVEREF(__pyx_v_value);
-- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
-- __Pyx_DECREF(__pyx_v_self->reply_userdata);
-- __pyx_v_self->reply_userdata = __pyx_v_value;
--
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(PyObject *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_14reply_userdata_4__del__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__del__", 0);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
-- __Pyx_DECREF(__pyx_v_self->reply_userdata);
-- __pyx_v_self->reply_userdata = Py_None;
--
-- /* function exit code */
-- __pyx_r = 0;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * cdef tuple state
-- * cdef object _dict
-+/* "vidcutter/libs/pympv/mpv.pyx":386
-+ *
-+ * @property
-+ * def time(self): # <<<<<<<<<<<<<<
-+ * """Internal mpv client time.
-+ *
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self) {
-- PyObject *__pyx_v_state = 0;
-- PyObject *__pyx_v__dict = 0;
-- int __pyx_v_use_setstate;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-+ int64_t __pyx_v_time;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- int __pyx_t_4;
-- int __pyx_t_5;
-- int __pyx_t_6;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-+ __Pyx_RefNannySetupContext("__get__", 0);
-
-- /* "(tree fragment)":5
-- * cdef object _dict
-- * cdef bint use_setstate
-- * state = (self.data, self.error, self.id, self.reply_userdata) # <<<<<<<<<<<<<<
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None:
-- */
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_INCREF(__pyx_v_self->data);
-- __Pyx_GIVEREF(__pyx_v_self->data);
-- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->data);
-- __Pyx_GIVEREF(__pyx_t_1);
-- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_2);
-- PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
-- __Pyx_INCREF(__pyx_v_self->reply_userdata);
-- __Pyx_GIVEREF(__pyx_v_self->reply_userdata);
-- PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->reply_userdata);
-- __pyx_t_1 = 0;
-- __pyx_t_2 = 0;
-- __pyx_v_state = ((PyObject*)__pyx_t_3);
-- __pyx_t_3 = 0;
--
-- /* "(tree fragment)":6
-- * cdef bint use_setstate
-- * state = (self.data, self.error, self.id, self.reply_userdata)
-- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
-- * if _dict is not None:
-- * state += (_dict,)
-- */
-- __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_v__dict = __pyx_t_3;
-- __pyx_t_3 = 0;
--
-- /* "(tree fragment)":7
-- * state = (self.data, self.error, self.id, self.reply_userdata)
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None: # <<<<<<<<<<<<<<
-- * state += (_dict,)
-- * use_setstate = True
-- */
-- __pyx_t_4 = (__pyx_v__dict != Py_None);
-- __pyx_t_5 = (__pyx_t_4 != 0);
-- if (__pyx_t_5) {
--
-- /* "(tree fragment)":8
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None:
-- * state += (_dict,) # <<<<<<<<<<<<<<
-- * use_setstate = True
-- * else:
-- */
-- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_INCREF(__pyx_v__dict);
-- __Pyx_GIVEREF(__pyx_v__dict);
-- PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
-- __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
-- __pyx_t_2 = 0;
--
-- /* "(tree fragment)":9
-- * if _dict is not None:
-- * state += (_dict,)
-- * use_setstate = True # <<<<<<<<<<<<<<
-- * else:
-- * use_setstate = self.data is not None or self.reply_userdata is not None
-- */
-- __pyx_v_use_setstate = 1;
--
-- /* "(tree fragment)":7
-- * state = (self.data, self.error, self.id, self.reply_userdata)
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None: # <<<<<<<<<<<<<<
-- * state += (_dict,)
-- * use_setstate = True
-- */
-- goto __pyx_L3;
-- }
--
-- /* "(tree fragment)":11
-- * use_setstate = True
-- * else:
-- * use_setstate = self.data is not None or self.reply_userdata is not None # <<<<<<<<<<<<<<
-- * if use_setstate:
-- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
-+ /* "vidcutter/libs/pympv/mpv.pyx":394
-+ * """
-+ * cdef int64_t time
-+ * assert self._ctx # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * time = mpv_get_time_us(self._ctx)
- */
-- /*else*/ {
-- __pyx_t_4 = (__pyx_v_self->data != Py_None);
-- __pyx_t_6 = (__pyx_t_4 != 0);
-- if (!__pyx_t_6) {
-- } else {
-- __pyx_t_5 = __pyx_t_6;
-- goto __pyx_L4_bool_binop_done;
-+ #ifndef CYTHON_WITHOUT_ASSERTIONS
-+ if (unlikely(!Py_OptimizeFlag)) {
-+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-+ PyErr_SetNone(PyExc_AssertionError);
-+ __PYX_ERR(0, 394, __pyx_L1_error)
- }
-- __pyx_t_6 = (__pyx_v_self->reply_userdata != Py_None);
-- __pyx_t_4 = (__pyx_t_6 != 0);
-- __pyx_t_5 = __pyx_t_4;
-- __pyx_L4_bool_binop_done:;
-- __pyx_v_use_setstate = __pyx_t_5;
- }
-- __pyx_L3:;
-+ #endif
-
-- /* "(tree fragment)":12
-- * else:
-- * use_setstate = self.data is not None or self.reply_userdata is not None
-- * if use_setstate: # <<<<<<<<<<<<<<
-- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
-- * else:
-+ /* "vidcutter/libs/pympv/mpv.pyx":395
-+ * cdef int64_t time
-+ * assert self._ctx
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * time = mpv_get_time_us(self._ctx)
-+ * return time
- */
-- __pyx_t_5 = (__pyx_v_use_setstate != 0);
-- if (__pyx_t_5) {
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "(tree fragment)":13
-- * use_setstate = self.data is not None or self.reply_userdata is not None
-- * if use_setstate:
-- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state # <<<<<<<<<<<<<<
-- * else:
-- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
-+ /* "vidcutter/libs/pympv/mpv.pyx":396
-+ * assert self._ctx
-+ * with nogil:
-+ * time = mpv_get_time_us(self._ctx) # <<<<<<<<<<<<<<
-+ * return time
-+ *
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_INCREF(__pyx_int_228822053);
-- __Pyx_GIVEREF(__pyx_int_228822053);
-- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
-- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_2);
-- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
-- __Pyx_GIVEREF(__pyx_t_3);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
-- __Pyx_INCREF(__pyx_v_state);
-- __Pyx_GIVEREF(__pyx_v_state);
-- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
-- __pyx_t_2 = 0;
-- __pyx_t_3 = 0;
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ __pyx_v_time = mpv_get_time_us(__pyx_v_self->_ctx);
-+ }
-
-- /* "(tree fragment)":12
-- * else:
-- * use_setstate = self.data is not None or self.reply_userdata is not None
-- * if use_setstate: # <<<<<<<<<<<<<<
-- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
-- * else:
-+ /* "vidcutter/libs/pympv/mpv.pyx":395
-+ * cdef int64_t time
-+ * assert self._ctx
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * time = mpv_get_time_us(self._ctx)
-+ * return time
- */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
- }
-
-- /* "(tree fragment)":15
-- * return __pyx_unpickle_Event, (type(self), 0xda38c25, None), state
-- * else:
-- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state) # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * __pyx_unpickle_Event__set_state(self, __pyx_state)
-+ /* "vidcutter/libs/pympv/mpv.pyx":397
-+ * with nogil:
-+ * time = mpv_get_time_us(self._ctx)
-+ * return time # <<<<<<<<<<<<<<
-+ *
-+ * # def suspend(self):
- */
-- /*else*/ {
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Event); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_INCREF(__pyx_int_228822053);
-- __Pyx_GIVEREF(__pyx_int_228822053);
-- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_228822053);
-- __Pyx_INCREF(__pyx_v_state);
-- __Pyx_GIVEREF(__pyx_v_state);
-- PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
-- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_GIVEREF(__pyx_t_1);
-- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_3);
-- PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
-- __pyx_t_1 = 0;
-- __pyx_t_3 = 0;
-- __pyx_r = __pyx_t_2;
-- __pyx_t_2 = 0;
-- goto __pyx_L0;
-- }
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
-- /* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * cdef tuple state
-- * cdef object _dict
-+ /* "vidcutter/libs/pympv/mpv.pyx":386
-+ *
-+ * @property
-+ * def time(self): # <<<<<<<<<<<<<<
-+ * """Internal mpv client time.
-+ *
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_state);
-- __Pyx_XDECREF(__pyx_v__dict);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "(tree fragment)":16
-- * else:
-- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_unpickle_Event__set_state(self, __pyx_state)
-+/* "vidcutter/libs/pympv/mpv.pyx":412
-+ *
-+ * @_errors
-+ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
-+ * """Enable or disable a given event.
-+ *
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_request_event[] = "Enable or disable a given event.\n\n Arguments:\n event - See Events\n enable - True to enable, False to disable\n\n Wraps: mpv_request_event\n ";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_event = 0;
-+ PyObject *__pyx_v_enable = 0;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-+ __Pyx_RefNannySetupContext("request_event (wrapper)", 0);
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_event,&__pyx_n_s_enable,0};
-+ PyObject* values[2] = {0,0};
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enable)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 412, __pyx_L3_error)
-+ }
-+ }
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
-+ }
-+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-+ goto __pyx_L5_argtuple_error;
-+ } else {
-+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ }
-+ __pyx_v_event = values[0];
-+ __pyx_v_enable = values[1];
-+ }
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_event, __pyx_v_enable);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable) {
-+ int __pyx_v_enable_i;
-+ int __pyx_v_err;
-+ enum mpv_event_id __pyx_v_event_id;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_1;
-+ int __pyx_t_2;
-+ enum mpv_event_id __pyx_t_3;
-+ PyObject *__pyx_t_4 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-+ __Pyx_RefNannySetupContext("request_event", 0);
-
-- /* "(tree fragment)":17
-- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
-- * def __setstate_cython__(self, __pyx_state):
-- * __pyx_unpickle_Event__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":421
-+ * Wraps: mpv_request_event
-+ * """
-+ * assert self._ctx # <<<<<<<<<<<<<<
-+ * cdef int enable_i = 1 if enable else 0
-+ * cdef int err
- */
-- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ #ifndef CYTHON_WITHOUT_ASSERTIONS
-+ if (unlikely(!Py_OptimizeFlag)) {
-+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-+ PyErr_SetNone(PyExc_AssertionError);
-+ __PYX_ERR(0, 421, __pyx_L1_error)
-+ }
-+ }
-+ #endif
-
-- /* "(tree fragment)":16
-- * else:
-- * return __pyx_unpickle_Event, (type(self), 0xda38c25, state)
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_unpickle_Event__set_state(self, __pyx_state)
-+ /* "vidcutter/libs/pympv/mpv.pyx":422
-+ * """
-+ * assert self._ctx
-+ * cdef int enable_i = 1 if enable else 0 # <<<<<<<<<<<<<<
-+ * cdef int err
-+ * cdef mpv_event_id event_id = event
- */
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
-+ if (__pyx_t_2) {
-+ __pyx_t_1 = 1;
-+ } else {
-+ __pyx_t_1 = 0;
-+ }
-+ __pyx_v_enable_i = __pyx_t_1;
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Event.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":424
-+ * cdef int enable_i = 1 if enable else 0
-+ * cdef int err
-+ * cdef mpv_event_id event_id = event # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * err = mpv_request_event(self._ctx, event_id, enable_i)
-+ */
-+ __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
-+ __pyx_v_event_id = __pyx_t_3;
-
--/* "vidcutter/libs/pympv/mpv.pyx":318
-+ /* "vidcutter/libs/pympv/mpv.pyx":425
-+ * cdef int err
-+ * cdef mpv_event_id event_id = event
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_request_event(self._ctx, event_id, enable_i)
-+ * return err
-+ */
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":426
-+ * cdef mpv_event_id event_id = event
-+ * with nogil:
-+ * err = mpv_request_event(self._ctx, event_id, enable_i) # <<<<<<<<<<<<<<
-+ * return err
- *
-+ */
-+ __pyx_v_err = mpv_request_event(__pyx_v_self->_ctx, __pyx_v_event_id, __pyx_v_enable_i);
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":425
-+ * cdef int err
-+ * cdef mpv_event_id event_id = event
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_request_event(self._ctx, event_id, enable_i)
-+ * return err
-+ */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":427
-+ * with nogil:
-+ * err = mpv_request_event(self._ctx, event_id, enable_i)
-+ * return err # <<<<<<<<<<<<<<
- *
-- * def _errors(fn): # <<<<<<<<<<<<<<
-- * def wrapped(*k, **kw):
-- * v = fn(*k, **kw)
-+ * @_errors
- */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_r = __pyx_t_4;
-+ __pyx_t_4 = 0;
-+ goto __pyx_L0;
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_5_errors = {"_errors", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5_errors, METH_O, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, PyObject *__pyx_v_fn) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("_errors (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_4_errors(__pyx_self, ((PyObject *)__pyx_v_fn));
-+ /* "vidcutter/libs/pympv/mpv.pyx":412
-+ *
-+ * @_errors
-+ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
-+ * """Enable or disable a given event.
-+ *
-+ */
-
- /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":319
-+/* "vidcutter/libs/pympv/mpv.pyx":430
- *
-- * def _errors(fn):
-- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
-- * v = fn(*k, **kw)
-- * if v < 0:
-+ * @_errors
-+ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_request_log_messages"""
-+ * assert self._ctx
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped = {"wrapped", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped, METH_VARARGS|METH_KEYWORDS, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7_errors_1wrapped(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_k = 0;
-- PyObject *__pyx_v_kw = 0;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_2set_log_level[] = "Wraps: mpv_request_log_messages";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("wrapped (wrapper)", 0);
-- if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "wrapped", 1))) return NULL;
-- if (unlikely(__pyx_kwds)) {
-- __pyx_v_kw = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kw)) return NULL;
-- __Pyx_GOTREF(__pyx_v_kw);
-- } else {
-- __pyx_v_kw = NULL;
-- }
-- __Pyx_INCREF(__pyx_args);
-- __pyx_v_k = __pyx_args;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(__pyx_self, __pyx_v_k, __pyx_v_kw);
-+ __Pyx_RefNannySetupContext("set_log_level (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_loglevel));
-
- /* function exit code */
-- __Pyx_XDECREF(__pyx_v_k);
-- __Pyx_XDECREF(__pyx_v_kw);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx_self, PyObject *__pyx_v_k, PyObject *__pyx_v_kw) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
-- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_outer_scope;
-- PyObject *__pyx_v_v = NULL;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel) {
-+ char const *__pyx_v_loglevel_c;
-+ int __pyx_v_err;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-+ PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-+ char const *__pyx_t_4;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("wrapped", 0);
-- __pyx_outer_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *) __Pyx_CyFunction_GetClosure(__pyx_self);
-- __pyx_cur_scope = __pyx_outer_scope;
-+ __Pyx_RefNannySetupContext("set_log_level", 0);
-+ __Pyx_INCREF(__pyx_v_loglevel);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":320
-- * def _errors(fn):
-- * def wrapped(*k, **kw):
-- * v = fn(*k, **kw) # <<<<<<<<<<<<<<
-- * if v < 0:
-- * raise MPVError(v)
-+ /* "vidcutter/libs/pympv/mpv.pyx":432
-+ * def set_log_level(self, loglevel):
-+ * """Wraps: mpv_request_log_messages"""
-+ * assert self._ctx # <<<<<<<<<<<<<<
-+ * loglevel = _strenc(loglevel)
-+ * cdef const char* loglevel_c = loglevel
- */
-- if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 320, __pyx_L1_error) }
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
-+ #ifndef CYTHON_WITHOUT_ASSERTIONS
-+ if (unlikely(!Py_OptimizeFlag)) {
-+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-+ PyErr_SetNone(PyExc_AssertionError);
-+ __PYX_ERR(0, 432, __pyx_L1_error)
-+ }
-+ }
-+ #endif
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":433
-+ * """Wraps: mpv_request_log_messages"""
-+ * assert self._ctx
-+ * loglevel = _strenc(loglevel) # <<<<<<<<<<<<<<
-+ * cdef const char* loglevel_c = loglevel
-+ * cdef int err
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_loglevel) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loglevel);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v_v = __pyx_t_1;
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF_SET(__pyx_v_loglevel, __pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":321
-- * def wrapped(*k, **kw):
-- * v = fn(*k, **kw)
-- * if v < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(v)
-- * return wrapped
-+ /* "vidcutter/libs/pympv/mpv.pyx":434
-+ * assert self._ctx
-+ * loglevel = _strenc(loglevel)
-+ * cdef const char* loglevel_c = loglevel # <<<<<<<<<<<<<<
-+ * cdef int err
-+ * with nogil:
- */
-- __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 321, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- if (unlikely(__pyx_t_2)) {
-+ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L1_error)
-+ __pyx_v_loglevel_c = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":322
-- * v = fn(*k, **kw)
-- * if v < 0:
-- * raise MPVError(v) # <<<<<<<<<<<<<<
-- * return wrapped
-+ /* "vidcutter/libs/pympv/mpv.pyx":436
-+ * cdef const char* loglevel_c = loglevel
-+ * cdef int err
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_request_log_messages(self._ctx, loglevel_c)
-+ * return err
-+ */
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":437
-+ * cdef int err
-+ * with nogil:
-+ * err = mpv_request_log_messages(self._ctx, loglevel_c) # <<<<<<<<<<<<<<
-+ * return err
- *
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-+ __pyx_v_err = mpv_request_log_messages(__pyx_v_self->_ctx, __pyx_v_loglevel_c);
- }
-- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_v);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(0, 322, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":321
-- * def wrapped(*k, **kw):
-- * v = fn(*k, **kw)
-- * if v < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(v)
-- * return wrapped
-+ /* "vidcutter/libs/pympv/mpv.pyx":436
-+ * cdef const char* loglevel_c = loglevel
-+ * cdef int err
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_request_log_messages(self._ctx, loglevel_c)
-+ * return err
- */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":319
-+ /* "vidcutter/libs/pympv/mpv.pyx":438
-+ * with nogil:
-+ * err = mpv_request_log_messages(self._ctx, loglevel_c)
-+ * return err # <<<<<<<<<<<<<<
- *
-- * def _errors(fn):
-- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
-- * v = fn(*k, **kw)
-- * if v < 0:
-+ * @_errors
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":430
-+ *
-+ * @_errors
-+ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_request_log_messages"""
-+ * assert self._ctx
- */
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._errors.wrapped", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_log_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_v);
-+ __Pyx_XDECREF(__pyx_v_loglevel);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":318
-- *
-+/* "vidcutter/libs/pympv/mpv.pyx":441
- *
-- * def _errors(fn): # <<<<<<<<<<<<<<
-- * def wrapped(*k, **kw):
-- * v = fn(*k, **kw)
-+ * @_errors
-+ * def load_config(self, filename): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_load_config_file"""
-+ * assert self._ctx
- */
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fn) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_cur_scope;
-- PyObject *__pyx_v_wrapped = 0;
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_4load_config[] = "Wraps: mpv_load_config_file";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("load_config (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_filename));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename) {
-+ char const *__pyx_v__filename;
-+ int __pyx_v_err;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ char const *__pyx_t_4;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_errors", 0);
-- __pyx_cur_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(__pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, __pyx_empty_tuple, NULL);
-- if (unlikely(!__pyx_cur_scope)) {
-- __pyx_cur_scope = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)Py_None);
-- __Pyx_INCREF(Py_None);
-- __PYX_ERR(0, 318, __pyx_L1_error)
-- } else {
-- __Pyx_GOTREF(__pyx_cur_scope);
-+ __Pyx_RefNannySetupContext("load_config", 0);
-+ __Pyx_INCREF(__pyx_v_filename);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":443
-+ * def load_config(self, filename):
-+ * """Wraps: mpv_load_config_file"""
-+ * assert self._ctx # <<<<<<<<<<<<<<
-+ * filename = _strenc(filename)
-+ * cdef const char* _filename = filename
-+ */
-+ #ifndef CYTHON_WITHOUT_ASSERTIONS
-+ if (unlikely(!Py_OptimizeFlag)) {
-+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-+ PyErr_SetNone(PyExc_AssertionError);
-+ __PYX_ERR(0, 443, __pyx_L1_error)
-+ }
- }
-- __pyx_cur_scope->__pyx_v_fn = __pyx_v_fn;
-- __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn);
-- __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn);
-+ #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":319
-- *
-- * def _errors(fn):
-- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
-- * v = fn(*k, **kw)
-- * if v < 0:
-+ /* "vidcutter/libs/pympv/mpv.pyx":444
-+ * """Wraps: mpv_load_config_file"""
-+ * assert self._ctx
-+ * filename = _strenc(filename) # <<<<<<<<<<<<<<
-+ * cdef const char* _filename = filename
-+ * cdef int err
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v_wrapped = __pyx_t_1;
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":323
-- * if v < 0:
-- * raise MPVError(v)
-- * return wrapped # <<<<<<<<<<<<<<
-- *
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":445
-+ * assert self._ctx
-+ * filename = _strenc(filename)
-+ * cdef const char* _filename = filename # <<<<<<<<<<<<<<
-+ * cdef int err
-+ * with nogil:
-+ */
-+ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
-+ __pyx_v__filename = __pyx_t_4;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":447
-+ * cdef const char* _filename = filename
-+ * cdef int err
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_load_config_file(self._ctx, _filename)
-+ * return err
-+ */
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":448
-+ * cdef int err
-+ * with nogil:
-+ * err = mpv_load_config_file(self._ctx, _filename) # <<<<<<<<<<<<<<
-+ * return err
-+ *
-+ */
-+ __pyx_v_err = mpv_load_config_file(__pyx_v_self->_ctx, __pyx_v__filename);
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":447
-+ * cdef const char* _filename = filename
-+ * cdef int err
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_load_config_file(self._ctx, _filename)
-+ * return err
-+ */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":449
-+ * with nogil:
-+ * err = mpv_load_config_file(self._ctx, _filename)
-+ * return err # <<<<<<<<<<<<<<
-+ *
-+ * def _format_for(self, value):
- */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_wrapped);
-- __pyx_r = __pyx_v_wrapped;
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":318
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":441
- *
-- * def _errors(fn): # <<<<<<<<<<<<<<
-- * def wrapped(*k, **kw):
-- * v = fn(*k, **kw)
-+ * @_errors
-+ * def load_config(self, filename): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_load_config_file"""
-+ * assert self._ctx
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._errors", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.load_config", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_wrapped);
-- __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
-+ __Pyx_XDECREF(__pyx_v_filename);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":329
-- * code = None
-+/* "vidcutter/libs/pympv/mpv.pyx":451
-+ * return err
- *
-- * def __init__(self, e): # <<<<<<<<<<<<<<
-- * self.code = e
-- * cdef const char* err_c
-+ * def _format_for(self, value): # <<<<<<<<<<<<<<
-+ * if isinstance(value, basestring):
-+ * return MPV_FORMAT_STRING
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_self = 0;
-- PyObject *__pyx_v_e = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_e,0};
-- PyObject* values[2] = {0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 329, __pyx_L3_error)
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 329, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- }
-- __pyx_v_self = values[0];
-- __pyx_v_e = values[1];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(__pyx_self, __pyx_v_self, __pyx_v_e);
-+ __Pyx_RefNannySetupContext("_format_for (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_value));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_e) {
-- char const *__pyx_v_err_c;
-- int __pyx_v_e_i;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
- int __pyx_t_2;
-- int __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ int __pyx_t_4;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__init__", 0);
-- __Pyx_INCREF(__pyx_v_e);
-+ __Pyx_RefNannySetupContext("_format_for", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":330
-+ /* "vidcutter/libs/pympv/mpv.pyx":452
- *
-- * def __init__(self, e):
-- * self.code = e # <<<<<<<<<<<<<<
-- * cdef const char* err_c
-- * cdef int e_i
-- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":333
-- * cdef const char* err_c
-- * cdef int e_i
-- * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
-- * e_i = e
-- * with nogil:
-+ * def _format_for(self, value):
-+ * if isinstance(value, basestring): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_STRING
-+ * elif isinstance(value, bool):
- */
-- __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_e);
-- __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
-+ __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_value);
-+ __pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":334
-- * cdef int e_i
-- * if not isinstance(e, basestring):
-- * e_i = e # <<<<<<<<<<<<<<
-- * with nogil:
-- * err_c = mpv_error_string(e_i)
-+ /* "vidcutter/libs/pympv/mpv.pyx":453
-+ * def _format_for(self, value):
-+ * if isinstance(value, basestring):
-+ * return MPV_FORMAT_STRING # <<<<<<<<<<<<<<
-+ * elif isinstance(value, bool):
-+ * return MPV_FORMAT_FLAG
- */
-- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
-- __pyx_v_e_i = __pyx_t_3;
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":335
-- * if not isinstance(e, basestring):
-- * e_i = e
-- * with nogil: # <<<<<<<<<<<<<<
-- * err_c = mpv_error_string(e_i)
-- * e = _strdec(err_c)
-+ /* "vidcutter/libs/pympv/mpv.pyx":452
-+ *
-+ * def _format_for(self, value):
-+ * if isinstance(value, basestring): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_STRING
-+ * elif isinstance(value, bool):
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":336
-- * e_i = e
-- * with nogil:
-- * err_c = mpv_error_string(e_i) # <<<<<<<<<<<<<<
-- * e = _strdec(err_c)
-- * Exception.__init__(self, e)
-+ /* "vidcutter/libs/pympv/mpv.pyx":454
-+ * if isinstance(value, basestring):
-+ * return MPV_FORMAT_STRING
-+ * elif isinstance(value, bool): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_FLAG
-+ * elif isinstance(value, int):
- */
-- __pyx_v_err_c = mpv_error_string(__pyx_v_e_i);
-- }
-+ __pyx_t_3 = ((PyObject*)&PyBool_Type);
-+ __Pyx_INCREF(__pyx_t_3);
-+ __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 454, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __pyx_t_1 = (__pyx_t_2 != 0);
-+ if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":335
-- * if not isinstance(e, basestring):
-- * e_i = e
-- * with nogil: # <<<<<<<<<<<<<<
-- * err_c = mpv_error_string(e_i)
-- * e = _strdec(err_c)
-+ /* "vidcutter/libs/pympv/mpv.pyx":455
-+ * return MPV_FORMAT_STRING
-+ * elif isinstance(value, bool):
-+ * return MPV_FORMAT_FLAG # <<<<<<<<<<<<<<
-+ * elif isinstance(value, int):
-+ * return MPV_FORMAT_INT64
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L6;
-- }
-- __pyx_L6:;
-- }
-- }
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":337
-- * with nogil:
-- * err_c = mpv_error_string(e_i)
-- * e = _strdec(err_c) # <<<<<<<<<<<<<<
-- * Exception.__init__(self, e)
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":454
-+ * if isinstance(value, basestring):
-+ * return MPV_FORMAT_STRING
-+ * elif isinstance(value, bool): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_FLAG
-+ * elif isinstance(value, int):
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
-- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
-- if (likely(__pyx_t_7)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-- __Pyx_INCREF(__pyx_t_7);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_5, function);
-- }
-- }
-- __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_4);
-- __pyx_t_4 = 0;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":333
-- * cdef const char* err_c
-- * cdef int e_i
-- * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
-- * e_i = e
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":456
-+ * elif isinstance(value, bool):
-+ * return MPV_FORMAT_FLAG
-+ * elif isinstance(value, int): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_INT64
-+ * elif isinstance(value, float):
-+ */
-+ __pyx_t_1 = PyInt_Check(__pyx_v_value);
-+ __pyx_t_2 = (__pyx_t_1 != 0);
-+ if (__pyx_t_2) {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":457
-+ * return MPV_FORMAT_FLAG
-+ * elif isinstance(value, int):
-+ * return MPV_FORMAT_INT64 # <<<<<<<<<<<<<<
-+ * elif isinstance(value, float):
-+ * return MPV_FORMAT_DOUBLE
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
-+ goto __pyx_L0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":456
-+ * elif isinstance(value, bool):
-+ * return MPV_FORMAT_FLAG
-+ * elif isinstance(value, int): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_INT64
-+ * elif isinstance(value, float):
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":338
-- * err_c = mpv_error_string(e_i)
-- * e = _strdec(err_c)
-- * Exception.__init__(self, e) # <<<<<<<<<<<<<<
-- *
-- * class PyMPVError(Exception):
-+ /* "vidcutter/libs/pympv/mpv.pyx":458
-+ * elif isinstance(value, int):
-+ * return MPV_FORMAT_INT64
-+ * elif isinstance(value, float): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_DOUBLE
-+ * elif isinstance(value, (tuple, list)):
-+ */
-+ __pyx_t_2 = PyFloat_Check(__pyx_v_value);
-+ __pyx_t_1 = (__pyx_t_2 != 0);
-+ if (__pyx_t_1) {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":459
-+ * return MPV_FORMAT_INT64
-+ * elif isinstance(value, float):
-+ * return MPV_FORMAT_DOUBLE # <<<<<<<<<<<<<<
-+ * elif isinstance(value, (tuple, list)):
-+ * return MPV_FORMAT_NODE_ARRAY
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
-+ goto __pyx_L0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":458
-+ * elif isinstance(value, int):
-+ * return MPV_FORMAT_INT64
-+ * elif isinstance(value, float): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_DOUBLE
-+ * elif isinstance(value, (tuple, list)):
- */
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __pyx_t_6 = NULL;
-- __pyx_t_3 = 0;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
-- if (likely(__pyx_t_6)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-- __Pyx_INCREF(__pyx_t_6);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_5, function);
-- __pyx_t_3 = 1;
-- }
- }
-- #if CYTHON_FAST_PYCALL
-- if (PyFunction_Check(__pyx_t_5)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
-- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_GOTREF(__pyx_t_4);
-- } else
-- #endif
-- #if CYTHON_FAST_PYCCALL
-- if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
-- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_GOTREF(__pyx_t_4);
-- } else
-- #endif
-- {
-- __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- if (__pyx_t_6) {
-- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
-- }
-- __Pyx_INCREF(__pyx_v_self);
-- __Pyx_GIVEREF(__pyx_v_self);
-- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_3, __pyx_v_self);
-- __Pyx_INCREF(__pyx_v_e);
-- __Pyx_GIVEREF(__pyx_v_e);
-- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_3, __pyx_v_e);
-- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":460
-+ * elif isinstance(value, float):
-+ * return MPV_FORMAT_DOUBLE
-+ * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_NODE_ARRAY
-+ * elif isinstance(value, dict):
-+ */
-+ __pyx_t_2 = PyTuple_Check(__pyx_v_value);
-+ __pyx_t_4 = (__pyx_t_2 != 0);
-+ if (!__pyx_t_4) {
-+ } else {
-+ __pyx_t_1 = __pyx_t_4;
-+ goto __pyx_L4_bool_binop_done;
- }
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_4 = PyList_Check(__pyx_v_value);
-+ __pyx_t_2 = (__pyx_t_4 != 0);
-+ __pyx_t_1 = __pyx_t_2;
-+ __pyx_L4_bool_binop_done:;
-+ __pyx_t_2 = (__pyx_t_1 != 0);
-+ if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":329
-- * code = None
-- *
-- * def __init__(self, e): # <<<<<<<<<<<<<<
-- * self.code = e
-- * cdef const char* err_c
-+ /* "vidcutter/libs/pympv/mpv.pyx":461
-+ * return MPV_FORMAT_DOUBLE
-+ * elif isinstance(value, (tuple, list)):
-+ * return MPV_FORMAT_NODE_ARRAY # <<<<<<<<<<<<<<
-+ * elif isinstance(value, dict):
-+ * return MPV_FORMAT_NODE_MAP
- */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
-+ goto __pyx_L0;
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_e);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":460
-+ * elif isinstance(value, float):
-+ * return MPV_FORMAT_DOUBLE
-+ * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_NODE_ARRAY
-+ * elif isinstance(value, dict):
-+ */
-+ }
-
--/* "vidcutter/libs/pympv/mpv.pyx":347
-- *
-- * class _ReplyUserData(object):
-- * def __init__(self, data): # <<<<<<<<<<<<<<
-- * self.counter = 0
-- * self.data = data
-+ /* "vidcutter/libs/pympv/mpv.pyx":462
-+ * elif isinstance(value, (tuple, list)):
-+ * return MPV_FORMAT_NODE_ARRAY
-+ * elif isinstance(value, dict): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_NODE_MAP
-+ * return MPV_FORMAT_NONE
- */
-+ __pyx_t_2 = PyDict_Check(__pyx_v_value);
-+ __pyx_t_1 = (__pyx_t_2 != 0);
-+ if (__pyx_t_1) {
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_self = 0;
-- PyObject *__pyx_v_data = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_data,0};
-- PyObject* values[2] = {0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 347, __pyx_L3_error)
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 347, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- }
-- __pyx_v_self = values[0];
-- __pyx_v_data = values[1];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 347, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(__pyx_self, __pyx_v_self, __pyx_v_data);
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__init__", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":348
-- * class _ReplyUserData(object):
-- * def __init__(self, data):
-- * self.counter = 0 # <<<<<<<<<<<<<<
-- * self.data = data
-- * self.observed = False
-+ /* "vidcutter/libs/pympv/mpv.pyx":463
-+ * return MPV_FORMAT_NODE_ARRAY
-+ * elif isinstance(value, dict):
-+ * return MPV_FORMAT_NODE_MAP # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_NONE
-+ *
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":349
-- * def __init__(self, data):
-- * self.counter = 0
-- * self.data = data # <<<<<<<<<<<<<<
-- * self.observed = False
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":462
-+ * elif isinstance(value, (tuple, list)):
-+ * return MPV_FORMAT_NODE_ARRAY
-+ * elif isinstance(value, dict): # <<<<<<<<<<<<<<
-+ * return MPV_FORMAT_NODE_MAP
-+ * return MPV_FORMAT_NONE
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":350
-- * self.counter = 0
-- * self.data = data
-- * self.observed = False # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":464
-+ * elif isinstance(value, dict):
-+ * return MPV_FORMAT_NODE_MAP
-+ * return MPV_FORMAT_NONE # <<<<<<<<<<<<<<
- *
-- * def add(self):
-+ * cdef mpv_node_list* _prep_node_list(self, values):
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":347
-+ /* "vidcutter/libs/pympv/mpv.pyx":451
-+ * return err
- *
-- * class _ReplyUserData(object):
-- * def __init__(self, data): # <<<<<<<<<<<<<<
-- * self.counter = 0
-- * self.data = data
-+ * def _format_for(self, value): # <<<<<<<<<<<<<<
-+ * if isinstance(value, basestring):
-+ * return MPV_FORMAT_STRING
- */
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context._format_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
-@@ -8510,1160 +9185,1186 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":352
-- * self.observed = False
-- *
-- * def add(self): # <<<<<<<<<<<<<<
-- * self.counter += 1
-+/* "vidcutter/libs/pympv/mpv.pyx":466
-+ * return MPV_FORMAT_NONE
- *
-+ * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
-+ * cdef mpv_node node
-+ * cdef mpv_format format
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add = {"add", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, METH_O, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_3add(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("add (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(__pyx_self, ((PyObject *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-+static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_values) {
-+ struct mpv_node __pyx_v_node;
-+ enum mpv_format __pyx_v_format;
-+ struct mpv_node_list *__pyx_v_node_list;
-+ PyObject *__pyx_v_i = NULL;
-+ PyObject *__pyx_v_value = NULL;
-+ struct mpv_node_list *__pyx_r;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-+ Py_ssize_t __pyx_t_1;
-+ int __pyx_t_2;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *(*__pyx_t_5)(PyObject *);
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ PyObject *__pyx_t_8 = NULL;
-+ enum mpv_format __pyx_t_9;
-+ Py_ssize_t __pyx_t_10;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("add", 0);
-+ __Pyx_RefNannySetupContext("_prep_node_list", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":353
-- *
-- * def add(self):
-- * self.counter += 1 # <<<<<<<<<<<<<<
-- *
-- * def remove(self):
-+ /* "vidcutter/libs/pympv/mpv.pyx":469
-+ * cdef mpv_node node
-+ * cdef mpv_format format
-+ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list)) # <<<<<<<<<<<<<<
-+ * node_list.num = len(values)
-+ * node_list.values = NULL
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v_node_list = ((struct mpv_node_list *)malloc((sizeof(struct mpv_node_list))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":352
-- * self.observed = False
-- *
-- * def add(self): # <<<<<<<<<<<<<<
-- * self.counter += 1
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":470
-+ * cdef mpv_format format
-+ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
-+ * node_list.num = len(values) # <<<<<<<<<<<<<<
-+ * node_list.values = NULL
-+ * node_list.keys = NULL
- */
-+ __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 470, __pyx_L1_error)
-+ __pyx_v_node_list->num = __pyx_t_1;
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":355
-- * self.counter += 1
-- *
-- * def remove(self): # <<<<<<<<<<<<<<
-- * self.counter -= 1
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":471
-+ * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
-+ * node_list.num = len(values)
-+ * node_list.values = NULL # <<<<<<<<<<<<<<
-+ * node_list.keys = NULL
-+ * if node_list.num:
- */
-+ __pyx_v_node_list->values = NULL;
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove = {"remove", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, METH_O, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("remove (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(__pyx_self, ((PyObject *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":472
-+ * node_list.num = len(values)
-+ * node_list.values = NULL
-+ * node_list.keys = NULL # <<<<<<<<<<<<<<
-+ * if node_list.num:
-+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-+ */
-+ __pyx_v_node_list->keys = NULL;
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("remove", 0);
-+ /* "vidcutter/libs/pympv/mpv.pyx":473
-+ * node_list.values = NULL
-+ * node_list.keys = NULL
-+ * if node_list.num: # <<<<<<<<<<<<<<
-+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-+ * for i, value in enumerate(values):
-+ */
-+ __pyx_t_2 = (__pyx_v_node_list->num != 0);
-+ if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":356
-- *
-- * def remove(self):
-- * self.counter -= 1 # <<<<<<<<<<<<<<
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":474
-+ * node_list.keys = NULL
-+ * if node_list.num:
-+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node)) # <<<<<<<<<<<<<<
-+ * for i, value in enumerate(values):
-+ * format = self._format_for(value)
-+ */
-+ __pyx_v_node_list->values = ((struct mpv_node *)malloc((__pyx_v_node_list->num * (sizeof(struct mpv_node)))));
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":473
-+ * node_list.values = NULL
-+ * node_list.keys = NULL
-+ * if node_list.num: # <<<<<<<<<<<<<<
-+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-+ * for i, value in enumerate(values):
-+ */
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":475
-+ * if node_list.num:
-+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-+ * for i, value in enumerate(values): # <<<<<<<<<<<<<<
-+ * format = self._format_for(value)
-+ * node = self._prep_native_value(value, format)
-+ */
-+ __Pyx_INCREF(__pyx_int_0);
-+ __pyx_t_3 = __pyx_int_0;
-+ if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
-+ __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
-+ __pyx_t_5 = NULL;
-+ } else {
-+ __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ }
-+ for (;;) {
-+ if (likely(!__pyx_t_5)) {
-+ if (likely(PyList_CheckExact(__pyx_t_4))) {
-+ if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
-+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ #else
-+ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ #endif
-+ } else {
-+ if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
-+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ #else
-+ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ #endif
-+ }
-+ } else {
-+ __pyx_t_6 = __pyx_t_5(__pyx_t_4);
-+ if (unlikely(!__pyx_t_6)) {
-+ PyObject* exc_type = PyErr_Occurred();
-+ if (exc_type) {
-+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
-+ else __PYX_ERR(0, 475, __pyx_L1_error)
-+ }
-+ break;
-+ }
-+ __Pyx_GOTREF(__pyx_t_6);
-+ }
-+ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
-+ __pyx_t_6 = 0;
-+ __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
-+ __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __Pyx_DECREF(__pyx_t_3);
-+ __pyx_t_3 = __pyx_t_6;
-+ __pyx_t_6 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":476
-+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-+ * for i, value in enumerate(values):
-+ * format = self._format_for(value) # <<<<<<<<<<<<<<
-+ * node = self._prep_native_value(value, format)
-+ * node_list.values[i] = node
-+ */
-+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 476, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_8 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-+ if (likely(__pyx_t_8)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-+ __Pyx_INCREF(__pyx_t_8);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_7, function);
-+ }
-+ }
-+ __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
-+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_v_format = __pyx_t_9;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":477
-+ * for i, value in enumerate(values):
-+ * format = self._format_for(value)
-+ * node = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
-+ * node_list.values[i] = node
-+ * return node_list
-+ */
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_6);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":478
-+ * format = self._format_for(value)
-+ * node = self._prep_native_value(value, format)
-+ * node_list.values[i] = node # <<<<<<<<<<<<<<
-+ * return node_list
- *
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
-+ (__pyx_v_node_list->values[__pyx_t_10]) = __pyx_v_node;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":355
-- * self.counter += 1
-+ /* "vidcutter/libs/pympv/mpv.pyx":475
-+ * if node_list.num:
-+ * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-+ * for i, value in enumerate(values): # <<<<<<<<<<<<<<
-+ * format = self._format_for(value)
-+ * node = self._prep_native_value(value, format)
-+ */
-+ }
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":479
-+ * node = self._prep_native_value(value, format)
-+ * node_list.values[i] = node
-+ * return node_list # <<<<<<<<<<<<<<
- *
-- * def remove(self): # <<<<<<<<<<<<<<
-- * self.counter -= 1
-+ * cdef mpv_node_list* _prep_node_map(self, map):
-+ */
-+ __pyx_r = __pyx_v_node_list;
-+ goto __pyx_L0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":466
-+ * return MPV_FORMAT_NONE
- *
-+ * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
-+ * cdef mpv_node node
-+ * cdef mpv_format format
- */
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_XDECREF(__pyx_t_8);
-+ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_list", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __pyx_r = 0;
- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_XDECREF(__pyx_v_i);
-+ __Pyx_XDECREF(__pyx_v_value);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":370
-- *
-- * @property
-- * def api_version(self): # <<<<<<<<<<<<<<
-- * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
-+/* "vidcutter/libs/pympv/mpv.pyx":481
-+ * return node_list
- *
-+ * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
-+ * cdef char* ckey
-+ * cdef mpv_node_list* list
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-+static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_map) {
-+ char *__pyx_v_ckey;
-+ struct mpv_node_list *__pyx_v_list;
-+ PyObject *__pyx_v_keys = NULL;
-+ PyObject *__pyx_v_i = NULL;
-+ PyObject *__pyx_v_key = NULL;
-+ struct mpv_node_list *__pyx_r;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-+ Py_ssize_t __pyx_t_4;
-+ int __pyx_t_5;
-+ PyObject *(*__pyx_t_6)(PyObject *);
-+ PyObject *__pyx_t_7 = NULL;
-+ PyObject *__pyx_t_8 = NULL;
-+ char *__pyx_t_9;
-+ Py_ssize_t __pyx_t_10;
-+ Py_ssize_t __pyx_t_11;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__get__", 0);
-+ __Pyx_RefNannySetupContext("_prep_node_map", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":371
-- * @property
-- * def api_version(self):
-- * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION # <<<<<<<<<<<<<<
-- *
-- * @property
-+ /* "vidcutter/libs/pympv/mpv.pyx":484
-+ * cdef char* ckey
-+ * cdef mpv_node_list* list
-+ * list = self._prep_node_list(map.values()) # <<<<<<<<<<<<<<
-+ * keys = map.keys()
-+ * if not len(keys):
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_GIVEREF(__pyx_t_1);
-- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_2);
-- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
-- __Pyx_GIVEREF(__pyx_t_3);
-- PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
-- __pyx_t_1 = 0;
-- __pyx_t_2 = 0;
-- __pyx_t_3 = 0;
-- __pyx_r = __pyx_t_4;
-- __pyx_t_4 = 0;
-- goto __pyx_L0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":370
-- *
-- * @property
-- * def api_version(self): # <<<<<<<<<<<<<<
-- * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION
-- *
-- */
--
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.api_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":374
-- *
-- * @property
-- * def name(self): # <<<<<<<<<<<<<<
-- * """Unique name for every context created.
-- *
-- */
--
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-- char const *__pyx_v_name;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__get__", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":380
-- * """
-- * cdef const char* name
-- * assert self._ctx # <<<<<<<<<<<<<<
-- * with nogil:
-- * name = mpv_client_name(self._ctx)
-- */
-- #ifndef CYTHON_WITHOUT_ASSERTIONS
-- if (unlikely(!Py_OptimizeFlag)) {
-- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 380, __pyx_L1_error)
-+ __pyx_t_3 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
- }
- }
-- #endif
--
-- /* "vidcutter/libs/pympv/mpv.pyx":381
-- * cdef const char* name
-- * assert self._ctx
-- * with nogil: # <<<<<<<<<<<<<<
-- * name = mpv_client_name(self._ctx)
-- * return _strdec(name)
-- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":382
-- * assert self._ctx
-- * with nogil:
-- * name = mpv_client_name(self._ctx) # <<<<<<<<<<<<<<
-- * return _strdec(name)
-- *
-- */
-- __pyx_v_name = mpv_client_name(__pyx_v_self->_ctx);
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":381
-- * cdef const char* name
-- * assert self._ctx
-- * with nogil: # <<<<<<<<<<<<<<
-- * name = mpv_client_name(self._ctx)
-- * return _strdec(name)
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-- }
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v_list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":383
-- * with nogil:
-- * name = mpv_client_name(self._ctx)
-- * return _strdec(name) # <<<<<<<<<<<<<<
-- *
-- * @property
-+ /* "vidcutter/libs/pympv/mpv.pyx":485
-+ * cdef mpv_node_list* list
-+ * list = self._prep_node_list(map.values())
-+ * keys = map.keys() # <<<<<<<<<<<<<<
-+ * if not len(keys):
-+ * return list
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-+ __pyx_t_3 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(__pyx_t_3);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
- }
- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_r = __pyx_t_1;
-+ __pyx_v_keys = __pyx_t_1;
- __pyx_t_1 = 0;
-- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":374
-- *
-- * @property
-- * def name(self): # <<<<<<<<<<<<<<
-- * """Unique name for every context created.
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":486
-+ * list = self._prep_node_list(map.values())
-+ * keys = map.keys()
-+ * if not len(keys): # <<<<<<<<<<<<<<
-+ * return list
-+ * list.keys = <char**>malloc(list.num)
- */
-+ __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 486, __pyx_L1_error)
-+ __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
-+ if (__pyx_t_5) {
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":386
-- *
-- * @property
-- * def time(self): # <<<<<<<<<<<<<<
-- * """Internal mpv client time.
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":487
-+ * keys = map.keys()
-+ * if not len(keys):
-+ * return list # <<<<<<<<<<<<<<
-+ * list.keys = <char**>malloc(list.num)
-+ * for i, key in enumerate(keys):
- */
-+ __pyx_r = __pyx_v_list;
-+ goto __pyx_L0;
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-+ /* "vidcutter/libs/pympv/mpv.pyx":486
-+ * list = self._prep_node_list(map.values())
-+ * keys = map.keys()
-+ * if not len(keys): # <<<<<<<<<<<<<<
-+ * return list
-+ * list.keys = <char**>malloc(list.num)
-+ */
-+ }
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":488
-+ * if not len(keys):
-+ * return list
-+ * list.keys = <char**>malloc(list.num) # <<<<<<<<<<<<<<
-+ * for i, key in enumerate(keys):
-+ * key = _strenc(key)
-+ */
-+ __pyx_v_list->keys = ((char **)malloc(__pyx_v_list->num));
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-- int64_t __pyx_v_time;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__get__", 0);
-+ /* "vidcutter/libs/pympv/mpv.pyx":489
-+ * return list
-+ * list.keys = <char**>malloc(list.num)
-+ * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
-+ * key = _strenc(key)
-+ * ckey = key
-+ */
-+ __Pyx_INCREF(__pyx_int_0);
-+ __pyx_t_1 = __pyx_int_0;
-+ if (likely(PyList_CheckExact(__pyx_v_keys)) || PyTuple_CheckExact(__pyx_v_keys)) {
-+ __pyx_t_2 = __pyx_v_keys; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
-+ __pyx_t_6 = NULL;
-+ } else {
-+ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ }
-+ for (;;) {
-+ if (likely(!__pyx_t_6)) {
-+ if (likely(PyList_CheckExact(__pyx_t_2))) {
-+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
-+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ #else
-+ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ #endif
-+ } else {
-+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ #else
-+ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ #endif
-+ }
-+ } else {
-+ __pyx_t_3 = __pyx_t_6(__pyx_t_2);
-+ if (unlikely(!__pyx_t_3)) {
-+ PyObject* exc_type = PyErr_Occurred();
-+ if (exc_type) {
-+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
-+ else __PYX_ERR(0, 489, __pyx_L1_error)
-+ }
-+ break;
-+ }
-+ __Pyx_GOTREF(__pyx_t_3);
-+ }
-+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
-+ __pyx_t_3 = 0;
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
-+ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_1);
-+ __pyx_t_1 = __pyx_t_3;
-+ __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":394
-- * """
-- * cdef int64_t time
-- * assert self._ctx # <<<<<<<<<<<<<<
-- * with nogil:
-- * time = mpv_get_time_us(self._ctx)
-+ /* "vidcutter/libs/pympv/mpv.pyx":490
-+ * list.keys = <char**>malloc(list.num)
-+ * for i, key in enumerate(keys):
-+ * key = _strenc(key) # <<<<<<<<<<<<<<
-+ * ckey = key
-+ * list.keys[i] = <char*>malloc(len(key) + 1)
- */
-- #ifndef CYTHON_WITHOUT_ASSERTIONS
-- if (unlikely(!Py_OptimizeFlag)) {
-- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 394, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_8 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
-+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-+ if (likely(__pyx_t_8)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-+ __Pyx_INCREF(__pyx_t_8);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_7, function);
-+ }
- }
-- }
-- #endif
-+ __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_key);
-+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
-+ __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":395
-- * cdef int64_t time
-- * assert self._ctx
-- * with nogil: # <<<<<<<<<<<<<<
-- * time = mpv_get_time_us(self._ctx)
-- * return time
-+ /* "vidcutter/libs/pympv/mpv.pyx":491
-+ * for i, key in enumerate(keys):
-+ * key = _strenc(key)
-+ * ckey = key # <<<<<<<<<<<<<<
-+ * list.keys[i] = <char*>malloc(len(key) + 1)
-+ * strcpy(list.keys[i], ckey)
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L1_error)
-+ __pyx_v_ckey = __pyx_t_9;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":396
-- * assert self._ctx
-- * with nogil:
-- * time = mpv_get_time_us(self._ctx) # <<<<<<<<<<<<<<
-- * return time
-+ /* "vidcutter/libs/pympv/mpv.pyx":492
-+ * key = _strenc(key)
-+ * ckey = key
-+ * list.keys[i] = <char*>malloc(len(key) + 1) # <<<<<<<<<<<<<<
-+ * strcpy(list.keys[i], ckey)
-+ * return list
-+ */
-+ __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 492, __pyx_L1_error)
-+ __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L1_error)
-+ (__pyx_v_list->keys[__pyx_t_11]) = ((char *)malloc((__pyx_t_10 + 1)));
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":493
-+ * ckey = key
-+ * list.keys[i] = <char*>malloc(len(key) + 1)
-+ * strcpy(list.keys[i], ckey) # <<<<<<<<<<<<<<
-+ * return list
- *
- */
-- __pyx_v_time = mpv_get_time_us(__pyx_v_self->_ctx);
-- }
-+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
-+ (void)(strcpy((__pyx_v_list->keys[__pyx_t_10]), __pyx_v_ckey));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":395
-- * cdef int64_t time
-- * assert self._ctx
-- * with nogil: # <<<<<<<<<<<<<<
-- * time = mpv_get_time_us(self._ctx)
-- * return time
-+ /* "vidcutter/libs/pympv/mpv.pyx":489
-+ * return list
-+ * list.keys = <char**>malloc(list.num)
-+ * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
-+ * key = _strenc(key)
-+ * ckey = key
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
- }
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":397
-- * with nogil:
-- * time = mpv_get_time_us(self._ctx)
-- * return time # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":494
-+ * list.keys[i] = <char*>malloc(len(key) + 1)
-+ * strcpy(list.keys[i], ckey)
-+ * return list # <<<<<<<<<<<<<<
- *
-- * def suspend(self):
-+ * cdef mpv_node _prep_native_value(self, value, format):
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ __pyx_r = __pyx_v_list;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":386
-- *
-- * @property
-- * def time(self): # <<<<<<<<<<<<<<
-- * """Internal mpv client time.
-+ /* "vidcutter/libs/pympv/mpv.pyx":481
-+ * return node_list
- *
-+ * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
-+ * cdef char* ckey
-+ * cdef mpv_node_list* list
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.time.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_XDECREF(__pyx_t_8);
-+ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_map", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __pyx_r = 0;
- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_XDECREF(__pyx_v_keys);
-+ __Pyx_XDECREF(__pyx_v_i);
-+ __Pyx_XDECREF(__pyx_v_key);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":399
-- * return time
-+/* "vidcutter/libs/pympv/mpv.pyx":496
-+ * return list
- *
-- * def suspend(self): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_suspend"""
-- * assert self._ctx
-+ * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
-+ * cdef mpv_node node
-+ * node.format = format
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1suspend(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_suspend[] = "Wraps: mpv_suspend";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1suspend(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("suspend (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_suspend(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_suspend(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-+static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format) {
-+ struct mpv_node __pyx_v_node;
-+ struct mpv_node __pyx_r;
- __Pyx_RefNannyDeclarations
-+ enum mpv_format __pyx_t_1;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ int __pyx_t_4;
-+ PyObject *__pyx_t_5 = NULL;
-+ Py_ssize_t __pyx_t_6;
-+ char const *__pyx_t_7;
-+ int __pyx_t_8;
-+ int64_t __pyx_t_9;
-+ double __pyx_t_10;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("suspend", 0);
-+ __Pyx_RefNannySetupContext("_prep_native_value", 0);
-+ __Pyx_INCREF(__pyx_v_value);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":401
-- * def suspend(self):
-- * """Wraps: mpv_suspend"""
-- * assert self._ctx # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_suspend(self._ctx)
-+ /* "vidcutter/libs/pympv/mpv.pyx":498
-+ * cdef mpv_node _prep_native_value(self, value, format):
-+ * cdef mpv_node node
-+ * node.format = format # <<<<<<<<<<<<<<
-+ * if format == MPV_FORMAT_STRING:
-+ * value = _strenc(value)
- */
-- #ifndef CYTHON_WITHOUT_ASSERTIONS
-- if (unlikely(!Py_OptimizeFlag)) {
-- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 401, __pyx_L1_error)
-- }
-- }
-- #endif
--
-- /* "vidcutter/libs/pympv/mpv.pyx":402
-- * """Wraps: mpv_suspend"""
-- * assert self._ctx
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_suspend(self._ctx)
-- *
-- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error)
-+ __pyx_v_node.format = __pyx_t_1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":403
-- * assert self._ctx
-- * with nogil:
-- * mpv_suspend(self._ctx) # <<<<<<<<<<<<<<
-- *
-- * def resume(self):
-+ /* "vidcutter/libs/pympv/mpv.pyx":499
-+ * cdef mpv_node node
-+ * node.format = format
-+ * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-+ * value = _strenc(value)
-+ * node.u.string = <char*>malloc(len(value) + 1)
- */
-- mpv_suspend(__pyx_v_self->_ctx);
-- }
-+ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (__pyx_t_4) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":402
-- * """Wraps: mpv_suspend"""
-- * assert self._ctx
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_suspend(self._ctx)
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":500
-+ * node.format = format
-+ * if format == MPV_FORMAT_STRING:
-+ * value = _strenc(value) # <<<<<<<<<<<<<<
-+ * node.u.string = <char*>malloc(len(value) + 1)
-+ * strcpy(node.u.string, value)
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
- }
-- }
-+ }
-+ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
-+ __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":399
-- * return time
-- *
-- * def suspend(self): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_suspend"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":501
-+ * if format == MPV_FORMAT_STRING:
-+ * value = _strenc(value)
-+ * node.u.string = <char*>malloc(len(value) + 1) # <<<<<<<<<<<<<<
-+ * strcpy(node.u.string, value)
-+ * elif format == MPV_FORMAT_FLAG:
- */
-+ __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 501, __pyx_L1_error)
-+ __pyx_v_node.u.string = ((char *)malloc((__pyx_t_6 + 1)));
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.suspend", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":405
-- * mpv_suspend(self._ctx)
-- *
-- * def resume(self): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_resume"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":502
-+ * value = _strenc(value)
-+ * node.u.string = <char*>malloc(len(value) + 1)
-+ * strcpy(node.u.string, value) # <<<<<<<<<<<<<<
-+ * elif format == MPV_FORMAT_FLAG:
-+ * node.u.flag = 1 if value else 0
- */
-+ __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
-+ (void)(strcpy(__pyx_v_node.u.string, __pyx_t_7));
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3resume(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_2resume[] = "Wraps: mpv_resume";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_3resume(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("resume (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_2resume(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":499
-+ * cdef mpv_node node
-+ * node.format = format
-+ * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-+ * value = _strenc(value)
-+ * node.u.string = <char*>malloc(len(value) + 1)
-+ */
-+ goto __pyx_L3;
-+ }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2resume(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("resume", 0);
-+ /* "vidcutter/libs/pympv/mpv.pyx":503
-+ * node.u.string = <char*>malloc(len(value) + 1)
-+ * strcpy(node.u.string, value)
-+ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
-+ * node.u.flag = 1 if value else 0
-+ * elif format == MPV_FORMAT_INT64:
-+ */
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (__pyx_t_4) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":407
-- * def resume(self):
-- * """Wraps: mpv_resume"""
-- * assert self._ctx # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_resume(self._ctx)
-+ /* "vidcutter/libs/pympv/mpv.pyx":504
-+ * strcpy(node.u.string, value)
-+ * elif format == MPV_FORMAT_FLAG:
-+ * node.u.flag = 1 if value else 0 # <<<<<<<<<<<<<<
-+ * elif format == MPV_FORMAT_INT64:
-+ * node.u.int64 = value
- */
-- #ifndef CYTHON_WITHOUT_ASSERTIONS
-- if (unlikely(!Py_OptimizeFlag)) {
-- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 407, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 504, __pyx_L1_error)
-+ if (__pyx_t_4) {
-+ __pyx_t_8 = 1;
-+ } else {
-+ __pyx_t_8 = 0;
- }
-+ __pyx_v_node.u.flag = __pyx_t_8;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":503
-+ * node.u.string = <char*>malloc(len(value) + 1)
-+ * strcpy(node.u.string, value)
-+ * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
-+ * node.u.flag = 1 if value else 0
-+ * elif format == MPV_FORMAT_INT64:
-+ */
-+ goto __pyx_L3;
- }
-- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":408
-- * """Wraps: mpv_resume"""
-- * assert self._ctx
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_resume(self._ctx)
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":505
-+ * elif format == MPV_FORMAT_FLAG:
-+ * node.u.flag = 1 if value else 0
-+ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
-+ * node.u.int64 = value
-+ * elif format == MPV_FORMAT_DOUBLE:
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (__pyx_t_4) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":409
-- * assert self._ctx
-- * with nogil:
-- * mpv_resume(self._ctx) # <<<<<<<<<<<<<<
-- *
-- * @_errors
-+ /* "vidcutter/libs/pympv/mpv.pyx":506
-+ * node.u.flag = 1 if value else 0
-+ * elif format == MPV_FORMAT_INT64:
-+ * node.u.int64 = value # <<<<<<<<<<<<<<
-+ * elif format == MPV_FORMAT_DOUBLE:
-+ * node.u.double_ = value
- */
-- mpv_resume(__pyx_v_self->_ctx);
-- }
-+ __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error)
-+ __pyx_v_node.u.int64 = __pyx_t_9;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":408
-- * """Wraps: mpv_resume"""
-- * assert self._ctx
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_resume(self._ctx)
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":505
-+ * elif format == MPV_FORMAT_FLAG:
-+ * node.u.flag = 1 if value else 0
-+ * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
-+ * node.u.int64 = value
-+ * elif format == MPV_FORMAT_DOUBLE:
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-+ goto __pyx_L3;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":405
-- * mpv_suspend(self._ctx)
-- *
-- * def resume(self): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_resume"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":507
-+ * elif format == MPV_FORMAT_INT64:
-+ * node.u.int64 = value
-+ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
-+ * node.u.double_ = value
-+ * elif format == MPV_FORMAT_NODE_ARRAY:
- */
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (__pyx_t_4) {
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.resume", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":508
-+ * node.u.int64 = value
-+ * elif format == MPV_FORMAT_DOUBLE:
-+ * node.u.double_ = value # <<<<<<<<<<<<<<
-+ * elif format == MPV_FORMAT_NODE_ARRAY:
-+ * node.u.list = self._prep_node_list(value)
-+ */
-+ __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
-+ __pyx_v_node.u.double_ = __pyx_t_10;
-
--/* "vidcutter/libs/pympv/mpv.pyx":412
-- *
-- * @_errors
-- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
-- * """Enable or disable a given event.
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":507
-+ * elif format == MPV_FORMAT_INT64:
-+ * node.u.int64 = value
-+ * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
-+ * node.u.double_ = value
-+ * elif format == MPV_FORMAT_NODE_ARRAY:
- */
--
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_4request_event[] = "Enable or disable a given event.\n\n Arguments:\n event - See Events\n enable - True to enable, False to disable\n\n Wraps: mpv_request_event\n ";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_5request_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_event = 0;
-- PyObject *__pyx_v_enable = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("request_event (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_event,&__pyx_n_s_enable,0};
-- PyObject* values[2] = {0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enable)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 412, __pyx_L3_error)
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- }
-- __pyx_v_event = values[0];
-- __pyx_v_enable = values[1];
-+ goto __pyx_L3;
- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_4request_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_event, __pyx_v_enable);
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4request_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_event, PyObject *__pyx_v_enable) {
-- int __pyx_v_enable_i;
-- int __pyx_v_err;
-- enum mpv_event_id __pyx_v_event_id;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- int __pyx_t_2;
-- enum mpv_event_id __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("request_event", 0);
-+ /* "vidcutter/libs/pympv/mpv.pyx":509
-+ * elif format == MPV_FORMAT_DOUBLE:
-+ * node.u.double_ = value
-+ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
-+ * node.u.list = self._prep_node_list(value)
-+ * elif format == MPV_FORMAT_NODE_MAP:
-+ */
-+ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (__pyx_t_4) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":421
-- * Wraps: mpv_request_event
-- * """
-- * assert self._ctx # <<<<<<<<<<<<<<
-- * cdef int enable_i = 1 if enable else 0
-- * cdef int err
-+ /* "vidcutter/libs/pympv/mpv.pyx":510
-+ * node.u.double_ = value
-+ * elif format == MPV_FORMAT_NODE_ARRAY:
-+ * node.u.list = self._prep_node_list(value) # <<<<<<<<<<<<<<
-+ * elif format == MPV_FORMAT_NODE_MAP:
-+ * node.u.list = self._prep_node_map(value)
- */
-- #ifndef CYTHON_WITHOUT_ASSERTIONS
-- if (unlikely(!Py_OptimizeFlag)) {
-- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 421, __pyx_L1_error)
-- }
-- }
-- #endif
-+ __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_v_value);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":422
-- * """
-- * assert self._ctx
-- * cdef int enable_i = 1 if enable else 0 # <<<<<<<<<<<<<<
-- * cdef int err
-- * cdef mpv_event_id event_id = event
-+ /* "vidcutter/libs/pympv/mpv.pyx":509
-+ * elif format == MPV_FORMAT_DOUBLE:
-+ * node.u.double_ = value
-+ * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
-+ * node.u.list = self._prep_node_list(value)
-+ * elif format == MPV_FORMAT_NODE_MAP:
- */
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
-- if (__pyx_t_2) {
-- __pyx_t_1 = 1;
-- } else {
-- __pyx_t_1 = 0;
-+ goto __pyx_L3;
- }
-- __pyx_v_enable_i = __pyx_t_1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":424
-- * cdef int enable_i = 1 if enable else 0
-- * cdef int err
-- * cdef mpv_event_id event_id = event # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_request_event(self._ctx, event_id, enable_i)
-+ /* "vidcutter/libs/pympv/mpv.pyx":511
-+ * elif format == MPV_FORMAT_NODE_ARRAY:
-+ * node.u.list = self._prep_node_list(value)
-+ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-+ * node.u.list = self._prep_node_map(value)
-+ * else:
- */
-- __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
-- __pyx_v_event_id = __pyx_t_3;
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (__pyx_t_4) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":425
-- * cdef int err
-- * cdef mpv_event_id event_id = event
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_request_event(self._ctx, event_id, enable_i)
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":512
-+ * node.u.list = self._prep_node_list(value)
-+ * elif format == MPV_FORMAT_NODE_MAP:
-+ * node.u.list = self._prep_node_map(value) # <<<<<<<<<<<<<<
-+ * else:
-+ * node.format = MPV_FORMAT_NONE
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_map(__pyx_v_self, __pyx_v_value);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":426
-- * cdef mpv_event_id event_id = event
-- * with nogil:
-- * err = mpv_request_event(self._ctx, event_id, enable_i) # <<<<<<<<<<<<<<
-- * return err
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":511
-+ * elif format == MPV_FORMAT_NODE_ARRAY:
-+ * node.u.list = self._prep_node_list(value)
-+ * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-+ * node.u.list = self._prep_node_map(value)
-+ * else:
- */
-- __pyx_v_err = mpv_request_event(__pyx_v_self->_ctx, __pyx_v_event_id, __pyx_v_enable_i);
-- }
-+ goto __pyx_L3;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":425
-- * cdef int err
-- * cdef mpv_event_id event_id = event
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_request_event(self._ctx, event_id, enable_i)
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":514
-+ * node.u.list = self._prep_node_map(value)
-+ * else:
-+ * node.format = MPV_FORMAT_NONE # <<<<<<<<<<<<<<
-+ * return node
-+ *
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-+ /*else*/ {
-+ __pyx_v_node.format = MPV_FORMAT_NONE;
- }
-+ __pyx_L3:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":427
-- * with nogil:
-- * err = mpv_request_event(self._ctx, event_id, enable_i)
-- * return err # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":515
-+ * else:
-+ * node.format = MPV_FORMAT_NONE
-+ * return node # <<<<<<<<<<<<<<
- *
-- * @_errors
-+ * cdef _free_native_value(self, mpv_node node):
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_r = __pyx_t_4;
-- __pyx_t_4 = 0;
-+ __pyx_r = __pyx_v_node;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":412
-- *
-- * @_errors
-- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
-- * """Enable or disable a given event.
-+ /* "vidcutter/libs/pympv/mpv.pyx":496
-+ * return list
- *
-+ * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
-+ * cdef mpv_node node
-+ * node.format = format
- */
-
- /* function exit code */
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __Pyx_pretend_to_initialize(&__pyx_r);
- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_XDECREF(__pyx_v_value);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":430
-+/* "vidcutter/libs/pympv/mpv.pyx":517
-+ * return node
- *
-- * @_errors
-- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_request_log_messages"""
-- * assert self._ctx
-+ * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
-+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
-+ * for i in range(node.u.list.num):
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_6set_log_level[] = "Wraps: mpv_request_log_messages";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_7set_log_level(PyObject *__pyx_v_self, PyObject *__pyx_v_loglevel) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("set_log_level (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_6set_log_level(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_loglevel));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6set_log_level(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_loglevel) {
-- char const *__pyx_v_loglevel_c;
-- int __pyx_v_err;
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, struct mpv_node __pyx_v_node) {
-+ int __pyx_v_i;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- char const *__pyx_t_4;
-+ int __pyx_t_1;
-+ int __pyx_t_2;
-+ int __pyx_t_3;
-+ PyObject *__pyx_t_4 = NULL;
-+ int __pyx_t_5;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("set_log_level", 0);
-- __Pyx_INCREF(__pyx_v_loglevel);
-+ __Pyx_RefNannySetupContext("_free_native_value", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":432
-- * def set_log_level(self, loglevel):
-- * """Wraps: mpv_request_log_messages"""
-- * assert self._ctx # <<<<<<<<<<<<<<
-- * loglevel = _strenc(loglevel)
-- * cdef const char* loglevel_c = loglevel
-+ /* "vidcutter/libs/pympv/mpv.pyx":518
-+ *
-+ * cdef _free_native_value(self, mpv_node node):
-+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
-+ * for i in range(node.u.list.num):
-+ * self._free_native_value(node.u.list.values[i])
- */
-- #ifndef CYTHON_WITHOUT_ASSERTIONS
-- if (unlikely(!Py_OptimizeFlag)) {
-- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 432, __pyx_L1_error)
-- }
-- }
-- #endif
-+ switch (__pyx_v_node.format) {
-+ case MPV_FORMAT_NODE_ARRAY:
-+ case MPV_FORMAT_NODE_MAP:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":433
-- * """Wraps: mpv_request_log_messages"""
-- * assert self._ctx
-- * loglevel = _strenc(loglevel) # <<<<<<<<<<<<<<
-- * cdef const char* loglevel_c = loglevel
-- * cdef int err
-+ /* "vidcutter/libs/pympv/mpv.pyx":519
-+ * cdef _free_native_value(self, mpv_node node):
-+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
-+ * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
-+ * self._free_native_value(node.u.list.values[i])
-+ * free(node.u.list.values)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-+ __pyx_t_1 = __pyx_v_node.u.list->num;
-+ __pyx_t_2 = __pyx_t_1;
-+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
-+ __pyx_v_i = __pyx_t_3;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":520
-+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
-+ * for i in range(node.u.list.num):
-+ * self._free_native_value(node.u.list.values[i]) # <<<<<<<<<<<<<<
-+ * free(node.u.list.values)
-+ * if node.format == MPV_FORMAT_NODE_MAP:
-+ */
-+ __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- }
-- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_loglevel) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loglevel);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF_SET(__pyx_v_loglevel, __pyx_t_1);
-- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":434
-- * assert self._ctx
-- * loglevel = _strenc(loglevel)
-- * cdef const char* loglevel_c = loglevel # <<<<<<<<<<<<<<
-- * cdef int err
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":521
-+ * for i in range(node.u.list.num):
-+ * self._free_native_value(node.u.list.values[i])
-+ * free(node.u.list.values) # <<<<<<<<<<<<<<
-+ * if node.format == MPV_FORMAT_NODE_MAP:
-+ * for i in range(node.u.list.num):
- */
-- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L1_error)
-- __pyx_v_loglevel_c = __pyx_t_4;
-+ free(__pyx_v_node.u.list->values);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":436
-- * cdef const char* loglevel_c = loglevel
-- * cdef int err
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_request_log_messages(self._ctx, loglevel_c)
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":522
-+ * self._free_native_value(node.u.list.values[i])
-+ * free(node.u.list.values)
-+ * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-+ * for i in range(node.u.list.num):
-+ * free(node.u.list.keys[i])
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_5 = ((__pyx_v_node.format == MPV_FORMAT_NODE_MAP) != 0);
-+ if (__pyx_t_5) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":437
-- * cdef int err
-- * with nogil:
-- * err = mpv_request_log_messages(self._ctx, loglevel_c) # <<<<<<<<<<<<<<
-- * return err
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":523
-+ * free(node.u.list.values)
-+ * if node.format == MPV_FORMAT_NODE_MAP:
-+ * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
-+ * free(node.u.list.keys[i])
-+ * free(node.u.list.keys)
- */
-- __pyx_v_err = mpv_request_log_messages(__pyx_v_self->_ctx, __pyx_v_loglevel_c);
-- }
-+ __pyx_t_1 = __pyx_v_node.u.list->num;
-+ __pyx_t_2 = __pyx_t_1;
-+ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
-+ __pyx_v_i = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":436
-- * cdef const char* loglevel_c = loglevel
-- * cdef int err
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_request_log_messages(self._ctx, loglevel_c)
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":524
-+ * if node.format == MPV_FORMAT_NODE_MAP:
-+ * for i in range(node.u.list.num):
-+ * free(node.u.list.keys[i]) # <<<<<<<<<<<<<<
-+ * free(node.u.list.keys)
-+ * free(node.u.list)
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-+ free((__pyx_v_node.u.list->keys[__pyx_v_i]));
- }
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":438
-- * with nogil:
-- * err = mpv_request_log_messages(self._ctx, loglevel_c)
-- * return err # <<<<<<<<<<<<<<
-- *
-- * @_errors
-+ /* "vidcutter/libs/pympv/mpv.pyx":525
-+ * for i in range(node.u.list.num):
-+ * free(node.u.list.keys[i])
-+ * free(node.u.list.keys) # <<<<<<<<<<<<<<
-+ * free(node.u.list)
-+ * elif node.format == MPV_FORMAT_STRING:
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ free(__pyx_v_node.u.list->keys);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":430
-- *
-- * @_errors
-- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_request_log_messages"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":522
-+ * self._free_native_value(node.u.list.values[i])
-+ * free(node.u.list.values)
-+ * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-+ * for i in range(node.u.list.num):
-+ * free(node.u.list.keys[i])
- */
-+ }
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_log_level", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_loglevel);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":526
-+ * free(node.u.list.keys[i])
-+ * free(node.u.list.keys)
-+ * free(node.u.list) # <<<<<<<<<<<<<<
-+ * elif node.format == MPV_FORMAT_STRING:
-+ * free(node.u.string)
-+ */
-+ free(__pyx_v_node.u.list);
-
--/* "vidcutter/libs/pympv/mpv.pyx":441
-+ /* "vidcutter/libs/pympv/mpv.pyx":518
- *
-- * @_errors
-- * def load_config(self, filename): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_load_config_file"""
-- * assert self._ctx
-+ * cdef _free_native_value(self, mpv_node node):
-+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
-+ * for i in range(node.u.list.num):
-+ * self._free_native_value(node.u.list.values[i])
- */
-+ break;
-+ case MPV_FORMAT_STRING:
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_8load_config[] = "Wraps: mpv_load_config_file";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9load_config(PyObject *__pyx_v_self, PyObject *__pyx_v_filename) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("load_config (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_filename));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_filename) {
-- char const *__pyx_v__filename;
-+ /* "vidcutter/libs/pympv/mpv.pyx":528
-+ * free(node.u.list)
-+ * elif node.format == MPV_FORMAT_STRING:
-+ * free(node.u.string) # <<<<<<<<<<<<<<
-+ *
-+ * def command(self, *cmdlist, asynchronous=False, data=None):
-+ */
-+ free(__pyx_v_node.u.string);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":527
-+ * free(node.u.list.keys)
-+ * free(node.u.list)
-+ * elif node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-+ * free(node.u.string)
-+ *
-+ */
-+ break;
-+ default: break;
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":517
-+ * return node
-+ *
-+ * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
-+ * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
-+ * for i in range(node.u.list.num):
-+ */
-+
-+ /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context._free_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* "vidcutter/libs/pympv/mpv.pyx":530
-+ * free(node.u.string)
-+ *
-+ * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-+ * """Send a command to mpv.
-+ *
-+ */
-+
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_8command[] = "Send a command to mpv.\n\n Non-async success returns the command's response data, otherwise None\n\n Arguments:\n Accepts parameters as args\n\n Keyword Arguments:\n asynchronous: True will return right away, status comes in as MPV_EVENT_COMMAND_REPLY\n data: Only valid if async, gets sent back as reply_userdata in the Event\n\n Wraps: mpv_command_node and mpv_command_node_async\n ";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_asynchronous = 0;
-+ PyObject *__pyx_v_data = 0;
-+ PyObject *__pyx_v_cmdlist = 0;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("command (wrapper)", 0);
-+ if (PyTuple_GET_SIZE(__pyx_args) > 0) {
-+ __pyx_v_cmdlist = PyTuple_GetSlice(__pyx_args, 0, PyTuple_GET_SIZE(__pyx_args));
-+ if (unlikely(!__pyx_v_cmdlist)) {
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ }
-+ __Pyx_GOTREF(__pyx_v_cmdlist);
-+ } else {
-+ __pyx_v_cmdlist = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
-+ }
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
-+ PyObject* values[2] = {0,0};
-+ values[0] = ((PyObject *)Py_False);
-+ values[1] = ((PyObject *)Py_None);
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ default:
-+ case 0: break;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ if (kw_args > 0 && likely(kw_args <= 2)) {
-+ Py_ssize_t index;
-+ for (index = 0; index < 2 && kw_args > 0; index++) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
-+ if (value) { values[index] = value; kw_args--; }
-+ }
-+ }
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 530, __pyx_L3_error)
-+ }
-+ } else if (PyTuple_GET_SIZE(__pyx_args) < 0) {
-+ goto __pyx_L5_argtuple_error;
-+ } else {
-+ }
-+ __pyx_v_asynchronous = values[0];
-+ __pyx_v_data = values[1];
-+ }
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 530, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_DECREF(__pyx_v_cmdlist); __pyx_v_cmdlist = 0;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_asynchronous, __pyx_v_data, __pyx_v_cmdlist);
-+
-+ /* function exit code */
-+ __Pyx_XDECREF(__pyx_v_cmdlist);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist) {
-+ struct mpv_node __pyx_v_node;
-+ struct mpv_node __pyx_v_noderesult;
- int __pyx_v_err;
-+ uint64_t __pyx_v_data_id;
-+ PyObject *__pyx_v_result = NULL;
-+ PyObject *__pyx_v_userdatas = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
-- char const *__pyx_t_4;
-+ uint64_t __pyx_t_4;
-+ int __pyx_t_5;
-+ int __pyx_t_6;
-+ int __pyx_t_7;
-+ int __pyx_t_8;
-+ char const *__pyx_t_9;
-+ PyObject *__pyx_t_10 = NULL;
-+ PyObject *__pyx_t_11 = NULL;
-+ PyObject *__pyx_t_12 = NULL;
-+ PyObject *__pyx_t_13 = NULL;
-+ PyObject *__pyx_t_14 = NULL;
-+ PyObject *__pyx_t_15 = NULL;
-+ PyObject *__pyx_t_16 = NULL;
-+ PyObject *__pyx_t_17 = NULL;
-+ char const *__pyx_t_18;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("load_config", 0);
-- __Pyx_INCREF(__pyx_v_filename);
-+ __Pyx_RefNannySetupContext("command", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":443
-- * def load_config(self, filename):
-- * """Wraps: mpv_load_config_file"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":544
-+ * Wraps: mpv_command_node and mpv_command_node_async
-+ * """
- * assert self._ctx # <<<<<<<<<<<<<<
-- * filename = _strenc(filename)
-- * cdef const char* _filename = filename
-+ * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist))
-+ * cdef mpv_node noderesult
- */
- #ifndef CYTHON_WITHOUT_ASSERTIONS
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 443, __pyx_L1_error)
-+ __PYX_ERR(0, 544, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":444
-- * """Wraps: mpv_load_config_file"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":545
-+ * """
- * assert self._ctx
-- * filename = _strenc(filename) # <<<<<<<<<<<<<<
-- * cdef const char* _filename = filename
-+ * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist)) # <<<<<<<<<<<<<<
-+ * cdef mpv_node noderesult
- * cdef int err
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-@@ -9672,679 +10373,724 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8load_config(struct __p
- __Pyx_DECREF_SET(__pyx_t_2, function);
- }
- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename);
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_cmdlist) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cmdlist);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
-- __pyx_t_1 = 0;
-+ __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_cmdlist, __pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":445
-- * assert self._ctx
-- * filename = _strenc(filename)
-- * cdef const char* _filename = filename # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":549
- * cdef int err
-- * with nogil:
-+ * cdef uint64_t data_id
-+ * result = None # <<<<<<<<<<<<<<
-+ * try:
-+ * data_id = id(data)
- */
-- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
-- __pyx_v__filename = __pyx_t_4;
-+ __Pyx_INCREF(Py_None);
-+ __pyx_v_result = Py_None;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":447
-- * cdef const char* _filename = filename
-- * cdef int err
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_load_config_file(self._ctx, _filename)
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":550
-+ * cdef uint64_t data_id
-+ * result = None
-+ * try: # <<<<<<<<<<<<<<
-+ * data_id = id(data)
-+ * if not asynchronous:
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":448
-- * cdef int err
-- * with nogil:
-- * err = mpv_load_config_file(self._ctx, _filename) # <<<<<<<<<<<<<<
-- * return err
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":551
-+ * result = None
-+ * try:
-+ * data_id = id(data) # <<<<<<<<<<<<<<
-+ * if not asynchronous:
-+ * with nogil:
- */
-- __pyx_v_err = mpv_load_config_file(__pyx_v_self->_ctx, __pyx_v__filename);
-- }
-+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L4_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v_data_id = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":447
-- * cdef const char* _filename = filename
-- * cdef int err
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_load_config_file(self._ctx, _filename)
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":552
-+ * try:
-+ * data_id = id(data)
-+ * if not asynchronous: # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * err = mpv_command_node(self._ctx, &node, &noderesult)
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 552, __pyx_L4_error)
-+ __pyx_t_6 = ((!__pyx_t_5) != 0);
-+ if (__pyx_t_6) {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":553
-+ * data_id = id(data)
-+ * if not asynchronous:
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_command_node(self._ctx, &node, &noderesult)
-+ * try:
-+ */
-+ {
- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-- }
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":449
-- * with nogil:
-- * err = mpv_load_config_file(self._ctx, _filename)
-- * return err # <<<<<<<<<<<<<<
-- *
-- * def _format_for(self, value):
-+ /* "vidcutter/libs/pympv/mpv.pyx":554
-+ * if not asynchronous:
-+ * with nogil:
-+ * err = mpv_command_node(self._ctx, &node, &noderesult) # <<<<<<<<<<<<<<
-+ * try:
-+ * result = _convert_node_value(noderesult) if err >= 0 else None
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ __pyx_v_err = mpv_command_node(__pyx_v_self->_ctx, (&__pyx_v_node), (&__pyx_v_noderesult));
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":441
-- *
-- * @_errors
-- * def load_config(self, filename): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_load_config_file"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":553
-+ * data_id = id(data)
-+ * if not asynchronous:
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_command_node(self._ctx, &node, &noderesult)
-+ * try:
- */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L9;
-+ }
-+ __pyx_L9:;
-+ }
-+ }
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.load_config", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_filename);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":451
-- * return err
-- *
-- * def _format_for(self, value): # <<<<<<<<<<<<<<
-- * if isinstance(value, basestring):
-- * return MPV_FORMAT_STRING
-+ /* "vidcutter/libs/pympv/mpv.pyx":555
-+ * with nogil:
-+ * err = mpv_command_node(self._ctx, &node, &noderesult)
-+ * try: # <<<<<<<<<<<<<<
-+ * result = _convert_node_value(noderesult) if err >= 0 else None
-+ * finally:
- */
-+ /*try:*/ {
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11_format_for(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("_format_for (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_10_format_for(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_value));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10_format_for(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- int __pyx_t_2;
-- PyObject *__pyx_t_3 = NULL;
-- int __pyx_t_4;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_format_for", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":452
-- *
-- * def _format_for(self, value):
-- * if isinstance(value, basestring): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_STRING
-- * elif isinstance(value, bool):
-+ /* "vidcutter/libs/pympv/mpv.pyx":556
-+ * err = mpv_command_node(self._ctx, &node, &noderesult)
-+ * try:
-+ * result = _convert_node_value(noderesult) if err >= 0 else None # <<<<<<<<<<<<<<
-+ * finally:
-+ * with nogil:
- */
-- __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_value);
-- __pyx_t_2 = (__pyx_t_1 != 0);
-- if (__pyx_t_2) {
-+ if (((__pyx_v_err >= 0) != 0)) {
-+ __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L11_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_1 = __pyx_t_2;
-+ __pyx_t_2 = 0;
-+ } else {
-+ __Pyx_INCREF(Py_None);
-+ __pyx_t_1 = Py_None;
-+ }
-+ __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
-+ __pyx_t_1 = 0;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":453
-- * def _format_for(self, value):
-- * if isinstance(value, basestring):
-- * return MPV_FORMAT_STRING # <<<<<<<<<<<<<<
-- * elif isinstance(value, bool):
-- * return MPV_FORMAT_FLAG
-+ /* "vidcutter/libs/pympv/mpv.pyx":558
-+ * result = _convert_node_value(noderesult) if err >= 0 else None
-+ * finally:
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_free_node_contents(&noderesult)
-+ * else:
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-- goto __pyx_L0;
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":452
-- *
-- * def _format_for(self, value):
-- * if isinstance(value, basestring): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_STRING
-- * elif isinstance(value, bool):
-+ /* "vidcutter/libs/pympv/mpv.pyx":559
-+ * finally:
-+ * with nogil:
-+ * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
-+ * else:
-+ * userdatas = self.reply_userdata.get(data_id, None)
- */
-- }
-+ mpv_free_node_contents((&__pyx_v_noderesult));
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":454
-- * if isinstance(value, basestring):
-- * return MPV_FORMAT_STRING
-- * elif isinstance(value, bool): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_FLAG
-- * elif isinstance(value, int):
-+ /* "vidcutter/libs/pympv/mpv.pyx":558
-+ * result = _convert_node_value(noderesult) if err >= 0 else None
-+ * finally:
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_free_node_contents(&noderesult)
-+ * else:
- */
-- __pyx_t_3 = ((PyObject*)&PyBool_Type);
-- __Pyx_INCREF(__pyx_t_3);
-- __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 454, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_t_1 = (__pyx_t_2 != 0);
-- if (__pyx_t_1) {
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L15;
-+ }
-+ __pyx_L15:;
-+ }
-+ }
-+ goto __pyx_L12;
-+ }
-+ __pyx_L11_error:;
-+ /*exception exit:*/{
-+ __Pyx_PyThreadState_declare
-+ __Pyx_PyThreadState_assign
-+ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
-+ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
-+ __Pyx_XGOTREF(__pyx_t_10);
-+ __Pyx_XGOTREF(__pyx_t_11);
-+ __Pyx_XGOTREF(__pyx_t_12);
-+ __Pyx_XGOTREF(__pyx_t_13);
-+ __Pyx_XGOTREF(__pyx_t_14);
-+ __Pyx_XGOTREF(__pyx_t_15);
-+ __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
-+ {
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":455
-- * return MPV_FORMAT_STRING
-- * elif isinstance(value, bool):
-- * return MPV_FORMAT_FLAG # <<<<<<<<<<<<<<
-- * elif isinstance(value, int):
-- * return MPV_FORMAT_INT64
-+ /* "vidcutter/libs/pympv/mpv.pyx":559
-+ * finally:
-+ * with nogil:
-+ * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
-+ * else:
-+ * userdatas = self.reply_userdata.get(data_id, None)
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-- goto __pyx_L0;
-+ mpv_free_node_contents((&__pyx_v_noderesult));
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":454
-- * if isinstance(value, basestring):
-- * return MPV_FORMAT_STRING
-- * elif isinstance(value, bool): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_FLAG
-- * elif isinstance(value, int):
-+ /* "vidcutter/libs/pympv/mpv.pyx":558
-+ * result = _convert_node_value(noderesult) if err >= 0 else None
-+ * finally:
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_free_node_contents(&noderesult)
-+ * else:
- */
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":456
-- * elif isinstance(value, bool):
-- * return MPV_FORMAT_FLAG
-- * elif isinstance(value, int): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_INT64
-- * elif isinstance(value, float):
-- */
-- __pyx_t_1 = PyInt_Check(__pyx_v_value);
-- __pyx_t_2 = (__pyx_t_1 != 0);
-- if (__pyx_t_2) {
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L20;
-+ }
-+ __pyx_L20:;
-+ }
-+ }
-+ }
-+ if (PY_MAJOR_VERSION >= 3) {
-+ __Pyx_XGIVEREF(__pyx_t_13);
-+ __Pyx_XGIVEREF(__pyx_t_14);
-+ __Pyx_XGIVEREF(__pyx_t_15);
-+ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
-+ }
-+ __Pyx_XGIVEREF(__pyx_t_10);
-+ __Pyx_XGIVEREF(__pyx_t_11);
-+ __Pyx_XGIVEREF(__pyx_t_12);
-+ __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
-+ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
-+ __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
-+ goto __pyx_L4_error;
-+ }
-+ __pyx_L12:;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":457
-- * return MPV_FORMAT_FLAG
-- * elif isinstance(value, int):
-- * return MPV_FORMAT_INT64 # <<<<<<<<<<<<<<
-- * elif isinstance(value, float):
-- * return MPV_FORMAT_DOUBLE
-+ /* "vidcutter/libs/pympv/mpv.pyx":552
-+ * try:
-+ * data_id = id(data)
-+ * if not asynchronous: # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * err = mpv_command_node(self._ctx, &node, &noderesult)
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-- goto __pyx_L0;
-+ goto __pyx_L6;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":456
-- * elif isinstance(value, bool):
-- * return MPV_FORMAT_FLAG
-- * elif isinstance(value, int): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_INT64
-- * elif isinstance(value, float):
-+ /* "vidcutter/libs/pympv/mpv.pyx":561
-+ * mpv_free_node_contents(&noderesult)
-+ * else:
-+ * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
-+ * if userdatas is None:
-+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
- */
-- }
-+ /*else*/ {
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_16 = NULL;
-+ __pyx_t_8 = 0;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_16)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_16);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ __pyx_t_8 = 1;
-+ }
-+ }
-+ #if CYTHON_FAST_PYCALL
-+ if (PyFunction_Check(__pyx_t_2)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
-+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ } else
-+ #endif
-+ #if CYTHON_FAST_PYCCALL
-+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
-+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ } else
-+ #endif
-+ {
-+ __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_17);
-+ if (__pyx_t_16) {
-+ __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
-+ }
-+ __Pyx_GIVEREF(__pyx_t_3);
-+ PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_8, __pyx_t_3);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_8, Py_None);
-+ __pyx_t_3 = 0;
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
-+ }
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v_userdatas = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":458
-- * elif isinstance(value, int):
-- * return MPV_FORMAT_INT64
-- * elif isinstance(value, float): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_DOUBLE
-- * elif isinstance(value, (tuple, list)):
-+ /* "vidcutter/libs/pympv/mpv.pyx":562
-+ * else:
-+ * userdatas = self.reply_userdata.get(data_id, None)
-+ * if userdatas is None: # <<<<<<<<<<<<<<
-+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
-+ * userdatas.add()
- */
-- __pyx_t_2 = PyFloat_Check(__pyx_v_value);
-- __pyx_t_1 = (__pyx_t_2 != 0);
-- if (__pyx_t_1) {
-+ __pyx_t_6 = (__pyx_v_userdatas == Py_None);
-+ __pyx_t_5 = (__pyx_t_6 != 0);
-+ if (__pyx_t_5) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":459
-- * return MPV_FORMAT_INT64
-- * elif isinstance(value, float):
-- * return MPV_FORMAT_DOUBLE # <<<<<<<<<<<<<<
-- * elif isinstance(value, (tuple, list)):
-- * return MPV_FORMAT_NODE_ARRAY
-+ /* "vidcutter/libs/pympv/mpv.pyx":563
-+ * userdatas = self.reply_userdata.get(data_id, None)
-+ * if userdatas is None:
-+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
-+ * userdatas.add()
-+ * with nogil:
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-- goto __pyx_L0;
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_17 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_17)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_17);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_17, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
-+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 563, __pyx_L4_error)
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":458
-- * elif isinstance(value, int):
-- * return MPV_FORMAT_INT64
-- * elif isinstance(value, float): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_DOUBLE
-- * elif isinstance(value, (tuple, list)):
-+ /* "vidcutter/libs/pympv/mpv.pyx":562
-+ * else:
-+ * userdatas = self.reply_userdata.get(data_id, None)
-+ * if userdatas is None: # <<<<<<<<<<<<<<
-+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
-+ * userdatas.add()
- */
-- }
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":460
-- * elif isinstance(value, float):
-- * return MPV_FORMAT_DOUBLE
-- * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_NODE_ARRAY
-- * elif isinstance(value, dict):
-+ /* "vidcutter/libs/pympv/mpv.pyx":564
-+ * if userdatas is None:
-+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
-+ * userdatas.add() # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * err = mpv_command_node_async(self._ctx, data_id, &node)
- */
-- __pyx_t_2 = PyTuple_Check(__pyx_v_value);
-- __pyx_t_4 = (__pyx_t_2 != 0);
-- if (!__pyx_t_4) {
-- } else {
-- __pyx_t_1 = __pyx_t_4;
-- goto __pyx_L4_bool_binop_done;
-- }
-- __pyx_t_4 = PyList_Check(__pyx_v_value);
-- __pyx_t_2 = (__pyx_t_4 != 0);
-- __pyx_t_1 = __pyx_t_2;
-- __pyx_L4_bool_binop_done:;
-- __pyx_t_2 = (__pyx_t_1 != 0);
-- if (__pyx_t_2) {
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_17 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_17)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_17);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":461
-- * return MPV_FORMAT_DOUBLE
-- * elif isinstance(value, (tuple, list)):
-- * return MPV_FORMAT_NODE_ARRAY # <<<<<<<<<<<<<<
-- * elif isinstance(value, dict):
-- * return MPV_FORMAT_NODE_MAP
-+ /* "vidcutter/libs/pympv/mpv.pyx":565
-+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
-+ * userdatas.add()
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_command_node_async(self._ctx, data_id, &node)
-+ * finally:
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-- goto __pyx_L0;
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":460
-- * elif isinstance(value, float):
-- * return MPV_FORMAT_DOUBLE
-- * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_NODE_ARRAY
-- * elif isinstance(value, dict):
-+ /* "vidcutter/libs/pympv/mpv.pyx":566
-+ * userdatas.add()
-+ * with nogil:
-+ * err = mpv_command_node_async(self._ctx, data_id, &node) # <<<<<<<<<<<<<<
-+ * finally:
-+ * self._free_native_value(node)
-+ */
-+ __pyx_v_err = mpv_command_node_async(__pyx_v_self->_ctx, __pyx_v_data_id, (&__pyx_v_node));
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":565
-+ * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
-+ * userdatas.add()
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_command_node_async(self._ctx, data_id, &node)
-+ * finally:
- */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L24;
-+ }
-+ __pyx_L24:;
-+ }
-+ }
-+ }
-+ __pyx_L6:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":462
-- * elif isinstance(value, (tuple, list)):
-- * return MPV_FORMAT_NODE_ARRAY
-- * elif isinstance(value, dict): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_NODE_MAP
-- * return MPV_FORMAT_NONE
-+ /* "vidcutter/libs/pympv/mpv.pyx":568
-+ * err = mpv_command_node_async(self._ctx, data_id, &node)
-+ * finally:
-+ * self._free_native_value(node) # <<<<<<<<<<<<<<
-+ * if err < 0:
-+ * raise MPVError(err)
- */
-- __pyx_t_2 = PyDict_Check(__pyx_v_value);
-- __pyx_t_1 = (__pyx_t_2 != 0);
-- if (__pyx_t_1) {
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ goto __pyx_L5;
-+ }
-+ __pyx_L4_error:;
-+ /*exception exit:*/{
-+ __Pyx_PyThreadState_declare
-+ __Pyx_PyThreadState_assign
-+ __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
-+ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
-+ __Pyx_XGOTREF(__pyx_t_15);
-+ __Pyx_XGOTREF(__pyx_t_14);
-+ __Pyx_XGOTREF(__pyx_t_13);
-+ __Pyx_XGOTREF(__pyx_t_12);
-+ __Pyx_XGOTREF(__pyx_t_11);
-+ __Pyx_XGOTREF(__pyx_t_10);
-+ __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
-+ {
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L26_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ }
-+ if (PY_MAJOR_VERSION >= 3) {
-+ __Pyx_XGIVEREF(__pyx_t_12);
-+ __Pyx_XGIVEREF(__pyx_t_11);
-+ __Pyx_XGIVEREF(__pyx_t_10);
-+ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
-+ }
-+ __Pyx_XGIVEREF(__pyx_t_15);
-+ __Pyx_XGIVEREF(__pyx_t_14);
-+ __Pyx_XGIVEREF(__pyx_t_13);
-+ __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
-+ __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
-+ __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_18;
-+ goto __pyx_L1_error;
-+ __pyx_L26_error:;
-+ if (PY_MAJOR_VERSION >= 3) {
-+ __Pyx_XGIVEREF(__pyx_t_12);
-+ __Pyx_XGIVEREF(__pyx_t_11);
-+ __Pyx_XGIVEREF(__pyx_t_10);
-+ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
-+ }
-+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
-+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
-+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
-+ __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
-+ goto __pyx_L1_error;
-+ }
-+ __pyx_L5:;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":463
-- * return MPV_FORMAT_NODE_ARRAY
-- * elif isinstance(value, dict):
-- * return MPV_FORMAT_NODE_MAP # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_NONE
-+ /* "vidcutter/libs/pympv/mpv.pyx":569
-+ * finally:
-+ * self._free_native_value(node)
-+ * if err < 0: # <<<<<<<<<<<<<<
-+ * raise MPVError(err)
-+ * return result
-+ */
-+ __pyx_t_5 = ((__pyx_v_err < 0) != 0);
-+ if (unlikely(__pyx_t_5)) {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":570
-+ * self._free_native_value(node)
-+ * if err < 0:
-+ * raise MPVError(err) # <<<<<<<<<<<<<<
-+ * return result
- *
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-- goto __pyx_L0;
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 570, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_17);
-+ __pyx_t_3 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __PYX_ERR(0, 570, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":462
-- * elif isinstance(value, (tuple, list)):
-- * return MPV_FORMAT_NODE_ARRAY
-- * elif isinstance(value, dict): # <<<<<<<<<<<<<<
-- * return MPV_FORMAT_NODE_MAP
-- * return MPV_FORMAT_NONE
-+ /* "vidcutter/libs/pympv/mpv.pyx":569
-+ * finally:
-+ * self._free_native_value(node)
-+ * if err < 0: # <<<<<<<<<<<<<<
-+ * raise MPVError(err)
-+ * return result
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":464
-- * elif isinstance(value, dict):
-- * return MPV_FORMAT_NODE_MAP
-- * return MPV_FORMAT_NONE # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":571
-+ * if err < 0:
-+ * raise MPVError(err)
-+ * return result # <<<<<<<<<<<<<<
- *
-- * cdef mpv_node_list* _prep_node_list(self, values):
-+ * @_errors
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-+ __Pyx_INCREF(__pyx_v_result);
-+ __pyx_r = __pyx_v_result;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":451
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":530
-+ * free(node.u.string)
-+ *
-+ * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-+ * """Send a command to mpv.
- *
-- * def _format_for(self, value): # <<<<<<<<<<<<<<
-- * if isinstance(value, basestring):
-- * return MPV_FORMAT_STRING
- */
-
- /* function exit code */
- __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context._format_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_16);
-+ __Pyx_XDECREF(__pyx_t_17);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_result);
-+ __Pyx_XDECREF(__pyx_v_userdatas);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":466
-- * return MPV_FORMAT_NONE
-+/* "vidcutter/libs/pympv/mpv.pyx":574
-+ *
-+ * @_errors
-+ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
-+ * """Gets the value of a property asynchronously.
- *
-- * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
-- * cdef mpv_node node
-- * cdef mpv_format format
- */
-
--static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_values) {
-- struct mpv_node __pyx_v_node;
-- enum mpv_format __pyx_v_format;
-- struct mpv_node_list *__pyx_v_node_list;
-- PyObject *__pyx_v_i = NULL;
-- PyObject *__pyx_v_value = NULL;
-- struct mpv_node_list *__pyx_r;
-- __Pyx_RefNannyDeclarations
-- Py_ssize_t __pyx_t_1;
-- int __pyx_t_2;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *(*__pyx_t_5)(PyObject *);
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-- PyObject *__pyx_t_8 = NULL;
-- enum mpv_format __pyx_t_9;
-- Py_ssize_t __pyx_t_10;
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_10get_property_async[] = "Gets the value of a property asynchronously.\n\n Arguments:\n prop: Property to get the value of.\n\n Keyword arguments:\n data: Value to be passed into the reply_userdata of the response event.\n Wraps: mpv_get_property_async";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_prop = 0;
-+ PyObject *__pyx_v_data = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_prep_node_list", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":469
-- * cdef mpv_node node
-- * cdef mpv_format format
-- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list)) # <<<<<<<<<<<<<<
-- * node_list.num = len(values)
-- * node_list.values = NULL
-- */
-- __pyx_v_node_list = ((struct mpv_node_list *)malloc((sizeof(struct mpv_node_list))));
--
-- /* "vidcutter/libs/pympv/mpv.pyx":470
-- * cdef mpv_format format
-- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
-- * node_list.num = len(values) # <<<<<<<<<<<<<<
-- * node_list.values = NULL
-- * node_list.keys = NULL
-- */
-- __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 470, __pyx_L1_error)
-- __pyx_v_node_list->num = __pyx_t_1;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":471
-- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
-- * node_list.num = len(values)
-- * node_list.values = NULL # <<<<<<<<<<<<<<
-- * node_list.keys = NULL
-- * if node_list.num:
-- */
-- __pyx_v_node_list->values = NULL;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":472
-- * node_list.num = len(values)
-- * node_list.values = NULL
-- * node_list.keys = NULL # <<<<<<<<<<<<<<
-- * if node_list.num:
-- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-- */
-- __pyx_v_node_list->keys = NULL;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":473
-- * node_list.values = NULL
-- * node_list.keys = NULL
-- * if node_list.num: # <<<<<<<<<<<<<<
-- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-- * for i, value in enumerate(values):
-- */
-- __pyx_t_2 = (__pyx_v_node_list->num != 0);
-- if (__pyx_t_2) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":474
-- * node_list.keys = NULL
-- * if node_list.num:
-- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node)) # <<<<<<<<<<<<<<
-- * for i, value in enumerate(values):
-- * format = self._format_for(value)
-- */
-- __pyx_v_node_list->values = ((struct mpv_node *)malloc((__pyx_v_node_list->num * (sizeof(struct mpv_node)))));
--
-- /* "vidcutter/libs/pympv/mpv.pyx":473
-- * node_list.values = NULL
-- * node_list.keys = NULL
-- * if node_list.num: # <<<<<<<<<<<<<<
-- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-- * for i, value in enumerate(values):
-- */
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":475
-- * if node_list.num:
-- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-- * for i, value in enumerate(values): # <<<<<<<<<<<<<<
-- * format = self._format_for(value)
-- * node = self._prep_native_value(value, format)
-- */
-- __Pyx_INCREF(__pyx_int_0);
-- __pyx_t_3 = __pyx_int_0;
-- if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
-- __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
-- __pyx_t_5 = NULL;
-- } else {
-- __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
-- }
-- for (;;) {
-- if (likely(!__pyx_t_5)) {
-- if (likely(PyList_CheckExact(__pyx_t_4))) {
-- if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
-- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
-- #else
-- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- #endif
-- } else {
-- if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
-- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
-- #else
-- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- #endif
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("get_property_async (wrapper)", 0);
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
-+ PyObject* values[2] = {0,0};
-+ values[1] = ((PyObject *)Py_None);
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
- }
-- } else {
-- __pyx_t_6 = __pyx_t_5(__pyx_t_4);
-- if (unlikely(!__pyx_t_6)) {
-- PyObject* exc_type = PyErr_Occurred();
-- if (exc_type) {
-- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
-- else __PYX_ERR(0, 475, __pyx_L1_error)
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
-+ if (value) { values[1] = value; kw_args--; }
- }
-- break;
- }
-- __Pyx_GOTREF(__pyx_t_6);
-- }
-- __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
-- __pyx_t_6 = 0;
-- __Pyx_INCREF(__pyx_t_3);
-- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
-- __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_DECREF(__pyx_t_3);
-- __pyx_t_3 = __pyx_t_6;
-- __pyx_t_6 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":476
-- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-- * for i, value in enumerate(values):
-- * format = self._format_for(value) # <<<<<<<<<<<<<<
-- * node = self._prep_native_value(value, format)
-- * node_list.values[i] = node
-- */
-- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 476, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_8 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-- if (likely(__pyx_t_8)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-- __Pyx_INCREF(__pyx_t_8);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_7, function);
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 574, __pyx_L3_error)
-+ }
-+ } else {
-+ switch (PyTuple_GET_SIZE(__pyx_args)) {
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ break;
-+ default: goto __pyx_L5_argtuple_error;
- }
- }
-- __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
-- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __pyx_v_format = __pyx_t_9;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":477
-- * for i, value in enumerate(values):
-- * format = self._format_for(value)
-- * node = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
-- * node_list.values[i] = node
-- * return node_list
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_6);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":478
-- * format = self._format_for(value)
-- * node = self._prep_native_value(value, format)
-- * node_list.values[i] = node # <<<<<<<<<<<<<<
-- * return node_list
-- *
-- */
-- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
-- (__pyx_v_node_list->values[__pyx_t_10]) = __pyx_v_node;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":475
-- * if node_list.num:
-- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
-- * for i, value in enumerate(values): # <<<<<<<<<<<<<<
-- * format = self._format_for(value)
-- * node = self._prep_native_value(value, format)
-- */
-+ __pyx_v_prop = values[0];
-+ __pyx_v_data = values[1];
- }
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":479
-- * node = self._prep_native_value(value, format)
-- * node_list.values[i] = node
-- * return node_list # <<<<<<<<<<<<<<
-- *
-- * cdef mpv_node_list* _prep_node_map(self, map):
-- */
-- __pyx_r = __pyx_v_node_list;
-- goto __pyx_L0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":466
-- * return MPV_FORMAT_NONE
-- *
-- * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
-- * cdef mpv_node node
-- * cdef mpv_format format
-- */
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 574, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
-
- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_list", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_i);
-- __Pyx_XDECREF(__pyx_v_value);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":481
-- * return node_list
-- *
-- * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
-- * cdef char* ckey
-- * cdef mpv_node_list* list
-- */
--
--static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_map) {
-- char *__pyx_v_ckey;
-- struct mpv_node_list *__pyx_v_list;
-- PyObject *__pyx_v_keys = NULL;
-- PyObject *__pyx_v_i = NULL;
-- PyObject *__pyx_v_key = NULL;
-- struct mpv_node_list *__pyx_r;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
-+ uint64_t __pyx_v_id_data;
-+ PyObject *__pyx_v_userdatas = NULL;
-+ char const *__pyx_v_prop_c;
-+ int __pyx_v_err;
-+ PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
-- Py_ssize_t __pyx_t_4;
-- int __pyx_t_5;
-- PyObject *(*__pyx_t_6)(PyObject *);
-+ Py_hash_t __pyx_t_4;
-+ PyObject *__pyx_t_5 = NULL;
-+ int __pyx_t_6;
- PyObject *__pyx_t_7 = NULL;
-- PyObject *__pyx_t_8 = NULL;
-- char *__pyx_t_9;
-- Py_ssize_t __pyx_t_10;
-- Py_ssize_t __pyx_t_11;
-+ int __pyx_t_8;
-+ int __pyx_t_9;
-+ char const *__pyx_t_10;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_prep_node_map", 0);
-+ __Pyx_RefNannySetupContext("get_property_async", 0);
-+ __Pyx_INCREF(__pyx_v_prop);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":484
-- * cdef char* ckey
-- * cdef mpv_node_list* list
-- * list = self._prep_node_list(map.values()) # <<<<<<<<<<<<<<
-- * keys = map.keys()
-- * if not len(keys):
-+ /* "vidcutter/libs/pympv/mpv.pyx":583
-+ * data: Value to be passed into the reply_userdata of the response event.
-+ * Wraps: mpv_get_property_async"""
-+ * assert self._ctx # <<<<<<<<<<<<<<
-+ * prop = _strenc(prop)
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
-+ #ifndef CYTHON_WITHOUT_ASSERTIONS
-+ if (unlikely(!Py_OptimizeFlag)) {
-+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-+ PyErr_SetNone(PyExc_AssertionError);
-+ __PYX_ERR(0, 583, __pyx_L1_error)
-+ }
-+ }
-+ #endif
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":584
-+ * Wraps: mpv_get_property_async"""
-+ * assert self._ctx
-+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-@@ -10353,223 +11099,234 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- __Pyx_DECREF_SET(__pyx_t_2, function);
- }
- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v_list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":485
-- * cdef mpv_node_list* list
-- * list = self._prep_node_list(map.values())
-- * keys = map.keys() # <<<<<<<<<<<<<<
-- * if not len(keys):
-- * return list
-+ /* "vidcutter/libs/pympv/mpv.pyx":585
-+ * assert self._ctx
-+ * prop = _strenc(prop)
-+ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is None:
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
-+ __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 585, __pyx_L1_error)
-+ __pyx_v_id_data = ((uint64_t)__pyx_t_4);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":586
-+ * prop = _strenc(prop)
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
-+ * if userdatas is None:
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-+ */
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = NULL;
-+ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_5 = NULL;
-+ __pyx_t_6 = 0;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_5)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_5);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
-+ __pyx_t_6 = 1;
- }
- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-+ #if CYTHON_FAST_PYCALL
-+ if (PyFunction_Check(__pyx_t_2)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
-+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ } else
-+ #endif
-+ #if CYTHON_FAST_PYCCALL
-+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
-+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ } else
-+ #endif
-+ {
-+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ if (__pyx_t_5) {
-+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
-+ }
-+ __Pyx_GIVEREF(__pyx_t_3);
-+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
-+ __pyx_t_3 = 0;
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ }
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v_keys = __pyx_t_1;
-+ __pyx_v_userdatas = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":486
-- * list = self._prep_node_list(map.values())
-- * keys = map.keys()
-- * if not len(keys): # <<<<<<<<<<<<<<
-- * return list
-- * list.keys = <char**>malloc(list.num)
-+ /* "vidcutter/libs/pympv/mpv.pyx":587
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is None: # <<<<<<<<<<<<<<
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-+ * userdatas.add()
- */
-- __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 486, __pyx_L1_error)
-- __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
-- if (__pyx_t_5) {
-+ __pyx_t_8 = (__pyx_v_userdatas == Py_None);
-+ __pyx_t_9 = (__pyx_t_8 != 0);
-+ if (__pyx_t_9) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":487
-- * keys = map.keys()
-- * if not len(keys):
-- * return list # <<<<<<<<<<<<<<
-- * list.keys = <char**>malloc(list.num)
-- * for i, key in enumerate(keys):
-+ /* "vidcutter/libs/pympv/mpv.pyx":588
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is None:
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
-+ * userdatas.add()
-+ * cdef const char* prop_c = prop
- */
-- __pyx_r = __pyx_v_list;
-- goto __pyx_L0;
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_7 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_7)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_7);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
-+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 588, __pyx_L1_error)
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":486
-- * list = self._prep_node_list(map.values())
-- * keys = map.keys()
-- * if not len(keys): # <<<<<<<<<<<<<<
-- * return list
-- * list.keys = <char**>malloc(list.num)
-+ /* "vidcutter/libs/pympv/mpv.pyx":587
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is None: # <<<<<<<<<<<<<<
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-+ * userdatas.add()
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":488
-- * if not len(keys):
-- * return list
-- * list.keys = <char**>malloc(list.num) # <<<<<<<<<<<<<<
-- * for i, key in enumerate(keys):
-- * key = _strenc(key)
-+ /* "vidcutter/libs/pympv/mpv.pyx":589
-+ * if userdatas is None:
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-+ * userdatas.add() # <<<<<<<<<<<<<<
-+ * cdef const char* prop_c = prop
-+ * with nogil:
- */
-- __pyx_v_list->keys = ((char **)malloc(__pyx_v_list->num));
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_7 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_7)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_7);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":489
-- * return list
-- * list.keys = <char**>malloc(list.num)
-- * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
-- * key = _strenc(key)
-- * ckey = key
-+ /* "vidcutter/libs/pympv/mpv.pyx":590
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-+ * userdatas.add()
-+ * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * err = mpv_get_property_async(
- */
-- __Pyx_INCREF(__pyx_int_0);
-- __pyx_t_1 = __pyx_int_0;
-- if (likely(PyList_CheckExact(__pyx_v_keys)) || PyTuple_CheckExact(__pyx_v_keys)) {
-- __pyx_t_2 = __pyx_v_keys; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
-- __pyx_t_6 = NULL;
-- } else {
-- __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
-- }
-- for (;;) {
-- if (likely(!__pyx_t_6)) {
-- if (likely(PyList_CheckExact(__pyx_t_2))) {
-- if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
-- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
-- #else
-- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- #endif
-- } else {
-- if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
-- #else
-- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- #endif
-- }
-- } else {
-- __pyx_t_3 = __pyx_t_6(__pyx_t_2);
-- if (unlikely(!__pyx_t_3)) {
-- PyObject* exc_type = PyErr_Occurred();
-- if (exc_type) {
-- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
-- else __PYX_ERR(0, 489, __pyx_L1_error)
-- }
-- break;
-- }
-- __Pyx_GOTREF(__pyx_t_3);
-- }
-- __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
-- __pyx_t_3 = 0;
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
-- __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_1);
-- __pyx_t_1 = __pyx_t_3;
-- __pyx_t_3 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":490
-- * list.keys = <char**>malloc(list.num)
-- * for i, key in enumerate(keys):
-- * key = _strenc(key) # <<<<<<<<<<<<<<
-- * ckey = key
-- * list.keys[i] = <char*>malloc(len(key) + 1)
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_8 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
-- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-- if (likely(__pyx_t_8)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-- __Pyx_INCREF(__pyx_t_8);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_7, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_key);
-- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
-- __pyx_t_3 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":491
-- * for i, key in enumerate(keys):
-- * key = _strenc(key)
-- * ckey = key # <<<<<<<<<<<<<<
-- * list.keys[i] = <char*>malloc(len(key) + 1)
-- * strcpy(list.keys[i], ckey)
-- */
-- __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L1_error)
-- __pyx_v_ckey = __pyx_t_9;
-+ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 590, __pyx_L1_error)
-+ __pyx_v_prop_c = __pyx_t_10;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":492
-- * key = _strenc(key)
-- * ckey = key
-- * list.keys[i] = <char*>malloc(len(key) + 1) # <<<<<<<<<<<<<<
-- * strcpy(list.keys[i], ckey)
-- * return list
-+ /* "vidcutter/libs/pympv/mpv.pyx":591
-+ * userdatas.add()
-+ * cdef const char* prop_c = prop
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_get_property_async(
-+ * self._ctx,
- */
-- __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 492, __pyx_L1_error)
-- __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L1_error)
-- (__pyx_v_list->keys[__pyx_t_11]) = ((char *)malloc((__pyx_t_10 + 1)));
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":493
-- * ckey = key
-- * list.keys[i] = <char*>malloc(len(key) + 1)
-- * strcpy(list.keys[i], ckey) # <<<<<<<<<<<<<<
-- * return list
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":592
-+ * cdef const char* prop_c = prop
-+ * with nogil:
-+ * err = mpv_get_property_async( # <<<<<<<<<<<<<<
-+ * self._ctx,
-+ * id_data,
- */
-- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
-- (void)(strcpy((__pyx_v_list->keys[__pyx_t_10]), __pyx_v_ckey));
-+ __pyx_v_err = mpv_get_property_async(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_prop_c, MPV_FORMAT_NODE);
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":489
-- * return list
-- * list.keys = <char**>malloc(list.num)
-- * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
-- * key = _strenc(key)
-- * ckey = key
-+ /* "vidcutter/libs/pympv/mpv.pyx":591
-+ * userdatas.add()
-+ * cdef const char* prop_c = prop
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_get_property_async(
-+ * self._ctx,
- */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L6;
-+ }
-+ __pyx_L6:;
-+ }
- }
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":494
-- * list.keys[i] = <char*>malloc(len(key) + 1)
-- * strcpy(list.keys[i], ckey)
-- * return list # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":598
-+ * MPV_FORMAT_NODE,
-+ * )
-+ * return err # <<<<<<<<<<<<<<
- *
-- * cdef mpv_node _prep_native_value(self, value, format):
-+ * def try_get_property_async(self, prop, data=None, default=None):
- */
-- __pyx_r = __pyx_v_list;
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":481
-- * return node_list
-+ /* "vidcutter/libs/pympv/mpv.pyx":574
-+ *
-+ * @_errors
-+ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
-+ * """Gets the value of a property asynchronously.
- *
-- * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
-- * cdef char* ckey
-- * cdef mpv_node_list* list
- */
-
- /* function exit code */
-@@ -10577,618 +11334,539 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_node_map", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-- __pyx_r = 0;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_keys);
-- __Pyx_XDECREF(__pyx_v_i);
-- __Pyx_XDECREF(__pyx_v_key);
-+ __Pyx_XDECREF(__pyx_v_userdatas);
-+ __Pyx_XDECREF(__pyx_v_prop);
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":496
-- * return list
-+/* "vidcutter/libs/pympv/mpv.pyx":600
-+ * return err
- *
-- * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
-- * cdef mpv_node node
-- * node.format = format
-+ * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
-+ * try:
-+ * return self.get_property_async(prop, data=data)
- */
-
--static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_format) {
-- struct mpv_node __pyx_v_node;
-- struct mpv_node __pyx_r;
-- __Pyx_RefNannyDeclarations
-- enum mpv_format __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- int __pyx_t_4;
-- PyObject *__pyx_t_5 = NULL;
-- Py_ssize_t __pyx_t_6;
-- char const *__pyx_t_7;
-- int __pyx_t_8;
-- int64_t __pyx_t_9;
-- double __pyx_t_10;
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_prop = 0;
-+ PyObject *__pyx_v_data = 0;
-+ PyObject *__pyx_v_default = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_prep_native_value", 0);
-- __Pyx_INCREF(__pyx_v_value);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":498
-- * cdef mpv_node _prep_native_value(self, value, format):
-- * cdef mpv_node node
-- * node.format = format # <<<<<<<<<<<<<<
-- * if format == MPV_FORMAT_STRING:
-- * value = _strenc(value)
-- */
-- __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error)
-- __pyx_v_node.format = __pyx_t_1;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":499
-- * cdef mpv_node node
-- * node.format = format
-- * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-- * value = _strenc(value)
-- * node.u.string = <char*>malloc(len(value) + 1)
-- */
-- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (__pyx_t_4) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":500
-- * node.format = format
-- * if format == MPV_FORMAT_STRING:
-- * value = _strenc(value) # <<<<<<<<<<<<<<
-- * node.u.string = <char*>malloc(len(value) + 1)
-- * strcpy(node.u.string, value)
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
-- __pyx_t_3 = 0;
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("try_get_property_async (wrapper)", 0);
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,&__pyx_n_s_default,0};
-+ PyObject* values[3] = {0,0,0};
-+ values[1] = ((PyObject *)Py_None);
-+ values[2] = ((PyObject *)Py_None);
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ CYTHON_FALLTHROUGH;
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
-+ if (value) { values[1] = value; kw_args--; }
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 2:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
-+ if (value) { values[2] = value; kw_args--; }
-+ }
-+ }
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 600, __pyx_L3_error)
-+ }
-+ } else {
-+ switch (PyTuple_GET_SIZE(__pyx_args)) {
-+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ CYTHON_FALLTHROUGH;
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ }
-+ __pyx_v_prop = values[0];
-+ __pyx_v_data = values[1];
-+ __pyx_v_default = values[2];
-+ }
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 600, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data, __pyx_v_default);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":501
-- * if format == MPV_FORMAT_STRING:
-- * value = _strenc(value)
-- * node.u.string = <char*>malloc(len(value) + 1) # <<<<<<<<<<<<<<
-- * strcpy(node.u.string, value)
-- * elif format == MPV_FORMAT_FLAG:
-- */
-- __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 501, __pyx_L1_error)
-- __pyx_v_node.u.string = ((char *)malloc((__pyx_t_6 + 1)));
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":502
-- * value = _strenc(value)
-- * node.u.string = <char*>malloc(len(value) + 1)
-- * strcpy(node.u.string, value) # <<<<<<<<<<<<<<
-- * elif format == MPV_FORMAT_FLAG:
-- * node.u.flag = 1 if value else 0
-- */
-- __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
-- (void)(strcpy(__pyx_v_node.u.string, __pyx_t_7));
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ int __pyx_t_8;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("try_get_property_async", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":499
-- * cdef mpv_node node
-- * node.format = format
-- * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-- * value = _strenc(value)
-- * node.u.string = <char*>malloc(len(value) + 1)
-+ /* "vidcutter/libs/pympv/mpv.pyx":601
-+ *
-+ * def try_get_property_async(self, prop, data=None, default=None):
-+ * try: # <<<<<<<<<<<<<<
-+ * return self.get_property_async(prop, data=data)
-+ * except MPVError:
- */
-- goto __pyx_L3;
-- }
-+ {
-+ __Pyx_PyThreadState_declare
-+ __Pyx_PyThreadState_assign
-+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
-+ __Pyx_XGOTREF(__pyx_t_1);
-+ __Pyx_XGOTREF(__pyx_t_2);
-+ __Pyx_XGOTREF(__pyx_t_3);
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":503
-- * node.u.string = <char*>malloc(len(value) + 1)
-- * strcpy(node.u.string, value)
-- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
-- * node.u.flag = 1 if value else 0
-- * elif format == MPV_FORMAT_INT64:
-+ /* "vidcutter/libs/pympv/mpv.pyx":602
-+ * def try_get_property_async(self, prop, data=None, default=None):
-+ * try:
-+ * return self.get_property_async(prop, data=data) # <<<<<<<<<<<<<<
-+ * except MPVError:
-+ * return default
- */
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (__pyx_t_4) {
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L3_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L3_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_INCREF(__pyx_v_prop);
-+ __Pyx_GIVEREF(__pyx_v_prop);
-+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_prop);
-+ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L3_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 602, __pyx_L3_error)
-+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L3_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_r = __pyx_t_7;
-+ __pyx_t_7 = 0;
-+ goto __pyx_L7_try_return;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":504
-- * strcpy(node.u.string, value)
-- * elif format == MPV_FORMAT_FLAG:
-- * node.u.flag = 1 if value else 0 # <<<<<<<<<<<<<<
-- * elif format == MPV_FORMAT_INT64:
-- * node.u.int64 = value
-+ /* "vidcutter/libs/pympv/mpv.pyx":601
-+ *
-+ * def try_get_property_async(self, prop, data=None, default=None):
-+ * try: # <<<<<<<<<<<<<<
-+ * return self.get_property_async(prop, data=data)
-+ * except MPVError:
- */
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 504, __pyx_L1_error)
-- if (__pyx_t_4) {
-- __pyx_t_8 = 1;
-- } else {
-- __pyx_t_8 = 0;
- }
-- __pyx_v_node.u.flag = __pyx_t_8;
-+ __pyx_L3_error:;
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":503
-- * node.u.string = <char*>malloc(len(value) + 1)
-- * strcpy(node.u.string, value)
-- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
-- * node.u.flag = 1 if value else 0
-- * elif format == MPV_FORMAT_INT64:
-+ /* "vidcutter/libs/pympv/mpv.pyx":603
-+ * try:
-+ * return self.get_property_async(prop, data=data)
-+ * except MPVError: # <<<<<<<<<<<<<<
-+ * return default
-+ *
- */
-- goto __pyx_L3;
-- }
-+ __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L5_except_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5);
-+ __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
-+ if (__pyx_t_8) {
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 603, __pyx_L5_except_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __Pyx_GOTREF(__pyx_t_7);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":505
-- * elif format == MPV_FORMAT_FLAG:
-- * node.u.flag = 1 if value else 0
-- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
-- * node.u.int64 = value
-- * elif format == MPV_FORMAT_DOUBLE:
-+ /* "vidcutter/libs/pympv/mpv.pyx":604
-+ * return self.get_property_async(prop, data=data)
-+ * except MPVError:
-+ * return default # <<<<<<<<<<<<<<
-+ *
-+ * def try_get_property(self, prop, default=None):
- */
-- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (__pyx_t_4) {
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v_default);
-+ __pyx_r = __pyx_v_default;
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ goto __pyx_L6_except_return;
-+ }
-+ goto __pyx_L5_except_error;
-+ __pyx_L5_except_error:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":506
-- * node.u.flag = 1 if value else 0
-- * elif format == MPV_FORMAT_INT64:
-- * node.u.int64 = value # <<<<<<<<<<<<<<
-- * elif format == MPV_FORMAT_DOUBLE:
-- * node.u.double_ = value
-+ /* "vidcutter/libs/pympv/mpv.pyx":601
-+ *
-+ * def try_get_property_async(self, prop, data=None, default=None):
-+ * try: # <<<<<<<<<<<<<<
-+ * return self.get_property_async(prop, data=data)
-+ * except MPVError:
- */
-- __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error)
-- __pyx_v_node.u.int64 = __pyx_t_9;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":505
-- * elif format == MPV_FORMAT_FLAG:
-- * node.u.flag = 1 if value else 0
-- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
-- * node.u.int64 = value
-- * elif format == MPV_FORMAT_DOUBLE:
-- */
-- goto __pyx_L3;
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":507
-- * elif format == MPV_FORMAT_INT64:
-- * node.u.int64 = value
-- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
-- * node.u.double_ = value
-- * elif format == MPV_FORMAT_NODE_ARRAY:
-- */
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (__pyx_t_4) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":508
-- * node.u.int64 = value
-- * elif format == MPV_FORMAT_DOUBLE:
-- * node.u.double_ = value # <<<<<<<<<<<<<<
-- * elif format == MPV_FORMAT_NODE_ARRAY:
-- * node.u.list = self._prep_node_list(value)
-- */
-- __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
-- __pyx_v_node.u.double_ = __pyx_t_10;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":507
-- * elif format == MPV_FORMAT_INT64:
-- * node.u.int64 = value
-- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
-- * node.u.double_ = value
-- * elif format == MPV_FORMAT_NODE_ARRAY:
-- */
-- goto __pyx_L3;
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":509
-- * elif format == MPV_FORMAT_DOUBLE:
-- * node.u.double_ = value
-- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
-- * node.u.list = self._prep_node_list(value)
-- * elif format == MPV_FORMAT_NODE_MAP:
-- */
-- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (__pyx_t_4) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":510
-- * node.u.double_ = value
-- * elif format == MPV_FORMAT_NODE_ARRAY:
-- * node.u.list = self._prep_node_list(value) # <<<<<<<<<<<<<<
-- * elif format == MPV_FORMAT_NODE_MAP:
-- * node.u.list = self._prep_node_map(value)
-- */
-- __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_v_value);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":509
-- * elif format == MPV_FORMAT_DOUBLE:
-- * node.u.double_ = value
-- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
-- * node.u.list = self._prep_node_list(value)
-- * elif format == MPV_FORMAT_NODE_MAP:
-- */
-- goto __pyx_L3;
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":511
-- * elif format == MPV_FORMAT_NODE_ARRAY:
-- * node.u.list = self._prep_node_list(value)
-- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-- * node.u.list = self._prep_node_map(value)
-- * else:
-- */
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (__pyx_t_4) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":512
-- * node.u.list = self._prep_node_list(value)
-- * elif format == MPV_FORMAT_NODE_MAP:
-- * node.u.list = self._prep_node_map(value) # <<<<<<<<<<<<<<
-- * else:
-- * node.format = MPV_FORMAT_NONE
-- */
-- __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_map(__pyx_v_self, __pyx_v_value);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":511
-- * elif format == MPV_FORMAT_NODE_ARRAY:
-- * node.u.list = self._prep_node_list(value)
-- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-- * node.u.list = self._prep_node_map(value)
-- * else:
-- */
-- goto __pyx_L3;
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":514
-- * node.u.list = self._prep_node_map(value)
-- * else:
-- * node.format = MPV_FORMAT_NONE # <<<<<<<<<<<<<<
-- * return node
-- *
-- */
-- /*else*/ {
-- __pyx_v_node.format = MPV_FORMAT_NONE;
-+ __Pyx_XGIVEREF(__pyx_t_1);
-+ __Pyx_XGIVEREF(__pyx_t_2);
-+ __Pyx_XGIVEREF(__pyx_t_3);
-+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-+ goto __pyx_L1_error;
-+ __pyx_L7_try_return:;
-+ __Pyx_XGIVEREF(__pyx_t_1);
-+ __Pyx_XGIVEREF(__pyx_t_2);
-+ __Pyx_XGIVEREF(__pyx_t_3);
-+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-+ goto __pyx_L0;
-+ __pyx_L6_except_return:;
-+ __Pyx_XGIVEREF(__pyx_t_1);
-+ __Pyx_XGIVEREF(__pyx_t_2);
-+ __Pyx_XGIVEREF(__pyx_t_3);
-+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-+ goto __pyx_L0;
- }
-- __pyx_L3:;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":515
-- * else:
-- * node.format = MPV_FORMAT_NONE
-- * return node # <<<<<<<<<<<<<<
-- *
-- * cdef _free_native_value(self, mpv_node node):
-- */
-- __pyx_r = __pyx_v_node;
-- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":496
-- * return list
-+ /* "vidcutter/libs/pympv/mpv.pyx":600
-+ * return err
- *
-- * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
-- * cdef mpv_node node
-- * node.format = format
-+ * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
-+ * try:
-+ * return self.get_property_async(prop, data=data)
- */
-
- /* function exit code */
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context._prep_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-- __Pyx_pretend_to_initialize(&__pyx_r);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_value);
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":517
-- * return node
-+/* "vidcutter/libs/pympv/mpv.pyx":606
-+ * return default
- *
-- * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
-- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
-- * for i in range(node.u.list.num):
-+ * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
-+ * try:
-+ * return self.get_property(prop)
- */
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, struct mpv_node __pyx_v_node) {
-- int __pyx_v_i;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- int __pyx_t_2;
-- int __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- int __pyx_t_5;
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_prop = 0;
-+ PyObject *__pyx_v_default = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_free_native_value", 0);
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("try_get_property (wrapper)", 0);
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_default,0};
-+ PyObject* values[2] = {0,0};
-+ values[1] = ((PyObject *)Py_None);
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
-+ if (value) { values[1] = value; kw_args--; }
-+ }
-+ }
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 606, __pyx_L3_error)
-+ }
-+ } else {
-+ switch (PyTuple_GET_SIZE(__pyx_args)) {
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ }
-+ __pyx_v_prop = values[0];
-+ __pyx_v_default = values[1];
-+ }
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_default);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":518
-- *
-- * cdef _free_native_value(self, mpv_node node):
-- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
-- * for i in range(node.u.list.num):
-- * self._free_native_value(node.u.list.values[i])
-- */
-- switch (__pyx_v_node.format) {
-- case MPV_FORMAT_NODE_ARRAY:
-- case MPV_FORMAT_NODE_MAP:
--
-- /* "vidcutter/libs/pympv/mpv.pyx":519
-- * cdef _free_native_value(self, mpv_node node):
-- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
-- * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
-- * self._free_native_value(node.u.list.values[i])
-- * free(node.u.list.values)
-- */
-- __pyx_t_1 = __pyx_v_node.u.list->num;
-- __pyx_t_2 = __pyx_t_1;
-- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
-- __pyx_v_i = __pyx_t_3;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":520
-- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
-- * for i in range(node.u.list.num):
-- * self._free_native_value(node.u.list.values[i]) # <<<<<<<<<<<<<<
-- * free(node.u.list.values)
-- * if node.format == MPV_FORMAT_NODE_MAP:
-- */
-- __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":521
-- * for i in range(node.u.list.num):
-- * self._free_native_value(node.u.list.values[i])
-- * free(node.u.list.values) # <<<<<<<<<<<<<<
-- * if node.format == MPV_FORMAT_NODE_MAP:
-- * for i in range(node.u.list.num):
-- */
-- free(__pyx_v_node.u.list->values);
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":522
-- * self._free_native_value(node.u.list.values[i])
-- * free(node.u.list.values)
-- * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-- * for i in range(node.u.list.num):
-- * free(node.u.list.keys[i])
-- */
-- __pyx_t_5 = ((__pyx_v_node.format == MPV_FORMAT_NODE_MAP) != 0);
-- if (__pyx_t_5) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ int __pyx_t_8;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("try_get_property", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":523
-- * free(node.u.list.values)
-- * if node.format == MPV_FORMAT_NODE_MAP:
-- * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
-- * free(node.u.list.keys[i])
-- * free(node.u.list.keys)
-+ /* "vidcutter/libs/pympv/mpv.pyx":607
-+ *
-+ * def try_get_property(self, prop, default=None):
-+ * try: # <<<<<<<<<<<<<<
-+ * return self.get_property(prop)
-+ * except MPVError:
- */
-- __pyx_t_1 = __pyx_v_node.u.list->num;
-- __pyx_t_2 = __pyx_t_1;
-- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
-- __pyx_v_i = __pyx_t_3;
-+ {
-+ __Pyx_PyThreadState_declare
-+ __Pyx_PyThreadState_assign
-+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
-+ __Pyx_XGOTREF(__pyx_t_1);
-+ __Pyx_XGOTREF(__pyx_t_2);
-+ __Pyx_XGOTREF(__pyx_t_3);
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":524
-- * if node.format == MPV_FORMAT_NODE_MAP:
-- * for i in range(node.u.list.num):
-- * free(node.u.list.keys[i]) # <<<<<<<<<<<<<<
-- * free(node.u.list.keys)
-- * free(node.u.list)
-+ /* "vidcutter/libs/pympv/mpv.pyx":608
-+ * def try_get_property(self, prop, default=None):
-+ * try:
-+ * return self.get_property(prop) # <<<<<<<<<<<<<<
-+ * except MPVError:
-+ * return default
- */
-- free((__pyx_v_node.u.list->keys[__pyx_v_i]));
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L3_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __pyx_t_6 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
-+ if (likely(__pyx_t_6)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-+ __Pyx_INCREF(__pyx_t_6);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_5, function);
-+ }
- }
-+ __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_prop);
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L3_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __pyx_r = __pyx_t_4;
-+ __pyx_t_4 = 0;
-+ goto __pyx_L7_try_return;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":525
-- * for i in range(node.u.list.num):
-- * free(node.u.list.keys[i])
-- * free(node.u.list.keys) # <<<<<<<<<<<<<<
-- * free(node.u.list)
-- * elif node.format == MPV_FORMAT_STRING:
-- */
-- free(__pyx_v_node.u.list->keys);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":522
-- * self._free_native_value(node.u.list.values[i])
-- * free(node.u.list.values)
-- * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-- * for i in range(node.u.list.num):
-- * free(node.u.list.keys[i])
-+ /* "vidcutter/libs/pympv/mpv.pyx":607
-+ *
-+ * def try_get_property(self, prop, default=None):
-+ * try: # <<<<<<<<<<<<<<
-+ * return self.get_property(prop)
-+ * except MPVError:
- */
- }
-+ __pyx_L3_error:;
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":526
-- * free(node.u.list.keys[i])
-- * free(node.u.list.keys)
-- * free(node.u.list) # <<<<<<<<<<<<<<
-- * elif node.format == MPV_FORMAT_STRING:
-- * free(node.u.string)
-- */
-- free(__pyx_v_node.u.list);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":518
-+ /* "vidcutter/libs/pympv/mpv.pyx":609
-+ * try:
-+ * return self.get_property(prop)
-+ * except MPVError: # <<<<<<<<<<<<<<
-+ * return default
- *
-- * cdef _free_native_value(self, mpv_node node):
-- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
-- * for i in range(node.u.list.num):
-- * self._free_native_value(node.u.list.values[i])
- */
-- break;
-- case MPV_FORMAT_STRING:
-+ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
-+ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L5_except_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
-+ __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
-+ if (__pyx_t_8) {
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 609, __pyx_L5_except_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_GOTREF(__pyx_t_4);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":528
-- * free(node.u.list)
-- * elif node.format == MPV_FORMAT_STRING:
-- * free(node.u.string) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":610
-+ * return self.get_property(prop)
-+ * except MPVError:
-+ * return default # <<<<<<<<<<<<<<
- *
-- * def command(self, *cmdlist, asynchronous=False, data=None):
-+ * def get_property(self, prop):
- */
-- free(__pyx_v_node.u.string);
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v_default);
-+ __pyx_r = __pyx_v_default;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ goto __pyx_L6_except_return;
-+ }
-+ goto __pyx_L5_except_error;
-+ __pyx_L5_except_error:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":527
-- * free(node.u.list.keys)
-- * free(node.u.list)
-- * elif node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-- * free(node.u.string)
-+ /* "vidcutter/libs/pympv/mpv.pyx":607
- *
-+ * def try_get_property(self, prop, default=None):
-+ * try: # <<<<<<<<<<<<<<
-+ * return self.get_property(prop)
-+ * except MPVError:
- */
-- break;
-- default: break;
-+ __Pyx_XGIVEREF(__pyx_t_1);
-+ __Pyx_XGIVEREF(__pyx_t_2);
-+ __Pyx_XGIVEREF(__pyx_t_3);
-+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-+ goto __pyx_L1_error;
-+ __pyx_L7_try_return:;
-+ __Pyx_XGIVEREF(__pyx_t_1);
-+ __Pyx_XGIVEREF(__pyx_t_2);
-+ __Pyx_XGIVEREF(__pyx_t_3);
-+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-+ goto __pyx_L0;
-+ __pyx_L6_except_return:;
-+ __Pyx_XGIVEREF(__pyx_t_1);
-+ __Pyx_XGIVEREF(__pyx_t_2);
-+ __Pyx_XGIVEREF(__pyx_t_3);
-+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-+ goto __pyx_L0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":517
-- * return node
-+ /* "vidcutter/libs/pympv/mpv.pyx":606
-+ * return default
- *
-- * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
-- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
-- * for i in range(node.u.list.num):
-+ * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
-+ * try:
-+ * return self.get_property(prop)
- */
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context._free_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":530
-- * free(node.u.string)
-- *
-- * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-- * """Send a command to mpv.
-+/* "vidcutter/libs/pympv/mpv.pyx":612
-+ * return default
- *
-+ * def get_property(self, prop): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_get_property"""
-+ * assert self._ctx
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_12command[] = "Send a command to mpv.\n\n Non-async success returns the command's response data, otherwise None\n\n Arguments:\n Accepts parameters as args\n\n Keyword Arguments:\n asynchronous: True will return right away, status comes in as MPV_EVENT_COMMAND_REPLY\n data: Only valid if async, gets sent back as reply_userdata in the Event\n\n Wraps: mpv_command_node and mpv_command_node_async\n ";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13command(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_asynchronous = 0;
-- PyObject *__pyx_v_data = 0;
-- PyObject *__pyx_v_cmdlist = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_16get_property[] = "Wraps: mpv_get_property";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("command (wrapper)", 0);
-- if (PyTuple_GET_SIZE(__pyx_args) > 0) {
-- __pyx_v_cmdlist = PyTuple_GetSlice(__pyx_args, 0, PyTuple_GET_SIZE(__pyx_args));
-- if (unlikely(!__pyx_v_cmdlist)) {
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- }
-- __Pyx_GOTREF(__pyx_v_cmdlist);
-- } else {
-- __pyx_v_cmdlist = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
-- }
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
-- PyObject* values[2] = {0,0};
-- values[0] = ((PyObject *)Py_False);
-- values[1] = ((PyObject *)Py_None);
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- default:
-- case 0: break;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- if (kw_args > 0 && likely(kw_args <= 2)) {
-- Py_ssize_t index;
-- for (index = 0; index < 2 && kw_args > 0; index++) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
-- if (value) { values[index] = value; kw_args--; }
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 530, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) < 0) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- }
-- __pyx_v_asynchronous = values[0];
-- __pyx_v_data = values[1];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 530, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_DECREF(__pyx_v_cmdlist); __pyx_v_cmdlist = 0;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_asynchronous, __pyx_v_data, __pyx_v_cmdlist);
-+ __Pyx_RefNannySetupContext("get_property (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_prop));
-
- /* function exit code */
-- __Pyx_XDECREF(__pyx_v_cmdlist);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data, PyObject *__pyx_v_cmdlist) {
-- struct mpv_node __pyx_v_node;
-- struct mpv_node __pyx_v_noderesult;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop) {
-+ struct mpv_node __pyx_v_result;
-+ char const *__pyx_v_prop_c;
- int __pyx_v_err;
-- uint64_t __pyx_v_data_id;
-- PyObject *__pyx_v_result = NULL;
-- PyObject *__pyx_v_userdatas = NULL;
-+ PyObject *__pyx_v_v = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
-- uint64_t __pyx_t_4;
-+ char const *__pyx_t_4;
- int __pyx_t_5;
-- int __pyx_t_6;
-+ PyObject *__pyx_t_6 = NULL;
- int __pyx_t_7;
- int __pyx_t_8;
- char const *__pyx_t_9;
-@@ -11198,41 +11876,39 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_
- PyObject *__pyx_t_13 = NULL;
- PyObject *__pyx_t_14 = NULL;
- PyObject *__pyx_t_15 = NULL;
-- PyObject *__pyx_t_16 = NULL;
-- PyObject *__pyx_t_17 = NULL;
-- char const *__pyx_t_18;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("command", 0);
-+ __Pyx_RefNannySetupContext("get_property", 0);
-+ __Pyx_INCREF(__pyx_v_prop);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":544
-- * Wraps: mpv_command_node and mpv_command_node_async
-- * """
-+ /* "vidcutter/libs/pympv/mpv.pyx":614
-+ * def get_property(self, prop):
-+ * """Wraps: mpv_get_property"""
- * assert self._ctx # <<<<<<<<<<<<<<
-- * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist))
-- * cdef mpv_node noderesult
-+ * cdef mpv_node result
-+ * prop = _strenc(prop)
- */
- #ifndef CYTHON_WITHOUT_ASSERTIONS
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 544, __pyx_L1_error)
-+ __PYX_ERR(0, 614, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":545
-- * """
-+ /* "vidcutter/libs/pympv/mpv.pyx":616
- * assert self._ctx
-- * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist)) # <<<<<<<<<<<<<<
-- * cdef mpv_node noderesult
-+ * cdef mpv_node result
-+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
-+ * cdef const char* prop_c = prop
- * cdef int err
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
- if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-@@ -11241,625 +11917,332 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12command(struct __pyx_
- __Pyx_DECREF_SET(__pyx_t_2, function);
- }
- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_cmdlist) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cmdlist);
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_cmdlist, __pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":549
-+ /* "vidcutter/libs/pympv/mpv.pyx":617
-+ * cdef mpv_node result
-+ * prop = _strenc(prop)
-+ * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
- * cdef int err
-- * cdef uint64_t data_id
-- * result = None # <<<<<<<<<<<<<<
-- * try:
-- * data_id = id(data)
-- */
-- __Pyx_INCREF(Py_None);
-- __pyx_v_result = Py_None;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":550
-- * cdef uint64_t data_id
-- * result = None
-- * try: # <<<<<<<<<<<<<<
-- * data_id = id(data)
-- * if not asynchronous:
-+ * with nogil:
- */
-- /*try:*/ {
-+ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error)
-+ __pyx_v_prop_c = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":551
-- * result = None
-- * try:
-- * data_id = id(data) # <<<<<<<<<<<<<<
-- * if not asynchronous:
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":619
-+ * cdef const char* prop_c = prop
-+ * cdef int err
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_get_property(
-+ * self._ctx,
- */
-- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L4_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v_data_id = __pyx_t_4;
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":552
-- * try:
-- * data_id = id(data)
-- * if not asynchronous: # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_command_node(self._ctx, &node, &noderesult)
-+ /* "vidcutter/libs/pympv/mpv.pyx":620
-+ * cdef int err
-+ * with nogil:
-+ * err = mpv_get_property( # <<<<<<<<<<<<<<
-+ * self._ctx,
-+ * prop_c,
- */
-- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 552, __pyx_L4_error)
-- __pyx_t_6 = ((!__pyx_t_5) != 0);
-- if (__pyx_t_6) {
-+ __pyx_v_err = mpv_get_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_result));
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":553
-- * data_id = id(data)
-- * if not asynchronous:
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_command_node(self._ctx, &node, &noderesult)
-- * try:
-+ /* "vidcutter/libs/pympv/mpv.pyx":619
-+ * cdef const char* prop_c = prop
-+ * cdef int err
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_get_property(
-+ * self._ctx,
- */
-- {
-+ /*finally:*/ {
-+ /*normal exit:*/{
- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":554
-- * if not asynchronous:
-- * with nogil:
-- * err = mpv_command_node(self._ctx, &node, &noderesult) # <<<<<<<<<<<<<<
-- * try:
-- * result = _convert_node_value(noderesult) if err >= 0 else None
-- */
-- __pyx_v_err = mpv_command_node(__pyx_v_self->_ctx, (&__pyx_v_node), (&__pyx_v_noderesult));
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":553
-- * data_id = id(data)
-- * if not asynchronous:
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_command_node(self._ctx, &node, &noderesult)
-- * try:
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L9;
-- }
-- __pyx_L9:;
-- }
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
- }
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":555
-- * with nogil:
-- * err = mpv_command_node(self._ctx, &node, &noderesult)
-- * try: # <<<<<<<<<<<<<<
-- * result = _convert_node_value(noderesult) if err >= 0 else None
-- * finally:
-+ /* "vidcutter/libs/pympv/mpv.pyx":626
-+ * &result,
-+ * )
-+ * if err < 0: # <<<<<<<<<<<<<<
-+ * raise MPVError(err)
-+ * try:
- */
-- /*try:*/ {
-+ __pyx_t_5 = ((__pyx_v_err < 0) != 0);
-+ if (unlikely(__pyx_t_5)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":556
-- * err = mpv_command_node(self._ctx, &node, &noderesult)
-- * try:
-- * result = _convert_node_value(noderesult) if err >= 0 else None # <<<<<<<<<<<<<<
-- * finally:
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":627
-+ * )
-+ * if err < 0:
-+ * raise MPVError(err) # <<<<<<<<<<<<<<
-+ * try:
-+ * v = _convert_node_value(result)
- */
-- if (((__pyx_v_err >= 0) != 0)) {
-- __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L11_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_1 = __pyx_t_2;
-- __pyx_t_2 = 0;
-- } else {
-- __Pyx_INCREF(Py_None);
-- __pyx_t_1 = Py_None;
-- }
-- __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
-- __pyx_t_1 = 0;
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_6 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_6)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_6);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
- }
-+ }
-+ __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __PYX_ERR(0, 627, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":558
-- * result = _convert_node_value(noderesult) if err >= 0 else None
-- * finally:
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_free_node_contents(&noderesult)
-- * else:
-+ /* "vidcutter/libs/pympv/mpv.pyx":626
-+ * &result,
-+ * )
-+ * if err < 0: # <<<<<<<<<<<<<<
-+ * raise MPVError(err)
-+ * try:
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":559
-- * finally:
-- * with nogil:
-- * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
-- * else:
-- * userdatas = self.reply_userdata.get(data_id, None)
-+ /* "vidcutter/libs/pympv/mpv.pyx":628
-+ * if err < 0:
-+ * raise MPVError(err)
-+ * try: # <<<<<<<<<<<<<<
-+ * v = _convert_node_value(result)
-+ * finally:
- */
-- mpv_free_node_contents((&__pyx_v_noderesult));
-- }
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":558
-- * result = _convert_node_value(noderesult) if err >= 0 else None
-- * finally:
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_free_node_contents(&noderesult)
-- * else:
-+ /* "vidcutter/libs/pympv/mpv.pyx":629
-+ * raise MPVError(err)
-+ * try:
-+ * v = _convert_node_value(result) # <<<<<<<<<<<<<<
-+ * finally:
-+ * with nogil:
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L15;
-- }
-- __pyx_L15:;
-- }
-- }
-- goto __pyx_L12;
-- }
-- __pyx_L11_error:;
-- /*exception exit:*/{
-- __Pyx_PyThreadState_declare
-- __Pyx_PyThreadState_assign
-- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
-- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
-- __Pyx_XGOTREF(__pyx_t_10);
-- __Pyx_XGOTREF(__pyx_t_11);
-- __Pyx_XGOTREF(__pyx_t_12);
-- __Pyx_XGOTREF(__pyx_t_13);
-- __Pyx_XGOTREF(__pyx_t_14);
-- __Pyx_XGOTREF(__pyx_t_15);
-- __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
-- {
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L8_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_v_v = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":559
-- * finally:
-- * with nogil:
-- * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
-- * else:
-- * userdatas = self.reply_userdata.get(data_id, None)
-+ /* "vidcutter/libs/pympv/mpv.pyx":631
-+ * v = _convert_node_value(result)
-+ * finally:
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_free_node_contents(&result)
-+ * return v
- */
-- mpv_free_node_contents((&__pyx_v_noderesult));
-- }
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":558
-- * result = _convert_node_value(noderesult) if err >= 0 else None
-- * finally:
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_free_node_contents(&noderesult)
-- * else:
-+ /* "vidcutter/libs/pympv/mpv.pyx":632
-+ * finally:
-+ * with nogil:
-+ * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
-+ * return v
-+ *
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L20;
-- }
-- __pyx_L20:;
-- }
-- }
-- }
-- if (PY_MAJOR_VERSION >= 3) {
-- __Pyx_XGIVEREF(__pyx_t_13);
-- __Pyx_XGIVEREF(__pyx_t_14);
-- __Pyx_XGIVEREF(__pyx_t_15);
-- __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
-+ mpv_free_node_contents((&__pyx_v_result));
- }
-- __Pyx_XGIVEREF(__pyx_t_10);
-- __Pyx_XGIVEREF(__pyx_t_11);
-- __Pyx_XGIVEREF(__pyx_t_12);
-- __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
-- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
-- __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
-- goto __pyx_L4_error;
-- }
-- __pyx_L12:;
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":552
-- * try:
-- * data_id = id(data)
-- * if not asynchronous: # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_command_node(self._ctx, &node, &noderesult)
-+ /* "vidcutter/libs/pympv/mpv.pyx":631
-+ * v = _convert_node_value(result)
-+ * finally:
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_free_node_contents(&result)
-+ * return v
- */
-- goto __pyx_L6;
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L12;
-+ }
-+ __pyx_L12:;
-+ }
-+ }
-+ goto __pyx_L9;
- }
-+ __pyx_L8_error:;
-+ /*exception exit:*/{
-+ __Pyx_PyThreadState_declare
-+ __Pyx_PyThreadState_assign
-+ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
-+ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
-+ __Pyx_XGOTREF(__pyx_t_10);
-+ __Pyx_XGOTREF(__pyx_t_11);
-+ __Pyx_XGOTREF(__pyx_t_12);
-+ __Pyx_XGOTREF(__pyx_t_13);
-+ __Pyx_XGOTREF(__pyx_t_14);
-+ __Pyx_XGOTREF(__pyx_t_15);
-+ __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
-+ {
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":561
-- * mpv_free_node_contents(&noderesult)
-- * else:
-- * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
-- * if userdatas is None:
-- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
-+ /* "vidcutter/libs/pympv/mpv.pyx":632
-+ * finally:
-+ * with nogil:
-+ * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
-+ * return v
-+ *
- */
-- /*else*/ {
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_16 = NULL;
-- __pyx_t_8 = 0;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_16)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_16);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- __pyx_t_8 = 1;
-- }
-- }
-- #if CYTHON_FAST_PYCALL
-- if (PyFunction_Check(__pyx_t_2)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
-- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- } else
-- #endif
-- #if CYTHON_FAST_PYCCALL
-- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
-- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- } else
-- #endif
-- {
-- __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 561, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_17);
-- if (__pyx_t_16) {
-- __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
-- }
-- __Pyx_GIVEREF(__pyx_t_3);
-- PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_8, __pyx_t_3);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_8, Py_None);
-- __pyx_t_3 = 0;
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
-- }
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v_userdatas = __pyx_t_1;
-- __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":562
-- * else:
-- * userdatas = self.reply_userdata.get(data_id, None)
-- * if userdatas is None: # <<<<<<<<<<<<<<
-- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
-- * userdatas.add()
-- */
-- __pyx_t_6 = (__pyx_v_userdatas == Py_None);
-- __pyx_t_5 = (__pyx_t_6 != 0);
-- if (__pyx_t_5) {
-+ mpv_free_node_contents((&__pyx_v_result));
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":563
-- * userdatas = self.reply_userdata.get(data_id, None)
-- * if userdatas is None:
-- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
-- * userdatas.add()
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":631
-+ * v = _convert_node_value(result)
-+ * finally:
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_free_node_contents(&result)
-+ * return v
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_17 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_17)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_17);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L17;
-+ }
-+ __pyx_L17:;
-+ }
- }
-- __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_17, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
-- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 563, __pyx_L4_error)
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":562
-- * else:
-- * userdatas = self.reply_userdata.get(data_id, None)
-- * if userdatas is None: # <<<<<<<<<<<<<<
-- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
-- * userdatas.add()
-- */
- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":564
-- * if userdatas is None:
-- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
-- * userdatas.add() # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_command_node_async(self._ctx, data_id, &node)
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_17 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_17)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_17);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-+ if (PY_MAJOR_VERSION >= 3) {
-+ __Pyx_XGIVEREF(__pyx_t_13);
-+ __Pyx_XGIVEREF(__pyx_t_14);
-+ __Pyx_XGIVEREF(__pyx_t_15);
-+ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
- }
-- __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_XGIVEREF(__pyx_t_10);
-+ __Pyx_XGIVEREF(__pyx_t_11);
-+ __Pyx_XGIVEREF(__pyx_t_12);
-+ __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
-+ __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
-+ __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
-+ goto __pyx_L1_error;
-+ }
-+ __pyx_L9:;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":565
-- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
-- * userdatas.add()
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_command_node_async(self._ctx, data_id, &node)
-- * finally:
-+ /* "vidcutter/libs/pympv/mpv.pyx":633
-+ * with nogil:
-+ * mpv_free_node_contents(&result)
-+ * return v # <<<<<<<<<<<<<<
-+ *
-+ * @_errors
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v_v);
-+ __pyx_r = __pyx_v_v;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":566
-- * userdatas.add()
-- * with nogil:
-- * err = mpv_command_node_async(self._ctx, data_id, &node) # <<<<<<<<<<<<<<
-- * finally:
-- * self._free_native_value(node)
-+ /* "vidcutter/libs/pympv/mpv.pyx":612
-+ * return default
-+ *
-+ * def get_property(self, prop): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_get_property"""
-+ * assert self._ctx
- */
-- __pyx_v_err = mpv_command_node_async(__pyx_v_self->_ctx, __pyx_v_data_id, (&__pyx_v_node));
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":565
-- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
-- * userdatas.add()
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_command_node_async(self._ctx, data_id, &node)
-- * finally:
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L24;
-- }
-- __pyx_L24:;
-- }
-- }
-- }
-- __pyx_L6:;
-- }
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_v);
-+ __Pyx_XDECREF(__pyx_v_prop);
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":568
-- * err = mpv_command_node_async(self._ctx, data_id, &node)
-- * finally:
-- * self._free_native_value(node) # <<<<<<<<<<<<<<
-- * if err < 0:
-- * raise MPVError(err)
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- goto __pyx_L5;
-- }
-- __pyx_L4_error:;
-- /*exception exit:*/{
-- __Pyx_PyThreadState_declare
-- __Pyx_PyThreadState_assign
-- __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
-- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
-- __Pyx_XGOTREF(__pyx_t_15);
-- __Pyx_XGOTREF(__pyx_t_14);
-- __Pyx_XGOTREF(__pyx_t_13);
-- __Pyx_XGOTREF(__pyx_t_12);
-- __Pyx_XGOTREF(__pyx_t_11);
-- __Pyx_XGOTREF(__pyx_t_10);
-- __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
-- {
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L26_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- }
-- if (PY_MAJOR_VERSION >= 3) {
-- __Pyx_XGIVEREF(__pyx_t_12);
-- __Pyx_XGIVEREF(__pyx_t_11);
-- __Pyx_XGIVEREF(__pyx_t_10);
-- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
-- }
-- __Pyx_XGIVEREF(__pyx_t_15);
-- __Pyx_XGIVEREF(__pyx_t_14);
-- __Pyx_XGIVEREF(__pyx_t_13);
-- __Pyx_ErrRestore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
-- __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
-- __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_18;
-- goto __pyx_L1_error;
-- __pyx_L26_error:;
-- if (PY_MAJOR_VERSION >= 3) {
-- __Pyx_XGIVEREF(__pyx_t_12);
-- __Pyx_XGIVEREF(__pyx_t_11);
-- __Pyx_XGIVEREF(__pyx_t_10);
-- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
-- }
-- __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
-- __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
-- __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
-- __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0;
-- goto __pyx_L1_error;
-- }
-- __pyx_L5:;
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":569
-- * finally:
-- * self._free_native_value(node)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-- * return result
-- */
-- __pyx_t_5 = ((__pyx_v_err < 0) != 0);
-- if (unlikely(__pyx_t_5)) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":570
-- * self._free_native_value(node)
-- * if err < 0:
-- * raise MPVError(err) # <<<<<<<<<<<<<<
-- * return result
-- *
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 570, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_17);
-- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(0, 570, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":569
-- * finally:
-- * self._free_native_value(node)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-- * return result
-- */
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":571
-- * if err < 0:
-- * raise MPVError(err)
-- * return result # <<<<<<<<<<<<<<
-- *
-- * @_errors
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_result);
-- __pyx_r = __pyx_v_result;
-- goto __pyx_L0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":530
-- * free(node.u.string)
-- *
-- * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-- * """Send a command to mpv.
-- *
-- */
--
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_16);
-- __Pyx_XDECREF(__pyx_t_17);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_result);
-- __Pyx_XDECREF(__pyx_v_userdatas);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":574
-- *
-- * @_errors
-- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
-- * """Gets the value of a property asynchronously.
-- *
-+/* "vidcutter/libs/pympv/mpv.pyx":636
-+ *
-+ * @_errors
-+ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_set_property and mpv_set_property_async"""
-+ * assert self._ctx
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_14get_property_async[] = "Gets the value of a property asynchronously.\n\n Arguments:\n prop: Property to get the value of.\n\n Keyword arguments:\n data: Value to be passed into the reply_userdata of the response event.\n Wraps: mpv_get_property_async";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_18set_property[] = "Wraps: mpv_set_property and mpv_set_property_async";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- PyObject *__pyx_v_prop = 0;
-+ PyObject *__pyx_v_value = 0;
-+ PyObject *__pyx_v_asynchronous = 0;
- PyObject *__pyx_v_data = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("get_property_async (wrapper)", 0);
-+ __Pyx_RefNannySetupContext("set_property (wrapper)", 0);
- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
-- PyObject* values[2] = {0,0};
-- values[1] = ((PyObject *)Py_None);
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
-+ PyObject* values[4] = {0,0,0,0};
-+ values[1] = ((PyObject *)Py_True);
-+ values[2] = ((PyObject *)Py_False);
-+ values[3] = ((PyObject *)Py_None);
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
-+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-+ CYTHON_FALLTHROUGH;
-+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ CYTHON_FALLTHROUGH;
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- CYTHON_FALLTHROUGH;
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -11875,15 +12258,31 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(Py
- CYTHON_FALLTHROUGH;
- case 1:
- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
- if (value) { values[1] = value; kw_args--; }
- }
-+ CYTHON_FALLTHROUGH;
-+ case 2:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_asynchronous);
-+ if (value) { values[2] = value; kw_args--; }
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 3:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
-+ if (value) { values[3] = value; kw_args--; }
-+ }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 574, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 636, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-+ CYTHON_FALLTHROUGH;
-+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ CYTHON_FALLTHROUGH;
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- CYTHON_FALLTHROUGH;
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -11892,70 +12291,83 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async(Py
- }
- }
- __pyx_v_prop = values[0];
-- __pyx_v_data = values[1];
-+ __pyx_v_value = values[1];
-+ __pyx_v_asynchronous = values[2];
-+ __pyx_v_data = values[3];
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 574, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __pyx_L3_error)
- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value, __pyx_v_asynchronous, __pyx_v_data);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
-- uint64_t __pyx_v_id_data;
-- PyObject *__pyx_v_userdatas = NULL;
-- char const *__pyx_v_prop_c;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data) {
-+ enum mpv_format __pyx_v_format;
-+ struct mpv_node __pyx_v_v;
- int __pyx_v_err;
-+ uint64_t __pyx_v_data_id;
-+ char const *__pyx_v_prop_c;
-+ PyObject *__pyx_v_userdatas = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
-- Py_hash_t __pyx_t_4;
-- PyObject *__pyx_t_5 = NULL;
-+ enum mpv_format __pyx_t_4;
-+ char const *__pyx_t_5;
- int __pyx_t_6;
-- PyObject *__pyx_t_7 = NULL;
-- int __pyx_t_8;
-- int __pyx_t_9;
-- char const *__pyx_t_10;
-+ int __pyx_t_7;
-+ Py_hash_t __pyx_t_8;
-+ PyObject *__pyx_t_9 = NULL;
-+ int __pyx_t_10;
-+ PyObject *__pyx_t_11 = NULL;
-+ int __pyx_t_12;
-+ char const *__pyx_t_13;
-+ PyObject *__pyx_t_14 = NULL;
-+ PyObject *__pyx_t_15 = NULL;
-+ PyObject *__pyx_t_16 = NULL;
-+ PyObject *__pyx_t_17 = NULL;
-+ PyObject *__pyx_t_18 = NULL;
-+ PyObject *__pyx_t_19 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("get_property_async", 0);
-+ __Pyx_RefNannySetupContext("set_property", 0);
- __Pyx_INCREF(__pyx_v_prop);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":583
-- * data: Value to be passed into the reply_userdata of the response event.
-- * Wraps: mpv_get_property_async"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":638
-+ * def set_property(self, prop, value=True, asynchronous=False, data=None):
-+ * """Wraps: mpv_set_property and mpv_set_property_async"""
- * assert self._ctx # <<<<<<<<<<<<<<
- * prop = _strenc(prop)
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * cdef mpv_format format = self._format_for(value)
- */
- #ifndef CYTHON_WITHOUT_ASSERTIONS
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 583, __pyx_L1_error)
-+ __PYX_ERR(0, 638, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":584
-- * Wraps: mpv_get_property_async"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":639
-+ * """Wraps: mpv_set_property and mpv_set_property_async"""
- * assert self._ctx
- * prop = _strenc(prop) # <<<<<<<<<<<<<<
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None)
-+ * cdef mpv_format format = self._format_for(value)
-+ * cdef mpv_node v = self._prep_native_value(value, format)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -11969,523 +12381,480 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14get_property_async(st
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":585
-+ /* "vidcutter/libs/pympv/mpv.pyx":640
- * assert self._ctx
- * prop = _strenc(prop)
-- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is None:
-- */
-- __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 585, __pyx_L1_error)
-- __pyx_v_id_data = ((uint64_t)__pyx_t_4);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":586
-- * prop = _strenc(prop)
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
-- * if userdatas is None:
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-+ * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
-+ * cdef mpv_node v = self._prep_native_value(value, format)
-+ * cdef int err
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_5 = NULL;
-- __pyx_t_6 = 0;
-+ __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_5)) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(__pyx_t_3);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
-- __pyx_t_6 = 1;
-- }
-- }
-- #if CYTHON_FAST_PYCALL
-- if (PyFunction_Check(__pyx_t_2)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- } else
-- #endif
-- #if CYTHON_FAST_PYCCALL
-- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- } else
-- #endif
-- {
-- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- if (__pyx_t_5) {
-- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
- }
-- __Pyx_GIVEREF(__pyx_t_3);
-- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
-- __pyx_t_3 = 0;
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- }
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v_userdatas = __pyx_t_1;
-- __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":587
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is None: # <<<<<<<<<<<<<<
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-- * userdatas.add()
-- */
-- __pyx_t_8 = (__pyx_v_userdatas == Py_None);
-- __pyx_t_9 = (__pyx_t_8 != 0);
-- if (__pyx_t_9) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":588
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is None:
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
-- * userdatas.add()
-- * cdef const char* prop_c = prop
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_7 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_7)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_7);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
-- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 588, __pyx_L1_error)
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":587
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is None: # <<<<<<<<<<<<<<
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-- * userdatas.add()
-- */
-- }
-+ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v_format = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":589
-- * if userdatas is None:
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-- * userdatas.add() # <<<<<<<<<<<<<<
-- * cdef const char* prop_c = prop
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":641
-+ * prop = _strenc(prop)
-+ * cdef mpv_format format = self._format_for(value)
-+ * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
-+ * cdef int err
-+ * cdef uint64_t data_id
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_7 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_7)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_7);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":590
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-- * userdatas.add()
-- * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_get_property_async(
-+ /* "vidcutter/libs/pympv/mpv.pyx":645
-+ * cdef uint64_t data_id
-+ * cdef const char* prop_c
-+ * try: # <<<<<<<<<<<<<<
-+ * prop_c = prop
-+ * if not asynchronous:
- */
-- __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 590, __pyx_L1_error)
-- __pyx_v_prop_c = __pyx_t_10;
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":591
-- * userdatas.add()
-- * cdef const char* prop_c = prop
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_get_property_async(
-- * self._ctx,
-+ /* "vidcutter/libs/pympv/mpv.pyx":646
-+ * cdef const char* prop_c
-+ * try:
-+ * prop_c = prop # <<<<<<<<<<<<<<
-+ * if not asynchronous:
-+ * with nogil:
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 646, __pyx_L4_error)
-+ __pyx_v_prop_c = __pyx_t_5;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":592
-- * cdef const char* prop_c = prop
-- * with nogil:
-- * err = mpv_get_property_async( # <<<<<<<<<<<<<<
-- * self._ctx,
-- * id_data,
-+ /* "vidcutter/libs/pympv/mpv.pyx":647
-+ * try:
-+ * prop_c = prop
-+ * if not asynchronous: # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * err = mpv_set_property(
- */
-- __pyx_v_err = mpv_get_property_async(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_prop_c, MPV_FORMAT_NODE);
-- }
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 647, __pyx_L4_error)
-+ __pyx_t_7 = ((!__pyx_t_6) != 0);
-+ if (__pyx_t_7) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":591
-- * userdatas.add()
-- * cdef const char* prop_c = prop
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_get_property_async(
-- * self._ctx,
-+ /* "vidcutter/libs/pympv/mpv.pyx":648
-+ * prop_c = prop
-+ * if not asynchronous:
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_set_property(
-+ * self._ctx,
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-+ {
- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
- #endif
-- goto __pyx_L6;
-- }
-- __pyx_L6:;
-- }
-- }
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":598
-- * MPV_FORMAT_NODE,
-- * )
-- * return err # <<<<<<<<<<<<<<
-- *
-- * def try_get_property_async(self, prop, data=None, default=None):
-+ /* "vidcutter/libs/pympv/mpv.pyx":649
-+ * if not asynchronous:
-+ * with nogil:
-+ * err = mpv_set_property( # <<<<<<<<<<<<<<
-+ * self._ctx,
-+ * prop_c,
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ __pyx_v_err = mpv_set_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":574
-- *
-- * @_errors
-- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
-- * """Gets the value of a property asynchronously.
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":648
-+ * prop_c = prop
-+ * if not asynchronous:
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_set_property(
-+ * self._ctx,
- */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L9;
-+ }
-+ __pyx_L9:;
-+ }
-+ }
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_userdatas);
-- __Pyx_XDECREF(__pyx_v_prop);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":655
-+ * &v
-+ * )
-+ * return err # <<<<<<<<<<<<<<
-+ * data_id = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(data_id, None)
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L3_return;
-
--/* "vidcutter/libs/pympv/mpv.pyx":600
-- * return err
-- *
-- * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":647
- * try:
-- * return self.get_property_async(prop, data=data)
-+ * prop_c = prop
-+ * if not asynchronous: # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * err = mpv_set_property(
- */
-+ }
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_17try_get_property_async(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_prop = 0;
-- PyObject *__pyx_v_data = 0;
-- PyObject *__pyx_v_default = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("try_get_property_async (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,&__pyx_n_s_default,0};
-- PyObject* values[3] = {0,0,0};
-- values[1] = ((PyObject *)Py_None);
-- values[2] = ((PyObject *)Py_None);
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
-- if (value) { values[1] = value; kw_args--; }
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
-- if (value) { values[2] = value; kw_args--; }
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 600, __pyx_L3_error)
-+ /* "vidcutter/libs/pympv/mpv.pyx":656
-+ * )
-+ * return err
-+ * data_id = <uint64_t>hash(data) # <<<<<<<<<<<<<<
-+ * userdatas = self.reply_userdata.get(data_id, None)
-+ * if userdatas is None:
-+ */
-+ __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 656, __pyx_L4_error)
-+ __pyx_v_data_id = ((uint64_t)__pyx_t_8);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":657
-+ * return err
-+ * data_id = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
-+ * if userdatas is None:
-+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-+ */
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_9 = NULL;
-+ __pyx_t_10 = 0;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_9)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_9);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ __pyx_t_10 = 1;
- }
-- } else {
-- switch (PyTuple_GET_SIZE(__pyx_args)) {
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- break;
-- default: goto __pyx_L5_argtuple_error;
-+ }
-+ #if CYTHON_FAST_PYCALL
-+ if (PyFunction_Check(__pyx_t_2)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
-+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ } else
-+ #endif
-+ #if CYTHON_FAST_PYCCALL
-+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
-+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ } else
-+ #endif
-+ {
-+ __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_11);
-+ if (__pyx_t_9) {
-+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
- }
-+ __Pyx_GIVEREF(__pyx_t_3);
-+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, Py_None);
-+ __pyx_t_3 = 0;
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- }
-- __pyx_v_prop = values[0];
-- __pyx_v_data = values[1];
-- __pyx_v_default = values[2];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 600, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_16try_get_property_async(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data, __pyx_v_default);
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v_userdatas = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16try_get_property_async(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data, PyObject *__pyx_v_default) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-- int __pyx_t_8;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("try_get_property_async", 0);
-+ /* "vidcutter/libs/pympv/mpv.pyx":658
-+ * data_id = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(data_id, None)
-+ * if userdatas is None: # <<<<<<<<<<<<<<
-+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-+ * userdatas.add()
-+ */
-+ __pyx_t_7 = (__pyx_v_userdatas == Py_None);
-+ __pyx_t_6 = (__pyx_t_7 != 0);
-+ if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":601
-- *
-- * def try_get_property_async(self, prop, data=None, default=None):
-- * try: # <<<<<<<<<<<<<<
-- * return self.get_property_async(prop, data=data)
-- * except MPVError:
-+ /* "vidcutter/libs/pympv/mpv.pyx":659
-+ * userdatas = self.reply_userdata.get(data_id, None)
-+ * if userdatas is None:
-+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
-+ * userdatas.add()
-+ * with nogil:
- */
-- {
-- __Pyx_PyThreadState_declare
-- __Pyx_PyThreadState_assign
-- __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
-- __Pyx_XGOTREF(__pyx_t_1);
-- __Pyx_XGOTREF(__pyx_t_2);
-- __Pyx_XGOTREF(__pyx_t_3);
-- /*try:*/ {
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_11 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_11)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_11);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
-+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 659, __pyx_L4_error)
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":602
-- * def try_get_property_async(self, prop, data=None, default=None):
-- * try:
-- * return self.get_property_async(prop, data=data) # <<<<<<<<<<<<<<
-- * except MPVError:
-- * return default
-+ /* "vidcutter/libs/pympv/mpv.pyx":658
-+ * data_id = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(data_id, None)
-+ * if userdatas is None: # <<<<<<<<<<<<<<
-+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-+ * userdatas.add()
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L3_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L3_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_INCREF(__pyx_v_prop);
-- __Pyx_GIVEREF(__pyx_v_prop);
-- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_prop);
-- __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L3_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 602, __pyx_L3_error)
-- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L3_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __pyx_r = __pyx_t_7;
-- __pyx_t_7 = 0;
-- goto __pyx_L7_try_return;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":601
-- *
-- * def try_get_property_async(self, prop, data=None, default=None):
-- * try: # <<<<<<<<<<<<<<
-- * return self.get_property_async(prop, data=data)
-- * except MPVError:
-+ /* "vidcutter/libs/pympv/mpv.pyx":660
-+ * if userdatas is None:
-+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-+ * userdatas.add() # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * err = mpv_set_property_async(
- */
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_11 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_11)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_11);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
- }
-- __pyx_L3_error:;
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L4_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":603
-- * try:
-- * return self.get_property_async(prop, data=data)
-- * except MPVError: # <<<<<<<<<<<<<<
-- * return default
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":661
-+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-+ * userdatas.add()
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_set_property_async(
-+ * self._ctx,
- */
-- __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L5_except_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5);
-- __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
-- if (__pyx_t_8) {
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 603, __pyx_L5_except_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_GOTREF(__pyx_t_7);
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":604
-- * return self.get_property_async(prop, data=data)
-- * except MPVError:
-- * return default # <<<<<<<<<<<<<<
-- *
-- * def try_get_property(self, prop, default=None):
-+ /* "vidcutter/libs/pympv/mpv.pyx":662
-+ * userdatas.add()
-+ * with nogil:
-+ * err = mpv_set_property_async( # <<<<<<<<<<<<<<
-+ * self._ctx,
-+ * data_id,
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_default);
-- __pyx_r = __pyx_v_default;
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- goto __pyx_L6_except_return;
-+ __pyx_v_err = mpv_set_property_async(__pyx_v_self->_ctx, __pyx_v_data_id, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":661
-+ * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-+ * userdatas.add()
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_set_property_async(
-+ * self._ctx,
-+ */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L13;
-+ }
-+ __pyx_L13:;
-+ }
- }
-- goto __pyx_L5_except_error;
-- __pyx_L5_except_error:;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":601
-+ /* "vidcutter/libs/pympv/mpv.pyx":670
-+ * )
-+ * finally:
-+ * self._free_native_value(v) # <<<<<<<<<<<<<<
-+ * return err
- *
-- * def try_get_property_async(self, prop, data=None, default=None):
-- * try: # <<<<<<<<<<<<<<
-- * return self.get_property_async(prop, data=data)
-- * except MPVError:
- */
-- __Pyx_XGIVEREF(__pyx_t_1);
-- __Pyx_XGIVEREF(__pyx_t_2);
-- __Pyx_XGIVEREF(__pyx_t_3);
-- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-- goto __pyx_L1_error;
-- __pyx_L7_try_return:;
-- __Pyx_XGIVEREF(__pyx_t_1);
-- __Pyx_XGIVEREF(__pyx_t_2);
-- __Pyx_XGIVEREF(__pyx_t_3);
-- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-- goto __pyx_L0;
-- __pyx_L6_except_return:;
-- __Pyx_XGIVEREF(__pyx_t_1);
-- __Pyx_XGIVEREF(__pyx_t_2);
-- __Pyx_XGIVEREF(__pyx_t_3);
-- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-- goto __pyx_L0;
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ goto __pyx_L5;
-+ }
-+ __pyx_L4_error:;
-+ /*exception exit:*/{
-+ __Pyx_PyThreadState_declare
-+ __Pyx_PyThreadState_assign
-+ __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-+ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
-+ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
-+ __Pyx_XGOTREF(__pyx_t_14);
-+ __Pyx_XGOTREF(__pyx_t_15);
-+ __Pyx_XGOTREF(__pyx_t_16);
-+ __Pyx_XGOTREF(__pyx_t_17);
-+ __Pyx_XGOTREF(__pyx_t_18);
-+ __Pyx_XGOTREF(__pyx_t_19);
-+ __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
-+ {
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L15_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ }
-+ if (PY_MAJOR_VERSION >= 3) {
-+ __Pyx_XGIVEREF(__pyx_t_17);
-+ __Pyx_XGIVEREF(__pyx_t_18);
-+ __Pyx_XGIVEREF(__pyx_t_19);
-+ __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
-+ }
-+ __Pyx_XGIVEREF(__pyx_t_14);
-+ __Pyx_XGIVEREF(__pyx_t_15);
-+ __Pyx_XGIVEREF(__pyx_t_16);
-+ __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
-+ __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
-+ __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
-+ goto __pyx_L1_error;
-+ __pyx_L15_error:;
-+ if (PY_MAJOR_VERSION >= 3) {
-+ __Pyx_XGIVEREF(__pyx_t_17);
-+ __Pyx_XGIVEREF(__pyx_t_18);
-+ __Pyx_XGIVEREF(__pyx_t_19);
-+ __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
-+ }
-+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
-+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
-+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-+ __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
-+ goto __pyx_L1_error;
-+ }
-+ __pyx_L3_return: {
-+ __pyx_t_19 = __pyx_r;
-+ __pyx_r = 0;
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_r = __pyx_t_19;
-+ __pyx_t_19 = 0;
-+ goto __pyx_L0;
-+ }
-+ __pyx_L5:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":600
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":671
-+ * finally:
-+ * self._free_native_value(v)
-+ * return err # <<<<<<<<<<<<<<
- *
-- * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
-- * try:
-- * return self.get_property_async(prop, data=data)
-+ * @_errors
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":636
-+ *
-+ * @_errors
-+ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_set_property and mpv_set_property_async"""
-+ * assert self._ctx
- */
-
- /* function exit code */
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_9);
-+ __Pyx_XDECREF(__pyx_t_11);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_XDECREF(__pyx_v_userdatas);
-+ __Pyx_XDECREF(__pyx_v_prop);
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":606
-- * return default
-+/* "vidcutter/libs/pympv/mpv.pyx":674
- *
-- * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
-- * try:
-- * return self.get_property(prop)
-+ * @_errors
-+ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_set_option"""
-+ * assert self._ctx
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_20set_option[] = "Wraps: mpv_set_option";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- PyObject *__pyx_v_prop = 0;
-- PyObject *__pyx_v_default = 0;
-+ PyObject *__pyx_v_value = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("try_get_property (wrapper)", 0);
-+ __Pyx_RefNannySetupContext("set_option (wrapper)", 0);
- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_default,0};
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,0};
- PyObject* values[2] = {0,0};
-- values[1] = ((PyObject *)Py_None);
-+ values[1] = ((PyObject *)Py_True);
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-@@ -12505,12 +12874,12 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyOb
- CYTHON_FALLTHROUGH;
- case 1:
- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default);
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
- if (value) { values[1] = value; kw_args--; }
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 606, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 674, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -12522,258 +12891,74 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property(PyOb
- }
- }
- __pyx_v_prop = values[0];
-- __pyx_v_default = values[1];
-+ __pyx_v_value = values[1];
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 674, __pyx_L3_error)
- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_18try_get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_default);
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18try_get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_default) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-- int __pyx_t_8;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("try_get_property", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":607
-- *
-- * def try_get_property(self, prop, default=None):
-- * try: # <<<<<<<<<<<<<<
-- * return self.get_property(prop)
-- * except MPVError:
-- */
-- {
-- __Pyx_PyThreadState_declare
-- __Pyx_PyThreadState_assign
-- __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
-- __Pyx_XGOTREF(__pyx_t_1);
-- __Pyx_XGOTREF(__pyx_t_2);
-- __Pyx_XGOTREF(__pyx_t_3);
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":608
-- * def try_get_property(self, prop, default=None):
-- * try:
-- * return self.get_property(prop) # <<<<<<<<<<<<<<
-- * except MPVError:
-- * return default
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L3_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __pyx_t_6 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
-- if (likely(__pyx_t_6)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-- __Pyx_INCREF(__pyx_t_6);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_5, function);
-- }
-- }
-- __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_prop);
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L3_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __pyx_r = __pyx_t_4;
-- __pyx_t_4 = 0;
-- goto __pyx_L7_try_return;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":607
-- *
-- * def try_get_property(self, prop, default=None):
-- * try: # <<<<<<<<<<<<<<
-- * return self.get_property(prop)
-- * except MPVError:
-- */
-- }
-- __pyx_L3_error:;
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":609
-- * try:
-- * return self.get_property(prop)
-- * except MPVError: # <<<<<<<<<<<<<<
-- * return default
-- *
-- */
-- __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
-- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L5_except_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __Pyx_ErrRestore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
-- __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
-- if (__pyx_t_8) {
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 609, __pyx_L5_except_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_GOTREF(__pyx_t_4);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":610
-- * return self.get_property(prop)
-- * except MPVError:
-- * return default # <<<<<<<<<<<<<<
-- *
-- * def get_property(self, prop):
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_default);
-- __pyx_r = __pyx_v_default;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- goto __pyx_L6_except_return;
-- }
-- goto __pyx_L5_except_error;
-- __pyx_L5_except_error:;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":607
-- *
-- * def try_get_property(self, prop, default=None):
-- * try: # <<<<<<<<<<<<<<
-- * return self.get_property(prop)
-- * except MPVError:
-- */
-- __Pyx_XGIVEREF(__pyx_t_1);
-- __Pyx_XGIVEREF(__pyx_t_2);
-- __Pyx_XGIVEREF(__pyx_t_3);
-- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-- goto __pyx_L1_error;
-- __pyx_L7_try_return:;
-- __Pyx_XGIVEREF(__pyx_t_1);
-- __Pyx_XGIVEREF(__pyx_t_2);
-- __Pyx_XGIVEREF(__pyx_t_3);
-- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-- goto __pyx_L0;
-- __pyx_L6_except_return:;
-- __Pyx_XGIVEREF(__pyx_t_1);
-- __Pyx_XGIVEREF(__pyx_t_2);
-- __Pyx_XGIVEREF(__pyx_t_3);
-- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-- goto __pyx_L0;
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":606
-- * return default
-- *
-- * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
-- * try:
-- * return self.get_property(prop)
-- */
--
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":612
-- * return default
-- *
-- * def get_property(self, prop): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_get_property"""
-- * assert self._ctx
-- */
--
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_20get_property[] = "Wraps: mpv_get_property";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21get_property(PyObject *__pyx_v_self, PyObject *__pyx_v_prop) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("get_property (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_prop));
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop) {
-- struct mpv_node __pyx_v_result;
-- char const *__pyx_v_prop_c;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value) {
-+ enum mpv_format __pyx_v_format;
-+ struct mpv_node __pyx_v_v;
- int __pyx_v_err;
-- PyObject *__pyx_v_v = NULL;
-+ char const *__pyx_v_prop_c;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
-- char const *__pyx_t_4;
-- int __pyx_t_5;
-- PyObject *__pyx_t_6 = NULL;
-+ enum mpv_format __pyx_t_4;
-+ char const *__pyx_t_5;
-+ int __pyx_t_6;
- int __pyx_t_7;
-- int __pyx_t_8;
-- char const *__pyx_t_9;
-+ char const *__pyx_t_8;
-+ PyObject *__pyx_t_9 = NULL;
- PyObject *__pyx_t_10 = NULL;
- PyObject *__pyx_t_11 = NULL;
- PyObject *__pyx_t_12 = NULL;
- PyObject *__pyx_t_13 = NULL;
- PyObject *__pyx_t_14 = NULL;
-- PyObject *__pyx_t_15 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("get_property", 0);
-+ __Pyx_RefNannySetupContext("set_option", 0);
- __Pyx_INCREF(__pyx_v_prop);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":614
-- * def get_property(self, prop):
-- * """Wraps: mpv_get_property"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":676
-+ * def set_option(self, prop, value=True):
-+ * """Wraps: mpv_set_option"""
- * assert self._ctx # <<<<<<<<<<<<<<
-- * cdef mpv_node result
- * prop = _strenc(prop)
-+ * cdef mpv_format format = self._format_for(value)
- */
- #ifndef CYTHON_WITHOUT_ASSERTIONS
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 614, __pyx_L1_error)
-+ __PYX_ERR(0, 676, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":616
-+ /* "vidcutter/libs/pympv/mpv.pyx":677
-+ * """Wraps: mpv_set_option"""
- * assert self._ctx
-- * cdef mpv_node result
- * prop = _strenc(prop) # <<<<<<<<<<<<<<
-- * cdef const char* prop_c = prop
-- * cdef int err
-+ * cdef mpv_format format = self._format_for(value)
-+ * cdef mpv_node v = self._prep_native_value(value, format)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -12787,275 +12972,200 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct _
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":617
-- * cdef mpv_node result
-+ /* "vidcutter/libs/pympv/mpv.pyx":678
-+ * assert self._ctx
- * prop = _strenc(prop)
-- * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
-- * cdef int err
-- * with nogil:
-- */
-- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error)
-- __pyx_v_prop_c = __pyx_t_4;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":619
-- * cdef const char* prop_c = prop
-+ * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
-+ * cdef mpv_node v = self._prep_native_value(value, format)
- * cdef int err
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_get_property(
-- * self._ctx,
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v_format = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":620
-+ /* "vidcutter/libs/pympv/mpv.pyx":679
-+ * prop = _strenc(prop)
-+ * cdef mpv_format format = self._format_for(value)
-+ * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
- * cdef int err
-- * with nogil:
-- * err = mpv_get_property( # <<<<<<<<<<<<<<
-- * self._ctx,
-- * prop_c,
-+ * cdef const char* prop_c
- */
-- __pyx_v_err = mpv_get_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_result));
-- }
-+ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":619
-- * cdef const char* prop_c = prop
-+ /* "vidcutter/libs/pympv/mpv.pyx":682
- * cdef int err
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_get_property(
-- * self._ctx,
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":626
-- * &result,
-- * )
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-- * try:
-+ * cdef const char* prop_c
-+ * try: # <<<<<<<<<<<<<<
-+ * prop_c = prop
-+ * with nogil:
- */
-- __pyx_t_5 = ((__pyx_v_err < 0) != 0);
-- if (unlikely(__pyx_t_5)) {
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":627
-- * )
-- * if err < 0:
-- * raise MPVError(err) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":683
-+ * cdef const char* prop_c
- * try:
-- * v = _convert_node_value(result)
-+ * prop_c = prop # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * err = mpv_set_option(
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_6 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_6)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_6);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(0, 627, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L4_error)
-+ __pyx_v_prop_c = __pyx_t_5;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":626
-- * &result,
-- * )
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-+ /* "vidcutter/libs/pympv/mpv.pyx":684
- * try:
-+ * prop_c = prop
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_set_option(
-+ * self._ctx,
- */
-- }
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":628
-- * if err < 0:
-- * raise MPVError(err)
-- * try: # <<<<<<<<<<<<<<
-- * v = _convert_node_value(result)
-- * finally:
-+ /* "vidcutter/libs/pympv/mpv.pyx":685
-+ * prop_c = prop
-+ * with nogil:
-+ * err = mpv_set_option( # <<<<<<<<<<<<<<
-+ * self._ctx,
-+ * prop_c,
- */
-- /*try:*/ {
-+ __pyx_v_err = mpv_set_option(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":629
-- * raise MPVError(err)
-+ /* "vidcutter/libs/pympv/mpv.pyx":684
- * try:
-- * v = _convert_node_value(result) # <<<<<<<<<<<<<<
-- * finally:
-- * with nogil:
-+ * prop_c = prop
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_set_option(
-+ * self._ctx,
- */
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L8_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v_v = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L8;
-+ }
-+ __pyx_L8:;
-+ }
-+ }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":631
-- * v = _convert_node_value(result)
-+ /* "vidcutter/libs/pympv/mpv.pyx":692
-+ * )
- * finally:
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_free_node_contents(&result)
-- * return v
-+ * self._free_native_value(v) # <<<<<<<<<<<<<<
-+ * return err
-+ *
- */
- /*finally:*/ {
- /*normal exit:*/{
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":632
-- * finally:
-- * with nogil:
-- * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
-- * return v
-- *
-- */
-- mpv_free_node_contents((&__pyx_v_result));
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":631
-- * v = _convert_node_value(result)
-- * finally:
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_free_node_contents(&result)
-- * return v
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L12;
-- }
-- __pyx_L12:;
-- }
-- }
-- goto __pyx_L9;
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ goto __pyx_L5;
- }
-- __pyx_L8_error:;
-+ __pyx_L4_error:;
- /*exception exit:*/{
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
-- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
-+ __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
-- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
-+ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
-+ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
-+ __Pyx_XGOTREF(__pyx_t_9);
- __Pyx_XGOTREF(__pyx_t_10);
- __Pyx_XGOTREF(__pyx_t_11);
- __Pyx_XGOTREF(__pyx_t_12);
- __Pyx_XGOTREF(__pyx_t_13);
- __Pyx_XGOTREF(__pyx_t_14);
-- __Pyx_XGOTREF(__pyx_t_15);
-- __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
-+ __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
- {
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":632
-- * finally:
-- * with nogil:
-- * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
-- * return v
-- *
-- */
-- mpv_free_node_contents((&__pyx_v_result));
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":631
-- * v = _convert_node_value(result)
-- * finally:
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_free_node_contents(&result)
-- * return v
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L17;
-- }
-- __pyx_L17:;
-- }
-- }
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L10_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- }
- if (PY_MAJOR_VERSION >= 3) {
-+ __Pyx_XGIVEREF(__pyx_t_12);
- __Pyx_XGIVEREF(__pyx_t_13);
- __Pyx_XGIVEREF(__pyx_t_14);
-- __Pyx_XGIVEREF(__pyx_t_15);
-- __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
-+ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
- }
-+ __Pyx_XGIVEREF(__pyx_t_9);
- __Pyx_XGIVEREF(__pyx_t_10);
- __Pyx_XGIVEREF(__pyx_t_11);
-- __Pyx_XGIVEREF(__pyx_t_12);
-- __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
-- __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
-- __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
-+ __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
-+ __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
-+ __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
-+ goto __pyx_L1_error;
-+ __pyx_L10_error:;
-+ if (PY_MAJOR_VERSION >= 3) {
-+ __Pyx_XGIVEREF(__pyx_t_12);
-+ __Pyx_XGIVEREF(__pyx_t_13);
-+ __Pyx_XGIVEREF(__pyx_t_14);
-+ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
-+ }
-+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-+ __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
- goto __pyx_L1_error;
- }
-- __pyx_L9:;
-+ __pyx_L5:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":633
-- * with nogil:
-- * mpv_free_node_contents(&result)
-- * return v # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":693
-+ * finally:
-+ * self._free_native_value(v)
-+ * return err # <<<<<<<<<<<<<<
- *
- * @_errors
- */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v_v);
-- __pyx_r = __pyx_v_v;
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":612
-- * return default
-+ /* "vidcutter/libs/pympv/mpv.pyx":674
- *
-- * def get_property(self, prop): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_get_property"""
-+ * @_errors
-+ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_set_option"""
- * assert self._ctx
- */
-
-@@ -13064,1047 +13174,798 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20get_property(struct _
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_v);
- __Pyx_XDECREF(__pyx_v_prop);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":636
-+/* "vidcutter/libs/pympv/mpv.pyx":696
- *
- * @_errors
-- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_set_property and mpv_set_property_async"""
-+ * def initialize(self): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_initialize"""
- * assert self._ctx
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_22set_property[] = "Wraps: mpv_set_property and mpv_set_property_async";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23set_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_prop = 0;
-- PyObject *__pyx_v_value = 0;
-- PyObject *__pyx_v_asynchronous = 0;
-- PyObject *__pyx_v_data = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_22initialize[] = "Wraps: mpv_initialize";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_23initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("set_property (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,&__pyx_n_s_asynchronous,&__pyx_n_s_data,0};
-- PyObject* values[4] = {0,0,0,0};
-- values[1] = ((PyObject *)Py_True);
-- values[2] = ((PyObject *)Py_False);
-- values[3] = ((PyObject *)Py_None);
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-- CYTHON_FALLTHROUGH;
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
-- if (value) { values[1] = value; kw_args--; }
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_asynchronous);
-- if (value) { values[2] = value; kw_args--; }
-- }
-- CYTHON_FALLTHROUGH;
-- case 3:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
-- if (value) { values[3] = value; kw_args--; }
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 636, __pyx_L3_error)
-- }
-- } else {
-- switch (PyTuple_GET_SIZE(__pyx_args)) {
-- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-- CYTHON_FALLTHROUGH;
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- }
-- __pyx_v_prop = values[0];
-- __pyx_v_value = values[1];
-- __pyx_v_asynchronous = values[2];
-- __pyx_v_data = values[3];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_22set_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value, __pyx_v_asynchronous, __pyx_v_data);
-+ __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22set_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value, PyObject *__pyx_v_asynchronous, PyObject *__pyx_v_data) {
-- enum mpv_format __pyx_v_format;
-- struct mpv_node __pyx_v_v;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
- int __pyx_v_err;
-- uint64_t __pyx_v_data_id;
-- char const *__pyx_v_prop_c;
-- PyObject *__pyx_v_userdatas = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- enum mpv_format __pyx_t_4;
-- char const *__pyx_t_5;
-- int __pyx_t_6;
-- int __pyx_t_7;
-- Py_hash_t __pyx_t_8;
-- PyObject *__pyx_t_9 = NULL;
-- int __pyx_t_10;
-- PyObject *__pyx_t_11 = NULL;
-- int __pyx_t_12;
-- char const *__pyx_t_13;
-- PyObject *__pyx_t_14 = NULL;
-- PyObject *__pyx_t_15 = NULL;
-- PyObject *__pyx_t_16 = NULL;
-- PyObject *__pyx_t_17 = NULL;
-- PyObject *__pyx_t_18 = NULL;
-- PyObject *__pyx_t_19 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("set_property", 0);
-- __Pyx_INCREF(__pyx_v_prop);
-+ __Pyx_RefNannySetupContext("initialize", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":638
-- * def set_property(self, prop, value=True, asynchronous=False, data=None):
-- * """Wraps: mpv_set_property and mpv_set_property_async"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":698
-+ * def initialize(self):
-+ * """Wraps: mpv_initialize"""
- * assert self._ctx # <<<<<<<<<<<<<<
-- * prop = _strenc(prop)
-- * cdef mpv_format format = self._format_for(value)
-+ * cdef int err
-+ * with nogil:
- */
- #ifndef CYTHON_WITHOUT_ASSERTIONS
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 638, __pyx_L1_error)
-+ __PYX_ERR(0, 698, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":639
-- * """Wraps: mpv_set_property and mpv_set_property_async"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":700
- * assert self._ctx
-- * prop = _strenc(prop) # <<<<<<<<<<<<<<
-- * cdef mpv_format format = self._format_for(value)
-- * cdef mpv_node v = self._prep_native_value(value, format)
-+ * cdef int err
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_initialize(self._ctx)
-+ * return err
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
-- __pyx_t_1 = 0;
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":640
-- * assert self._ctx
-- * prop = _strenc(prop)
-- * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
-- * cdef mpv_node v = self._prep_native_value(value, format)
-+ /* "vidcutter/libs/pympv/mpv.pyx":701
- * cdef int err
-+ * with nogil:
-+ * err = mpv_initialize(self._ctx) # <<<<<<<<<<<<<<
-+ * return err
-+ *
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v_format = __pyx_t_4;
-+ __pyx_v_err = mpv_initialize(__pyx_v_self->_ctx);
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":641
-- * prop = _strenc(prop)
-- * cdef mpv_format format = self._format_for(value)
-- * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":700
-+ * assert self._ctx
- * cdef int err
-- * cdef uint64_t data_id
-- */
-- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":645
-- * cdef uint64_t data_id
-- * cdef const char* prop_c
-- * try: # <<<<<<<<<<<<<<
-- * prop_c = prop
-- * if not asynchronous:
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_initialize(self._ctx)
-+ * return err
- */
-- /*try:*/ {
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":646
-- * cdef const char* prop_c
-- * try:
-- * prop_c = prop # <<<<<<<<<<<<<<
-- * if not asynchronous:
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":702
-+ * with nogil:
-+ * err = mpv_initialize(self._ctx)
-+ * return err # <<<<<<<<<<<<<<
-+ *
-+ * def wait_event(self, timeout=None):
- */
-- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 646, __pyx_L4_error)
-- __pyx_v_prop_c = __pyx_t_5;
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":647
-- * try:
-- * prop_c = prop
-- * if not asynchronous: # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_set_property(
-+ /* "vidcutter/libs/pympv/mpv.pyx":696
-+ *
-+ * @_errors
-+ * def initialize(self): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_initialize"""
-+ * assert self._ctx
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 647, __pyx_L4_error)
-- __pyx_t_7 = ((!__pyx_t_6) != 0);
-- if (__pyx_t_7) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":648
-- * prop_c = prop
-- * if not asynchronous:
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_set_property(
-- * self._ctx,
-- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":649
-- * if not asynchronous:
-- * with nogil:
-- * err = mpv_set_property( # <<<<<<<<<<<<<<
-- * self._ctx,
-- * prop_c,
-+/* "vidcutter/libs/pympv/mpv.pyx":704
-+ * return err
-+ *
-+ * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_wait_event"""
-+ * assert self._ctx
- */
-- __pyx_v_err = mpv_set_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":648
-- * prop_c = prop
-- * if not asynchronous:
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_set_property(
-- * self._ctx,
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L9;
-- }
-- __pyx_L9:;
-- }
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_24wait_event[] = "Wraps: mpv_wait_event";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_timeout = 0;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("wait_event (wrapper)", 0);
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};
-+ PyObject* values[1] = {0};
-+ values[0] = ((PyObject *)Py_None);
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout);
-+ if (value) { values[0] = value; kw_args--; }
-+ }
-+ }
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 704, __pyx_L3_error)
-+ }
-+ } else {
-+ switch (PyTuple_GET_SIZE(__pyx_args)) {
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
- }
-+ }
-+ __pyx_v_timeout = values[0];
-+ }
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 704, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_timeout);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":655
-- * &v
-- * )
-- * return err # <<<<<<<<<<<<<<
-- * data_id = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(data_id, None)
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L3_return;
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":647
-- * try:
-- * prop_c = prop
-- * if not asynchronous: # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_set_property(
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout) {
-+ double __pyx_v_timeout_d;
-+ struct mpv_event *__pyx_v_event;
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ double __pyx_t_1;
-+ int __pyx_t_2;
-+ double __pyx_t_3;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("wait_event", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":706
-+ * def wait_event(self, timeout=None):
-+ * """Wraps: mpv_wait_event"""
-+ * assert self._ctx # <<<<<<<<<<<<<<
-+ * cdef double timeout_d = timeout if timeout is not None else -1
-+ * cdef mpv_event* event
- */
-+ #ifndef CYTHON_WITHOUT_ASSERTIONS
-+ if (unlikely(!Py_OptimizeFlag)) {
-+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-+ PyErr_SetNone(PyExc_AssertionError);
-+ __PYX_ERR(0, 706, __pyx_L1_error)
- }
-+ }
-+ #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":656
-- * )
-- * return err
-- * data_id = <uint64_t>hash(data) # <<<<<<<<<<<<<<
-- * userdatas = self.reply_userdata.get(data_id, None)
-- * if userdatas is None:
-+ /* "vidcutter/libs/pympv/mpv.pyx":707
-+ * """Wraps: mpv_wait_event"""
-+ * assert self._ctx
-+ * cdef double timeout_d = timeout if timeout is not None else -1 # <<<<<<<<<<<<<<
-+ * cdef mpv_event* event
-+ * with nogil:
- */
-- __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 656, __pyx_L4_error)
-- __pyx_v_data_id = ((uint64_t)__pyx_t_8);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":657
-- * return err
-- * data_id = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
-- * if userdatas is None:
-- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_9 = NULL;
-- __pyx_t_10 = 0;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_9)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_9);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- __pyx_t_10 = 1;
-- }
-- }
-- #if CYTHON_FAST_PYCALL
-- if (PyFunction_Check(__pyx_t_2)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
-- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- } else
-- #endif
-- #if CYTHON_FAST_PYCCALL
-- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
-- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- } else
-- #endif
-- {
-- __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 657, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_11);
-- if (__pyx_t_9) {
-- __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
-- }
-- __Pyx_GIVEREF(__pyx_t_3);
-- PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, Py_None);
-- __pyx_t_3 = 0;
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
-- }
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v_userdatas = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ __pyx_t_2 = (__pyx_v_timeout != Py_None);
-+ if ((__pyx_t_2 != 0)) {
-+ __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_t_3;
-+ } else {
-+ __pyx_t_1 = -1.0;
-+ }
-+ __pyx_v_timeout_d = __pyx_t_1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":658
-- * data_id = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(data_id, None)
-- * if userdatas is None: # <<<<<<<<<<<<<<
-- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-- * userdatas.add()
-+ /* "vidcutter/libs/pympv/mpv.pyx":709
-+ * cdef double timeout_d = timeout if timeout is not None else -1
-+ * cdef mpv_event* event
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * event = mpv_wait_event(self._ctx, timeout_d)
-+ * return Event()._init(event, self)
- */
-- __pyx_t_7 = (__pyx_v_userdatas == Py_None);
-- __pyx_t_6 = (__pyx_t_7 != 0);
-- if (__pyx_t_6) {
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":659
-- * userdatas = self.reply_userdata.get(data_id, None)
-- * if userdatas is None:
-- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
-- * userdatas.add()
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":710
-+ * cdef mpv_event* event
-+ * with nogil:
-+ * event = mpv_wait_event(self._ctx, timeout_d) # <<<<<<<<<<<<<<
-+ * return Event()._init(event, self)
-+ *
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_11 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_11)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_11);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-+ __pyx_v_event = mpv_wait_event(__pyx_v_self->_ctx, __pyx_v_timeout_d);
- }
-- __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
-- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 659, __pyx_L4_error)
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":658
-- * data_id = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(data_id, None)
-- * if userdatas is None: # <<<<<<<<<<<<<<
-- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-- * userdatas.add()
-- */
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":660
-- * if userdatas is None:
-- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-- * userdatas.add() # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_set_property_async(
-+ /* "vidcutter/libs/pympv/mpv.pyx":709
-+ * cdef double timeout_d = timeout if timeout is not None else -1
-+ * cdef mpv_event* event
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * event = mpv_wait_event(self._ctx, timeout_d)
-+ * return Event()._init(event, self)
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_11 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_11)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_11);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
- }
-- }
-- __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L4_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":661
-- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-- * userdatas.add()
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_set_property_async(
-- * self._ctx,
-+ /* "vidcutter/libs/pympv/mpv.pyx":711
-+ * with nogil:
-+ * event = mpv_wait_event(self._ctx, timeout_d)
-+ * return Event()._init(event, self) # <<<<<<<<<<<<<<
-+ *
-+ * def wakeup(self):
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_r = __pyx_t_5;
-+ __pyx_t_5 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":662
-- * userdatas.add()
-- * with nogil:
-- * err = mpv_set_property_async( # <<<<<<<<<<<<<<
-- * self._ctx,
-- * data_id,
-+ /* "vidcutter/libs/pympv/mpv.pyx":704
-+ * return err
-+ *
-+ * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_wait_event"""
-+ * assert self._ctx
- */
-- __pyx_v_err = mpv_set_property_async(__pyx_v_self->_ctx, __pyx_v_data_id, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":661
-- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
-- * userdatas.add()
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_set_property_async(
-- * self._ctx,
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L13;
-- }
-- __pyx_L13:;
-- }
-- }
-- }
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":670
-- * )
-- * finally:
-- * self._free_native_value(v) # <<<<<<<<<<<<<<
-- * return err
-+/* "vidcutter/libs/pympv/mpv.pyx":713
-+ * return Event()._init(event, self)
- *
-+ * def wakeup(self): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_wakeup"""
-+ * assert self._ctx
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- goto __pyx_L5;
-- }
-- __pyx_L4_error:;
-- /*exception exit:*/{
-- __Pyx_PyThreadState_declare
-- __Pyx_PyThreadState_assign
-- __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
-- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
-- __Pyx_XGOTREF(__pyx_t_14);
-- __Pyx_XGOTREF(__pyx_t_15);
-- __Pyx_XGOTREF(__pyx_t_16);
-- __Pyx_XGOTREF(__pyx_t_17);
-- __Pyx_XGOTREF(__pyx_t_18);
-- __Pyx_XGOTREF(__pyx_t_19);
-- __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
-- {
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L15_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- }
-- if (PY_MAJOR_VERSION >= 3) {
-- __Pyx_XGIVEREF(__pyx_t_17);
-- __Pyx_XGIVEREF(__pyx_t_18);
-- __Pyx_XGIVEREF(__pyx_t_19);
-- __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
-- }
-- __Pyx_XGIVEREF(__pyx_t_14);
-- __Pyx_XGIVEREF(__pyx_t_15);
-- __Pyx_XGIVEREF(__pyx_t_16);
-- __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
-- __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
-- __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
-- goto __pyx_L1_error;
-- __pyx_L15_error:;
-- if (PY_MAJOR_VERSION >= 3) {
-- __Pyx_XGIVEREF(__pyx_t_17);
-- __Pyx_XGIVEREF(__pyx_t_18);
-- __Pyx_XGIVEREF(__pyx_t_19);
-- __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
-- }
-- __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
-- __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
-- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
-- __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
-- goto __pyx_L1_error;
-- }
-- __pyx_L3_return: {
-- __pyx_t_19 = __pyx_r;
-- __pyx_r = 0;
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_r = __pyx_t_19;
-- __pyx_t_19 = 0;
-- goto __pyx_L0;
-+
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_26wakeup[] = "Wraps: mpv_wakeup";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("wakeup (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("wakeup", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":715
-+ * def wakeup(self):
-+ * """Wraps: mpv_wakeup"""
-+ * assert self._ctx # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * mpv_wakeup(self._ctx)
-+ */
-+ #ifndef CYTHON_WITHOUT_ASSERTIONS
-+ if (unlikely(!Py_OptimizeFlag)) {
-+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-+ PyErr_SetNone(PyExc_AssertionError);
-+ __PYX_ERR(0, 715, __pyx_L1_error)
- }
-- __pyx_L5:;
- }
-+ #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":671
-- * finally:
-- * self._free_native_value(v)
-- * return err # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":716
-+ * """Wraps: mpv_wakeup"""
-+ * assert self._ctx
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_wakeup(self._ctx)
- *
-- * @_errors
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":636
-+ /* "vidcutter/libs/pympv/mpv.pyx":717
-+ * assert self._ctx
-+ * with nogil:
-+ * mpv_wakeup(self._ctx) # <<<<<<<<<<<<<<
- *
-- * @_errors
-- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_set_property and mpv_set_property_async"""
-+ * def set_wakeup_callback(self, callback):
-+ */
-+ mpv_wakeup(__pyx_v_self->_ctx);
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":716
-+ * """Wraps: mpv_wakeup"""
-+ * assert self._ctx
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_wakeup(self._ctx)
-+ *
-+ */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":713
-+ * return Event()._init(event, self)
-+ *
-+ * def wakeup(self): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_wakeup"""
- * assert self._ctx
- */
-
- /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_9);
-- __Pyx_XDECREF(__pyx_t_11);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wakeup", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_userdatas);
-- __Pyx_XDECREF(__pyx_v_prop);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":674
-+/* "vidcutter/libs/pympv/mpv.pyx":719
-+ * mpv_wakeup(self._ctx)
- *
-- * @_errors
-- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_set_option"""
-+ * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_set_wakeup_callback"""
- * assert self._ctx
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_24set_option[] = "Wraps: mpv_set_option";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25set_option(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_prop = 0;
-- PyObject *__pyx_v_value = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback[] = "Wraps: mpv_set_wakeup_callback";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("set_option (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_value,0};
-- PyObject* values[2] = {0,0};
-- values[1] = ((PyObject *)Py_True);
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value);
-- if (value) { values[1] = value; kw_args--; }
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 674, __pyx_L3_error)
-- }
-- } else {
-- switch (PyTuple_GET_SIZE(__pyx_args)) {
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- }
-- __pyx_v_prop = values[0];
-- __pyx_v_value = values[1];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 674, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_24set_option(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_value);
-+ __Pyx_RefNannySetupContext("set_wakeup_callback (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24set_option(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_value) {
-- enum mpv_format __pyx_v_format;
-- struct mpv_node __pyx_v_v;
-- int __pyx_v_err;
-- char const *__pyx_v_prop_c;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback) {
-+ uint64_t __pyx_v_name;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-+ uint64_t __pyx_t_2;
- PyObject *__pyx_t_3 = NULL;
-- enum mpv_format __pyx_t_4;
-- char const *__pyx_t_5;
-- int __pyx_t_6;
-- int __pyx_t_7;
-- char const *__pyx_t_8;
-- PyObject *__pyx_t_9 = NULL;
-- PyObject *__pyx_t_10 = NULL;
-- PyObject *__pyx_t_11 = NULL;
-- PyObject *__pyx_t_12 = NULL;
-- PyObject *__pyx_t_13 = NULL;
-- PyObject *__pyx_t_14 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("set_option", 0);
-- __Pyx_INCREF(__pyx_v_prop);
-+ __Pyx_RefNannySetupContext("set_wakeup_callback", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":676
-- * def set_option(self, prop, value=True):
-- * """Wraps: mpv_set_option"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":721
-+ * def set_wakeup_callback(self, callback):
-+ * """Wraps: mpv_set_wakeup_callback"""
- * assert self._ctx # <<<<<<<<<<<<<<
-- * prop = _strenc(prop)
-- * cdef mpv_format format = self._format_for(value)
-+ * cdef uint64_t name = <uint64_t>id(self)
-+ * self.callback = callback
- */
- #ifndef CYTHON_WITHOUT_ASSERTIONS
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 676, __pyx_L1_error)
-+ __PYX_ERR(0, 721, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":677
-- * """Wraps: mpv_set_option"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":722
-+ * """Wraps: mpv_set_wakeup_callback"""
- * assert self._ctx
-- * prop = _strenc(prop) # <<<<<<<<<<<<<<
-- * cdef mpv_format format = self._format_for(value)
-- * cdef mpv_node v = self._prep_native_value(value, format)
-+ * cdef uint64_t name = <uint64_t>id(self) # <<<<<<<<<<<<<<
-+ * self.callback = callback
-+ * self.callbackthread.set(callback)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
-- __pyx_t_1 = 0;
-+ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v_name = ((uint64_t)__pyx_t_2);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":678
-+ /* "vidcutter/libs/pympv/mpv.pyx":723
- * assert self._ctx
-- * prop = _strenc(prop)
-- * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
-- * cdef mpv_node v = self._prep_native_value(value, format)
-- * cdef int err
-+ * cdef uint64_t name = <uint64_t>id(self)
-+ * self.callback = callback # <<<<<<<<<<<<<<
-+ * self.callbackthread.set(callback)
-+ * with nogil:
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_v_callback);
-+ __Pyx_GIVEREF(__pyx_v_callback);
-+ __Pyx_GOTREF(__pyx_v_self->callback);
-+ __Pyx_DECREF(__pyx_v_self->callback);
-+ __pyx_v_self->callback = __pyx_v_callback;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":724
-+ * cdef uint64_t name = <uint64_t>id(self)
-+ * self.callback = callback
-+ * self.callbackthread.set(callback) # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
-+ */
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_4);
- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-+ __Pyx_DECREF_SET(__pyx_t_3, function);
- }
- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
-+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callback);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v_format = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":679
-- * prop = _strenc(prop)
-- * cdef mpv_format format = self._format_for(value)
-- * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
-- * cdef int err
-- * cdef const char* prop_c
-+ /* "vidcutter/libs/pympv/mpv.pyx":725
-+ * self.callback = callback
-+ * self.callbackthread.set(callback)
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
-+ *
- */
-- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":682
-- * cdef int err
-- * cdef const char* prop_c
-- * try: # <<<<<<<<<<<<<<
-- * prop_c = prop
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":726
-+ * self.callbackthread.set(callback)
-+ * with nogil:
-+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name) # <<<<<<<<<<<<<<
-+ *
-+ * def get_wakeup_pipe(self):
- */
-- /*try:*/ {
-+ mpv_set_wakeup_callback(__pyx_v_self->_ctx, __pyx_f_9vidcutter_4libs_3mpv__c_callback, ((void *)__pyx_v_name));
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":683
-- * cdef const char* prop_c
-- * try:
-- * prop_c = prop # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_set_option(
-+ /* "vidcutter/libs/pympv/mpv.pyx":725
-+ * self.callback = callback
-+ * self.callbackthread.set(callback)
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
-+ *
- */
-- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L4_error)
-- __pyx_v_prop_c = __pyx_t_5;
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":684
-- * try:
-- * prop_c = prop
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_set_option(
-- * self._ctx,
-+ /* "vidcutter/libs/pympv/mpv.pyx":719
-+ * mpv_wakeup(self._ctx)
-+ *
-+ * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_set_wakeup_callback"""
-+ * assert self._ctx
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":685
-- * prop_c = prop
-- * with nogil:
-- * err = mpv_set_option( # <<<<<<<<<<<<<<
-- * self._ctx,
-- * prop_c,
-+ /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_wakeup_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* "vidcutter/libs/pympv/mpv.pyx":728
-+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
-+ *
-+ * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_get_wakeup_pipe"""
-+ * assert self._ctx
- */
-- __pyx_v_err = mpv_set_option(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":684
-- * try:
-- * prop_c = prop
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_set_option(
-- * self._ctx,
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe[] = "Wraps: mpv_get_wakeup_pipe";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("get_wakeup_pipe (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-+ int __pyx_v_pipe;
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("get_wakeup_pipe", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":730
-+ * def get_wakeup_pipe(self):
-+ * """Wraps: mpv_get_wakeup_pipe"""
-+ * assert self._ctx # <<<<<<<<<<<<<<
-+ * cdef int pipe
-+ * with nogil:
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L8;
-- }
-- __pyx_L8:;
-- }
-+ #ifndef CYTHON_WITHOUT_ASSERTIONS
-+ if (unlikely(!Py_OptimizeFlag)) {
-+ if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-+ PyErr_SetNone(PyExc_AssertionError);
-+ __PYX_ERR(0, 730, __pyx_L1_error)
- }
- }
-+ #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":692
-- * )
-- * finally:
-- * self._free_native_value(v) # <<<<<<<<<<<<<<
-- * return err
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":732
-+ * assert self._ctx
-+ * cdef int pipe
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * pipe = mpv_get_wakeup_pipe(self._ctx)
-+ * return pipe
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- goto __pyx_L5;
-- }
-- __pyx_L4_error:;
-- /*exception exit:*/{
-- __Pyx_PyThreadState_declare
-- __Pyx_PyThreadState_assign
-- __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
-- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
-- __Pyx_XGOTREF(__pyx_t_9);
-- __Pyx_XGOTREF(__pyx_t_10);
-- __Pyx_XGOTREF(__pyx_t_11);
-- __Pyx_XGOTREF(__pyx_t_12);
-- __Pyx_XGOTREF(__pyx_t_13);
-- __Pyx_XGOTREF(__pyx_t_14);
-- __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
-- {
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L10_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- }
-- if (PY_MAJOR_VERSION >= 3) {
-- __Pyx_XGIVEREF(__pyx_t_12);
-- __Pyx_XGIVEREF(__pyx_t_13);
-- __Pyx_XGIVEREF(__pyx_t_14);
-- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":733
-+ * cdef int pipe
-+ * with nogil:
-+ * pipe = mpv_get_wakeup_pipe(self._ctx) # <<<<<<<<<<<<<<
-+ * return pipe
-+ *
-+ */
-+ __pyx_v_pipe = mpv_get_wakeup_pipe(__pyx_v_self->_ctx);
- }
-- __Pyx_XGIVEREF(__pyx_t_9);
-- __Pyx_XGIVEREF(__pyx_t_10);
-- __Pyx_XGIVEREF(__pyx_t_11);
-- __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
-- __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
-- __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
-- goto __pyx_L1_error;
-- __pyx_L10_error:;
-- if (PY_MAJOR_VERSION >= 3) {
-- __Pyx_XGIVEREF(__pyx_t_12);
-- __Pyx_XGIVEREF(__pyx_t_13);
-- __Pyx_XGIVEREF(__pyx_t_14);
-- __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":732
-+ * assert self._ctx
-+ * cdef int pipe
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * pipe = mpv_get_wakeup_pipe(self._ctx)
-+ * return pipe
-+ */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
- }
-- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-- __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
-- goto __pyx_L1_error;
-- }
-- __pyx_L5:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":693
-- * finally:
-- * self._free_native_value(v)
-- * return err # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":734
-+ * with nogil:
-+ * pipe = mpv_get_wakeup_pipe(self._ctx)
-+ * return pipe # <<<<<<<<<<<<<<
- *
-- * @_errors
-+ * def __cinit__(self):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":674
-+ /* "vidcutter/libs/pympv/mpv.pyx":728
-+ * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
- *
-- * @_errors
-- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_set_option"""
-+ * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_get_wakeup_pipe"""
- * assert self._ctx
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_wakeup_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_prop);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":696
-+/* "vidcutter/libs/pympv/mpv.pyx":736
-+ * return pipe
- *
-- * @_errors
-- * def initialize(self): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_initialize"""
-- * assert self._ctx
-+ * def __cinit__(self): # <<<<<<<<<<<<<<
-+ * cdef uint64_t ctxid = <uint64_t>id(self)
-+ * with nogil:
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_26initialize[] = "Wraps: mpv_initialize";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_27initialize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-- PyObject *__pyx_r = 0;
-+static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_33__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_33__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ int __pyx_r;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("initialize (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-+ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
-+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
-+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-- int __pyx_v_err;
-- PyObject *__pyx_r = NULL;
-+static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-+ uint64_t __pyx_v_ctxid;
-+ int __pyx_r;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-+ uint64_t __pyx_t_2;
-+ int __pyx_t_3;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("initialize", 0);
-+ __Pyx_RefNannySetupContext("__cinit__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":698
-- * def initialize(self):
-- * """Wraps: mpv_initialize"""
-- * assert self._ctx # <<<<<<<<<<<<<<
-- * cdef int err
-+ /* "vidcutter/libs/pympv/mpv.pyx":737
-+ *
-+ * def __cinit__(self):
-+ * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
- * with nogil:
-+ * self._ctx = mpv_create()
- */
-- #ifndef CYTHON_WITHOUT_ASSERTIONS
-- if (unlikely(!Py_OptimizeFlag)) {
-- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 698, __pyx_L1_error)
-- }
-- }
-- #endif
-+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":700
-- * assert self._ctx
-- * cdef int err
-+ /* "vidcutter/libs/pympv/mpv.pyx":738
-+ * def __cinit__(self):
-+ * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_initialize(self._ctx)
-- * return err
-+ * self._ctx = mpv_create()
-+ * if not self._ctx:
- */
- {
- #ifdef WITH_THREAD
-@@ -14114,22 +13975,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __p
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":701
-- * cdef int err
-+ /* "vidcutter/libs/pympv/mpv.pyx":739
-+ * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil:
-- * err = mpv_initialize(self._ctx) # <<<<<<<<<<<<<<
-- * return err
-- *
-+ * self._ctx = mpv_create() # <<<<<<<<<<<<<<
-+ * if not self._ctx:
-+ * raise MPVError("Context creation error")
- */
-- __pyx_v_err = mpv_initialize(__pyx_v_self->_ctx);
-+ __pyx_v_self->_ctx = mpv_create();
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":700
-- * assert self._ctx
-- * cdef int err
-+ /* "vidcutter/libs/pympv/mpv.pyx":738
-+ * def __cinit__(self):
-+ * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_initialize(self._ctx)
-- * return err
-+ * self._ctx = mpv_create()
-+ * if not self._ctx:
- */
- /*finally:*/ {
- /*normal exit:*/{
-@@ -14143,66 +14004,200 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26initialize(struct __p
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":702
-+ /* "vidcutter/libs/pympv/mpv.pyx":740
- * with nogil:
-- * err = mpv_initialize(self._ctx)
-- * return err # <<<<<<<<<<<<<<
-- *
-- * def wait_event(self, timeout=None):
-+ * self._ctx = mpv_create()
-+ * if not self._ctx: # <<<<<<<<<<<<<<
-+ * raise MPVError("Context creation error")
-+ * self.callbackthread = CallbackThread()
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ __pyx_t_3 = ((!(__pyx_v_self->_ctx != 0)) != 0);
-+ if (unlikely(__pyx_t_3)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":696
-- *
-- * @_errors
-- * def initialize(self): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_initialize"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":741
-+ * self._ctx = mpv_create()
-+ * if not self._ctx:
-+ * raise MPVError("Context creation error") # <<<<<<<<<<<<<<
-+ * self.callbackthread = CallbackThread()
-+ * _callbacks[ctxid] = self.callbackthread
- */
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_4, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Context_creation_error) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Context_creation_error);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __PYX_ERR(0, 741, __pyx_L1_error)
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-+ /* "vidcutter/libs/pympv/mpv.pyx":740
-+ * with nogil:
-+ * self._ctx = mpv_create()
-+ * if not self._ctx: # <<<<<<<<<<<<<<
-+ * raise MPVError("Context creation error")
-+ * self.callbackthread = CallbackThread()
-+ */
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":742
-+ * if not self._ctx:
-+ * raise MPVError("Context creation error")
-+ * self.callbackthread = CallbackThread() # <<<<<<<<<<<<<<
-+ * _callbacks[ctxid] = self.callbackthread
-+ * self.reply_userdata = dict()
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_4, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v_self->callbackthread);
-+ __Pyx_DECREF(__pyx_v_self->callbackthread);
-+ __pyx_v_self->callbackthread = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":743
-+ * raise MPVError("Context creation error")
-+ * self.callbackthread = CallbackThread()
-+ * _callbacks[ctxid] = self.callbackthread # <<<<<<<<<<<<<<
-+ * self.reply_userdata = dict()
-+ * _reply_userdatas[ctxid] = self.reply_userdata
-+ */
-+ __pyx_t_1 = __pyx_v_self->callbackthread;
-+ __Pyx_INCREF(__pyx_t_1);
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":744
-+ * self.callbackthread = CallbackThread()
-+ * _callbacks[ctxid] = self.callbackthread
-+ * self.reply_userdata = dict() # <<<<<<<<<<<<<<
-+ * _reply_userdatas[ctxid] = self.reply_userdata
-+ * self.callbackthread.start()
-+ */
-+ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
-+ __Pyx_DECREF(__pyx_v_self->reply_userdata);
-+ __pyx_v_self->reply_userdata = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":745
-+ * _callbacks[ctxid] = self.callbackthread
-+ * self.reply_userdata = dict()
-+ * _reply_userdatas[ctxid] = self.reply_userdata # <<<<<<<<<<<<<<
-+ * self.callbackthread.start()
-+ *
-+ */
-+ __pyx_t_1 = __pyx_v_self->reply_userdata;
-+ __Pyx_INCREF(__pyx_t_1);
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":746
-+ * self.reply_userdata = dict()
-+ * _reply_userdatas[ctxid] = self.reply_userdata
-+ * self.callbackthread.start() # <<<<<<<<<<<<<<
-+ *
-+ * @_errors
-+ */
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_4, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":736
-+ * return pipe
-+ *
-+ * def __cinit__(self): # <<<<<<<<<<<<<<
-+ * cdef uint64_t ctxid = <uint64_t>id(self)
-+ * with nogil:
-+ */
-+
-+ /* function exit code */
-+ __pyx_r = 0;
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = -1;
-+ __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":704
-- * return err
-+/* "vidcutter/libs/pympv/mpv.pyx":749
- *
-- * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_wait_event"""
-+ * @_errors
-+ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_observe_property"""
- * assert self._ctx
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_28wait_event[] = "Wraps: mpv_wait_event";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_timeout = 0;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_34observe_property[] = "Wraps: mpv_observe_property";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_prop = 0;
-+ PyObject *__pyx_v_data = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("wait_event (wrapper)", 0);
-+ __Pyx_RefNannySetupContext("observe_property (wrapper)", 0);
- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};
-- PyObject* values[1] = {0};
-- values[0] = ((PyObject *)Py_None);
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
-+ PyObject* values[2] = {0,0};
-+ values[1] = ((PyObject *)Py_None);
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- CYTHON_FALLTHROUGH;
- case 0: break;
-@@ -14211,117 +14206,291 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event(PyObject *
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timeout);
-- if (value) { values[0] = value; kw_args--; }
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
-+ if (value) { values[1] = value; kw_args--; }
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 704, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 749, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- CYTHON_FALLTHROUGH;
-- case 0: break;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ break;
- default: goto __pyx_L5_argtuple_error;
- }
- }
-- __pyx_v_timeout = values[0];
-+ __pyx_v_prop = values[0];
-+ __pyx_v_data = values[1];
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 704, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 749, __pyx_L3_error)
- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_timeout);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_timeout) {
-- double __pyx_v_timeout_d;
-- struct mpv_event *__pyx_v_event;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
-+ uint64_t __pyx_v_id_data;
-+ PyObject *__pyx_v_userdatas = NULL;
-+ char *__pyx_v_propc;
-+ int __pyx_v_err;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- double __pyx_t_1;
-- int __pyx_t_2;
-- double __pyx_t_3;
-+ Py_hash_t __pyx_t_1;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
-+ int __pyx_t_6;
-+ PyObject *__pyx_t_7 = NULL;
-+ int __pyx_t_8;
-+ int __pyx_t_9;
-+ char *__pyx_t_10;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("wait_event", 0);
-+ __Pyx_RefNannySetupContext("observe_property", 0);
-+ __Pyx_INCREF(__pyx_v_prop);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":706
-- * def wait_event(self, timeout=None):
-- * """Wraps: mpv_wait_event"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":751
-+ * def observe_property(self, prop, data=None):
-+ * """Wraps: mpv_observe_property"""
- * assert self._ctx # <<<<<<<<<<<<<<
-- * cdef double timeout_d = timeout if timeout is not None else -1
-- * cdef mpv_event* event
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * id_data = <uint64_t>hash(data)
- */
- #ifndef CYTHON_WITHOUT_ASSERTIONS
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 706, __pyx_L1_error)
-+ __PYX_ERR(0, 751, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":707
-- * """Wraps: mpv_wait_event"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":752
-+ * """Wraps: mpv_observe_property"""
- * assert self._ctx
-- * cdef double timeout_d = timeout if timeout is not None else -1 # <<<<<<<<<<<<<<
-- * cdef mpv_event* event
-- * with nogil:
-+ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
-+ * id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None)
- */
-- __pyx_t_2 = (__pyx_v_timeout != Py_None);
-- if ((__pyx_t_2 != 0)) {
-- __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
-- __pyx_t_1 = __pyx_t_3;
-- } else {
-- __pyx_t_1 = -1.0;
-- }
-- __pyx_v_timeout_d = __pyx_t_1;
-+ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
-+ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":709
-- * cdef double timeout_d = timeout if timeout is not None else -1
-- * cdef mpv_event* event
-- * with nogil: # <<<<<<<<<<<<<<
-- * event = mpv_wait_event(self._ctx, timeout_d)
-- * return Event()._init(event, self)
-+ /* "vidcutter/libs/pympv/mpv.pyx":753
-+ * assert self._ctx
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is None:
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 753, __pyx_L1_error)
-+ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":710
-- * cdef mpv_event* event
-- * with nogil:
-- * event = mpv_wait_event(self._ctx, timeout_d) # <<<<<<<<<<<<<<
-- * return Event()._init(event, self)
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":754
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
-+ * if userdatas is None:
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
- */
-- __pyx_v_event = mpv_wait_event(__pyx_v_self->_ctx, __pyx_v_timeout_d);
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":709
-- * cdef double timeout_d = timeout if timeout is not None else -1
-- * cdef mpv_event* event
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = NULL;
-+ __pyx_t_6 = 0;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_3, function);
-+ __pyx_t_6 = 1;
-+ }
-+ }
-+ #if CYTHON_FAST_PYCALL
-+ if (PyFunction_Check(__pyx_t_3)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ } else
-+ #endif
-+ #if CYTHON_FAST_PYCCALL
-+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ } else
-+ #endif
-+ {
-+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ if (__pyx_t_5) {
-+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
-+ }
-+ __Pyx_GIVEREF(__pyx_t_4);
-+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
-+ __pyx_t_4 = 0;
-+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ }
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __pyx_v_userdatas = __pyx_t_2;
-+ __pyx_t_2 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":755
-+ * id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is None: # <<<<<<<<<<<<<<
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-+ * userdatas.observed = True
-+ */
-+ __pyx_t_8 = (__pyx_v_userdatas == Py_None);
-+ __pyx_t_9 = (__pyx_t_8 != 0);
-+ if (__pyx_t_9) {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":756
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is None:
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
-+ * userdatas.observed = True
-+ * prop = _strenc(prop)
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_7 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
-+ if (likely(__pyx_t_7)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_7);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_3, function);
-+ }
-+ }
-+ __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
-+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
-+ __Pyx_INCREF(__pyx_t_2);
-+ __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":755
-+ * id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is None: # <<<<<<<<<<<<<<
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-+ * userdatas.observed = True
-+ */
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":757
-+ * if userdatas is None:
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-+ * userdatas.observed = True # <<<<<<<<<<<<<<
-+ * prop = _strenc(prop)
-+ * cdef char* propc = prop
-+ */
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":758
-+ * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-+ * userdatas.observed = True
-+ * prop = _strenc(prop) # <<<<<<<<<<<<<<
-+ * cdef char* propc = prop
-+ * cdef int err
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_7 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
-+ if (likely(__pyx_t_7)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_7);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_3, function);
-+ }
-+ }
-+ __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_prop);
-+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_2);
-+ __pyx_t_2 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":759
-+ * userdatas.observed = True
-+ * prop = _strenc(prop)
-+ * cdef char* propc = prop # <<<<<<<<<<<<<<
-+ * cdef int err
-+ * with nogil:
-+ */
-+ __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
-+ __pyx_v_propc = __pyx_t_10;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":761
-+ * cdef char* propc = prop
-+ * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-- * event = mpv_wait_event(self._ctx, timeout_d)
-- * return Event()._init(event, self)
-+ * err = mpv_observe_property(
-+ * self._ctx,
-+ */
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":762
-+ * cdef int err
-+ * with nogil:
-+ * err = mpv_observe_property( # <<<<<<<<<<<<<<
-+ * self._ctx,
-+ * id_data,
-+ */
-+ __pyx_v_err = mpv_observe_property(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_propc, MPV_FORMAT_NODE);
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":761
-+ * cdef char* propc = prop
-+ * cdef int err
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_observe_property(
-+ * self._ctx,
- */
- /*finally:*/ {
- /*normal exit:*/{
-@@ -14329,101 +14498,248 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28wait_event(struct __p
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
-- goto __pyx_L5;
-+ goto __pyx_L6;
- }
-- __pyx_L5:;
-+ __pyx_L6:;
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":711
-- * with nogil:
-- * event = mpv_wait_event(self._ctx, timeout_d)
-- * return Event()._init(event, self) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":768
-+ * MPV_FORMAT_NODE,
-+ * )
-+ * return err # <<<<<<<<<<<<<<
- *
-- * def wakeup(self):
-+ * @_errors
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __pyx_r = __pyx_t_5;
-- __pyx_t_5 = 0;
-+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_r = __pyx_t_2;
-+ __pyx_t_2 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":704
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":749
- *
-- * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_wait_event"""
-+ * @_errors
-+ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_observe_property"""
- * assert self._ctx
- */
-
- /* function exit code */
- __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_userdatas);
-+ __Pyx_XDECREF(__pyx_v_prop);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":713
-- * return Event()._init(event, self)
-+/* "vidcutter/libs/pympv/mpv.pyx":771
- *
-- * def wakeup(self): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_wakeup"""
-+ * @_errors
-+ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_unobserve_property"""
- * assert self._ctx
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_30wakeup[] = "Wraps: mpv_wakeup";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_31wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_37unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
-+static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_36unobserve_property[] = "Wraps: mpv_unobserve_property";
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_37unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("wakeup (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("unobserve_property (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_data));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data) {
-+ uint64_t __pyx_v_id_data;
-+ PyObject *__pyx_v_userdatas = NULL;
-+ int __pyx_v_err;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-+ Py_hash_t __pyx_t_1;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ int __pyx_t_6;
-+ PyObject *__pyx_t_7 = NULL;
-+ int __pyx_t_8;
-+ int __pyx_t_9;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("wakeup", 0);
-+ __Pyx_RefNannySetupContext("unobserve_property", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":715
-- * def wakeup(self):
-- * """Wraps: mpv_wakeup"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":773
-+ * def unobserve_property(self, data):
-+ * """Wraps: mpv_unobserve_property"""
- * assert self._ctx # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_wakeup(self._ctx)
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None)
- */
- #ifndef CYTHON_WITHOUT_ASSERTIONS
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 715, __pyx_L1_error)
-+ __PYX_ERR(0, 773, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":716
-- * """Wraps: mpv_wakeup"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":774
-+ * """Wraps: mpv_unobserve_property"""
-+ * assert self._ctx
-+ * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is not None:
-+ */
-+ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
-+ __pyx_v_id_data = ((uint64_t)__pyx_t_1);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":775
- * assert self._ctx
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
-+ * if userdatas is not None:
-+ * userdatas.observed = False
-+ */
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = NULL;
-+ __pyx_t_6 = 0;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_3, function);
-+ __pyx_t_6 = 1;
-+ }
-+ }
-+ #if CYTHON_FAST_PYCALL
-+ if (PyFunction_Check(__pyx_t_3)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ } else
-+ #endif
-+ #if CYTHON_FAST_PYCCALL
-+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
-+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ } else
-+ #endif
-+ {
-+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ if (__pyx_t_5) {
-+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
-+ }
-+ __Pyx_GIVEREF(__pyx_t_4);
-+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
-+ __pyx_t_4 = 0;
-+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ }
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __pyx_v_userdatas = __pyx_t_2;
-+ __pyx_t_2 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":776
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is not None: # <<<<<<<<<<<<<<
-+ * userdatas.observed = False
-+ * if userdatas.counter <= 0:
-+ */
-+ __pyx_t_8 = (__pyx_v_userdatas != Py_None);
-+ __pyx_t_9 = (__pyx_t_8 != 0);
-+ if (__pyx_t_9) {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":777
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is not None:
-+ * userdatas.observed = False # <<<<<<<<<<<<<<
-+ * if userdatas.counter <= 0:
-+ * del self.reply_userdata[id_data]
-+ */
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":778
-+ * if userdatas is not None:
-+ * userdatas.observed = False
-+ * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
-+ * del self.reply_userdata[id_data]
-+ * cdef int err
-+ */
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 778, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (__pyx_t_9) {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":779
-+ * userdatas.observed = False
-+ * if userdatas.counter <= 0:
-+ * del self.reply_userdata[id_data] # <<<<<<<<<<<<<<
-+ * cdef int err
-+ * with nogil:
-+ */
-+ if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 779, __pyx_L1_error)
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":778
-+ * if userdatas is not None:
-+ * userdatas.observed = False
-+ * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
-+ * del self.reply_userdata[id_data]
-+ * cdef int err
-+ */
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":776
-+ * cdef uint64_t id_data = <uint64_t>hash(data)
-+ * userdatas = self.reply_userdata.get(id_data, None)
-+ * if userdatas is not None: # <<<<<<<<<<<<<<
-+ * userdatas.observed = False
-+ * if userdatas.counter <= 0:
-+ */
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":781
-+ * del self.reply_userdata[id_data]
-+ * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_wakeup(self._ctx)
-- *
-+ * err = mpv_unobserve_property(
-+ * self._ctx,
- */
- {
- #ifdef WITH_THREAD
-@@ -14433,22 +14749,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_o
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":717
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":782
-+ * cdef int err
- * with nogil:
-- * mpv_wakeup(self._ctx) # <<<<<<<<<<<<<<
-- *
-- * def set_wakeup_callback(self, callback):
-+ * err = mpv_unobserve_property( # <<<<<<<<<<<<<<
-+ * self._ctx,
-+ * id_data,
- */
-- mpv_wakeup(__pyx_v_self->_ctx);
-+ __pyx_v_err = mpv_unobserve_property(__pyx_v_self->_ctx, __pyx_v_id_data);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":716
-- * """Wraps: mpv_wakeup"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":781
-+ * del self.reply_userdata[id_data]
-+ * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_wakeup(self._ctx)
-- *
-+ * err = mpv_unobserve_property(
-+ * self._ctx,
- */
- /*finally:*/ {
- /*normal exit:*/{
-@@ -14456,141 +14772,134 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30wakeup(struct __pyx_o
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
-- goto __pyx_L5;
-+ goto __pyx_L7;
- }
-- __pyx_L5:;
-+ __pyx_L7:;
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":713
-- * return Event()._init(event, self)
-+ /* "vidcutter/libs/pympv/mpv.pyx":786
-+ * id_data,
-+ * )
-+ * return err # <<<<<<<<<<<<<<
- *
-- * def wakeup(self): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_wakeup"""
-+ * def shutdown(self):
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
-+ goto __pyx_L0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":771
-+ *
-+ * @_errors
-+ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_unobserve_property"""
- * assert self._ctx
- */
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wakeup", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.unobserve_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_userdatas);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":719
-- * mpv_wakeup(self._ctx)
-+/* "vidcutter/libs/pympv/mpv.pyx":788
-+ * return err
- *
-- * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_set_wakeup_callback"""
-- * assert self._ctx
-+ * def shutdown(self): # <<<<<<<<<<<<<<
-+ * if self._ctx == NULL:
-+ * return
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_33set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback[] = "Wraps: mpv_set_wakeup_callback";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_33set_wakeup_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("set_wakeup_callback (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_callback));
-+ __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_callback) {
-- uint64_t __pyx_v_name;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-+ uint64_t __pyx_v_ctxid;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- uint64_t __pyx_t_2;
-- PyObject *__pyx_t_3 = NULL;
-+ int __pyx_t_1;
-+ PyObject *__pyx_t_2 = NULL;
-+ uint64_t __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("set_wakeup_callback", 0);
-+ __Pyx_RefNannySetupContext("shutdown", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":721
-- * def set_wakeup_callback(self, callback):
-- * """Wraps: mpv_set_wakeup_callback"""
-- * assert self._ctx # <<<<<<<<<<<<<<
-- * cdef uint64_t name = <uint64_t>id(self)
-- * self.callback = callback
-+ /* "vidcutter/libs/pympv/mpv.pyx":789
-+ *
-+ * def shutdown(self):
-+ * if self._ctx == NULL: # <<<<<<<<<<<<<<
-+ * return
-+ * cdef uint64_t ctxid = <uint64_t>id(self)
- */
-- #ifndef CYTHON_WITHOUT_ASSERTIONS
-- if (unlikely(!Py_OptimizeFlag)) {
-- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 721, __pyx_L1_error)
-- }
-- }
-- #endif
-+ __pyx_t_1 = ((__pyx_v_self->_ctx == NULL) != 0);
-+ if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":722
-- * """Wraps: mpv_set_wakeup_callback"""
-- * assert self._ctx
-- * cdef uint64_t name = <uint64_t>id(self) # <<<<<<<<<<<<<<
-- * self.callback = callback
-- * self.callbackthread.set(callback)
-- */
-- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v_name = ((uint64_t)__pyx_t_2);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":723
-- * assert self._ctx
-- * cdef uint64_t name = <uint64_t>id(self)
-- * self.callback = callback # <<<<<<<<<<<<<<
-- * self.callbackthread.set(callback)
-+ /* "vidcutter/libs/pympv/mpv.pyx":790
-+ * def shutdown(self):
-+ * if self._ctx == NULL:
-+ * return # <<<<<<<<<<<<<<
-+ * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil:
- */
-- __Pyx_INCREF(__pyx_v_callback);
-- __Pyx_GIVEREF(__pyx_v_callback);
-- __Pyx_GOTREF(__pyx_v_self->callback);
-- __Pyx_DECREF(__pyx_v_self->callback);
-- __pyx_v_self->callback = __pyx_v_callback;
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":724
-- * cdef uint64_t name = <uint64_t>id(self)
-- * self.callback = callback
-- * self.callbackthread.set(callback) # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
-+ /* "vidcutter/libs/pympv/mpv.pyx":789
-+ *
-+ * def shutdown(self):
-+ * if self._ctx == NULL: # <<<<<<<<<<<<<<
-+ * return
-+ * cdef uint64_t ctxid = <uint64_t>id(self)
- */
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- }
- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callback);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":725
-- * self.callback = callback
-- * self.callbackthread.set(callback)
-+ /* "vidcutter/libs/pympv/mpv.pyx":791
-+ * if self._ctx == NULL:
-+ * return
-+ * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * mpv_terminate_destroy(self._ctx)
-+ */
-+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v_ctxid = ((uint64_t)__pyx_t_3);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":792
-+ * return
-+ * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
-- *
-+ * mpv_terminate_destroy(self._ctx)
-+ * self.callbackthread.shutdown()
- */
- {
- #ifdef WITH_THREAD
-@@ -14600,22 +14909,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(s
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":726
-- * self.callbackthread.set(callback)
-+ /* "vidcutter/libs/pympv/mpv.pyx":793
-+ * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil:
-- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name) # <<<<<<<<<<<<<<
-- *
-- * def get_wakeup_pipe(self):
-+ * mpv_terminate_destroy(self._ctx) # <<<<<<<<<<<<<<
-+ * self.callbackthread.shutdown()
-+ * del _callbacks[ctxid]
- */
-- mpv_set_wakeup_callback(__pyx_v_self->_ctx, __pyx_f_9vidcutter_4libs_3mpv__c_callback, ((void *)__pyx_v_name));
-+ mpv_terminate_destroy(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":725
-- * self.callback = callback
-- * self.callbackthread.set(callback)
-+ /* "vidcutter/libs/pympv/mpv.pyx":792
-+ * return
-+ * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
-- *
-+ * mpv_terminate_destroy(self._ctx)
-+ * self.callbackthread.shutdown()
- */
- /*finally:*/ {
- /*normal exit:*/{
-@@ -14623,28 +14932,107 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(s
- __Pyx_FastGIL_Forget();
- Py_BLOCK_THREADS
- #endif
-- goto __pyx_L5;
-+ goto __pyx_L6;
- }
-- __pyx_L5:;
-+ __pyx_L6:;
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":719
-- * mpv_wakeup(self._ctx)
-+ /* "vidcutter/libs/pympv/mpv.pyx":794
-+ * with nogil:
-+ * mpv_terminate_destroy(self._ctx)
-+ * self.callbackthread.shutdown() # <<<<<<<<<<<<<<
-+ * del _callbacks[ctxid]
-+ * del _reply_userdatas[ctxid]
-+ */
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_4, function);
-+ }
-+ }
-+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":795
-+ * mpv_terminate_destroy(self._ctx)
-+ * self.callbackthread.shutdown()
-+ * del _callbacks[ctxid] # <<<<<<<<<<<<<<
-+ * del _reply_userdatas[ctxid]
-+ * self.callback = None
-+ */
-+ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":796
-+ * self.callbackthread.shutdown()
-+ * del _callbacks[ctxid]
-+ * del _reply_userdatas[ctxid] # <<<<<<<<<<<<<<
-+ * self.callback = None
-+ * self.reply_userdata = None
-+ */
-+ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 796, __pyx_L1_error)
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":797
-+ * del _callbacks[ctxid]
-+ * del _reply_userdatas[ctxid]
-+ * self.callback = None # <<<<<<<<<<<<<<
-+ * self.reply_userdata = None
-+ * self._ctx = NULL
-+ */
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ __Pyx_GOTREF(__pyx_v_self->callback);
-+ __Pyx_DECREF(__pyx_v_self->callback);
-+ __pyx_v_self->callback = Py_None;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":798
-+ * del _reply_userdatas[ctxid]
-+ * self.callback = None
-+ * self.reply_userdata = None # <<<<<<<<<<<<<<
-+ * self._ctx = NULL
- *
-- * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_set_wakeup_callback"""
-- * assert self._ctx
-+ */
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ __Pyx_GOTREF(__pyx_v_self->reply_userdata);
-+ __Pyx_DECREF(__pyx_v_self->reply_userdata);
-+ __pyx_v_self->reply_userdata = Py_None;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":799
-+ * self.callback = None
-+ * self.reply_userdata = None
-+ * self._ctx = NULL # <<<<<<<<<<<<<<
-+ *
-+ * # def opengl_cb_api(self):
-+ */
-+ __pyx_v_self->_ctx = NULL;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":788
-+ * return err
-+ *
-+ * def shutdown(self): # <<<<<<<<<<<<<<
-+ * if self._ctx == NULL:
-+ * return
- */
-
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_wakeup_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
-@@ -14652,374 +15040,403 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback(s
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":728
-- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
-+/* "vidcutter/libs/pympv/mpv.pyx":813
-+ * # return ctx
-+ *
-+ * def __dealloc__(self): # <<<<<<<<<<<<<<
-+ * self.shutdown()
- *
-- * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_get_wakeup_pipe"""
-- * assert self._ctx
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe[] = "Wraps: mpv_get_wakeup_pipe";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35get_wakeup_pipe(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-- PyObject *__pyx_r = 0;
-+static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_41__dealloc__(PyObject *__pyx_v_self); /*proto*/
-+static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_41__dealloc__(PyObject *__pyx_v_self) {
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("get_wakeup_pipe (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-+ __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-- int __pyx_v_pipe;
-- PyObject *__pyx_r = NULL;
-+static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("get_wakeup_pipe", 0);
-+ __Pyx_RefNannySetupContext("__dealloc__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":730
-- * def get_wakeup_pipe(self):
-- * """Wraps: mpv_get_wakeup_pipe"""
-- * assert self._ctx # <<<<<<<<<<<<<<
-- * cdef int pipe
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":814
-+ *
-+ * def __dealloc__(self):
-+ * self.shutdown() # <<<<<<<<<<<<<<
-+ *
-+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
- */
-- #ifndef CYTHON_WITHOUT_ASSERTIONS
-- if (unlikely(!Py_OptimizeFlag)) {
-- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 730, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
- }
- }
-- #endif
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":732
-- * assert self._ctx
-- * cdef int pipe
-- * with nogil: # <<<<<<<<<<<<<<
-- * pipe = mpv_get_wakeup_pipe(self._ctx)
-- * return pipe
-- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":733
-- * cdef int pipe
-- * with nogil:
-- * pipe = mpv_get_wakeup_pipe(self._ctx) # <<<<<<<<<<<<<<
-- * return pipe
-+ /* "vidcutter/libs/pympv/mpv.pyx":813
-+ * # return ctx
-+ *
-+ * def __dealloc__(self): # <<<<<<<<<<<<<<
-+ * self.shutdown()
- *
- */
-- __pyx_v_pipe = mpv_get_wakeup_pipe(__pyx_v_self->_ctx);
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":732
-- * assert self._ctx
-- * cdef int pipe
-- * with nogil: # <<<<<<<<<<<<<<
-- * pipe = mpv_get_wakeup_pipe(self._ctx)
-- * return pipe
-+ /* function exit code */
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __pyx_L0:;
-+ __Pyx_RefNannyFinishContext();
-+}
-+
-+/* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * def __setstate_cython__(self, __pyx_state):
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":734
-- * with nogil:
-- * pipe = mpv_get_wakeup_pipe(self._ctx)
-- * return pipe # <<<<<<<<<<<<<<
-- *
-- * def __cinit__(self):
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_42__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-+
-+ /* "(tree fragment)":2
-+ * def __reduce_cython__(self):
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __PYX_ERR(1, 2, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":728
-- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
-- *
-- * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_get_wakeup_pipe"""
-- * assert self._ctx
-+ /* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * def __setstate_cython__(self, __pyx_state):
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_wakeup_pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
-- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":736
-- * return pipe
-- *
-- * def __cinit__(self): # <<<<<<<<<<<<<<
-- * cdef uint64_t ctxid = <uint64_t>id(self)
-- * with nogil:
-+/* "(tree fragment)":3
-+ * def __reduce_cython__(self):
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- */
-
- /* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_37__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_7Context_37__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- int __pyx_r;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
-- if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
-- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
-- if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-- uint64_t __pyx_v_ctxid;
-- int __pyx_r;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- uint64_t __pyx_t_2;
-- int __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__cinit__", 0);
-+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":737
-- *
-- * def __cinit__(self):
-- * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
-- * with nogil:
-- * self._ctx = mpv_create()
-+ /* "(tree fragment)":4
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
- */
-- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
-+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
-+ __PYX_ERR(1, 4, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":738
-- * def __cinit__(self):
-- * cdef uint64_t ctxid = <uint64_t>id(self)
-- * with nogil: # <<<<<<<<<<<<<<
-- * self._ctx = mpv_create()
-- * if not self._ctx:
-+ /* "(tree fragment)":3
-+ * def __reduce_cython__(self):
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":739
-- * cdef uint64_t ctxid = <uint64_t>id(self)
-- * with nogil:
-- * self._ctx = mpv_create() # <<<<<<<<<<<<<<
-- * if not self._ctx:
-- * raise MPVError("Context creation error")
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* "vidcutter/libs/pympv/mpv.pyx":816
-+ * self.shutdown()
-+ *
-+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
-+ * return <void *><intptr_t>(<object>ctx)(name)
-+ *
- */
-- __pyx_v_self->_ctx = mpv_create();
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":738
-- * def __cinit__(self):
-- * cdef uint64_t ctxid = <uint64_t>id(self)
-- * with nogil: # <<<<<<<<<<<<<<
-- * self._ctx = mpv_create()
-- * if not self._ctx:
-+static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx, char const *__pyx_v_name) {
-+ void *__pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ intptr_t __pyx_t_5;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ #ifdef WITH_THREAD
-+ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
-+ #endif
-+ __Pyx_RefNannySetupContext("_c_getprocaddress", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":817
-+ *
-+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
-+ * return <void *><intptr_t>(<object>ctx)(name) # <<<<<<<<<<<<<<
-+ *
-+ * cdef void _c_updatecb(void *ctx) with gil:
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-+ __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
-+ __pyx_t_3 = ((PyObject *)__pyx_v_ctx); __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_3, function);
-+ }
- }
-+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_r = ((void *)((intptr_t)__pyx_t_5));
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":740
-- * with nogil:
-- * self._ctx = mpv_create()
-- * if not self._ctx: # <<<<<<<<<<<<<<
-- * raise MPVError("Context creation error")
-- * self.callbackthread = CallbackThread()
-+ /* "vidcutter/libs/pympv/mpv.pyx":816
-+ * self.shutdown()
-+ *
-+ * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
-+ * return <void *><intptr_t>(<object>ctx)(name)
-+ *
- */
-- __pyx_t_3 = ((!(__pyx_v_self->_ctx != 0)) != 0);
-- if (unlikely(__pyx_t_3)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":741
-- * self._ctx = mpv_create()
-- * if not self._ctx:
-- * raise MPVError("Context creation error") # <<<<<<<<<<<<<<
-- * self.callbackthread = CallbackThread()
-- * _callbacks[ctxid] = self.callbackthread
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_4, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Context_creation_error) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Context_creation_error);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(0, 741, __pyx_L1_error)
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_getprocaddress", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __pyx_r = 0;
-+ __pyx_L0:;
-+ __Pyx_RefNannyFinishContext();
-+ #ifdef WITH_THREAD
-+ __Pyx_PyGILState_Release(__pyx_gilstate_save);
-+ #endif
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":740
-- * with nogil:
-- * self._ctx = mpv_create()
-- * if not self._ctx: # <<<<<<<<<<<<<<
-- * raise MPVError("Context creation error")
-- * self.callbackthread = CallbackThread()
-+/* "vidcutter/libs/pympv/mpv.pyx":819
-+ * return <void *><intptr_t>(<object>ctx)(name)
-+ *
-+ * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
-+ * (<object>ctx)()
-+ *
- */
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":742
-- * if not self._ctx:
-- * raise MPVError("Context creation error")
-- * self.callbackthread = CallbackThread() # <<<<<<<<<<<<<<
-- * _callbacks[ctxid] = self.callbackthread
-- * self.reply_userdata = dict()
-+static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ #ifdef WITH_THREAD
-+ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
-+ #endif
-+ __Pyx_RefNannySetupContext("_c_updatecb", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":820
-+ *
-+ * cdef void _c_updatecb(void *ctx) with gil:
-+ * (<object>ctx)() # <<<<<<<<<<<<<<
-+ *
-+ * # cdef class OpenGLContext(object):
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-- __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
-+ __pyx_t_2 = ((PyObject *)__pyx_v_ctx); __pyx_t_3 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_3);
- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_4, function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
- }
- }
-- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->callbackthread);
-- __Pyx_DECREF(__pyx_v_self->callbackthread);
-- __pyx_v_self->callbackthread = __pyx_t_1;
-- __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":743
-- * raise MPVError("Context creation error")
-- * self.callbackthread = CallbackThread()
-- * _callbacks[ctxid] = self.callbackthread # <<<<<<<<<<<<<<
-- * self.reply_userdata = dict()
-- * _reply_userdatas[ctxid] = self.reply_userdata
-- */
-- __pyx_t_1 = __pyx_v_self->callbackthread;
-- __Pyx_INCREF(__pyx_t_1);
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":744
-- * self.callbackthread = CallbackThread()
-- * _callbacks[ctxid] = self.callbackthread
-- * self.reply_userdata = dict() # <<<<<<<<<<<<<<
-- * _reply_userdatas[ctxid] = self.reply_userdata
-- * self.callbackthread.start()
-+ /* "vidcutter/libs/pympv/mpv.pyx":819
-+ * return <void *><intptr_t>(<object>ctx)(name)
-+ *
-+ * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
-+ * (<object>ctx)()
-+ *
- */
-- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
-- __Pyx_DECREF(__pyx_v_self->reply_userdata);
-- __pyx_v_self->reply_userdata = __pyx_t_1;
-- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":745
-- * _callbacks[ctxid] = self.callbackthread
-- * self.reply_userdata = dict()
-- * _reply_userdatas[ctxid] = self.reply_userdata # <<<<<<<<<<<<<<
-- * self.callbackthread.start()
-+ /* function exit code */
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_updatecb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __pyx_L0:;
-+ __Pyx_RefNannyFinishContext();
-+ #ifdef WITH_THREAD
-+ __Pyx_PyGILState_Release(__pyx_gilstate_save);
-+ #endif
-+}
-+
-+/* "vidcutter/libs/pympv/mpv.pyx":886
-+ * object owned
- *
-+ * def __init__(self): # <<<<<<<<<<<<<<
-+ * self.owned = []
-+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
- */
-- __pyx_t_1 = __pyx_v_self->reply_userdata;
-- __Pyx_INCREF(__pyx_t_1);
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":746
-- * self.reply_userdata = dict()
-- * _reply_userdatas[ctxid] = self.reply_userdata
-- * self.callbackthread.start() # <<<<<<<<<<<<<<
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-+ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
-+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
-+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__init__", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":887
-+ *
-+ * def __init__(self):
-+ * self.owned = [] # <<<<<<<<<<<<<<
-+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
- *
-- * @_errors
- */
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_4, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
-+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v_self->owned);
-+ __Pyx_DECREF(__pyx_v_self->owned);
-+ __pyx_v_self->owned = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":736
-- * return pipe
-+ /* "vidcutter/libs/pympv/mpv.pyx":888
-+ * def __init__(self):
-+ * self.owned = []
-+ * self.params[0].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
- *
-- * def __cinit__(self): # <<<<<<<<<<<<<<
-- * cdef uint64_t ctxid = <uint64_t>id(self)
-- * with nogil:
-+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
-+ */
-+ (__pyx_v_self->params[0]).type = MPV_RENDER_PARAM_INVALID;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":886
-+ * object owned
-+ *
-+ * def __init__(self): # <<<<<<<<<<<<<<
-+ * self.owned = []
-+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
- */
-
- /* function exit code */
-@@ -15027,1094 +15444,479 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_36__cinit__(struct __pyx_obj_
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = -1;
- __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":749
-+/* "vidcutter/libs/pympv/mpv.pyx":890
-+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
- *
-- * @_errors
-- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_observe_property"""
-- * assert self._ctx
-+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
-+ * count = len(self.owned)
-+ * if count >= MAX_RENDER_PARAMS:
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_38observe_property[] = "Wraps: mpv_observe_property";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_39observe_property(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_prop = 0;
-- PyObject *__pyx_v_data = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("observe_property (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prop,&__pyx_n_s_data,0};
-- PyObject* values[2] = {0,0};
-- values[1] = ((PyObject *)Py_None);
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prop)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data);
-- if (value) { values[1] = value; kw_args--; }
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 749, __pyx_L3_error)
-- }
-- } else {
-- switch (PyTuple_GET_SIZE(__pyx_args)) {
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- }
-- __pyx_v_prop = values[0];
-- __pyx_v_data = values[1];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 749, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_38observe_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), __pyx_v_prop, __pyx_v_data);
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38observe_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_prop, PyObject *__pyx_v_data) {
-- uint64_t __pyx_v_id_data;
-- PyObject *__pyx_v_userdatas = NULL;
-- char *__pyx_v_propc;
-- int __pyx_v_err;
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, void *__pyx_v_p, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args) {
-+ int __pyx_v_owned = ((int)0);
-+ PyObject *__pyx_v_count = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- Py_hash_t __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_1 = NULL;
-+ Py_ssize_t __pyx_t_2;
-+ int __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
- int __pyx_t_6;
-- PyObject *__pyx_t_7 = NULL;
-- int __pyx_t_8;
-- int __pyx_t_9;
-- char *__pyx_t_10;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("observe_property", 0);
-- __Pyx_INCREF(__pyx_v_prop);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":751
-- * def observe_property(self, prop, data=None):
-- * """Wraps: mpv_observe_property"""
-- * assert self._ctx # <<<<<<<<<<<<<<
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-- * id_data = <uint64_t>hash(data)
-- */
-- #ifndef CYTHON_WITHOUT_ASSERTIONS
-- if (unlikely(!Py_OptimizeFlag)) {
-- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 751, __pyx_L1_error)
-+ __Pyx_RefNannySetupContext("add_voidp", 0);
-+ if (__pyx_optional_args) {
-+ if (__pyx_optional_args->__pyx_n > 0) {
-+ __pyx_v_owned = __pyx_optional_args->owned;
- }
- }
-- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":752
-- * """Wraps: mpv_observe_property"""
-- * assert self._ctx
-- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
-- * id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None)
-+ /* "vidcutter/libs/pympv/mpv.pyx":891
-+ *
-+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
-+ * count = len(self.owned) # <<<<<<<<<<<<<<
-+ * if count >= MAX_RENDER_PARAMS:
-+ * if owned:
- */
-- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
-- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
-+ __pyx_t_1 = __pyx_v_self->owned;
-+ __Pyx_INCREF(__pyx_t_1);
-+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 891, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_v_count = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":753
-- * assert self._ctx
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-- * id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is None:
-+ /* "vidcutter/libs/pympv/mpv.pyx":892
-+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
-+ * count = len(self.owned)
-+ * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
-+ * if owned:
-+ * free(p)
- */
-- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 753, __pyx_L1_error)
-- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
-+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ if (__pyx_t_3) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":754
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-- * id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
-- * if userdatas is None:
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-+ /* "vidcutter/libs/pympv/mpv.pyx":893
-+ * count = len(self.owned)
-+ * if count >= MAX_RENDER_PARAMS:
-+ * if owned: # <<<<<<<<<<<<<<
-+ * free(p)
-+ * raise PyMPVError("RenderParams overflow")
- */
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- __pyx_t_6 = 0;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- __pyx_t_6 = 1;
-- }
-- }
-- #if CYTHON_FAST_PYCALL
-- if (PyFunction_Check(__pyx_t_3)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- } else
-- #endif
-- #if CYTHON_FAST_PYCCALL
-- if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- } else
-- #endif
-- {
-- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- if (__pyx_t_5) {
-- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
-- }
-- __Pyx_GIVEREF(__pyx_t_4);
-- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
-- __pyx_t_4 = 0;
-- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- }
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_v_userdatas = __pyx_t_2;
-- __pyx_t_2 = 0;
-+ __pyx_t_3 = (__pyx_v_owned != 0);
-+ if (__pyx_t_3) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":755
-- * id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is None: # <<<<<<<<<<<<<<
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-- * userdatas.observed = True
-+ /* "vidcutter/libs/pympv/mpv.pyx":894
-+ * if count >= MAX_RENDER_PARAMS:
-+ * if owned:
-+ * free(p) # <<<<<<<<<<<<<<
-+ * raise PyMPVError("RenderParams overflow")
-+ *
- */
-- __pyx_t_8 = (__pyx_v_userdatas == Py_None);
-- __pyx_t_9 = (__pyx_t_8 != 0);
-- if (__pyx_t_9) {
-+ free(__pyx_v_p);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":756
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is None:
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
-- * userdatas.observed = True
-- * prop = _strenc(prop)
-+ /* "vidcutter/libs/pympv/mpv.pyx":893
-+ * count = len(self.owned)
-+ * if count >= MAX_RENDER_PARAMS:
-+ * if owned: # <<<<<<<<<<<<<<
-+ * free(p)
-+ * raise PyMPVError("RenderParams overflow")
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_7 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_7)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_7);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- }
- }
-- __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
-- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
-- __Pyx_INCREF(__pyx_t_2);
-- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_2);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":755
-- * id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is None: # <<<<<<<<<<<<<<
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-- * userdatas.observed = True
-- */
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":757
-- * if userdatas is None:
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-- * userdatas.observed = True # <<<<<<<<<<<<<<
-- * prop = _strenc(prop)
-- * cdef char* propc = prop
-- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":758
-- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
-- * userdatas.observed = True
-- * prop = _strenc(prop) # <<<<<<<<<<<<<<
-- * cdef char* propc = prop
-- * cdef int err
-+ /* "vidcutter/libs/pympv/mpv.pyx":895
-+ * if owned:
-+ * free(p)
-+ * raise PyMPVError("RenderParams overflow") # <<<<<<<<<<<<<<
-+ *
-+ * self.params[count].type = t
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_7 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_7)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_7);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_4, function);
-+ }
- }
-- }
-- __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_prop);
-- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_2);
-- __pyx_t_2 = 0;
-+ __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_RenderParams_overflow) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_RenderParams_overflow);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __PYX_ERR(0, 895, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":759
-- * userdatas.observed = True
-- * prop = _strenc(prop)
-- * cdef char* propc = prop # <<<<<<<<<<<<<<
-- * cdef int err
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":892
-+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
-+ * count = len(self.owned)
-+ * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
-+ * if owned:
-+ * free(p)
- */
-- __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
-- __pyx_v_propc = __pyx_t_10;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":761
-- * cdef char* propc = prop
-- * cdef int err
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_observe_property(
-- * self._ctx,
-+ /* "vidcutter/libs/pympv/mpv.pyx":897
-+ * raise PyMPVError("RenderParams overflow")
-+ *
-+ * self.params[count].type = t # <<<<<<<<<<<<<<
-+ * self.params[count].data = p
-+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error)
-+ (__pyx_v_self->params[__pyx_t_2]).type = __pyx_v_t;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":762
-- * cdef int err
-- * with nogil:
-- * err = mpv_observe_property( # <<<<<<<<<<<<<<
-- * self._ctx,
-- * id_data,
-+ /* "vidcutter/libs/pympv/mpv.pyx":898
-+ *
-+ * self.params[count].type = t
-+ * self.params[count].data = p # <<<<<<<<<<<<<<
-+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
-+ * self.owned.append(owned)
- */
-- __pyx_v_err = mpv_observe_property(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_propc, MPV_FORMAT_NODE);
-- }
-+ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error)
-+ (__pyx_v_self->params[__pyx_t_2]).data = __pyx_v_p;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":761
-- * cdef char* propc = prop
-- * cdef int err
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_observe_property(
-- * self._ctx,
-+ /* "vidcutter/libs/pympv/mpv.pyx":899
-+ * self.params[count].type = t
-+ * self.params[count].data = p
-+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
-+ * self.owned.append(owned)
-+ *
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L6;
-- }
-- __pyx_L6:;
-- }
-- }
-+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ (__pyx_v_self->params[__pyx_t_2]).type = MPV_RENDER_PARAM_INVALID;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":768
-- * MPV_FORMAT_NODE,
-- * )
-- * return err # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":900
-+ * self.params[count].data = p
-+ * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
-+ * self.owned.append(owned) # <<<<<<<<<<<<<<
- *
-- * @_errors
-+ * cdef add_int(self, mpv_render_param_type t, int val):
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_r = __pyx_t_2;
-- __pyx_t_2 = 0;
-- goto __pyx_L0;
-+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 900, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":749
-+ /* "vidcutter/libs/pympv/mpv.pyx":890
-+ * self.params[0].type = MPV_RENDER_PARAM_INVALID
- *
-- * @_errors
-- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_observe_property"""
-- * assert self._ctx
-+ * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
-+ * count = len(self.owned)
-+ * if count >= MAX_RENDER_PARAMS:
- */
-
- /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_voidp", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_userdatas);
-- __Pyx_XDECREF(__pyx_v_prop);
-+ __Pyx_XDECREF(__pyx_v_count);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":771
-+/* "vidcutter/libs/pympv/mpv.pyx":902
-+ * self.owned.append(owned)
- *
-- * @_errors
-- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_unobserve_property"""
-- * assert self._ctx
-+ * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
-+ * cdef int *p = <int *>malloc(sizeof(int))
-+ * p[0] = val
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_41unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
--static char __pyx_doc_9vidcutter_4libs_3mpv_7Context_40unobserve_property[] = "Wraps: mpv_unobserve_property";
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_41unobserve_property(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("unobserve_property (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_40unobserve_property(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v_data));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_40unobserve_property(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, PyObject *__pyx_v_data) {
-- uint64_t __pyx_v_id_data;
-- PyObject *__pyx_v_userdatas = NULL;
-- int __pyx_v_err;
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, int __pyx_v_val) {
-+ int *__pyx_v_p;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- Py_hash_t __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- int __pyx_t_6;
-- PyObject *__pyx_t_7 = NULL;
-- int __pyx_t_8;
-- int __pyx_t_9;
-+ PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("unobserve_property", 0);
-+ __Pyx_RefNannySetupContext("add_int", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":773
-- * def unobserve_property(self, data):
-- * """Wraps: mpv_unobserve_property"""
-- * assert self._ctx # <<<<<<<<<<<<<<
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None)
-+ /* "vidcutter/libs/pympv/mpv.pyx":903
-+ *
-+ * cdef add_int(self, mpv_render_param_type t, int val):
-+ * cdef int *p = <int *>malloc(sizeof(int)) # <<<<<<<<<<<<<<
-+ * p[0] = val
-+ * self.add_voidp(t, p)
- */
-- #ifndef CYTHON_WITHOUT_ASSERTIONS
-- if (unlikely(!Py_OptimizeFlag)) {
-- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
-- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 773, __pyx_L1_error)
-- }
-- }
-- #endif
-+ __pyx_v_p = ((int *)malloc((sizeof(int))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":774
-- * """Wraps: mpv_unobserve_property"""
-- * assert self._ctx
-- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is not None:
-- */
-- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
-- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":775
-- * assert self._ctx
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
-- * if userdatas is not None:
-- * userdatas.observed = False
-- */
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- __pyx_t_6 = 0;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- __pyx_t_6 = 1;
-- }
-- }
-- #if CYTHON_FAST_PYCALL
-- if (PyFunction_Check(__pyx_t_3)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- } else
-- #endif
-- #if CYTHON_FAST_PYCCALL
-- if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
-- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- } else
-- #endif
-- {
-- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- if (__pyx_t_5) {
-- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
-- }
-- __Pyx_GIVEREF(__pyx_t_4);
-- PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
-- __pyx_t_4 = 0;
-- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- }
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_v_userdatas = __pyx_t_2;
-- __pyx_t_2 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":776
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is not None: # <<<<<<<<<<<<<<
-- * userdatas.observed = False
-- * if userdatas.counter <= 0:
-- */
-- __pyx_t_8 = (__pyx_v_userdatas != Py_None);
-- __pyx_t_9 = (__pyx_t_8 != 0);
-- if (__pyx_t_9) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":777
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is not None:
-- * userdatas.observed = False # <<<<<<<<<<<<<<
-- * if userdatas.counter <= 0:
-- * del self.reply_userdata[id_data]
-- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":778
-- * if userdatas is not None:
-- * userdatas.observed = False
-- * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
-- * del self.reply_userdata[id_data]
-- * cdef int err
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 778, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (__pyx_t_9) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":779
-- * userdatas.observed = False
-- * if userdatas.counter <= 0:
-- * del self.reply_userdata[id_data] # <<<<<<<<<<<<<<
-- * cdef int err
-- * with nogil:
-- */
-- if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 779, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":778
-- * if userdatas is not None:
-- * userdatas.observed = False
-- * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
-- * del self.reply_userdata[id_data]
-- * cdef int err
-- */
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":776
-- * cdef uint64_t id_data = <uint64_t>hash(data)
-- * userdatas = self.reply_userdata.get(id_data, None)
-- * if userdatas is not None: # <<<<<<<<<<<<<<
-- * userdatas.observed = False
-- * if userdatas.counter <= 0:
-- */
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":781
-- * del self.reply_userdata[id_data]
-- * cdef int err
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_unobserve_property(
-- * self._ctx,
-- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":782
-- * cdef int err
-- * with nogil:
-- * err = mpv_unobserve_property( # <<<<<<<<<<<<<<
-- * self._ctx,
-- * id_data,
-- */
-- __pyx_v_err = mpv_unobserve_property(__pyx_v_self->_ctx, __pyx_v_id_data);
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":781
-- * del self.reply_userdata[id_data]
-- * cdef int err
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_unobserve_property(
-- * self._ctx,
-+ /* "vidcutter/libs/pympv/mpv.pyx":904
-+ * cdef add_int(self, mpv_render_param_type t, int val):
-+ * cdef int *p = <int *>malloc(sizeof(int))
-+ * p[0] = val # <<<<<<<<<<<<<<
-+ * self.add_voidp(t, p)
-+ *
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L7;
-- }
-- __pyx_L7:;
-- }
-- }
-+ (__pyx_v_p[0]) = __pyx_v_val;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":786
-- * id_data,
-- * )
-- * return err # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":905
-+ * cdef int *p = <int *>malloc(sizeof(int))
-+ * p[0] = val
-+ * self.add_voidp(t, p) # <<<<<<<<<<<<<<
- *
-- * def shutdown(self):
-+ * cdef add_string(self, mpv_render_param_type t, char *s):
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-- goto __pyx_L0;
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":771
-+ /* "vidcutter/libs/pympv/mpv.pyx":902
-+ * self.owned.append(owned)
- *
-- * @_errors
-- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_unobserve_property"""
-- * assert self._ctx
-+ * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
-+ * cdef int *p = <int *>malloc(sizeof(int))
-+ * p[0] = val
- */
-
- /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.unobserve_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_userdatas);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":788
-- * return err
-+/* "vidcutter/libs/pympv/mpv.pyx":907
-+ * self.add_voidp(t, p)
- *
-- * def shutdown(self): # <<<<<<<<<<<<<<
-- * if self._ctx == NULL:
-- * return
-+ * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
-+ * cdef char *p = <char *>malloc(strlen(s) + 1)
-+ * strcpy(p, s)
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_43shutdown(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_42shutdown(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_42shutdown(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-- uint64_t __pyx_v_ctxid;
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, char *__pyx_v_s) {
-+ char *__pyx_v_p;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- uint64_t __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-+ PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("shutdown", 0);
-+ __Pyx_RefNannySetupContext("add_string", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":789
-+ /* "vidcutter/libs/pympv/mpv.pyx":908
- *
-- * def shutdown(self):
-- * if self._ctx == NULL: # <<<<<<<<<<<<<<
-- * return
-- * cdef uint64_t ctxid = <uint64_t>id(self)
-- */
-- __pyx_t_1 = ((__pyx_v_self->_ctx == NULL) != 0);
-- if (__pyx_t_1) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":790
-- * def shutdown(self):
-- * if self._ctx == NULL:
-- * return # <<<<<<<<<<<<<<
-- * cdef uint64_t ctxid = <uint64_t>id(self)
-- * with nogil:
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":789
-- *
-- * def shutdown(self):
-- * if self._ctx == NULL: # <<<<<<<<<<<<<<
-- * return
-- * cdef uint64_t ctxid = <uint64_t>id(self)
-- */
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":791
-- * if self._ctx == NULL:
-- * return
-- * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_terminate_destroy(self._ctx)
-- */
-- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v_ctxid = ((uint64_t)__pyx_t_3);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":792
-- * return
-- * cdef uint64_t ctxid = <uint64_t>id(self)
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_terminate_destroy(self._ctx)
-- * self.callbackthread.shutdown()
-- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":793
-- * cdef uint64_t ctxid = <uint64_t>id(self)
-- * with nogil:
-- * mpv_terminate_destroy(self._ctx) # <<<<<<<<<<<<<<
-- * self.callbackthread.shutdown()
-- * del _callbacks[ctxid]
-- */
-- mpv_terminate_destroy(__pyx_v_self->_ctx);
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":792
-- * return
-- * cdef uint64_t ctxid = <uint64_t>id(self)
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_terminate_destroy(self._ctx)
-- * self.callbackthread.shutdown()
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L6;
-- }
-- __pyx_L6:;
-- }
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":794
-- * with nogil:
-- * mpv_terminate_destroy(self._ctx)
-- * self.callbackthread.shutdown() # <<<<<<<<<<<<<<
-- * del _callbacks[ctxid]
-- * del _reply_userdatas[ctxid]
-- */
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_4, function);
-- }
-- }
-- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":795
-- * mpv_terminate_destroy(self._ctx)
-- * self.callbackthread.shutdown()
-- * del _callbacks[ctxid] # <<<<<<<<<<<<<<
-- * del _reply_userdatas[ctxid]
-- * self.callback = None
-- */
-- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":796
-- * self.callbackthread.shutdown()
-- * del _callbacks[ctxid]
-- * del _reply_userdatas[ctxid] # <<<<<<<<<<<<<<
-- * self.callback = None
-- * self.reply_userdata = None
-- */
-- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 796, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":797
-- * del _callbacks[ctxid]
-- * del _reply_userdatas[ctxid]
-- * self.callback = None # <<<<<<<<<<<<<<
-- * self.reply_userdata = None
-- * self._ctx = NULL
-+ * cdef add_string(self, mpv_render_param_type t, char *s):
-+ * cdef char *p = <char *>malloc(strlen(s) + 1) # <<<<<<<<<<<<<<
-+ * strcpy(p, s)
-+ * self.add_voidp(t, p)
- */
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->callback);
-- __Pyx_DECREF(__pyx_v_self->callback);
-- __pyx_v_self->callback = Py_None;
-+ __pyx_v_p = ((char *)malloc((strlen(__pyx_v_s) + 1)));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":798
-- * del _reply_userdatas[ctxid]
-- * self.callback = None
-- * self.reply_userdata = None # <<<<<<<<<<<<<<
-- * self._ctx = NULL
-+ /* "vidcutter/libs/pympv/mpv.pyx":909
-+ * cdef add_string(self, mpv_render_param_type t, char *s):
-+ * cdef char *p = <char *>malloc(strlen(s) + 1)
-+ * strcpy(p, s) # <<<<<<<<<<<<<<
-+ * self.add_voidp(t, p)
- *
- */
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
-- __Pyx_DECREF(__pyx_v_self->reply_userdata);
-- __pyx_v_self->reply_userdata = Py_None;
-+ (void)(strcpy(__pyx_v_p, __pyx_v_s));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":799
-- * self.callback = None
-- * self.reply_userdata = None
-- * self._ctx = NULL # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":910
-+ * cdef char *p = <char *>malloc(strlen(s) + 1)
-+ * strcpy(p, s)
-+ * self.add_voidp(t, p) # <<<<<<<<<<<<<<
- *
-- * def opengl_cb_api(self):
-+ * def __dealloc__(self):
- */
-- __pyx_v_self->_ctx = NULL;
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":788
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":907
-+ * self.add_voidp(t, p)
- *
-- * def shutdown(self): # <<<<<<<<<<<<<<
-- * if self._ctx == NULL:
-- * return
-+ * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
-+ * cdef char *p = <char *>malloc(strlen(s) + 1)
-+ * strcpy(p, s)
- */
-
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":801
-- * self._ctx = NULL
-- *
-- * def opengl_cb_api(self): # <<<<<<<<<<<<<<
-- * cdef void *cb
-+/* "vidcutter/libs/pympv/mpv.pyx":912
-+ * self.add_voidp(t, p)
- *
-+ * def __dealloc__(self): # <<<<<<<<<<<<<<
-+ * for i, j in enumerate(self.owned):
-+ * if j:
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45opengl_cb_api(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_45opengl_cb_api(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-- PyObject *__pyx_r = 0;
-+static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
-+static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self) {
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("opengl_cb_api (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_44opengl_cb_api(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-+ __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44opengl_cb_api(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-- void *__pyx_v__ctx;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_ctx = NULL;
-- PyObject *__pyx_r = NULL;
-+static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
-+ PyObject *__pyx_v_i = NULL;
-+ PyObject *__pyx_v_j = NULL;
- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-+ PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-+ Py_ssize_t __pyx_t_3;
-+ PyObject *(*__pyx_t_4)(PyObject *);
-+ PyObject *__pyx_t_5 = NULL;
-+ int __pyx_t_6;
-+ Py_ssize_t __pyx_t_7;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("opengl_cb_api", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":804
-- * cdef void *cb
-- *
-- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB) # <<<<<<<<<<<<<<
-- * if not _ctx:
-- * raise MPVError("OpenGL API not available")
-- */
-- __pyx_v__ctx = mpv_get_sub_api(__pyx_v_self->_ctx, MPV_SUB_API_OPENGL_CB);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":805
-- *
-- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
-- * if not _ctx: # <<<<<<<<<<<<<<
-- * raise MPVError("OpenGL API not available")
-- *
-- */
-- __pyx_t_1 = ((!(__pyx_v__ctx != 0)) != 0);
-- if (unlikely(__pyx_t_1)) {
-+ __Pyx_RefNannySetupContext("__dealloc__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":806
-- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
-- * if not _ctx:
-- * raise MPVError("OpenGL API not available") # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":913
- *
-- * ctx = OpenGLContext()
-+ * def __dealloc__(self):
-+ * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
-+ * if j:
-+ * free(self.params[i].data)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 806, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_int_0);
-+ __pyx_t_1 = __pyx_int_0;
-+ if (likely(PyList_CheckExact(__pyx_v_self->owned)) || PyTuple_CheckExact(__pyx_v_self->owned)) {
-+ __pyx_t_2 = __pyx_v_self->owned; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- }
-- }
-- __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_OpenGL_API_not_available) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_OpenGL_API_not_available);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error)
-+ } else {
-+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __PYX_ERR(0, 806, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":805
-- *
-- * _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
-- * if not _ctx: # <<<<<<<<<<<<<<
-- * raise MPVError("OpenGL API not available")
-- *
-- */
-+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error)
- }
-+ for (;;) {
-+ if (likely(!__pyx_t_4)) {
-+ if (likely(PyList_CheckExact(__pyx_t_2))) {
-+ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
-+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ #else
-+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ #endif
-+ } else {
-+ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ #else
-+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ #endif
-+ }
-+ } else {
-+ __pyx_t_5 = __pyx_t_4(__pyx_t_2);
-+ if (unlikely(!__pyx_t_5)) {
-+ PyObject* exc_type = PyErr_Occurred();
-+ if (exc_type) {
-+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
-+ else __PYX_ERR(0, 913, __pyx_L1_error)
-+ }
-+ break;
-+ }
-+ __Pyx_GOTREF(__pyx_t_5);
-+ }
-+ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_5);
-+ __pyx_t_5 = 0;
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
-+ __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_DECREF(__pyx_t_1);
-+ __pyx_t_1 = __pyx_t_5;
-+ __pyx_t_5 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":808
-- * raise MPVError("OpenGL API not available")
-- *
-- * ctx = OpenGLContext() # <<<<<<<<<<<<<<
-- * ctx._ctx = <mpv_opengl_cb_context*>_ctx
-- *
-- */
-- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_OpenGLContext)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_v_ctx = ((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_t_2);
-- __pyx_t_2 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":809
-- *
-- * ctx = OpenGLContext()
-- * ctx._ctx = <mpv_opengl_cb_context*>_ctx # <<<<<<<<<<<<<<
-- *
-- * return ctx
-- */
-- __pyx_v_ctx->_ctx = ((struct mpv_opengl_cb_context *)__pyx_v__ctx);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":811
-- * ctx._ctx = <mpv_opengl_cb_context*>_ctx
-- *
-- * return ctx # <<<<<<<<<<<<<<
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":914
- * def __dealloc__(self):
-+ * for i, j in enumerate(self.owned):
-+ * if j: # <<<<<<<<<<<<<<
-+ * free(self.params[i].data)
-+ *
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
-- __pyx_r = ((PyObject *)__pyx_v_ctx);
-- goto __pyx_L0;
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 914, __pyx_L1_error)
-+ if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":801
-- * self._ctx = NULL
-- *
-- * def opengl_cb_api(self): # <<<<<<<<<<<<<<
-- * cdef void *cb
-+ /* "vidcutter/libs/pympv/mpv.pyx":915
-+ * for i, j in enumerate(self.owned):
-+ * if j:
-+ * free(self.params[i].data) # <<<<<<<<<<<<<<
- *
-+ * cdef void *get_pointer(const char *name, object obj):
- */
-+ __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
-+ free((__pyx_v_self->params[__pyx_t_7]).data);
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.opengl_cb_api", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF((PyObject *)__pyx_v_ctx);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":813
-- * return ctx
-- *
-- * def __dealloc__(self): # <<<<<<<<<<<<<<
-- * self.shutdown()
-+ /* "vidcutter/libs/pympv/mpv.pyx":914
-+ * def __dealloc__(self):
-+ * for i, j in enumerate(self.owned):
-+ * if j: # <<<<<<<<<<<<<<
-+ * free(self.params[i].data)
- *
- */
-+ }
-
--/* Python wrapper */
--static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_47__dealloc__(PyObject *__pyx_v_self); /*proto*/
--static void __pyx_pw_9vidcutter_4libs_3mpv_7Context_47__dealloc__(PyObject *__pyx_v_self) {
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-- __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
--}
--
--static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__dealloc__", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":814
-+ /* "vidcutter/libs/pympv/mpv.pyx":913
- *
- * def __dealloc__(self):
-- * self.shutdown() # <<<<<<<<<<<<<<
-- *
-- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
-+ * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
-+ * if j:
-+ * free(self.params[i].data)
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":813
-- * return ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":912
-+ * self.add_voidp(t, p)
- *
- * def __dealloc__(self): # <<<<<<<<<<<<<<
-- * self.shutdown()
-- *
-+ * for i, j in enumerate(self.owned):
-+ * if j:
- */
-
- /* function exit code */
-@@ -16122,32 +15924,34 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_46__dealloc__(struct __pyx_o
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_WriteUnraisable("vidcutter.libs.mpv.Context.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_WriteUnraisable("vidcutter.libs.mpv._RenderParams.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
- __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_i);
-+ __Pyx_XDECREF(__pyx_v_j);
- __Pyx_RefNannyFinishContext();
- }
-
- /* "(tree fragment)":1
- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling")
- * def __setstate_cython__(self, __pyx_state):
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_49__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_49__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self));
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-@@ -16158,11 +15962,11 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYT
-
- /* "(tree fragment)":2
- * def __reduce_cython__(self):
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling")
- */
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-@@ -16170,14 +15974,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYT
-
- /* "(tree fragment)":1
- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling")
- * def __setstate_cython__(self, __pyx_state):
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
-@@ -16186,25 +15990,25 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_48__reduce_cython__(CYT
-
- /* "(tree fragment)":3
- * def __reduce_cython__(self):
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling")
- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling")
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_51__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_51__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_Context *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-@@ -16214,11 +16018,11 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(C
- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-
- /* "(tree fragment)":4
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling")
- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
- */
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-@@ -16226,2675 +16030,2187 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_50__setstate_cython__(C
-
- /* "(tree fragment)":3
- * def __reduce_cython__(self):
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling")
- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling")
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":816
-- * self.shutdown()
-- *
-- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
-- * return <void *><intptr_t>(<object>ctx)(name)
-+/* "vidcutter/libs/pympv/mpv.pyx":917
-+ * free(self.params[i].data)
- *
-+ * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
-+ * cdef void *p
-+ * if PyCapsule_IsValid(obj, name):
- */
-
--static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx, char const *__pyx_v_name) {
-+static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name, PyObject *__pyx_v_obj) {
-+ void *__pyx_v_p;
- void *__pyx_r;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-+ int __pyx_t_1;
-+ void *__pyx_t_2;
-+ int __pyx_t_3;
-+ int __pyx_t_4;
- intptr_t __pyx_t_5;
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ PyObject *__pyx_t_8 = NULL;
-+ PyObject *__pyx_t_9 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- #ifdef WITH_THREAD
-- PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
-- #endif
-- __Pyx_RefNannySetupContext("_c_getprocaddress", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":817
-- *
-- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
-- * return <void *><intptr_t>(<object>ctx)(name) # <<<<<<<<<<<<<<
-- *
-- * cdef void _c_updatecb(void *ctx) with gil:
-- */
-- __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
-- __pyx_t_3 = ((PyObject *)__pyx_v_ctx); __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_r = ((void *)((intptr_t)__pyx_t_5));
-- goto __pyx_L0;
-+ __Pyx_RefNannySetupContext("get_pointer", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":816
-- * self.shutdown()
-- *
-- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
-- * return <void *><intptr_t>(<object>ctx)(name)
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":919
-+ * cdef void *get_pointer(const char *name, object obj):
-+ * cdef void *p
-+ * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
-+ * p = PyCapsule_GetPointer(obj, name)
-+ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
- */
-+ __pyx_t_1 = (PyCapsule_IsValid(__pyx_v_obj, __pyx_v_name) != 0);
-+ if (__pyx_t_1) {
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_getprocaddress", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_RefNannyFinishContext();
-- #ifdef WITH_THREAD
-- __Pyx_PyGILState_Release(__pyx_gilstate_save);
-- #endif
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":920
-+ * cdef void *p
-+ * if PyCapsule_IsValid(obj, name):
-+ * p = PyCapsule_GetPointer(obj, name) # <<<<<<<<<<<<<<
-+ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
-+ * p = <void *><intptr_t>obj
-+ */
-+ __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error)
-+ __pyx_v_p = __pyx_t_2;
-
--/* "vidcutter/libs/pympv/mpv.pyx":819
-- * return <void *><intptr_t>(<object>ctx)(name)
-- *
-- * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
-- * (<object>ctx)()
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":919
-+ * cdef void *get_pointer(const char *name, object obj):
-+ * cdef void *p
-+ * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
-+ * p = PyCapsule_GetPointer(obj, name)
-+ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
- */
-+ goto __pyx_L3;
-+ }
-
--static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- #ifdef WITH_THREAD
-- PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
-- #endif
-- __Pyx_RefNannySetupContext("_c_updatecb", 0);
-+ /* "vidcutter/libs/pympv/mpv.pyx":921
-+ * if PyCapsule_IsValid(obj, name):
-+ * p = PyCapsule_GetPointer(obj, name)
-+ * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
-+ * p = <void *><intptr_t>obj
-+ * else:
-+ */
-+ __pyx_t_3 = PyInt_Check(__pyx_v_obj);
-+ __pyx_t_4 = (__pyx_t_3 != 0);
-+ if (!__pyx_t_4) {
-+ } else {
-+ __pyx_t_1 = __pyx_t_4;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_4 = PyLong_Check(__pyx_v_obj);
-+ __pyx_t_3 = (__pyx_t_4 != 0);
-+ if (__pyx_t_3) {
-+ } else {
-+ __pyx_t_1 = __pyx_t_3;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_t_3;
-+ __pyx_L4_bool_binop_done:;
-+ if (likely(__pyx_t_1)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":820
-- *
-- * cdef void _c_updatecb(void *ctx) with gil:
-- * (<object>ctx)() # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":922
-+ * p = PyCapsule_GetPointer(obj, name)
-+ * elif isinstance(obj, int) or isinstance(obj, long) and obj:
-+ * p = <void *><intptr_t>obj # <<<<<<<<<<<<<<
-+ * else:
-+ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
-+ */
-+ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
-+ __pyx_v_p = ((void *)((intptr_t)__pyx_t_5));
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":921
-+ * if PyCapsule_IsValid(obj, name):
-+ * p = PyCapsule_GetPointer(obj, name)
-+ * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
-+ * p = <void *><intptr_t>obj
-+ * else:
-+ */
-+ goto __pyx_L3;
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":924
-+ * p = <void *><intptr_t>obj
-+ * else:
-+ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj) # <<<<<<<<<<<<<<
-+ * return p
- *
-- * cdef class OpenGLContext(object):
- */
-- __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
-- __pyx_t_2 = ((PyObject *)__pyx_v_ctx); __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-+ /*else*/ {
-+ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_8);
-+ __pyx_t_9 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
-+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
-+ if (likely(__pyx_t_9)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-+ __Pyx_INCREF(__pyx_t_9);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_7, function);
-+ }
- }
-+ __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
-+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 924, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __Pyx_Raise(__pyx_t_6, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __PYX_ERR(0, 924, __pyx_L1_error)
- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_L3:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":819
-- * return <void *><intptr_t>(<object>ctx)(name)
-- *
-- * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
-- * (<object>ctx)()
-+ /* "vidcutter/libs/pympv/mpv.pyx":925
-+ * else:
-+ * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
-+ * return p # <<<<<<<<<<<<<<
- *
-+ * @cython.internal
- */
--
-- /* function exit code */
-+ __pyx_r = __pyx_v_p;
- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_updatecb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-- __pyx_L0:;
-- __Pyx_RefNannyFinishContext();
-- #ifdef WITH_THREAD
-- __Pyx_PyGILState_Release(__pyx_gilstate_save);
-- #endif
--}
-
--/* "vidcutter/libs/pympv/mpv.pyx":828
-- * object update_cb
-+ /* "vidcutter/libs/pympv/mpv.pyx":917
-+ * free(self.params[i].data)
- *
-- * def __init__(self): # <<<<<<<<<<<<<<
-- * self.inited = False
-- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
-+ * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
-+ * cdef void *p
-+ * if PyCapsule_IsValid(obj, name):
- */
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-- if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
-- __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
-- if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
--
- /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_XDECREF(__pyx_t_8);
-+ __Pyx_XDECREF(__pyx_t_9);
-+ __Pyx_WriteUnraisable("vidcutter.libs.mpv.get_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __pyx_r = 0;
-+ __pyx_L0:;
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
-- int __pyx_r;
-+/* "vidcutter/libs/pympv/mpv.pyx":929
-+ * @cython.internal
-+ * cdef class RenderFrameInfo(object):
-+ * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
-+ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
-+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
-+ */
-+
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, struct mpv_render_frame_info *__pyx_v_info) {
-+ PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-+ int __pyx_t_2;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__init__", 0);
-+ __Pyx_RefNannySetupContext("_from_struct", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":829
-- *
-- * def __init__(self):
-- * self.inited = False # <<<<<<<<<<<<<<
-- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":930
-+ * cdef class RenderFrameInfo(object):
-+ * cdef _from_struct(self, mpv_render_frame_info *info):
-+ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT) # <<<<<<<<<<<<<<
-+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
-+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
- */
-- __pyx_v_self->inited = 0;
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":830
-- * def __init__(self):
-- * self.inited = False
-- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning) # <<<<<<<<<<<<<<
-- *
-- * def init_gl(self, exts, get_proc_address):
-+ /* "vidcutter/libs/pympv/mpv.pyx":931
-+ * cdef _from_struct(self, mpv_render_frame_info *info):
-+ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
-+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW) # <<<<<<<<<<<<<<
-+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
-+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 931, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":828
-- * object update_cb
-- *
-- * def __init__(self): # <<<<<<<<<<<<<<
-- * self.inited = False
-- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
-+ /* "vidcutter/libs/pympv/mpv.pyx":932
-+ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
-+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
-+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT) # <<<<<<<<<<<<<<
-+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
-+ * self.target_time = info[0].target_time
- */
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* function exit code */
-- __pyx_r = 0;
-- goto __pyx_L0;
-+ /* "vidcutter/libs/pympv/mpv.pyx":933
-+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
-+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
-+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC) # <<<<<<<<<<<<<<
-+ * self.target_time = info[0].target_time
-+ * return self
-+ */
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":934
-+ * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
-+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
-+ * self.target_time = info[0].target_time # <<<<<<<<<<<<<<
-+ * return self
-+ *
-+ */
-+ __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":935
-+ * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
-+ * self.target_time = info[0].target_time
-+ * return self # <<<<<<<<<<<<<<
-+ *
-+ * cdef class RenderContext(object):
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
-+ __pyx_r = ((PyObject *)__pyx_v_self);
-+ goto __pyx_L0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":929
-+ * @cython.internal
-+ * cdef class RenderFrameInfo(object):
-+ * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
-+ * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
-+ * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
-+ */
-+
-+ /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = -1;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo._from_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
- __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":832
-- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
-- *
-- * def init_gl(self, exts, get_proc_address): # <<<<<<<<<<<<<<
-- * exts = _strenc(exts) if exts is not None else None
-- * cdef char* extsc = NULL
-+/* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * cdef tuple state
-+ * cdef object _dict
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_3init_gl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_3init_gl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_exts = 0;
-- PyObject *__pyx_v_get_proc_address = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("init_gl (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exts,&__pyx_n_s_get_proc_address,0};
-- PyObject* values[2] = {0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_exts)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("init_gl", 1, 2, 2, 1); __PYX_ERR(0, 832, __pyx_L3_error)
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "init_gl") < 0)) __PYX_ERR(0, 832, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- }
-- __pyx_v_exts = values[0];
-- __pyx_v_get_proc_address = values[1];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("init_gl", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 832, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.init_gl", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_2init_gl(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), __pyx_v_exts, __pyx_v_get_proc_address);
-+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_2init_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_exts, PyObject *__pyx_v_get_proc_address) {
-- char *__pyx_v_extsc;
-- int __pyx_v_err;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self) {
-+ PyObject *__pyx_v_state = 0;
-+ PyObject *__pyx_v__dict = 0;
-+ int __pyx_v_use_setstate;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_t_2;
-- PyObject *__pyx_t_3 = NULL;
-+ int __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
-- int __pyx_t_6;
-- char *__pyx_t_7;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("init_gl", 0);
-- __Pyx_INCREF(__pyx_v_exts);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":833
-- *
-- * def init_gl(self, exts, get_proc_address):
-- * exts = _strenc(exts) if exts is not None else None # <<<<<<<<<<<<<<
-- * cdef char* extsc = NULL
-- * if exts is not None:
-- */
-- __pyx_t_2 = (__pyx_v_exts != Py_None);
-- if ((__pyx_t_2 != 0)) {
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_strenc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_4, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_exts) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_exts);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __pyx_t_1 = __pyx_t_3;
-- __pyx_t_3 = 0;
-- } else {
-- __Pyx_INCREF(Py_None);
-- __pyx_t_1 = Py_None;
-- }
-- __Pyx_DECREF_SET(__pyx_v_exts, __pyx_t_1);
-- __pyx_t_1 = 0;
-+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":834
-- * def init_gl(self, exts, get_proc_address):
-- * exts = _strenc(exts) if exts is not None else None
-- * cdef char* extsc = NULL # <<<<<<<<<<<<<<
-- * if exts is not None:
-- * extsc = exts
-+ /* "(tree fragment)":5
-+ * cdef object _dict
-+ * cdef bint use_setstate
-+ * state = () # <<<<<<<<<<<<<<
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None:
- */
-- __pyx_v_extsc = NULL;
-+ __Pyx_INCREF(__pyx_empty_tuple);
-+ __pyx_v_state = __pyx_empty_tuple;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":835
-- * exts = _strenc(exts) if exts is not None else None
-- * cdef char* extsc = NULL
-- * if exts is not None: # <<<<<<<<<<<<<<
-- * extsc = exts
-- * with nogil:
-+ /* "(tree fragment)":6
-+ * cdef bint use_setstate
-+ * state = ()
-+ * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
-+ * if _dict is not None:
-+ * state += (_dict,)
- */
-- __pyx_t_2 = (__pyx_v_exts != Py_None);
-- __pyx_t_6 = (__pyx_t_2 != 0);
-- if (__pyx_t_6) {
-+ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_v__dict = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":836
-- * cdef char* extsc = NULL
-- * if exts is not None:
-- * extsc = exts # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
-+ /* "(tree fragment)":7
-+ * state = ()
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None: # <<<<<<<<<<<<<<
-+ * state += (_dict,)
-+ * use_setstate = True
- */
-- __pyx_t_7 = __Pyx_PyObject_AsWritableString(__pyx_v_exts); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 836, __pyx_L1_error)
-- __pyx_v_extsc = __pyx_t_7;
-+ __pyx_t_2 = (__pyx_v__dict != Py_None);
-+ __pyx_t_3 = (__pyx_t_2 != 0);
-+ if (__pyx_t_3) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":835
-- * exts = _strenc(exts) if exts is not None else None
-- * cdef char* extsc = NULL
-- * if exts is not None: # <<<<<<<<<<<<<<
-- * extsc = exts
-- * with nogil:
-+ /* "(tree fragment)":8
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None:
-+ * state += (_dict,) # <<<<<<<<<<<<<<
-+ * use_setstate = True
-+ * else:
- */
-- }
-+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_INCREF(__pyx_v__dict);
-+ __Pyx_GIVEREF(__pyx_v__dict);
-+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
-+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
-+ __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":837
-- * if exts is not None:
-- * extsc = exts
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
-- * <void *>get_proc_address)
-+ /* "(tree fragment)":9
-+ * if _dict is not None:
-+ * state += (_dict,)
-+ * use_setstate = True # <<<<<<<<<<<<<<
-+ * else:
-+ * use_setstate = False
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_v_use_setstate = 1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":838
-- * extsc = exts
-- * with nogil:
-- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress, # <<<<<<<<<<<<<<
-- * <void *>get_proc_address)
-- * if err < 0:
-+ /* "(tree fragment)":7
-+ * state = ()
-+ * _dict = getattr(self, '__dict__', None)
-+ * if _dict is not None: # <<<<<<<<<<<<<<
-+ * state += (_dict,)
-+ * use_setstate = True
- */
-- __pyx_v_err = mpv_opengl_cb_init_gl(__pyx_v_self->_ctx, __pyx_v_extsc, (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress), ((void *)__pyx_v_get_proc_address));
-- }
-+ goto __pyx_L3;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":837
-- * if exts is not None:
-- * extsc = exts
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
-- * <void *>get_proc_address)
-+ /* "(tree fragment)":11
-+ * use_setstate = True
-+ * else:
-+ * use_setstate = False # <<<<<<<<<<<<<<
-+ * if use_setstate:
-+ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L6;
-- }
-- __pyx_L6:;
-- }
-+ /*else*/ {
-+ __pyx_v_use_setstate = 0;
- }
-+ __pyx_L3:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":840
-- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
-- * <void *>get_proc_address)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-- *
-+ /* "(tree fragment)":12
-+ * else:
-+ * use_setstate = False
-+ * if use_setstate: # <<<<<<<<<<<<<<
-+ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
-+ * else:
- */
-- __pyx_t_6 = ((__pyx_v_err < 0) != 0);
-- if (unlikely(__pyx_t_6)) {
-+ __pyx_t_3 = (__pyx_v_use_setstate != 0);
-+ if (__pyx_t_3) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":841
-- * <void *>get_proc_address)
-- * if err < 0:
-- * raise MPVError(err) # <<<<<<<<<<<<<<
-- *
-- * self.inited = True
-+ /* "(tree fragment)":13
-+ * use_setstate = False
-+ * if use_setstate:
-+ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<<
-+ * else:
-+ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
-+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(0, 841, __pyx_L1_error)
-+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_INCREF(__pyx_int_222419149);
-+ __Pyx_GIVEREF(__pyx_int_222419149);
-+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
-+ __Pyx_INCREF(Py_None);
-+ __Pyx_GIVEREF(Py_None);
-+ PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
-+ __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_GIVEREF(__pyx_t_4);
-+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
-+ __Pyx_INCREF(__pyx_v_state);
-+ __Pyx_GIVEREF(__pyx_v_state);
-+ PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
-+ __pyx_t_4 = 0;
-+ __pyx_t_1 = 0;
-+ __pyx_r = __pyx_t_5;
-+ __pyx_t_5 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":840
-- * err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
-- * <void *>get_proc_address)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-- *
-+ /* "(tree fragment)":12
-+ * else:
-+ * use_setstate = False
-+ * if use_setstate: # <<<<<<<<<<<<<<
-+ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
-+ * else:
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":843
-- * raise MPVError(err)
-- *
-- * self.inited = True # <<<<<<<<<<<<<<
-- *
-- * def set_update_callback(self, cb):
-+ /* "(tree fragment)":15
-+ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
-+ * else:
-+ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<<
-+ * def __setstate_cython__(self, __pyx_state):
-+ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
- */
-- __pyx_v_self->inited = 1;
-+ /*else*/ {
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-+ __Pyx_INCREF(__pyx_int_222419149);
-+ __Pyx_GIVEREF(__pyx_int_222419149);
-+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
-+ __Pyx_INCREF(__pyx_v_state);
-+ __Pyx_GIVEREF(__pyx_v_state);
-+ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
-+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_GIVEREF(__pyx_t_5);
-+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
-+ __pyx_t_5 = 0;
-+ __pyx_t_1 = 0;
-+ __pyx_r = __pyx_t_4;
-+ __pyx_t_4 = 0;
-+ goto __pyx_L0;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":832
-- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
-- *
-- * def init_gl(self, exts, get_proc_address): # <<<<<<<<<<<<<<
-- * exts = _strenc(exts) if exts is not None else None
-- * cdef char* extsc = NULL
-+ /* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * cdef tuple state
-+ * cdef object _dict
- */
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.init_gl", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_exts);
-+ __Pyx_XDECREF(__pyx_v_state);
-+ __Pyx_XDECREF(__pyx_v__dict);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":845
-- * self.inited = True
-- *
-- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
-- * self.update_cb = cb
-- * with nogil:
-+/* "(tree fragment)":16
-+ * else:
-+ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_5set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_5set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("set_update_callback (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_4set_update_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), ((PyObject *)__pyx_v_cb));
-+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_4set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_cb) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("set_update_callback", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":846
-- *
-- * def set_update_callback(self, cb):
-- * self.update_cb = cb # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-- */
-- __Pyx_INCREF(__pyx_v_cb);
-- __Pyx_GIVEREF(__pyx_v_cb);
-- __Pyx_GOTREF(__pyx_v_self->update_cb);
-- __Pyx_DECREF(__pyx_v_self->update_cb);
-- __pyx_v_self->update_cb = __pyx_v_cb;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":847
-- * def set_update_callback(self, cb):
-- * self.update_cb = cb
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-- *
-- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":848
-- * self.update_cb = cb
-- * with nogil:
-- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
-- *
-- * def draw(self, fbo, w, h):
-- */
-- mpv_opengl_cb_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
-- }
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":847
-- * def set_update_callback(self, cb):
-- * self.update_cb = cb
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-- *
-+ /* "(tree fragment)":17
-+ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
-+ * def __setstate_cython__(self, __pyx_state):
-+ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-- }
-+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":845
-- * self.inited = True
-- *
-- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
-- * self.update_cb = cb
-- * with nogil:
-+ /* "(tree fragment)":16
-+ * else:
-+ * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
- */
-
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":850
-- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-+/* "vidcutter/libs/pympv/mpv.pyx":950
-+ * bint inited
- *
-- * def draw(self, fbo, w, h): # <<<<<<<<<<<<<<
-- * cdef:
-- * int fboc = fbo
-+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
-+ * api_type,
-+ * opengl_init_params=None,
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_7draw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_7draw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_fbo = 0;
-- PyObject *__pyx_v_w = 0;
-- PyObject *__pyx_v_h = 0;
-+static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_mpv = 0;
-+ PyObject *__pyx_v_api_type = 0;
-+ PyObject *__pyx_v_opengl_init_params = 0;
-+ PyObject *__pyx_v_advanced_control = 0;
-+ PyObject *__pyx_v_x11_display = 0;
-+ PyObject *__pyx_v_wl_display = 0;
-+ PyObject *__pyx_v_drm_display = 0;
-+ PyObject *__pyx_v_drm_osd_size = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- PyObject *__pyx_r = 0;
-+ int __pyx_r;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("draw (wrapper)", 0);
-+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fbo,&__pyx_n_s_w,&__pyx_n_s_h,0};
-- PyObject* values[3] = {0,0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fbo)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("draw", 1, 3, 3, 1); __PYX_ERR(0, 850, __pyx_L3_error)
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("draw", 1, 3, 3, 2); __PYX_ERR(0, 850, __pyx_L3_error)
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 850, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- }
-- __pyx_v_fbo = values[0];
-- __pyx_v_w = values[1];
-- __pyx_v_h = values[2];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("draw", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 850, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_6draw(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), __pyx_v_fbo, __pyx_v_w, __pyx_v_h);
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_api_type,&__pyx_n_s_opengl_init_params,&__pyx_n_s_advanced_control,&__pyx_n_s_x11_display,&__pyx_n_s_wl_display,&__pyx_n_s_drm_display,&__pyx_n_s_drm_osd_size,0};
-+ PyObject* values[8] = {0,0,0,0,0,0,0,0};
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_6draw(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_fbo, PyObject *__pyx_v_w, PyObject *__pyx_v_h) {
-- int __pyx_v_fboc;
-- int __pyx_v_wc;
-- int __pyx_v_hc;
-- int __pyx_v_err;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- int __pyx_t_2;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- PyObject *__pyx_t_6 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("draw", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":852
-- * def draw(self, fbo, w, h):
-- * cdef:
-- * int fboc = fbo # <<<<<<<<<<<<<<
-- * int wc = w
-- * int hc = h
-+ /* "vidcutter/libs/pympv/mpv.pyx":952
-+ * def __init__(self, mpv,
-+ * api_type,
-+ * opengl_init_params=None, # <<<<<<<<<<<<<<
-+ * advanced_control=False,
-+ * x11_display=None,
- */
-- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_fbo); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L1_error)
-- __pyx_v_fboc = __pyx_t_1;
-+ values[2] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":853
-- * cdef:
-- * int fboc = fbo
-- * int wc = w # <<<<<<<<<<<<<<
-- * int hc = h
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":953
-+ * api_type,
-+ * opengl_init_params=None,
-+ * advanced_control=False, # <<<<<<<<<<<<<<
-+ * x11_display=None,
-+ * wl_display=None,
- */
-- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_w); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 853, __pyx_L1_error)
-- __pyx_v_wc = __pyx_t_1;
-+ values[3] = ((PyObject *)Py_False);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":854
-- * int fboc = fbo
-- * int wc = w
-- * int hc = h # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
-+ /* "vidcutter/libs/pympv/mpv.pyx":954
-+ * opengl_init_params=None,
-+ * advanced_control=False,
-+ * x11_display=None, # <<<<<<<<<<<<<<
-+ * wl_display=None,
-+ * drm_display=None,
- */
-- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_h); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L1_error)
-- __pyx_v_hc = __pyx_t_1;
-+ values[4] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":855
-- * int wc = w
-- * int hc = h
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
-- * if err < 0:
-+ /* "vidcutter/libs/pympv/mpv.pyx":955
-+ * advanced_control=False,
-+ * x11_display=None,
-+ * wl_display=None, # <<<<<<<<<<<<<<
-+ * drm_display=None,
-+ * drm_osd_size=None
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ values[5] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":856
-- * int hc = h
-- * with nogil:
-- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc) # <<<<<<<<<<<<<<
-- * if err < 0:
-- * raise MPVError(err)
-+ /* "vidcutter/libs/pympv/mpv.pyx":956
-+ * x11_display=None,
-+ * wl_display=None,
-+ * drm_display=None, # <<<<<<<<<<<<<<
-+ * drm_osd_size=None
-+ * ):
- */
-- __pyx_v_err = mpv_opengl_cb_draw(__pyx_v_self->_ctx, __pyx_v_fboc, __pyx_v_wc, __pyx_v_hc);
-- }
-+ values[6] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":855
-- * int wc = w
-- * int hc = h
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
-- * if err < 0:
-+ /* "vidcutter/libs/pympv/mpv.pyx":957
-+ * wl_display=None,
-+ * drm_display=None,
-+ * drm_osd_size=None # <<<<<<<<<<<<<<
-+ * ):
-+ *
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-+ values[7] = ((PyObject *)Py_None);
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
-+ CYTHON_FALLTHROUGH;
-+ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
-+ CYTHON_FALLTHROUGH;
-+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
-+ CYTHON_FALLTHROUGH;
-+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-+ CYTHON_FALLTHROUGH;
-+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-+ CYTHON_FALLTHROUGH;
-+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ CYTHON_FALLTHROUGH;
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_api_type)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 950, __pyx_L3_error)
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 2:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_init_params);
-+ if (value) { values[2] = value; kw_args--; }
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 3:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advanced_control);
-+ if (value) { values[3] = value; kw_args--; }
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 4:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x11_display);
-+ if (value) { values[4] = value; kw_args--; }
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 5:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wl_display);
-+ if (value) { values[5] = value; kw_args--; }
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 6:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_display);
-+ if (value) { values[6] = value; kw_args--; }
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 7:
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_osd_size);
-+ if (value) { values[7] = value; kw_args--; }
- }
-- __pyx_L5:;
- }
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":857
-- * with nogil:
-- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-- *
-- */
-- __pyx_t_2 = ((__pyx_v_err < 0) != 0);
-- if (unlikely(__pyx_t_2)) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":858
-- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
-- * if err < 0:
-- * raise MPVError(err) # <<<<<<<<<<<<<<
-- *
-- * def report_flip(self, time):
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 858, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __pyx_t_6 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
-- if (likely(__pyx_t_6)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-- __Pyx_INCREF(__pyx_t_6);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_4, function);
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 950, __pyx_L3_error)
-+ }
-+ } else {
-+ switch (PyTuple_GET_SIZE(__pyx_args)) {
-+ case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
-+ CYTHON_FALLTHROUGH;
-+ case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
-+ CYTHON_FALLTHROUGH;
-+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
-+ CYTHON_FALLTHROUGH;
-+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-+ CYTHON_FALLTHROUGH;
-+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-+ CYTHON_FALLTHROUGH;
-+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ CYTHON_FALLTHROUGH;
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ break;
-+ default: goto __pyx_L5_argtuple_error;
- }
- }
-- __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 858, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __PYX_ERR(0, 858, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":857
-- * with nogil:
-- * err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-- *
-- */
-+ __pyx_v_mpv = values[0];
-+ __pyx_v_api_type = values[1];
-+ __pyx_v_opengl_init_params = values[2];
-+ __pyx_v_advanced_control = values[3];
-+ __pyx_v_x11_display = values[4];
-+ __pyx_v_wl_display = values[5];
-+ __pyx_v_drm_display = values[6];
-+ __pyx_v_drm_osd_size = values[7];
- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":850
-- * mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-- *
-- * def draw(self, fbo, w, h): # <<<<<<<<<<<<<<
-- * cdef:
-- * int fboc = fbo
-- */
--
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.draw", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 950, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ return -1;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_api_type, __pyx_v_opengl_init_params, __pyx_v_advanced_control, __pyx_v_x11_display, __pyx_v_wl_display, __pyx_v_drm_display, __pyx_v_drm_osd_size);
-
--/* "vidcutter/libs/pympv/mpv.pyx":860
-- * raise MPVError(err)
-+ /* "vidcutter/libs/pympv/mpv.pyx":950
-+ * bint inited
- *
-- * def report_flip(self, time): # <<<<<<<<<<<<<<
-- * cdef int64_t ctime = time
-- * with nogil:
-+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
-+ * api_type,
-+ * opengl_init_params=None,
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_9report_flip(PyObject *__pyx_v_self, PyObject *__pyx_v_time); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_9report_flip(PyObject *__pyx_v_self, PyObject *__pyx_v_time) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("report_flip (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_8report_flip(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), ((PyObject *)__pyx_v_time));
--
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_8report_flip(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, PyObject *__pyx_v_time) {
-- int64_t __pyx_v_ctime;
-- int __pyx_v_err;
-- PyObject *__pyx_r = NULL;
-+static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_api_type, PyObject *__pyx_v_opengl_init_params, PyObject *__pyx_v_advanced_control, PyObject *__pyx_v_x11_display, PyObject *__pyx_v_wl_display, PyObject *__pyx_v_drm_display, PyObject *__pyx_v_drm_osd_size) {
-+ struct mpv_opengl_init_params __pyx_v_gl_params;
-+ struct mpv_opengl_drm_params __pyx_v_drm_params;
-+ struct mpv_opengl_drm_osd_size __pyx_v__drm_osd_size;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_params = NULL;
-+ PyObject *__pyx_v_arp = NULL;
-+ int __pyx_v_err;
-+ int __pyx_r;
- __Pyx_RefNannyDeclarations
-- int64_t __pyx_t_1;
-- int __pyx_t_2;
-- PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ int __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
-- PyObject *__pyx_t_6 = NULL;
-+ int __pyx_t_6;
-+ int __pyx_t_7;
-+ char const *__pyx_t_8;
-+ PyObject *(*__pyx_t_9)(PyObject *);
-+ int __pyx_t_10;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("report_flip", 0);
-+ __Pyx_RefNannySetupContext("__init__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":861
-+ /* "vidcutter/libs/pympv/mpv.pyx":965
-+ * mpv_opengl_drm_osd_size _drm_osd_size
- *
-- * def report_flip(self, time):
-- * cdef int64_t ctime = time # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
-+ * self._mpv = mpv # <<<<<<<<<<<<<<
-+ *
-+ * memset(&gl_params, 0, sizeof(gl_params))
- */
-- __pyx_t_1 = __Pyx_PyInt_As_int64_t(__pyx_v_time); if (unlikely((__pyx_t_1 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 861, __pyx_L1_error)
-- __pyx_v_ctime = __pyx_t_1;
-+ if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 965, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_v_mpv;
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v_self->_mpv);
-+ __Pyx_DECREF(((PyObject *)__pyx_v_self->_mpv));
-+ __pyx_v_self->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_t_1);
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":862
-- * def report_flip(self, time):
-- * cdef int64_t ctime = time
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
-- * if err < 0:
-+ /* "vidcutter/libs/pympv/mpv.pyx":967
-+ * self._mpv = mpv
-+ *
-+ * memset(&gl_params, 0, sizeof(gl_params)) # <<<<<<<<<<<<<<
-+ * memset(&drm_params, 0, sizeof(drm_params))
-+ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ (void)(memset((&__pyx_v_gl_params), 0, (sizeof(__pyx_v_gl_params))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":863
-- * cdef int64_t ctime = time
-- * with nogil:
-- * err = mpv_opengl_cb_report_flip(self._ctx, ctime) # <<<<<<<<<<<<<<
-- * if err < 0:
-- * raise MPVError(err)
-+ /* "vidcutter/libs/pympv/mpv.pyx":968
-+ *
-+ * memset(&gl_params, 0, sizeof(gl_params))
-+ * memset(&drm_params, 0, sizeof(drm_params)) # <<<<<<<<<<<<<<
-+ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
-+ *
- */
-- __pyx_v_err = mpv_opengl_cb_report_flip(__pyx_v_self->_ctx, __pyx_v_ctime);
-- }
-+ (void)(memset((&__pyx_v_drm_params), 0, (sizeof(__pyx_v_drm_params))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":862
-- * def report_flip(self, time):
-- * cdef int64_t ctime = time
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
-- * if err < 0:
-+ /* "vidcutter/libs/pympv/mpv.pyx":969
-+ * memset(&gl_params, 0, sizeof(gl_params))
-+ * memset(&drm_params, 0, sizeof(drm_params))
-+ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size)) # <<<<<<<<<<<<<<
-+ *
-+ * params = _RenderParams()
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-- }
-+ (void)(memset((&__pyx_v__drm_osd_size), 0, (sizeof(__pyx_v__drm_osd_size))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":864
-- * with nogil:
-- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-+ /* "vidcutter/libs/pympv/mpv.pyx":971
-+ * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
-+ *
-+ * params = _RenderParams() # <<<<<<<<<<<<<<
- *
-+ * if api_type == self.API_OPENGL:
- */
-- __pyx_t_2 = ((__pyx_v_err < 0) != 0);
-- if (unlikely(__pyx_t_2)) {
-+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":865
-- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
-- * if err < 0:
-- * raise MPVError(err) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":973
-+ * params = _RenderParams()
-+ *
-+ * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
-+ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
-+ * else:
-+ */
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (likely(__pyx_t_3)) {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":974
-+ *
-+ * if api_type == self.API_OPENGL:
-+ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL) # <<<<<<<<<<<<<<
-+ * else:
-+ * raise PyMPVError("Unknown api_type %r" % api_type)
-+ */
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":973
-+ * params = _RenderParams()
-+ *
-+ * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
-+ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
-+ * else:
-+ */
-+ goto __pyx_L3;
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":976
-+ * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
-+ * else:
-+ * raise PyMPVError("Unknown api_type %r" % api_type) # <<<<<<<<<<<<<<
- *
-- * def uninit_gl(self):
-+ * if opengl_init_params is not None:
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L1_error)
-+ /*else*/ {
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 865, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __pyx_t_6 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
-- if (likely(__pyx_t_6)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-- __Pyx_INCREF(__pyx_t_6);
-+ __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
-+ __Pyx_INCREF(__pyx_t_5);
- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_4, function);
-+ __Pyx_DECREF_SET(__pyx_t_1, function);
- }
- }
-- __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __PYX_ERR(0, 865, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __PYX_ERR(0, 976, __pyx_L1_error)
-+ }
-+ __pyx_L3:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":864
-- * with nogil:
-- * err = mpv_opengl_cb_report_flip(self._ctx, ctime)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-+ /* "vidcutter/libs/pympv/mpv.pyx":978
-+ * raise PyMPVError("Unknown api_type %r" % api_type)
- *
-+ * if opengl_init_params is not None: # <<<<<<<<<<<<<<
-+ * self._get_proc_address = opengl_init_params["get_proc_address"]
-+ * gl_params.get_proc_address = &_c_getprocaddress
- */
-- }
-+ __pyx_t_3 = (__pyx_v_opengl_init_params != Py_None);
-+ __pyx_t_6 = (__pyx_t_3 != 0);
-+ if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":860
-- * raise MPVError(err)
-+ /* "vidcutter/libs/pympv/mpv.pyx":979
- *
-- * def report_flip(self, time): # <<<<<<<<<<<<<<
-- * cdef int64_t ctime = time
-- * with nogil:
-+ * if opengl_init_params is not None:
-+ * self._get_proc_address = opengl_init_params["get_proc_address"] # <<<<<<<<<<<<<<
-+ * gl_params.get_proc_address = &_c_getprocaddress
-+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
- */
-+ __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_GIVEREF(__pyx_t_2);
-+ __Pyx_GOTREF(__pyx_v_self->_get_proc_address);
-+ __Pyx_DECREF(__pyx_v_self->_get_proc_address);
-+ __pyx_v_self->_get_proc_address = __pyx_t_2;
-+ __pyx_t_2 = 0;
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.report_flip", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":980
-+ * if opengl_init_params is not None:
-+ * self._get_proc_address = opengl_init_params["get_proc_address"]
-+ * gl_params.get_proc_address = &_c_getprocaddress # <<<<<<<<<<<<<<
-+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
-+ */
-+ __pyx_v_gl_params.get_proc_address = (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress);
-
--/* "vidcutter/libs/pympv/mpv.pyx":867
-- * raise MPVError(err)
-- *
-- * def uninit_gl(self): # <<<<<<<<<<<<<<
-- * if not self.inited:
-- * return
-+ /* "vidcutter/libs/pympv/mpv.pyx":981
-+ * self._get_proc_address = opengl_init_params["get_proc_address"]
-+ * gl_params.get_proc_address = &_c_getprocaddress
-+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address # <<<<<<<<<<<<<<
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
-+ * if advanced_control:
- */
-+ __pyx_v_gl_params.get_proc_address_ctx = ((void *)__pyx_v_self->_get_proc_address);
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_11uninit_gl(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_11uninit_gl(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("uninit_gl (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_10uninit_gl(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
-+ /* "vidcutter/libs/pympv/mpv.pyx":982
-+ * gl_params.get_proc_address = &_c_getprocaddress
-+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params) # <<<<<<<<<<<<<<
-+ * if advanced_control:
-+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-+ */
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":978
-+ * raise PyMPVError("Unknown api_type %r" % api_type)
-+ *
-+ * if opengl_init_params is not None: # <<<<<<<<<<<<<<
-+ * self._get_proc_address = opengl_init_params["get_proc_address"]
-+ * gl_params.get_proc_address = &_c_getprocaddress
-+ */
-+ }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_10uninit_gl(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
-- int __pyx_v_err;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("uninit_gl", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":868
-- *
-- * def uninit_gl(self):
-- * if not self.inited: # <<<<<<<<<<<<<<
-- * return
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":983
-+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
-+ * if advanced_control: # <<<<<<<<<<<<<<
-+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-+ * if x11_display:
- */
-- __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
-- if (__pyx_t_1) {
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 983, __pyx_L1_error)
-+ if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":869
-- * def uninit_gl(self):
-- * if not self.inited:
-- * return # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_opengl_cb_uninit_gl(self._ctx)
-+ /* "vidcutter/libs/pympv/mpv.pyx":984
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
-+ * if advanced_control:
-+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1) # <<<<<<<<<<<<<<
-+ * if x11_display:
-+ * self._x11_display = x11_display
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":868
-- *
-- * def uninit_gl(self):
-- * if not self.inited: # <<<<<<<<<<<<<<
-- * return
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":983
-+ * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
-+ * if advanced_control: # <<<<<<<<<<<<<<
-+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-+ * if x11_display:
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":870
-- * if not self.inited:
-- * return
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_opengl_cb_uninit_gl(self._ctx)
-- * if err < 0:
-+ /* "vidcutter/libs/pympv/mpv.pyx":985
-+ * if advanced_control:
-+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-+ * if x11_display: # <<<<<<<<<<<<<<
-+ * self._x11_display = x11_display
-+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
-+ if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":871
-- * return
-- * with nogil:
-- * err = mpv_opengl_cb_uninit_gl(self._ctx) # <<<<<<<<<<<<<<
-- * if err < 0:
-- * raise MPVError(err)
-+ /* "vidcutter/libs/pympv/mpv.pyx":986
-+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-+ * if x11_display:
-+ * self._x11_display = x11_display # <<<<<<<<<<<<<<
-+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
-+ * if wl_display:
- */
-- __pyx_v_err = mpv_opengl_cb_uninit_gl(__pyx_v_self->_ctx);
-- }
-+ __Pyx_INCREF(__pyx_v_x11_display);
-+ __Pyx_GIVEREF(__pyx_v_x11_display);
-+ __Pyx_GOTREF(__pyx_v_self->_x11_display);
-+ __Pyx_DECREF(__pyx_v_self->_x11_display);
-+ __pyx_v_self->_x11_display = __pyx_v_x11_display;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":870
-- * if not self.inited:
-- * return
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_opengl_cb_uninit_gl(self._ctx)
-- * if err < 0:
-+ /* "vidcutter/libs/pympv/mpv.pyx":987
-+ * if x11_display:
-+ * self._x11_display = x11_display
-+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display)) # <<<<<<<<<<<<<<
-+ * if wl_display:
-+ * self._wl_display = wl_display
-+ */
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":985
-+ * if advanced_control:
-+ * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-+ * if x11_display: # <<<<<<<<<<<<<<
-+ * self._x11_display = x11_display
-+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L6;
-- }
-- __pyx_L6:;
-- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":872
-- * with nogil:
-- * err = mpv_opengl_cb_uninit_gl(self._ctx)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-- * self.inited = False
-+ /* "vidcutter/libs/pympv/mpv.pyx":988
-+ * self._x11_display = x11_display
-+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
-+ * if wl_display: # <<<<<<<<<<<<<<
-+ * self._wl_display = wl_display
-+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
- */
-- __pyx_t_1 = ((__pyx_v_err < 0) != 0);
-- if (unlikely(__pyx_t_1)) {
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
-+ if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":873
-- * err = mpv_opengl_cb_uninit_gl(self._ctx)
-- * if err < 0:
-- * raise MPVError(err) # <<<<<<<<<<<<<<
-- * self.inited = False
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":989
-+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
-+ * if wl_display:
-+ * self._wl_display = wl_display # <<<<<<<<<<<<<<
-+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-+ * if drm_display:
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 873, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- }
-- }
-- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error)
-+ __Pyx_INCREF(__pyx_v_wl_display);
-+ __Pyx_GIVEREF(__pyx_v_wl_display);
-+ __Pyx_GOTREF(__pyx_v_self->_wl_display);
-+ __Pyx_DECREF(__pyx_v_self->_wl_display);
-+ __pyx_v_self->_wl_display = __pyx_v_wl_display;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":990
-+ * if wl_display:
-+ * self._wl_display = wl_display
-+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display)) # <<<<<<<<<<<<<<
-+ * if drm_display:
-+ * drm_params.fd = drm_display.get("fd", -1)
-+ */
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __PYX_ERR(0, 873, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":872
-- * with nogil:
-- * err = mpv_opengl_cb_uninit_gl(self._ctx)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-- * self.inited = False
-+ /* "vidcutter/libs/pympv/mpv.pyx":988
-+ * self._x11_display = x11_display
-+ * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
-+ * if wl_display: # <<<<<<<<<<<<<<
-+ * self._wl_display = wl_display
-+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":874
-- * if err < 0:
-- * raise MPVError(err)
-- * self.inited = False # <<<<<<<<<<<<<<
-- *
-- * def __dealloc__(self):
-+ /* "vidcutter/libs/pympv/mpv.pyx":991
-+ * self._wl_display = wl_display
-+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-+ * if drm_display: # <<<<<<<<<<<<<<
-+ * drm_params.fd = drm_display.get("fd", -1)
-+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
- */
-- __pyx_v_self->inited = 0;
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 991, __pyx_L1_error)
-+ if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":867
-- * raise MPVError(err)
-- *
-- * def uninit_gl(self): # <<<<<<<<<<<<<<
-- * if not self.inited:
-- * return
-+ /* "vidcutter/libs/pympv/mpv.pyx":992
-+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-+ * if drm_display:
-+ * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
-+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-+ * drm_params.connector_id = drm_display.get("connector_id", -1)
- */
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v_drm_params.fd = __pyx_t_7;
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.uninit_gl", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":876
-- * self.inited = False
-- *
-- * def __dealloc__(self): # <<<<<<<<<<<<<<
-- * self.uninit_gl()
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":993
-+ * if drm_display:
-+ * drm_params.fd = drm_display.get("fd", -1)
-+ * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
-+ * drm_params.connector_id = drm_display.get("connector_id", -1)
-+ * arp = drm_display.get("atomic_request_ptr", None)
- */
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 993, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v_drm_params.crtc_id = __pyx_t_7;
-
--/* Python wrapper */
--static void __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_13__dealloc__(PyObject *__pyx_v_self); /*proto*/
--static void __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_13__dealloc__(PyObject *__pyx_v_self) {
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-- __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_12__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
--}
--
--static void __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_12__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__dealloc__", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":877
-- *
-- * def __dealloc__(self):
-- * self.uninit_gl() # <<<<<<<<<<<<<<
-- *
-- * DEF MAX_RENDER_PARAMS = 32
-+ /* "vidcutter/libs/pympv/mpv.pyx":994
-+ * drm_params.fd = drm_display.get("fd", -1)
-+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-+ * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
-+ * arp = drm_display.get("atomic_request_ptr", None)
-+ * if arp is not None:
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_uninit_gl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v_drm_params.connector_id = __pyx_t_7;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":876
-- * self.inited = False
-- *
-- * def __dealloc__(self): # <<<<<<<<<<<<<<
-- * self.uninit_gl()
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":995
-+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-+ * drm_params.connector_id = drm_display.get("connector_id", -1)
-+ * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
-+ * if arp is not None:
-+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
- */
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v_arp = __pyx_t_2;
-+ __pyx_t_2 = 0;
-
-- /* function exit code */
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_WriteUnraisable("vidcutter.libs.mpv.OpenGLContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-- __pyx_L0:;
-- __Pyx_RefNannyFinishContext();
--}
--
--/* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-+ /* "vidcutter/libs/pympv/mpv.pyx":996
-+ * drm_params.connector_id = drm_display.get("connector_id", -1)
-+ * arp = drm_display.get("atomic_request_ptr", None)
-+ * if arp is not None: # <<<<<<<<<<<<<<
-+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-+ * drm_params.render_fd = drm_display.get("render_fd", -1)
- */
-+ __pyx_t_6 = (__pyx_v_arp != Py_None);
-+ __pyx_t_3 = (__pyx_t_6 != 0);
-+ if (__pyx_t_3) {
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_14__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
--
-- /* "(tree fragment)":2
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ /* "vidcutter/libs/pympv/mpv.pyx":997
-+ * arp = drm_display.get("atomic_request_ptr", None)
-+ * if arp is not None:
-+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*") # <<<<<<<<<<<<<<
-+ * drm_params.render_fd = drm_display.get("render_fd", -1)
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
- */
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(1, 2, __pyx_L1_error)
-+ __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L1_error)
-+ __pyx_v_drm_params.atomic_request_ptr = ((struct _drmModeAtomicReq **)__pyx_f_9vidcutter_4libs_3mpv_get_pointer(__pyx_t_8, __pyx_kp_s_drmModeAtomicReq));
-
-- /* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-+ /* "vidcutter/libs/pympv/mpv.pyx":996
-+ * drm_params.connector_id = drm_display.get("connector_id", -1)
-+ * arp = drm_display.get("atomic_request_ptr", None)
-+ * if arp is not None: # <<<<<<<<<<<<<<
-+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-+ * drm_params.render_fd = drm_display.get("render_fd", -1)
- */
-+ }
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "(tree fragment)":3
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ /* "vidcutter/libs/pympv/mpv.pyx":998
-+ * if arp is not None:
-+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-+ * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
-+ * if drm_osd_size:
- */
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v_drm_params.render_fd = __pyx_t_7;
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_16__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13OpenGLContext_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
--
-- /* "(tree fragment)":4
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":999
-+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-+ * drm_params.render_fd = drm_display.get("render_fd", -1)
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params) # <<<<<<<<<<<<<<
-+ * if drm_osd_size:
-+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
- */
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(1, 4, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "(tree fragment)":3
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ /* "vidcutter/libs/pympv/mpv.pyx":991
-+ * self._wl_display = wl_display
-+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-+ * if drm_display: # <<<<<<<<<<<<<<
-+ * drm_params.fd = drm_display.get("fd", -1)
-+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
- */
-+ }
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":886
-- * object owned
-- *
-- * def __init__(self): # <<<<<<<<<<<<<<
-- * self.owned = []
-- * self.params[0].type = MPV_RENDER_PARAM_INVALID
-+ /* "vidcutter/libs/pympv/mpv.pyx":1000
-+ * drm_params.render_fd = drm_display.get("render_fd", -1)
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
-+ * if drm_osd_size: # <<<<<<<<<<<<<<
-+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
- */
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1000, __pyx_L1_error)
-+ if (__pyx_t_3) {
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-- if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
-- __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
-- if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__init__", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":887
-- *
-- * def __init__(self):
-- * self.owned = [] # <<<<<<<<<<<<<<
-- * self.params[0].type = MPV_RENDER_PARAM_INVALID
-+ /* "vidcutter/libs/pympv/mpv.pyx":1001
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
-+ * if drm_osd_size:
-+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size # <<<<<<<<<<<<<<
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
- *
- */
-- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->owned);
-- __Pyx_DECREF(__pyx_v_self->owned);
-- __pyx_v_self->owned = __pyx_t_1;
-- __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":888
-- * def __init__(self):
-- * self.owned = []
-- * self.params[0].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
-- *
-- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
-- */
-- (__pyx_v_self->params[0]).type = MPV_RENDER_PARAM_INVALID;
-+ if ((likely(PyTuple_CheckExact(__pyx_v_drm_osd_size))) || (PyList_CheckExact(__pyx_v_drm_osd_size))) {
-+ PyObject* sequence = __pyx_v_drm_osd_size;
-+ Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
-+ if (unlikely(size != 2)) {
-+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-+ __PYX_ERR(0, 1001, __pyx_L1_error)
-+ }
-+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-+ if (likely(PyTuple_CheckExact(sequence))) {
-+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
-+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
-+ } else {
-+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
-+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
-+ }
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(__pyx_t_2);
-+ #else
-+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ #endif
-+ } else {
-+ Py_ssize_t index = -1;
-+ __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
-+ index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
-+ __Pyx_GOTREF(__pyx_t_1);
-+ index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
-+ __Pyx_GOTREF(__pyx_t_2);
-+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __pyx_t_9 = NULL;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ goto __pyx_L12_unpacking_done;
-+ __pyx_L11_unpacking_failed:;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_9 = NULL;
-+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-+ __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __pyx_L12_unpacking_done:;
-+ }
-+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v__drm_osd_size.width = __pyx_t_7;
-+ __pyx_v__drm_osd_size.height = __pyx_t_10;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":886
-- * object owned
-+ /* "vidcutter/libs/pympv/mpv.pyx":1002
-+ * if drm_osd_size:
-+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size) # <<<<<<<<<<<<<<
- *
-- * def __init__(self): # <<<<<<<<<<<<<<
-- * self.owned = []
-- * self.params[0].type = MPV_RENDER_PARAM_INVALID
-+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
- */
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* function exit code */
-- __pyx_r = 0;
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = -1;
-- __pyx_L0:;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":890
-- * self.params[0].type = MPV_RENDER_PARAM_INVALID
-- *
-- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
-- * count = len(self.owned)
-- * if count >= MAX_RENDER_PARAMS:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1000
-+ * drm_params.render_fd = drm_display.get("render_fd", -1)
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
-+ * if drm_osd_size: # <<<<<<<<<<<<<<
-+ * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
- */
--
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, void *__pyx_v_p, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args) {
-- int __pyx_v_owned = ((int)0);
-- PyObject *__pyx_v_count = NULL;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- Py_ssize_t __pyx_t_2;
-- int __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- int __pyx_t_6;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("add_voidp", 0);
-- if (__pyx_optional_args) {
-- if (__pyx_optional_args->__pyx_n > 0) {
-- __pyx_v_owned = __pyx_optional_args->owned;
-- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":891
-+ /* "vidcutter/libs/pympv/mpv.pyx":1004
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
- *
-- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
-- * count = len(self.owned) # <<<<<<<<<<<<<<
-- * if count >= MAX_RENDER_PARAMS:
-- * if owned:
-- */
-- __pyx_t_1 = __pyx_v_self->owned;
-- __Pyx_INCREF(__pyx_t_1);
-- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 891, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v_count = __pyx_t_1;
-- __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":892
-- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
-- * count = len(self.owned)
-- * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
-- * if owned:
-- * free(p)
-- */
-- __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- if (__pyx_t_3) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":893
-- * count = len(self.owned)
-- * if count >= MAX_RENDER_PARAMS:
-- * if owned: # <<<<<<<<<<<<<<
-- * free(p)
-- * raise PyMPVError("RenderParams overflow")
-+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params) # <<<<<<<<<<<<<<
-+ * if err < 0:
-+ * raise MPVError(err)
- */
-- __pyx_t_3 = (__pyx_v_owned != 0);
-- if (__pyx_t_3) {
-+ __pyx_v_err = mpv_render_context_create((&__pyx_v_self->_ctx), __pyx_v_self->_mpv->_ctx, __pyx_v_params->params);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":894
-- * if count >= MAX_RENDER_PARAMS:
-- * if owned:
-- * free(p) # <<<<<<<<<<<<<<
-- * raise PyMPVError("RenderParams overflow")
-+ /* "vidcutter/libs/pympv/mpv.pyx":1005
- *
-+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
-+ * if err < 0: # <<<<<<<<<<<<<<
-+ * raise MPVError(err)
-+ * self.inited = True
- */
-- free(__pyx_v_p);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":893
-- * count = len(self.owned)
-- * if count >= MAX_RENDER_PARAMS:
-- * if owned: # <<<<<<<<<<<<<<
-- * free(p)
-- * raise PyMPVError("RenderParams overflow")
-- */
-- }
-+ __pyx_t_3 = ((__pyx_v_err < 0) != 0);
-+ if (unlikely(__pyx_t_3)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":895
-- * if owned:
-- * free(p)
-- * raise PyMPVError("RenderParams overflow") # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1006
-+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
-+ * if err < 0:
-+ * raise MPVError(err) # <<<<<<<<<<<<<<
-+ * self.inited = True
- *
-- * self.params[count].type = t
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_5);
- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_4, function);
-+ __Pyx_DECREF_SET(__pyx_t_1, function);
- }
- }
-- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_RenderParams_overflow) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_RenderParams_overflow);
-+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(0, 895, __pyx_L1_error)
-+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __PYX_ERR(0, 1006, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":892
-- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
-- * count = len(self.owned)
-- * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
-- * if owned:
-- * free(p)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1005
-+ *
-+ * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
-+ * if err < 0: # <<<<<<<<<<<<<<
-+ * raise MPVError(err)
-+ * self.inited = True
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":897
-- * raise PyMPVError("RenderParams overflow")
-+ /* "vidcutter/libs/pympv/mpv.pyx":1007
-+ * if err < 0:
-+ * raise MPVError(err)
-+ * self.inited = True # <<<<<<<<<<<<<<
- *
-- * self.params[count].type = t # <<<<<<<<<<<<<<
-- * self.params[count].data = p
-- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
-+ * @_errors
- */
-- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error)
-- (__pyx_v_self->params[__pyx_t_2]).type = __pyx_v_t;
-+ __pyx_v_self->inited = 1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":898
-+ /* "vidcutter/libs/pympv/mpv.pyx":950
-+ * bint inited
- *
-- * self.params[count].type = t
-- * self.params[count].data = p # <<<<<<<<<<<<<<
-- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
-- * self.owned.append(owned)
-- */
-- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error)
-- (__pyx_v_self->params[__pyx_t_2]).data = __pyx_v_p;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":899
-- * self.params[count].type = t
-- * self.params[count].data = p
-- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
-- * self.owned.append(owned)
-- *
-- */
-- __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- (__pyx_v_self->params[__pyx_t_2]).type = MPV_RENDER_PARAM_INVALID;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":900
-- * self.params[count].data = p
-- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
-- * self.owned.append(owned) # <<<<<<<<<<<<<<
-- *
-- * cdef add_int(self, mpv_render_param_type t, int val):
-- */
-- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 900, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":890
-- * self.params[0].type = MPV_RENDER_PARAM_INVALID
-- *
-- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
-- * count = len(self.owned)
-- * if count >= MAX_RENDER_PARAMS:
-+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
-+ * api_type,
-+ * opengl_init_params=None,
- */
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ __pyx_r = 0;
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_voidp", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = -1;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_count);
-- __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_XDECREF((PyObject *)__pyx_v_params);
-+ __Pyx_XDECREF(__pyx_v_arp);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":902
-- * self.owned.append(owned)
-+/* "vidcutter/libs/pympv/mpv.pyx":1010
- *
-- * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
-- * cdef int *p = <int *>malloc(sizeof(int))
-- * p[0] = val
-+ * @_errors
-+ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
-+ * cdef:
-+ * mpv_render_param param
- */
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, int __pyx_v_val) {
-- int *__pyx_v_p;
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("set_icc_profile (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_icc_blob));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
-+ struct mpv_render_param __pyx_v_param;
-+ struct mpv_byte_array __pyx_v_val;
-+ int __pyx_v_err;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_1;
-+ int __pyx_t_2;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ char *__pyx_t_6;
-+ Py_ssize_t __pyx_t_7;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("add_int", 0);
-+ __Pyx_RefNannySetupContext("set_icc_profile", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":903
-+ /* "vidcutter/libs/pympv/mpv.pyx":1016
-+ * int err
- *
-- * cdef add_int(self, mpv_render_param_type t, int val):
-- * cdef int *p = <int *>malloc(sizeof(int)) # <<<<<<<<<<<<<<
-- * p[0] = val
-- * self.add_voidp(t, p)
-+ * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
-+ * raise PyMPVError("icc_blob should be a bytes instance")
-+ * val.data = <void *><char *>icc_blob
- */
-- __pyx_v_p = ((int *)malloc((sizeof(int))));
-+ __pyx_t_1 = PyBytes_Check(__pyx_v_icc_blob);
-+ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
-+ if (unlikely(__pyx_t_2)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":904
-- * cdef add_int(self, mpv_render_param_type t, int val):
-- * cdef int *p = <int *>malloc(sizeof(int))
-- * p[0] = val # <<<<<<<<<<<<<<
-- * self.add_voidp(t, p)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1017
- *
-+ * if not isinstance(icc_blob, bytes):
-+ * raise PyMPVError("icc_blob should be a bytes instance") # <<<<<<<<<<<<<<
-+ * val.data = <void *><char *>icc_blob
-+ * val.size = len(icc_blob)
- */
-- (__pyx_v_p[0]) = __pyx_v_val;
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_4, function);
-+ }
-+ }
-+ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_icc_blob_should_be_a_bytes_insta) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_icc_blob_should_be_a_bytes_insta);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __PYX_ERR(0, 1017, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":905
-- * cdef int *p = <int *>malloc(sizeof(int))
-- * p[0] = val
-- * self.add_voidp(t, p) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1016
-+ * int err
- *
-- * cdef add_string(self, mpv_render_param_type t, char *s):
-+ * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
-+ * raise PyMPVError("icc_blob should be a bytes instance")
-+ * val.data = <void *><char *>icc_blob
- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":902
-- * self.owned.append(owned)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1018
-+ * if not isinstance(icc_blob, bytes):
-+ * raise PyMPVError("icc_blob should be a bytes instance")
-+ * val.data = <void *><char *>icc_blob # <<<<<<<<<<<<<<
-+ * val.size = len(icc_blob)
- *
-- * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
-- * cdef int *p = <int *>malloc(sizeof(int))
-- * p[0] = val
- */
-+ __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
-+ __pyx_v_val.data = ((void *)((char *)__pyx_t_6));
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":907
-- * self.add_voidp(t, p)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1019
-+ * raise PyMPVError("icc_blob should be a bytes instance")
-+ * val.data = <void *><char *>icc_blob
-+ * val.size = len(icc_blob) # <<<<<<<<<<<<<<
- *
-- * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
-- * cdef char *p = <char *>malloc(strlen(s) + 1)
-- * strcpy(p, s)
-+ * param.type = MPV_RENDER_PARAM_ICC_PROFILE
- */
-+ __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1019, __pyx_L1_error)
-+ __pyx_v_val.size = __pyx_t_7;
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, enum mpv_render_param_type __pyx_v_t, char *__pyx_v_s) {
-- char *__pyx_v_p;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("add_string", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":908
-+ /* "vidcutter/libs/pympv/mpv.pyx":1021
-+ * val.size = len(icc_blob)
-+ *
-+ * param.type = MPV_RENDER_PARAM_ICC_PROFILE # <<<<<<<<<<<<<<
-+ * param.data = &val
- *
-- * cdef add_string(self, mpv_render_param_type t, char *s):
-- * cdef char *p = <char *>malloc(strlen(s) + 1) # <<<<<<<<<<<<<<
-- * strcpy(p, s)
-- * self.add_voidp(t, p)
- */
-- __pyx_v_p = ((char *)malloc((strlen(__pyx_v_s) + 1)));
-+ __pyx_v_param.type = MPV_RENDER_PARAM_ICC_PROFILE;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":909
-- * cdef add_string(self, mpv_render_param_type t, char *s):
-- * cdef char *p = <char *>malloc(strlen(s) + 1)
-- * strcpy(p, s) # <<<<<<<<<<<<<<
-- * self.add_voidp(t, p)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1022
-+ *
-+ * param.type = MPV_RENDER_PARAM_ICC_PROFILE
-+ * param.data = &val # <<<<<<<<<<<<<<
- *
-+ * with nogil:
- */
-- (void)(strcpy(__pyx_v_p, __pyx_v_s));
-+ __pyx_v_param.data = (&__pyx_v_val);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":910
-- * cdef char *p = <char *>malloc(strlen(s) + 1)
-- * strcpy(p, s)
-- * self.add_voidp(t, p) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1024
-+ * param.data = &val
- *
-- * def __dealloc__(self):
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_render_context_set_parameter(self._ctx, param)
-+ * return err
- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":907
-- * self.add_voidp(t, p)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1025
-+ *
-+ * with nogil:
-+ * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
-+ * return err
- *
-- * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
-- * cdef char *p = <char *>malloc(strlen(s) + 1)
-- * strcpy(p, s)
- */
-+ __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
-+ }
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.add_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":912
-- * self.add_voidp(t, p)
-- *
-- * def __dealloc__(self): # <<<<<<<<<<<<<<
-- * for i, j in enumerate(self.owned):
-- * if j:
-- */
--
--/* Python wrapper */
--static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
--static void __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(PyObject *__pyx_v_self) {
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-- __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
--}
--
--static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
-- PyObject *__pyx_v_i = NULL;
-- PyObject *__pyx_v_j = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- Py_ssize_t __pyx_t_3;
-- PyObject *(*__pyx_t_4)(PyObject *);
-- PyObject *__pyx_t_5 = NULL;
-- int __pyx_t_6;
-- Py_ssize_t __pyx_t_7;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__dealloc__", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":913
-+ /* "vidcutter/libs/pympv/mpv.pyx":1024
-+ * param.data = &val
- *
-- * def __dealloc__(self):
-- * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
-- * if j:
-- * free(self.params[i].data)
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_render_context_set_parameter(self._ctx, param)
-+ * return err
- */
-- __Pyx_INCREF(__pyx_int_0);
-- __pyx_t_1 = __pyx_int_0;
-- if (likely(PyList_CheckExact(__pyx_v_self->owned)) || PyTuple_CheckExact(__pyx_v_self->owned)) {
-- __pyx_t_2 = __pyx_v_self->owned; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
-- __pyx_t_4 = NULL;
-- } else {
-- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error)
-- }
-- for (;;) {
-- if (likely(!__pyx_t_4)) {
-- if (likely(PyList_CheckExact(__pyx_t_2))) {
-- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
-- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
-- #else
-- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- #endif
-- } else {
-- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
-- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
-- #else
-- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- #endif
-- }
-- } else {
-- __pyx_t_5 = __pyx_t_4(__pyx_t_2);
-- if (unlikely(!__pyx_t_5)) {
-- PyObject* exc_type = PyErr_Occurred();
-- if (exc_type) {
-- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
-- else __PYX_ERR(0, 913, __pyx_L1_error)
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L6;
- }
-- break;
-+ __pyx_L6:;
- }
-- __Pyx_GOTREF(__pyx_t_5);
-- }
-- __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_5);
-- __pyx_t_5 = 0;
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
-- __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_DECREF(__pyx_t_1);
-- __pyx_t_1 = __pyx_t_5;
-- __pyx_t_5 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":914
-- * def __dealloc__(self):
-- * for i, j in enumerate(self.owned):
-- * if j: # <<<<<<<<<<<<<<
-- * free(self.params[i].data)
-- *
-- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 914, __pyx_L1_error)
-- if (__pyx_t_6) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":915
-- * for i, j in enumerate(self.owned):
-- * if j:
-- * free(self.params[i].data) # <<<<<<<<<<<<<<
-- *
-- * cdef void *get_pointer(const char *name, object obj):
-- */
-- __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
-- free((__pyx_v_self->params[__pyx_t_7]).data);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":914
-- * def __dealloc__(self):
-- * for i, j in enumerate(self.owned):
-- * if j: # <<<<<<<<<<<<<<
-- * free(self.params[i].data)
-- *
-- */
-- }
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":913
-+ /* "vidcutter/libs/pympv/mpv.pyx":1026
-+ * with nogil:
-+ * err = mpv_render_context_set_parameter(self._ctx, param)
-+ * return err # <<<<<<<<<<<<<<
- *
-- * def __dealloc__(self):
-- * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
-- * if j:
-- * free(self.params[i].data)
-+ * @_errors
- */
-- }
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":912
-- * self.add_voidp(t, p)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1010
- *
-- * def __dealloc__(self): # <<<<<<<<<<<<<<
-- * for i, j in enumerate(self.owned):
-- * if j:
-+ * @_errors
-+ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
-+ * cdef:
-+ * mpv_render_param param
- */
-
- /* function exit code */
-- goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_WriteUnraisable("vidcutter.libs.mpv._RenderParams.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_icc_profile", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_i);
-- __Pyx_XDECREF(__pyx_v_j);
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
- }
-
--/* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * raise TypeError("self.params cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-+/* "vidcutter/libs/pympv/mpv.pyx":1029
-+ *
-+ * @_errors
-+ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
-+ * cdef:
-+ * mpv_render_param param
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("set_ambient_light (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_lux));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_lux) {
-+ struct mpv_render_param __pyx_v_param;
-+ int __pyx_v_val;
-+ int __pyx_v_err;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_1;
-+ PyObject *__pyx_t_2 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-+ __Pyx_RefNannySetupContext("set_ambient_light", 0);
-
-- /* "(tree fragment)":2
-- * def __reduce_cython__(self):
-- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self.params cannot be converted to a Python object for pickling")
-+ /* "vidcutter/libs/pympv/mpv.pyx":1035
-+ * int err
-+ *
-+ * val = lux # <<<<<<<<<<<<<<
-+ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
-+ * param.data = &val
- */
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(1, 2, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
-+ __pyx_v_val = __pyx_t_1;
-
-- /* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * raise TypeError("self.params cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-+ /* "vidcutter/libs/pympv/mpv.pyx":1036
-+ *
-+ * val = lux
-+ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT # <<<<<<<<<<<<<<
-+ * param.data = &val
-+ *
- */
-+ __pyx_v_param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT;
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "(tree fragment)":3
-- * def __reduce_cython__(self):
-- * raise TypeError("self.params cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * raise TypeError("self.params cannot be converted to a Python object for pickling")
-+ /* "vidcutter/libs/pympv/mpv.pyx":1037
-+ * val = lux
-+ * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
-+ * param.data = &val # <<<<<<<<<<<<<<
-+ *
-+ * with nogil:
- */
-+ __pyx_v_param.data = (&__pyx_v_val);
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-+ /* "vidcutter/libs/pympv/mpv.pyx":1039
-+ * param.data = &val
-+ *
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_render_context_set_parameter(self._ctx, param)
-+ * return err
-+ */
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":1040
-+ *
-+ * with nogil:
-+ * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
-+ * return err
-+ *
-+ */
-+ __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
-+ }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-+ /* "vidcutter/libs/pympv/mpv.pyx":1039
-+ * param.data = &val
-+ *
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_render_context_set_parameter(self._ctx, param)
-+ * return err
-+ */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
-+ }
-
-- /* "(tree fragment)":4
-- * raise TypeError("self.params cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1041
-+ * with nogil:
-+ * err = mpv_render_context_set_parameter(self._ctx, param)
-+ * return err # <<<<<<<<<<<<<<
-+ *
-+ * def get_next_frame_info(self):
- */
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(1, 4, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_r = __pyx_t_2;
-+ __pyx_t_2 = 0;
-+ goto __pyx_L0;
-
-- /* "(tree fragment)":3
-- * def __reduce_cython__(self):
-- * raise TypeError("self.params cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * raise TypeError("self.params cannot be converted to a Python object for pickling")
-+ /* "vidcutter/libs/pympv/mpv.pyx":1029
-+ *
-+ * @_errors
-+ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
-+ * cdef:
-+ * mpv_render_param param
- */
-
- /* function exit code */
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv._RenderParams.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_ambient_light", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
-+ __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":917
-- * free(self.params[i].data)
-+/* "vidcutter/libs/pympv/mpv.pyx":1043
-+ * return err
- *
-- * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
-- * cdef void *p
-- * if PyCapsule_IsValid(obj, name):
-+ * def get_next_frame_info(self): # <<<<<<<<<<<<<<
-+ * cdef:
-+ * mpv_render_frame_info info
- */
-
--static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name, PyObject *__pyx_v_obj) {
-- void *__pyx_v_p;
-- void *__pyx_r;
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("get_next_frame_info (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-+
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-+ struct mpv_render_frame_info __pyx_v_info;
-+ struct mpv_render_param __pyx_v_param;
-+ int __pyx_v_err;
-+ PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
-- void *__pyx_t_2;
-- int __pyx_t_3;
-- int __pyx_t_4;
-- intptr_t __pyx_t_5;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-- PyObject *__pyx_t_8 = NULL;
-- PyObject *__pyx_t_9 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("get_pointer", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":919
-- * cdef void *get_pointer(const char *name, object obj):
-- * cdef void *p
-- * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
-- * p = PyCapsule_GetPointer(obj, name)
-- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
-- */
-- __pyx_t_1 = (PyCapsule_IsValid(__pyx_v_obj, __pyx_v_name) != 0);
-- if (__pyx_t_1) {
-+ __Pyx_RefNannySetupContext("get_next_frame_info", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":920
-- * cdef void *p
-- * if PyCapsule_IsValid(obj, name):
-- * p = PyCapsule_GetPointer(obj, name) # <<<<<<<<<<<<<<
-- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
-- * p = <void *><intptr_t>obj
-+ /* "vidcutter/libs/pympv/mpv.pyx":1048
-+ * mpv_render_param param
-+ *
-+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO # <<<<<<<<<<<<<<
-+ * param.data = &info
-+ * with nogil:
- */
-- __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error)
-- __pyx_v_p = __pyx_t_2;
-+ __pyx_v_param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":919
-- * cdef void *get_pointer(const char *name, object obj):
-- * cdef void *p
-- * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
-- * p = PyCapsule_GetPointer(obj, name)
-- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1049
-+ *
-+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
-+ * param.data = &info # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * err = mpv_render_context_get_info(self._ctx, param)
- */
-- goto __pyx_L3;
-- }
-+ __pyx_v_param.data = (&__pyx_v_info);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":921
-- * if PyCapsule_IsValid(obj, name):
-- * p = PyCapsule_GetPointer(obj, name)
-- * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
-- * p = <void *><intptr_t>obj
-- * else:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1050
-+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
-+ * param.data = &info
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_render_context_get_info(self._ctx, param)
-+ * if err < 0:
- */
-- __pyx_t_3 = PyInt_Check(__pyx_v_obj);
-- __pyx_t_4 = (__pyx_t_3 != 0);
-- if (!__pyx_t_4) {
-- } else {
-- __pyx_t_1 = __pyx_t_4;
-- goto __pyx_L4_bool_binop_done;
-- }
-- __pyx_t_4 = PyLong_Check(__pyx_v_obj);
-- __pyx_t_3 = (__pyx_t_4 != 0);
-- if (__pyx_t_3) {
-- } else {
-- __pyx_t_1 = __pyx_t_3;
-- goto __pyx_L4_bool_binop_done;
-- }
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
-- __pyx_t_1 = __pyx_t_3;
-- __pyx_L4_bool_binop_done:;
-- if (likely(__pyx_t_1)) {
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":922
-- * p = PyCapsule_GetPointer(obj, name)
-- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
-- * p = <void *><intptr_t>obj # <<<<<<<<<<<<<<
-- * else:
-- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1051
-+ * param.data = &info
-+ * with nogil:
-+ * err = mpv_render_context_get_info(self._ctx, param) # <<<<<<<<<<<<<<
-+ * if err < 0:
-+ * raise MPVError(err)
- */
-- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
-- __pyx_v_p = ((void *)((intptr_t)__pyx_t_5));
-+ __pyx_v_err = mpv_render_context_get_info(__pyx_v_self->_ctx, __pyx_v_param);
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":921
-- * if PyCapsule_IsValid(obj, name):
-- * p = PyCapsule_GetPointer(obj, name)
-- * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
-- * p = <void *><intptr_t>obj
-- * else:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1050
-+ * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
-+ * param.data = &info
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * err = mpv_render_context_get_info(self._ctx, param)
-+ * if err < 0:
- */
-- goto __pyx_L3;
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":924
-- * p = <void *><intptr_t>obj
-- * else:
-- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj) # <<<<<<<<<<<<<<
-- * return p
-+ /* "vidcutter/libs/pympv/mpv.pyx":1052
-+ * with nogil:
-+ * err = mpv_render_context_get_info(self._ctx, param)
-+ * if err < 0: # <<<<<<<<<<<<<<
-+ * raise MPVError(err)
- *
- */
-- /*else*/ {
-- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_8);
-- __pyx_t_9 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
-- __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
-- if (likely(__pyx_t_9)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-- __Pyx_INCREF(__pyx_t_9);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_7, function);
-- }
-- }
-- __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
-- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 924, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __Pyx_Raise(__pyx_t_6, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __PYX_ERR(0, 924, __pyx_L1_error)
-- }
-- __pyx_L3:;
-+ __pyx_t_1 = ((__pyx_v_err < 0) != 0);
-+ if (unlikely(__pyx_t_1)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":925
-- * else:
-- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
-- * return p # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1053
-+ * err = mpv_render_context_get_info(self._ctx, param)
-+ * if err < 0:
-+ * raise MPVError(err) # <<<<<<<<<<<<<<
- *
-- * @cython.internal
-+ * return RenderFrameInfo()._from_struct(&info)
- */
-- __pyx_r = __pyx_v_p;
-- goto __pyx_L0;
-+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_3, function);
-+ }
-+ }
-+ __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __PYX_ERR(0, 1053, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":917
-- * free(self.params[i].data)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1052
-+ * with nogil:
-+ * err = mpv_render_context_get_info(self._ctx, param)
-+ * if err < 0: # <<<<<<<<<<<<<<
-+ * raise MPVError(err)
- *
-- * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
-- * cdef void *p
-- * if PyCapsule_IsValid(obj, name):
-- */
--
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_XDECREF(__pyx_t_9);
-- __Pyx_WriteUnraisable("vidcutter.libs.mpv.get_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":929
-- * @cython.internal
-- * cdef class RenderFrameInfo(object):
-- * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
-- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
-- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
-- */
--
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, struct mpv_render_frame_info *__pyx_v_info) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("_from_struct", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":930
-- * cdef class RenderFrameInfo(object):
-- * cdef _from_struct(self, mpv_render_frame_info *info):
-- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT) # <<<<<<<<<<<<<<
-- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
-- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
-- */
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":931
-- * cdef _from_struct(self, mpv_render_frame_info *info):
-- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
-- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW) # <<<<<<<<<<<<<<
-- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
-- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
-- */
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 931, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":932
-- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
-- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
-- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT) # <<<<<<<<<<<<<<
-- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
-- * self.target_time = info[0].target_time
-- */
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":933
-- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
-- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
-- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC) # <<<<<<<<<<<<<<
-- * self.target_time = info[0].target_time
-- * return self
- */
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":934
-- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
-- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
-- * self.target_time = info[0].target_time # <<<<<<<<<<<<<<
-- * return self
-+ /* "vidcutter/libs/pympv/mpv.pyx":1055
-+ * raise MPVError(err)
- *
-- */
-- __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":935
-- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
-- * self.target_time = info[0].target_time
-- * return self # <<<<<<<<<<<<<<
-+ * return RenderFrameInfo()._from_struct(&info) # <<<<<<<<<<<<<<
- *
-- * cdef class RenderContext(object):
-+ * def set_update_callback(self, cb):
- */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(((PyObject *)__pyx_v_self));
-- __pyx_r = ((PyObject *)__pyx_v_self);
-+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_r = __pyx_t_3;
-+ __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":929
-- * @cython.internal
-- * cdef class RenderFrameInfo(object):
-- * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
-- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
-- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1043
-+ * return err
-+ *
-+ * def get_next_frame_info(self): # <<<<<<<<<<<<<<
-+ * cdef:
-+ * mpv_render_frame_info info
- */
-
- /* function exit code */
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo._from_struct", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.get_next_frame_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * cdef tuple state
-- * cdef object _dict
-+/* "vidcutter/libs/pympv/mpv.pyx":1057
-+ * return RenderFrameInfo()._from_struct(&info)
-+ *
-+ * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("set_update_callback (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_cb));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo___reduce_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self) {
-- PyObject *__pyx_v_state = 0;
-- PyObject *__pyx_v__dict = 0;
-- int __pyx_v_use_setstate;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_cb) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- int __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
--
-- /* "(tree fragment)":5
-- * cdef object _dict
-- * cdef bint use_setstate
-- * state = () # <<<<<<<<<<<<<<
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None:
-- */
-- __Pyx_INCREF(__pyx_empty_tuple);
-- __pyx_v_state = __pyx_empty_tuple;
--
-- /* "(tree fragment)":6
-- * cdef bint use_setstate
-- * state = ()
-- * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
-- * if _dict is not None:
-- * state += (_dict,)
-- */
-- __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v__dict = __pyx_t_1;
-- __pyx_t_1 = 0;
--
-- /* "(tree fragment)":7
-- * state = ()
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None: # <<<<<<<<<<<<<<
-- * state += (_dict,)
-- * use_setstate = True
-- */
-- __pyx_t_2 = (__pyx_v__dict != Py_None);
-- __pyx_t_3 = (__pyx_t_2 != 0);
-- if (__pyx_t_3) {
--
-- /* "(tree fragment)":8
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None:
-- * state += (_dict,) # <<<<<<<<<<<<<<
-- * use_setstate = True
-- * else:
-- */
-- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(__pyx_v__dict);
-- __Pyx_GIVEREF(__pyx_v__dict);
-- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
-- __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
-- __pyx_t_4 = 0;
--
-- /* "(tree fragment)":9
-- * if _dict is not None:
-- * state += (_dict,)
-- * use_setstate = True # <<<<<<<<<<<<<<
-- * else:
-- * use_setstate = False
-- */
-- __pyx_v_use_setstate = 1;
--
-- /* "(tree fragment)":7
-- * state = ()
-- * _dict = getattr(self, '__dict__', None)
-- * if _dict is not None: # <<<<<<<<<<<<<<
-- * state += (_dict,)
-- * use_setstate = True
-- */
-- goto __pyx_L3;
-- }
--
-- /* "(tree fragment)":11
-- * use_setstate = True
-- * else:
-- * use_setstate = False # <<<<<<<<<<<<<<
-- * if use_setstate:
-- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
-- */
-- /*else*/ {
-- __pyx_v_use_setstate = 0;
-- }
-- __pyx_L3:;
-+ __Pyx_RefNannySetupContext("set_update_callback", 0);
-
-- /* "(tree fragment)":12
-- * else:
-- * use_setstate = False
-- * if use_setstate: # <<<<<<<<<<<<<<
-- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
-- * else:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1058
-+ *
-+ * def set_update_callback(self, cb):
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-+ * self.update_cb = cb
- */
-- __pyx_t_3 = (__pyx_v_use_setstate != 0);
-- if (__pyx_t_3) {
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "(tree fragment)":13
-- * use_setstate = False
-- * if use_setstate:
-- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state # <<<<<<<<<<<<<<
-- * else:
-- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1059
-+ * def set_update_callback(self, cb):
-+ * with nogil:
-+ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
-+ * self.update_cb = cb
-+ *
- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_INCREF(__pyx_int_222419149);
-- __Pyx_GIVEREF(__pyx_int_222419149);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
-- __Pyx_INCREF(Py_None);
-- __Pyx_GIVEREF(Py_None);
-- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
-- __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_GIVEREF(__pyx_t_4);
-- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
-- __Pyx_GIVEREF(__pyx_t_1);
-- PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
-- __Pyx_INCREF(__pyx_v_state);
-- __Pyx_GIVEREF(__pyx_v_state);
-- PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
-- __pyx_t_4 = 0;
-- __pyx_t_1 = 0;
-- __pyx_r = __pyx_t_5;
-- __pyx_t_5 = 0;
-- goto __pyx_L0;
-+ mpv_render_context_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
-+ }
-
-- /* "(tree fragment)":12
-- * else:
-- * use_setstate = False
-- * if use_setstate: # <<<<<<<<<<<<<<
-- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
-- * else:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1058
-+ *
-+ * def set_update_callback(self, cb):
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-+ * self.update_cb = cb
- */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
- }
-
-- /* "(tree fragment)":15
-- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, None), state
-- * else:
-- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state) # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1060
-+ * with nogil:
-+ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-+ * self.update_cb = cb # <<<<<<<<<<<<<<
-+ *
-+ * def update(self):
- */
-- /*else*/ {
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_RenderFrameInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
-- __Pyx_INCREF(__pyx_int_222419149);
-- __Pyx_GIVEREF(__pyx_int_222419149);
-- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
-- __Pyx_INCREF(__pyx_v_state);
-- __Pyx_GIVEREF(__pyx_v_state);
-- PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
-- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_GIVEREF(__pyx_t_5);
-- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
-- __Pyx_GIVEREF(__pyx_t_1);
-- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
-- __pyx_t_5 = 0;
-- __pyx_t_1 = 0;
-- __pyx_r = __pyx_t_4;
-- __pyx_t_4 = 0;
-- goto __pyx_L0;
-- }
-+ __Pyx_INCREF(__pyx_v_cb);
-+ __Pyx_GIVEREF(__pyx_v_cb);
-+ __Pyx_GOTREF(__pyx_v_self->update_cb);
-+ __Pyx_DECREF(__pyx_v_self->update_cb);
-+ __pyx_v_self->update_cb = __pyx_v_cb;
-
-- /* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * cdef tuple state
-- * cdef object _dict
-+ /* "vidcutter/libs/pympv/mpv.pyx":1057
-+ * return RenderFrameInfo()._from_struct(&info)
-+ *
-+ * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
- */
-
- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_state);
-- __Pyx_XDECREF(__pyx_v__dict);
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "(tree fragment)":16
-- * else:
-- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
-+/* "vidcutter/libs/pympv/mpv.pyx":1062
-+ * self.update_cb = cb
-+ *
-+ * def update(self): # <<<<<<<<<<<<<<
-+ * cdef uint64_t ret
-+ * with nogil:
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-+ __Pyx_RefNannySetupContext("update (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cython__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-+ uint64_t __pyx_v_ret;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-+ __Pyx_RefNannySetupContext("update", 0);
-
-- /* "(tree fragment)":17
-- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
-- * def __setstate_cython__(self, __pyx_state):
-- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1064
-+ * def update(self):
-+ * cdef uint64_t ret
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * ret = mpv_render_context_update(self._ctx)
-+ * return ret
- */
-- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1065
-+ * cdef uint64_t ret
-+ * with nogil:
-+ * ret = mpv_render_context_update(self._ctx) # <<<<<<<<<<<<<<
-+ * return ret
-+ *
-+ */
-+ __pyx_v_ret = mpv_render_context_update(__pyx_v_self->_ctx);
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1064
-+ * def update(self):
-+ * cdef uint64_t ret
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * ret = mpv_render_context_update(self._ctx)
-+ * return ret
-+ */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
-+ }
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1066
-+ * with nogil:
-+ * ret = mpv_render_context_update(self._ctx)
-+ * return ret # <<<<<<<<<<<<<<
-+ *
-+ * @_errors
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
-- /* "(tree fragment)":16
-- * else:
-- * return __pyx_unpickle_RenderFrameInfo, (type(self), 0xd41d8cd, state)
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_unpickle_RenderFrameInfo__set_state(self, __pyx_state)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1062
-+ * self.update_cb = cb
-+ *
-+ * def update(self): # <<<<<<<<<<<<<<
-+ * cdef uint64_t ret
-+ * with nogil:
- */
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderFrameInfo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
-@@ -18902,98 +18218,80 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cy
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":950
-- * bint inited
-+/* "vidcutter/libs/pympv/mpv.pyx":1069
- *
-- * def __init__(self, mpv, # <<<<<<<<<<<<<<
-- * api_type,
-- * opengl_init_params=None,
-+ * @_errors
-+ * def render(self, # <<<<<<<<<<<<<<
-+ * opengl_fbo=None,
-+ * flip_y=False,
- */
-
- /* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_mpv = 0;
-- PyObject *__pyx_v_api_type = 0;
-- PyObject *__pyx_v_opengl_init_params = 0;
-- PyObject *__pyx_v_advanced_control = 0;
-- PyObject *__pyx_v_x11_display = 0;
-- PyObject *__pyx_v_wl_display = 0;
-- PyObject *__pyx_v_drm_display = 0;
-- PyObject *__pyx_v_drm_osd_size = 0;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_opengl_fbo = 0;
-+ PyObject *__pyx_v_flip_y = 0;
-+ PyObject *__pyx_v_depth = 0;
-+ PyObject *__pyx_v_block_for_target_time = 0;
-+ PyObject *__pyx_v_skip_rendering = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- int __pyx_r;
-+ PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-+ __Pyx_RefNannySetupContext("render (wrapper)", 0);
- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_api_type,&__pyx_n_s_opengl_init_params,&__pyx_n_s_advanced_control,&__pyx_n_s_x11_display,&__pyx_n_s_wl_display,&__pyx_n_s_drm_display,&__pyx_n_s_drm_osd_size,0};
-- PyObject* values[8] = {0,0,0,0,0,0,0,0};
--
-- /* "vidcutter/libs/pympv/mpv.pyx":952
-- * def __init__(self, mpv,
-- * api_type,
-- * opengl_init_params=None, # <<<<<<<<<<<<<<
-- * advanced_control=False,
-- * x11_display=None,
-- */
-- values[2] = ((PyObject *)Py_None);
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_opengl_fbo,&__pyx_n_s_flip_y,&__pyx_n_s_depth,&__pyx_n_s_block_for_target_time,&__pyx_n_s_skip_rendering,0};
-+ PyObject* values[5] = {0,0,0,0,0};
-
-- /* "vidcutter/libs/pympv/mpv.pyx":953
-- * api_type,
-- * opengl_init_params=None,
-- * advanced_control=False, # <<<<<<<<<<<<<<
-- * x11_display=None,
-- * wl_display=None,
-+ /* "vidcutter/libs/pympv/mpv.pyx":1070
-+ * @_errors
-+ * def render(self,
-+ * opengl_fbo=None, # <<<<<<<<<<<<<<
-+ * flip_y=False,
-+ * depth=None,
- */
-- values[3] = ((PyObject *)Py_False);
-+ values[0] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":954
-- * opengl_init_params=None,
-- * advanced_control=False,
-- * x11_display=None, # <<<<<<<<<<<<<<
-- * wl_display=None,
-- * drm_display=None,
-+ /* "vidcutter/libs/pympv/mpv.pyx":1071
-+ * def render(self,
-+ * opengl_fbo=None,
-+ * flip_y=False, # <<<<<<<<<<<<<<
-+ * depth=None,
-+ * block_for_target_time=True,
- */
-- values[4] = ((PyObject *)Py_None);
-+ values[1] = ((PyObject *)Py_False);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":955
-- * advanced_control=False,
-- * x11_display=None,
-- * wl_display=None, # <<<<<<<<<<<<<<
-- * drm_display=None,
-- * drm_osd_size=None
-+ /* "vidcutter/libs/pympv/mpv.pyx":1072
-+ * opengl_fbo=None,
-+ * flip_y=False,
-+ * depth=None, # <<<<<<<<<<<<<<
-+ * block_for_target_time=True,
-+ * skip_rendering=False):
- */
-- values[5] = ((PyObject *)Py_None);
-+ values[2] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":956
-- * x11_display=None,
-- * wl_display=None,
-- * drm_display=None, # <<<<<<<<<<<<<<
-- * drm_osd_size=None
-- * ):
-+ /* "vidcutter/libs/pympv/mpv.pyx":1073
-+ * flip_y=False,
-+ * depth=None,
-+ * block_for_target_time=True, # <<<<<<<<<<<<<<
-+ * skip_rendering=False):
-+ *
- */
-- values[6] = ((PyObject *)Py_None);
-+ values[3] = ((PyObject *)Py_True);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":957
-- * wl_display=None,
-- * drm_display=None,
-- * drm_osd_size=None # <<<<<<<<<<<<<<
-- * ):
-+ /* "vidcutter/libs/pympv/mpv.pyx":1074
-+ * depth=None,
-+ * block_for_target_time=True,
-+ * skip_rendering=False): # <<<<<<<<<<<<<<
- *
-+ * cdef:
- */
-- values[7] = ((PyObject *)Py_None);
-+ values[4] = ((PyObject *)Py_False);
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
-- case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
-- CYTHON_FALLTHROUGH;
-- case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
-- CYTHON_FALLTHROUGH;
-- case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
-- CYTHON_FALLTHROUGH;
- case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
- CYTHON_FALLTHROUGH;
- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-@@ -19010,62 +18308,40 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_fbo);
-+ if (value) { values[0] = value; kw_args--; }
-+ }
- CYTHON_FALLTHROUGH;
- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_api_type)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 950, __pyx_L3_error)
-+ if (kw_args > 0) {
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flip_y);
-+ if (value) { values[1] = value; kw_args--; }
- }
- CYTHON_FALLTHROUGH;
- case 2:
- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_init_params);
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_depth);
- if (value) { values[2] = value; kw_args--; }
- }
- CYTHON_FALLTHROUGH;
- case 3:
- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_advanced_control);
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_block_for_target_time);
- if (value) { values[3] = value; kw_args--; }
- }
- CYTHON_FALLTHROUGH;
- case 4:
- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x11_display);
-+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_rendering);
- if (value) { values[4] = value; kw_args--; }
- }
-- CYTHON_FALLTHROUGH;
-- case 5:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_wl_display);
-- if (value) { values[5] = value; kw_args--; }
-- }
-- CYTHON_FALLTHROUGH;
-- case 6:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_display);
-- if (value) { values[6] = value; kw_args--; }
-- }
-- CYTHON_FALLTHROUGH;
-- case 7:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_drm_osd_size);
-- if (value) { values[7] = value; kw_args--; }
-- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 950, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1069, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-- case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
-- CYTHON_FALLTHROUGH;
-- case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
-- CYTHON_FALLTHROUGH;
-- case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
-- CYTHON_FALLTHROUGH;
- case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
- CYTHON_FALLTHROUGH;
- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-@@ -19073,36 +18349,35 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- CYTHON_FALLTHROUGH;
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- break;
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
- default: goto __pyx_L5_argtuple_error;
- }
- }
-- __pyx_v_mpv = values[0];
-- __pyx_v_api_type = values[1];
-- __pyx_v_opengl_init_params = values[2];
-- __pyx_v_advanced_control = values[3];
-- __pyx_v_x11_display = values[4];
-- __pyx_v_wl_display = values[5];
-- __pyx_v_drm_display = values[6];
-- __pyx_v_drm_osd_size = values[7];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-+ __pyx_v_opengl_fbo = values[0];
-+ __pyx_v_flip_y = values[1];
-+ __pyx_v_depth = values[2];
-+ __pyx_v_block_for_target_time = values[3];
-+ __pyx_v_skip_rendering = values[4];
-+ }
-+ goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 950, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1069, __pyx_L3_error)
- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-- return -1;
-+ return NULL;
- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_api_type, __pyx_v_opengl_init_params, __pyx_v_advanced_control, __pyx_v_x11_display, __pyx_v_wl_display, __pyx_v_drm_display, __pyx_v_drm_osd_size);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_opengl_fbo, __pyx_v_flip_y, __pyx_v_depth, __pyx_v_block_for_target_time, __pyx_v_skip_rendering);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":950
-- * bint inited
-+ /* "vidcutter/libs/pympv/mpv.pyx":1069
- *
-- * def __init__(self, mpv, # <<<<<<<<<<<<<<
-- * api_type,
-- * opengl_init_params=None,
-+ * @_errors
-+ * def render(self, # <<<<<<<<<<<<<<
-+ * opengl_fbo=None,
-+ * flip_y=False,
- */
-
- /* function exit code */
-@@ -19110,786 +18385,626 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_api_type, PyObject *__pyx_v_opengl_init_params, PyObject *__pyx_v_advanced_control, PyObject *__pyx_v_x11_display, PyObject *__pyx_v_wl_display, PyObject *__pyx_v_drm_display, PyObject *__pyx_v_drm_osd_size) {
-- struct mpv_opengl_init_params __pyx_v_gl_params;
-- struct mpv_opengl_drm_params __pyx_v_drm_params;
-- struct mpv_opengl_drm_osd_size __pyx_v__drm_osd_size;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_opengl_fbo, PyObject *__pyx_v_flip_y, PyObject *__pyx_v_depth, PyObject *__pyx_v_block_for_target_time, PyObject *__pyx_v_skip_rendering) {
-+ struct mpv_opengl_fbo __pyx_v_fbo;
- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_params = NULL;
-- PyObject *__pyx_v_arp = NULL;
-- int __pyx_v_err;
-- int __pyx_r;
-+ int __pyx_v_ret;
-+ PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-+ int __pyx_t_2;
- int __pyx_t_3;
- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-+ int __pyx_t_5;
- int __pyx_t_6;
-- int __pyx_t_7;
-- char const *__pyx_t_8;
-- PyObject *(*__pyx_t_9)(PyObject *);
-- int __pyx_t_10;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__init__", 0);
-+ __Pyx_RefNannySetupContext("render", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":965
-- * mpv_opengl_drm_osd_size _drm_osd_size
-+ /* "vidcutter/libs/pympv/mpv.pyx":1079
-+ * mpv_opengl_fbo fbo
- *
-- * self._mpv = mpv # <<<<<<<<<<<<<<
-+ * params = _RenderParams() # <<<<<<<<<<<<<<
- *
-- * memset(&gl_params, 0, sizeof(gl_params))
-+ * if opengl_fbo:
- */
-- if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 965, __pyx_L1_error)
-- __pyx_t_1 = __pyx_v_mpv;
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v_self->_mpv);
-- __Pyx_DECREF(((PyObject *)__pyx_v_self->_mpv));
-- __pyx_v_self->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_t_1);
-+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":967
-- * self._mpv = mpv
-+ /* "vidcutter/libs/pympv/mpv.pyx":1081
-+ * params = _RenderParams()
- *
-- * memset(&gl_params, 0, sizeof(gl_params)) # <<<<<<<<<<<<<<
-- * memset(&drm_params, 0, sizeof(drm_params))
-- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
-+ * if opengl_fbo: # <<<<<<<<<<<<<<
-+ * memset(&fbo, 0, sizeof(fbo))
-+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
- */
-- (void)(memset((&__pyx_v_gl_params), 0, (sizeof(__pyx_v_gl_params))));
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
-+ if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":968
-- *
-- * memset(&gl_params, 0, sizeof(gl_params))
-- * memset(&drm_params, 0, sizeof(drm_params)) # <<<<<<<<<<<<<<
-- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
-+ /* "vidcutter/libs/pympv/mpv.pyx":1082
- *
-+ * if opengl_fbo:
-+ * memset(&fbo, 0, sizeof(fbo)) # <<<<<<<<<<<<<<
-+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
-+ * fbo.w = opengl_fbo["w"]
- */
-- (void)(memset((&__pyx_v_drm_params), 0, (sizeof(__pyx_v_drm_params))));
-+ (void)(memset((&__pyx_v_fbo), 0, (sizeof(__pyx_v_fbo))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":969
-- * memset(&gl_params, 0, sizeof(gl_params))
-- * memset(&drm_params, 0, sizeof(drm_params))
-- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size)) # <<<<<<<<<<<<<<
-- *
-- * params = _RenderParams()
-+ /* "vidcutter/libs/pympv/mpv.pyx":1083
-+ * if opengl_fbo:
-+ * memset(&fbo, 0, sizeof(fbo))
-+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
-+ * fbo.w = opengl_fbo["w"]
-+ * fbo.h = opengl_fbo["h"]
- */
-- (void)(memset((&__pyx_v__drm_osd_size), 0, (sizeof(__pyx_v__drm_osd_size))));
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
-+ if (!__pyx_t_2) {
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ } else {
-+ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error)
-+ __pyx_t_3 = __pyx_t_5;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_3 = 0;
-+ __pyx_L4_bool_binop_done:;
-+ __pyx_v_fbo.fbo = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":971
-- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
-- *
-- * params = _RenderParams() # <<<<<<<<<<<<<<
-- *
-- * if api_type == self.API_OPENGL:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1084
-+ * memset(&fbo, 0, sizeof(fbo))
-+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
-+ * fbo.w = opengl_fbo["w"] # <<<<<<<<<<<<<<
-+ * fbo.h = opengl_fbo["h"]
-+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
- */
-- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
-- __pyx_t_1 = 0;
-+ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_v_fbo.w = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":973
-- * params = _RenderParams()
-- *
-- * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
-- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
-- * else:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1085
-+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
-+ * fbo.w = opengl_fbo["w"]
-+ * fbo.h = opengl_fbo["h"] # <<<<<<<<<<<<<<
-+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (likely(__pyx_t_3)) {
-+ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_v_fbo.h = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":974
-- *
-- * if api_type == self.API_OPENGL:
-- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL) # <<<<<<<<<<<<<<
-- * else:
-- * raise PyMPVError("Unknown api_type %r" % api_type)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1086
-+ * fbo.w = opengl_fbo["w"]
-+ * fbo.h = opengl_fbo["h"]
-+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
-+ * if flip_y:
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error)
-+ if (!__pyx_t_2) {
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ } else {
-+ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
-+ __pyx_t_3 = __pyx_t_5;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ goto __pyx_L6_bool_binop_done;
-+ }
-+ __pyx_t_3 = 0;
-+ __pyx_L6_bool_binop_done:;
-+ __pyx_v_fbo.internal_format = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":973
-+ /* "vidcutter/libs/pympv/mpv.pyx":1087
-+ * fbo.h = opengl_fbo["h"]
-+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo) # <<<<<<<<<<<<<<
-+ * if flip_y:
-+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-+ */
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1081
- * params = _RenderParams()
- *
-- * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
-- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
-- * else:
-+ * if opengl_fbo: # <<<<<<<<<<<<<<
-+ * memset(&fbo, 0, sizeof(fbo))
-+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
- */
-- goto __pyx_L3;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":976
-- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
-- * else:
-- * raise PyMPVError("Unknown api_type %r" % api_type) # <<<<<<<<<<<<<<
-- *
-- * if opengl_init_params is not None:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1088
-+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
-+ * if flip_y: # <<<<<<<<<<<<<<
-+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-+ * if depth is not None:
- */
-- /*else*/ {
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
-+ if (__pyx_t_2) {
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1089
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
-+ * if flip_y:
-+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1) # <<<<<<<<<<<<<<
-+ * if depth is not None:
-+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-+ */
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_1, function);
-- }
-- }
-- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __PYX_ERR(0, 976, __pyx_L1_error)
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1088
-+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
-+ * if flip_y: # <<<<<<<<<<<<<<
-+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-+ * if depth is not None:
-+ */
- }
-- __pyx_L3:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":978
-- * raise PyMPVError("Unknown api_type %r" % api_type)
-- *
-- * if opengl_init_params is not None: # <<<<<<<<<<<<<<
-- * self._get_proc_address = opengl_init_params["get_proc_address"]
-- * gl_params.get_proc_address = &_c_getprocaddress
-+ /* "vidcutter/libs/pympv/mpv.pyx":1090
-+ * if flip_y:
-+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-+ * if depth is not None: # <<<<<<<<<<<<<<
-+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-+ * if not block_for_target_time:
- */
-- __pyx_t_3 = (__pyx_v_opengl_init_params != Py_None);
-- __pyx_t_6 = (__pyx_t_3 != 0);
-+ __pyx_t_2 = (__pyx_v_depth != Py_None);
-+ __pyx_t_6 = (__pyx_t_2 != 0);
- if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":979
-- *
-- * if opengl_init_params is not None:
-- * self._get_proc_address = opengl_init_params["get_proc_address"] # <<<<<<<<<<<<<<
-- * gl_params.get_proc_address = &_c_getprocaddress
-- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
-+ /* "vidcutter/libs/pympv/mpv.pyx":1091
-+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-+ * if depth is not None:
-+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth) # <<<<<<<<<<<<<<
-+ * if not block_for_target_time:
-+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
- */
-- __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_GIVEREF(__pyx_t_2);
-- __Pyx_GOTREF(__pyx_v_self->_get_proc_address);
-- __Pyx_DECREF(__pyx_v_self->_get_proc_address);
-- __pyx_v_self->_get_proc_address = __pyx_t_2;
-- __pyx_t_2 = 0;
-+ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":980
-- * if opengl_init_params is not None:
-- * self._get_proc_address = opengl_init_params["get_proc_address"]
-- * gl_params.get_proc_address = &_c_getprocaddress # <<<<<<<<<<<<<<
-- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1090
-+ * if flip_y:
-+ * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-+ * if depth is not None: # <<<<<<<<<<<<<<
-+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-+ * if not block_for_target_time:
- */
-- __pyx_v_gl_params.get_proc_address = (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress);
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":981
-- * self._get_proc_address = opengl_init_params["get_proc_address"]
-- * gl_params.get_proc_address = &_c_getprocaddress
-- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address # <<<<<<<<<<<<<<
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
-- * if advanced_control:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1092
-+ * if depth is not None:
-+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-+ * if not block_for_target_time: # <<<<<<<<<<<<<<
-+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
-+ * if skip_rendering:
- */
-- __pyx_v_gl_params.get_proc_address_ctx = ((void *)__pyx_v_self->_get_proc_address);
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
-+ __pyx_t_2 = ((!__pyx_t_6) != 0);
-+ if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":982
-- * gl_params.get_proc_address = &_c_getprocaddress
-- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params) # <<<<<<<<<<<<<<
-- * if advanced_control:
-- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1093
-+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-+ * if not block_for_target_time:
-+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0) # <<<<<<<<<<<<<<
-+ * if skip_rendering:
-+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":978
-- * raise PyMPVError("Unknown api_type %r" % api_type)
-- *
-- * if opengl_init_params is not None: # <<<<<<<<<<<<<<
-- * self._get_proc_address = opengl_init_params["get_proc_address"]
-- * gl_params.get_proc_address = &_c_getprocaddress
-+ /* "vidcutter/libs/pympv/mpv.pyx":1092
-+ * if depth is not None:
-+ * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-+ * if not block_for_target_time: # <<<<<<<<<<<<<<
-+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
-+ * if skip_rendering:
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":983
-- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
-- * if advanced_control: # <<<<<<<<<<<<<<
-- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-- * if x11_display:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1094
-+ * if not block_for_target_time:
-+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
-+ * if skip_rendering: # <<<<<<<<<<<<<<
-+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
-+ *
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 983, __pyx_L1_error)
-- if (__pyx_t_6) {
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
-+ if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":984
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
-- * if advanced_control:
-- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1) # <<<<<<<<<<<<<<
-- * if x11_display:
-- * self._x11_display = x11_display
-+ /* "vidcutter/libs/pympv/mpv.pyx":1095
-+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
-+ * if skip_rendering:
-+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1) # <<<<<<<<<<<<<<
-+ *
-+ * with nogil:
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":983
-- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
-- * if advanced_control: # <<<<<<<<<<<<<<
-- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-- * if x11_display:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1094
-+ * if not block_for_target_time:
-+ * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
-+ * if skip_rendering: # <<<<<<<<<<<<<<
-+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
-+ *
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":985
-- * if advanced_control:
-- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-- * if x11_display: # <<<<<<<<<<<<<<
-- * self._x11_display = x11_display
-- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
-+ /* "vidcutter/libs/pympv/mpv.pyx":1097
-+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
-+ *
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * ret = mpv_render_context_render(self._ctx, params.params)
-+ * return ret
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
-- if (__pyx_t_6) {
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":986
-- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-- * if x11_display:
-- * self._x11_display = x11_display # <<<<<<<<<<<<<<
-- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
-- * if wl_display:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1098
-+ *
-+ * with nogil:
-+ * ret = mpv_render_context_render(self._ctx, params.params) # <<<<<<<<<<<<<<
-+ * return ret
-+ *
- */
-- __Pyx_INCREF(__pyx_v_x11_display);
-- __Pyx_GIVEREF(__pyx_v_x11_display);
-- __Pyx_GOTREF(__pyx_v_self->_x11_display);
-- __Pyx_DECREF(__pyx_v_self->_x11_display);
-- __pyx_v_self->_x11_display = __pyx_v_x11_display;
-+ __pyx_v_ret = mpv_render_context_render(__pyx_v_self->_ctx, __pyx_v_params->params);
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":987
-- * if x11_display:
-- * self._x11_display = x11_display
-- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display)) # <<<<<<<<<<<<<<
-- * if wl_display:
-- * self._wl_display = wl_display
-+ /* "vidcutter/libs/pympv/mpv.pyx":1097
-+ * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
-+ *
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * ret = mpv_render_context_render(self._ctx, params.params)
-+ * return ret
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L14;
-+ }
-+ __pyx_L14:;
-+ }
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":985
-- * if advanced_control:
-- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
-- * if x11_display: # <<<<<<<<<<<<<<
-- * self._x11_display = x11_display
-- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
-+ /* "vidcutter/libs/pympv/mpv.pyx":1099
-+ * with nogil:
-+ * ret = mpv_render_context_render(self._ctx, params.params)
-+ * return ret # <<<<<<<<<<<<<<
-+ *
-+ * def report_swap(self):
- */
-- }
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_r = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":988
-- * self._x11_display = x11_display
-- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
-- * if wl_display: # <<<<<<<<<<<<<<
-- * self._wl_display = wl_display
-- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-+ /* "vidcutter/libs/pympv/mpv.pyx":1069
-+ *
-+ * @_errors
-+ * def render(self, # <<<<<<<<<<<<<<
-+ * opengl_fbo=None,
-+ * flip_y=False,
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
-- if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":989
-- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
-- * if wl_display:
-- * self._wl_display = wl_display # <<<<<<<<<<<<<<
-- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-- * if drm_display:
-- */
-- __Pyx_INCREF(__pyx_v_wl_display);
-- __Pyx_GIVEREF(__pyx_v_wl_display);
-- __Pyx_GOTREF(__pyx_v_self->_wl_display);
-- __Pyx_DECREF(__pyx_v_self->_wl_display);
-- __pyx_v_self->_wl_display = __pyx_v_wl_display;
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XDECREF((PyObject *)__pyx_v_params);
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":990
-- * if wl_display:
-- * self._wl_display = wl_display
-- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display)) # <<<<<<<<<<<<<<
-- * if drm_display:
-- * drm_params.fd = drm_display.get("fd", -1)
-+/* "vidcutter/libs/pympv/mpv.pyx":1101
-+ * return ret
-+ *
-+ * def report_swap(self): # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * mpv_render_context_report_swap(self._ctx)
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":988
-- * self._x11_display = x11_display
-- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
-- * if wl_display: # <<<<<<<<<<<<<<
-- * self._wl_display = wl_display
-- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-- */
-- }
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("report_swap (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":991
-- * self._wl_display = wl_display
-- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-- * if drm_display: # <<<<<<<<<<<<<<
-- * drm_params.fd = drm_display.get("fd", -1)
-- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 991, __pyx_L1_error)
-- if (__pyx_t_6) {
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":992
-- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-- * if drm_display:
-- * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
-- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-- * drm_params.connector_id = drm_display.get("connector_id", -1)
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v_drm_params.fd = __pyx_t_7;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("report_swap", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":993
-- * if drm_display:
-- * drm_params.fd = drm_display.get("fd", -1)
-- * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
-- * drm_params.connector_id = drm_display.get("connector_id", -1)
-- * arp = drm_display.get("atomic_request_ptr", None)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1102
-+ *
-+ * def report_swap(self):
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_render_context_report_swap(self._ctx)
-+ *
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 993, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v_drm_params.crtc_id = __pyx_t_7;
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":994
-- * drm_params.fd = drm_display.get("fd", -1)
-- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-- * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
-- * arp = drm_display.get("atomic_request_ptr", None)
-- * if arp is not None:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1103
-+ * def report_swap(self):
-+ * with nogil:
-+ * mpv_render_context_report_swap(self._ctx) # <<<<<<<<<<<<<<
-+ *
-+ * def free(self):
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v_drm_params.connector_id = __pyx_t_7;
-+ mpv_render_context_report_swap(__pyx_v_self->_ctx);
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":995
-- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-- * drm_params.connector_id = drm_display.get("connector_id", -1)
-- * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
-- * if arp is not None:
-- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-+ /* "vidcutter/libs/pympv/mpv.pyx":1102
-+ *
-+ * def report_swap(self):
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_render_context_report_swap(self._ctx)
-+ *
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v_arp = __pyx_t_2;
-- __pyx_t_2 = 0;
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L5;
-+ }
-+ __pyx_L5:;
-+ }
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":996
-- * drm_params.connector_id = drm_display.get("connector_id", -1)
-- * arp = drm_display.get("atomic_request_ptr", None)
-- * if arp is not None: # <<<<<<<<<<<<<<
-- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-- * drm_params.render_fd = drm_display.get("render_fd", -1)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1101
-+ * return ret
-+ *
-+ * def report_swap(self): # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * mpv_render_context_report_swap(self._ctx)
- */
-- __pyx_t_6 = (__pyx_v_arp != Py_None);
-- __pyx_t_3 = (__pyx_t_6 != 0);
-- if (__pyx_t_3) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":997
-- * arp = drm_display.get("atomic_request_ptr", None)
-- * if arp is not None:
-- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*") # <<<<<<<<<<<<<<
-- * drm_params.render_fd = drm_display.get("render_fd", -1)
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
-- */
-- __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L1_error)
-- __pyx_v_drm_params.atomic_request_ptr = ((struct _drmModeAtomicReq **)__pyx_f_9vidcutter_4libs_3mpv_get_pointer(__pyx_t_8, __pyx_kp_s_drmModeAtomicReq));
-+ /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":996
-- * drm_params.connector_id = drm_display.get("connector_id", -1)
-- * arp = drm_display.get("atomic_request_ptr", None)
-- * if arp is not None: # <<<<<<<<<<<<<<
-- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-- * drm_params.render_fd = drm_display.get("render_fd", -1)
-+/* "vidcutter/libs/pympv/mpv.pyx":1105
-+ * mpv_render_context_report_swap(self._ctx)
-+ *
-+ * def free(self): # <<<<<<<<<<<<<<
-+ * if not self.inited:
-+ * return
- */
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":998
-- * if arp is not None:
-- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-- * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
-- * if drm_osd_size:
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v_drm_params.render_fd = __pyx_t_7;
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("free (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":999
-- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-- * drm_params.render_fd = drm_display.get("render_fd", -1)
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params) # <<<<<<<<<<<<<<
-- * if drm_osd_size:
-- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
-- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":991
-- * self._wl_display = wl_display
-- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-- * if drm_display: # <<<<<<<<<<<<<<
-- * drm_params.fd = drm_display.get("fd", -1)
-- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-- */
-- }
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ int __pyx_t_1;
-+ __Pyx_RefNannySetupContext("free", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1000
-- * drm_params.render_fd = drm_display.get("render_fd", -1)
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
-- * if drm_osd_size: # <<<<<<<<<<<<<<
-- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
-- */
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1000, __pyx_L1_error)
-- if (__pyx_t_3) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1001
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
-- * if drm_osd_size:
-- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size # <<<<<<<<<<<<<<
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
-- *
-- */
-- if ((likely(PyTuple_CheckExact(__pyx_v_drm_osd_size))) || (PyList_CheckExact(__pyx_v_drm_osd_size))) {
-- PyObject* sequence = __pyx_v_drm_osd_size;
-- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
-- if (unlikely(size != 2)) {
-- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
-- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-- __PYX_ERR(0, 1001, __pyx_L1_error)
-- }
-- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- if (likely(PyTuple_CheckExact(sequence))) {
-- __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
-- __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
-- } else {
-- __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
-- __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
-- }
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(__pyx_t_2);
-- #else
-- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- #endif
-- } else {
-- Py_ssize_t index = -1;
-- __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
-- index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
-- __Pyx_GOTREF(__pyx_t_1);
-- index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
-- __Pyx_GOTREF(__pyx_t_2);
-- if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
-- __pyx_t_9 = NULL;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- goto __pyx_L12_unpacking_done;
-- __pyx_L11_unpacking_failed:;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __pyx_t_9 = NULL;
-- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-- __PYX_ERR(0, 1001, __pyx_L1_error)
-- __pyx_L12_unpacking_done:;
-- }
-- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v__drm_osd_size.width = __pyx_t_7;
-- __pyx_v__drm_osd_size.height = __pyx_t_10;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1002
-- * if drm_osd_size:
-- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1106
- *
-- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
-+ * def free(self):
-+ * if not self.inited: # <<<<<<<<<<<<<<
-+ * return
-+ * with nogil:
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
-+ if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1000
-- * drm_params.render_fd = drm_display.get("render_fd", -1)
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
-- * if drm_osd_size: # <<<<<<<<<<<<<<
-- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1107
-+ * def free(self):
-+ * if not self.inited:
-+ * return # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * mpv_render_context_free(self._ctx)
- */
-- }
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1004
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1106
- *
-- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params) # <<<<<<<<<<<<<<
-- * if err < 0:
-- * raise MPVError(err)
-+ * def free(self):
-+ * if not self.inited: # <<<<<<<<<<<<<<
-+ * return
-+ * with nogil:
- */
-- __pyx_v_err = mpv_render_context_create((&__pyx_v_self->_ctx), __pyx_v_self->_mpv->_ctx, __pyx_v_params->params);
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1005
-- *
-- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-- * self.inited = True
-+ /* "vidcutter/libs/pympv/mpv.pyx":1108
-+ * if not self.inited:
-+ * return
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_render_context_free(self._ctx)
-+ * self.inited = False
- */
-- __pyx_t_3 = ((__pyx_v_err < 0) != 0);
-- if (unlikely(__pyx_t_3)) {
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1006
-- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
-- * if err < 0:
-- * raise MPVError(err) # <<<<<<<<<<<<<<
-- * self.inited = True
-+ /* "vidcutter/libs/pympv/mpv.pyx":1109
-+ * return
-+ * with nogil:
-+ * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
-+ * self.inited = False
- *
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_1, function);
-+ mpv_render_context_free(__pyx_v_self->_ctx);
- }
-- }
-- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __PYX_ERR(0, 1006, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1005
-- *
-- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-- * self.inited = True
-+ /* "vidcutter/libs/pympv/mpv.pyx":1108
-+ * if not self.inited:
-+ * return
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * mpv_render_context_free(self._ctx)
-+ * self.inited = False
- */
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L6;
-+ }
-+ __pyx_L6:;
-+ }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1007
-- * if err < 0:
-- * raise MPVError(err)
-- * self.inited = True # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1110
-+ * with nogil:
-+ * mpv_render_context_free(self._ctx)
-+ * self.inited = False # <<<<<<<<<<<<<<
- *
-- * @_errors
-+ * def close(self):
- */
-- __pyx_v_self->inited = 1;
-+ __pyx_v_self->inited = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":950
-- * bint inited
-+ /* "vidcutter/libs/pympv/mpv.pyx":1105
-+ * mpv_render_context_report_swap(self._ctx)
- *
-- * def __init__(self, mpv, # <<<<<<<<<<<<<<
-- * api_type,
-- * opengl_init_params=None,
-+ * def free(self): # <<<<<<<<<<<<<<
-+ * if not self.inited:
-+ * return
- */
-
- /* function exit code */
-- __pyx_r = 0;
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = -1;
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- __pyx_L0:;
-- __Pyx_XDECREF((PyObject *)__pyx_v_params);
-- __Pyx_XDECREF(__pyx_v_arp);
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1010
-+/* "vidcutter/libs/pympv/mpv.pyx":1112
-+ * self.inited = False
- *
-- * @_errors
-- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
-- * cdef:
-- * mpv_render_param param
-+ * def close(self): # <<<<<<<<<<<<<<
-+ * if not self.inited:
-+ * return
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile(PyObject *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("set_icc_profile (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_icc_blob));
-+ __Pyx_RefNannySetupContext("close (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_icc_blob) {
-- struct mpv_render_param __pyx_v_param;
-- struct mpv_byte_array __pyx_v_val;
-- int __pyx_v_err;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- int __pyx_t_1;
-- int __pyx_t_2;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- char *__pyx_t_6;
-- Py_ssize_t __pyx_t_7;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("set_icc_profile", 0);
-+ __Pyx_RefNannySetupContext("close", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1016
-- * int err
-+ /* "vidcutter/libs/pympv/mpv.pyx":1113
- *
-- * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
-- * raise PyMPVError("icc_blob should be a bytes instance")
-- * val.data = <void *><char *>icc_blob
-- */
-- __pyx_t_1 = PyBytes_Check(__pyx_v_icc_blob);
-- __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
-- if (unlikely(__pyx_t_2)) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1017
-- *
-- * if not isinstance(icc_blob, bytes):
-- * raise PyMPVError("icc_blob should be a bytes instance") # <<<<<<<<<<<<<<
-- * val.data = <void *><char *>icc_blob
-- * val.size = len(icc_blob)
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_4, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_icc_blob_should_be_a_bytes_insta) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_icc_blob_should_be_a_bytes_insta);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __PYX_ERR(0, 1017, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1016
-- * int err
-- *
-- * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
-- * raise PyMPVError("icc_blob should be a bytes instance")
-- * val.data = <void *><char *>icc_blob
-- */
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1018
-- * if not isinstance(icc_blob, bytes):
-- * raise PyMPVError("icc_blob should be a bytes instance")
-- * val.data = <void *><char *>icc_blob # <<<<<<<<<<<<<<
-- * val.size = len(icc_blob)
-- *
-- */
-- __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
-- __pyx_v_val.data = ((void *)((char *)__pyx_t_6));
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1019
-- * raise PyMPVError("icc_blob should be a bytes instance")
-- * val.data = <void *><char *>icc_blob
-- * val.size = len(icc_blob) # <<<<<<<<<<<<<<
-- *
-- * param.type = MPV_RENDER_PARAM_ICC_PROFILE
-+ * def close(self):
-+ * if not self.inited: # <<<<<<<<<<<<<<
-+ * return
-+ * with nogil:
- */
-- __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1019, __pyx_L1_error)
-- __pyx_v_val.size = __pyx_t_7;
-+ __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
-+ if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1021
-- * val.size = len(icc_blob)
-- *
-- * param.type = MPV_RENDER_PARAM_ICC_PROFILE # <<<<<<<<<<<<<<
-- * param.data = &val
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":1114
-+ * def close(self):
-+ * if not self.inited:
-+ * return # <<<<<<<<<<<<<<
-+ * with nogil:
-+ * mpv_render_context_free(self._ctx)
- */
-- __pyx_v_param.type = MPV_RENDER_PARAM_ICC_PROFILE;
-+ __Pyx_XDECREF(__pyx_r);
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1022
-- *
-- * param.type = MPV_RENDER_PARAM_ICC_PROFILE
-- * param.data = &val # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1113
- *
-+ * def close(self):
-+ * if not self.inited: # <<<<<<<<<<<<<<
-+ * return
- * with nogil:
- */
-- __pyx_v_param.data = (&__pyx_v_val);
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1024
-- * param.data = &val
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":1115
-+ * if not self.inited:
-+ * return
- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_render_context_set_parameter(self._ctx, param)
-- * return err
-+ * mpv_render_context_free(self._ctx)
-+ * self.inited = False
- */
- {
- #ifdef WITH_THREAD
-@@ -19899,22 +19014,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1025
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":1116
-+ * return
- * with nogil:
-- * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
-- * return err
-+ * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
-+ * self.inited = False
- *
- */
-- __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
-+ mpv_render_context_free(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1024
-- * param.data = &val
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":1115
-+ * if not self.inited:
-+ * return
- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_render_context_set_parameter(self._ctx, param)
-- * return err
-+ * mpv_render_context_free(self._ctx)
-+ * self.inited = False
- */
- /*finally:*/ {
- /*normal exit:*/{
-@@ -19928,1485 +19043,1505 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1026
-+ /* "vidcutter/libs/pympv/mpv.pyx":1117
- * with nogil:
-- * err = mpv_render_context_set_parameter(self._ctx, param)
-- * return err # <<<<<<<<<<<<<<
-+ * mpv_render_context_free(self._ctx)
-+ * self.inited = False # <<<<<<<<<<<<<<
- *
-- * @_errors
-+ * def __dealloc__(self):
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-- goto __pyx_L0;
-+ __pyx_v_self->inited = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1010
-+ /* "vidcutter/libs/pympv/mpv.pyx":1112
-+ * self.inited = False
- *
-- * @_errors
-- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
-- * cdef:
-- * mpv_render_param param
-+ * def close(self): # <<<<<<<<<<<<<<
-+ * if not self.inited:
-+ * return
- */
-
- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_icc_profile", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1029
-+/* "vidcutter/libs/pympv/mpv.pyx":1119
-+ * self.inited = False
-+ *
-+ * def __dealloc__(self): # <<<<<<<<<<<<<<
-+ * self.close()
- *
-- * @_errors
-- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
-- * cdef:
-- * mpv_render_param param
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light(PyObject *__pyx_v_self, PyObject *__pyx_v_lux) {
-- PyObject *__pyx_r = 0;
-+static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self); /*proto*/
-+static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self) {
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("set_ambient_light (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_lux));
-+ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-+ __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_light(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_lux) {
-- struct mpv_render_param __pyx_v_param;
-- int __pyx_v_val;
-- int __pyx_v_err;
-- PyObject *__pyx_r = NULL;
-+static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-+ PyObject *__pyx_t_1 = NULL;
- PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("set_ambient_light", 0);
-+ __Pyx_RefNannySetupContext("__dealloc__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1035
-- * int err
-+ /* "vidcutter/libs/pympv/mpv.pyx":1120
- *
-- * val = lux # <<<<<<<<<<<<<<
-- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
-- * param.data = &val
-+ * def __dealloc__(self):
-+ * self.close() # <<<<<<<<<<<<<<
-+ *
-+ * cdef class OpenGLRenderContext(RenderContext):
- */
-- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
-- __pyx_v_val = __pyx_t_1;
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1036
-+ /* "vidcutter/libs/pympv/mpv.pyx":1119
-+ * self.inited = False
- *
-- * val = lux
-- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT # <<<<<<<<<<<<<<
-- * param.data = &val
-+ * def __dealloc__(self): # <<<<<<<<<<<<<<
-+ * self.close()
- *
- */
-- __pyx_v_param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1037
-- * val = lux
-- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
-- * param.data = &val # <<<<<<<<<<<<<<
-- *
-- * with nogil:
-- */
-- __pyx_v_param.data = (&__pyx_v_val);
-+ /* function exit code */
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_WriteUnraisable("vidcutter.libs.mpv.RenderContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __pyx_L0:;
-+ __Pyx_RefNannyFinishContext();
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1039
-- * param.data = &val
-- *
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_render_context_set_parameter(self._ctx, param)
-- * return err
-+/* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state):
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1040
-- *
-- * with nogil:
-- * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
-- * return err
-- *
-- */
-- __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
-- }
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1039
-- * param.data = &val
-- *
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_render_context_set_parameter(self._ctx, param)
-- * return err
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-- }
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1041
-- * with nogil:
-- * err = mpv_render_context_set_parameter(self._ctx, param)
-- * return err # <<<<<<<<<<<<<<
-- *
-- * def get_next_frame_info(self):
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-+
-+ /* "(tree fragment)":2
-+ * def __reduce_cython__(self):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_r = __pyx_t_2;
-- __pyx_t_2 = 0;
-- goto __pyx_L0;
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __PYX_ERR(1, 2, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1029
-- *
-- * @_errors
-- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
-- * cdef:
-- * mpv_render_param param
-+ /* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state):
- */
-
- /* function exit code */
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.set_ambient_light", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
-- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1043
-- * return err
-- *
-- * def get_next_frame_info(self): # <<<<<<<<<<<<<<
-- * cdef:
-- * mpv_render_frame_info info
-+/* "(tree fragment)":3
-+ * def __reduce_cython__(self):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("get_next_frame_info (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_info(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-- struct mpv_render_frame_info __pyx_v_info;
-- struct mpv_render_param __pyx_v_param;
-- int __pyx_v_err;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-+ PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("get_next_frame_info", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1048
-- * mpv_render_param param
-- *
-- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO # <<<<<<<<<<<<<<
-- * param.data = &info
-- * with nogil:
-- */
-- __pyx_v_param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1049
-- *
-- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
-- * param.data = &info # <<<<<<<<<<<<<<
-- * with nogil:
-- * err = mpv_render_context_get_info(self._ctx, param)
-- */
-- __pyx_v_param.data = (&__pyx_v_info);
-+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1050
-- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
-- * param.data = &info
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_render_context_get_info(self._ctx, param)
-- * if err < 0:
-+ /* "(tree fragment)":4
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __PYX_ERR(1, 4, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1051
-- * param.data = &info
-- * with nogil:
-- * err = mpv_render_context_get_info(self._ctx, param) # <<<<<<<<<<<<<<
-- * if err < 0:
-- * raise MPVError(err)
-+ /* "(tree fragment)":3
-+ * def __reduce_cython__(self):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
- */
-- __pyx_v_err = mpv_render_context_get_info(__pyx_v_self->_ctx, __pyx_v_param);
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1050
-- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
-- * param.data = &info
-- * with nogil: # <<<<<<<<<<<<<<
-- * err = mpv_render_context_get_info(self._ctx, param)
-- * if err < 0:
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-- }
-+ /* function exit code */
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1052
-- * with nogil:
-- * err = mpv_render_context_get_info(self._ctx, param)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-+/* "vidcutter/libs/pympv/mpv.pyx":1123
- *
-+ * cdef class OpenGLRenderContext(RenderContext):
-+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
-+ * get_proc_address,
-+ * *args, **kwargs):
- */
-- __pyx_t_1 = ((__pyx_v_err < 0) != 0);
-- if (unlikely(__pyx_t_1)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1053
-- * err = mpv_render_context_get_info(self._ctx, param)
-- * if err < 0:
-- * raise MPVError(err) # <<<<<<<<<<<<<<
-- *
-- * return RenderFrameInfo()._from_struct(&info)
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- }
-+/* Python wrapper */
-+static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_mpv = 0;
-+ PyObject *__pyx_v_get_proc_address = 0;
-+ PyObject *__pyx_v_args = 0;
-+ PyObject *__pyx_v_kwargs = 0;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-+ __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
-+ __Pyx_GOTREF(__pyx_v_kwargs);
-+ if (PyTuple_GET_SIZE(__pyx_args) > 2) {
-+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
-+ if (unlikely(!__pyx_v_args)) {
-+ __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
-+ __Pyx_RefNannyFinishContext();
-+ return -1;
- }
-- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __PYX_ERR(0, 1053, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_v_args);
-+ } else {
-+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
-+ }
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_get_proc_address,0};
-+ PyObject* values[2] = {0,0};
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ default:
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1123, __pyx_L3_error)
-+ }
-+ }
-+ if (unlikely(kw_args > 0)) {
-+ const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1123, __pyx_L3_error)
-+ }
-+ } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
-+ goto __pyx_L5_argtuple_error;
-+ } else {
-+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ }
-+ __pyx_v_mpv = values[0];
-+ __pyx_v_get_proc_address = values[1];
-+ }
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1123, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
-+ __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return -1;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_get_proc_address, __pyx_v_args, __pyx_v_kwargs);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1052
-- * with nogil:
-- * err = mpv_render_context_get_info(self._ctx, param)
-- * if err < 0: # <<<<<<<<<<<<<<
-- * raise MPVError(err)
-+ /* function exit code */
-+ __Pyx_XDECREF(__pyx_v_args);
-+ __Pyx_XDECREF(__pyx_v_kwargs);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_get_proc_address, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
-+ PyObject *__pyx_v_init_params = NULL;
-+ int __pyx_r;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__init__", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1127
-+ * *args, **kwargs):
-+ * init_params = {
-+ * "get_proc_address": get_proc_address # <<<<<<<<<<<<<<
-+ * }
-+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
-+ */
-+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1127, __pyx_L1_error)
-+ __pyx_v_init_params = ((PyObject*)__pyx_t_1);
-+ __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1129
-+ * "get_proc_address": get_proc_address
-+ * }
-+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
-+ * init_params, *args, **kwargs)
- *
- */
-- }
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1055
-- * raise MPVError(err)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1130
-+ * }
-+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
-+ * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
- *
-- * return RenderFrameInfo()._from_struct(&info) # <<<<<<<<<<<<<<
-+ * class CallbackThread(Thread):
-+ */
-+ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_INCREF(((PyObject *)__pyx_v_self));
-+ __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-+ PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
-+ __Pyx_INCREF(__pyx_v_mpv);
-+ __Pyx_GIVEREF(__pyx_v_mpv);
-+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_mpv);
-+ __Pyx_GIVEREF(__pyx_t_2);
-+ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
-+ __Pyx_INCREF(__pyx_v_init_params);
-+ __Pyx_GIVEREF(__pyx_v_init_params);
-+ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_init_params);
-+ __pyx_t_2 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1129
-+ * "get_proc_address": get_proc_address
-+ * }
-+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
-+ * init_params, *args, **kwargs)
- *
-- * def set_update_callback(self, cb):
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
-+ __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1130
-+ * }
-+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
-+ * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
-+ *
-+ * class CallbackThread(Thread):
-+ */
-+ __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1129
-+ * "get_proc_address": get_proc_address
-+ * }
-+ * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
-+ * init_params, *args, **kwargs)
-+ *
-+ */
-+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_r = __pyx_t_3;
-- __pyx_t_3 = 0;
-- goto __pyx_L0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1043
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":1123
- *
-- * def get_next_frame_info(self): # <<<<<<<<<<<<<<
-- * cdef:
-- * mpv_render_frame_info info
-+ * cdef class OpenGLRenderContext(RenderContext):
-+ * def __init__(self, mpv, # <<<<<<<<<<<<<<
-+ * get_proc_address,
-+ * *args, **kwargs):
- */
-
- /* function exit code */
-+ __pyx_r = 0;
-+ goto __pyx_L0;
- __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.get_next_frame_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = -1;
- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_XDECREF(__pyx_v_init_params);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1057
-- * return RenderFrameInfo()._from_struct(&info)
-- *
-- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-+/* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state):
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_cb) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("set_update_callback (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v_cb));
-+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_callback(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_cb) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("set_update_callback", 0);
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1058
-- *
-- * def set_update_callback(self, cb):
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-- * self.update_cb = cb
-+ /* "(tree fragment)":2
-+ * def __reduce_cython__(self):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __PYX_ERR(1, 2, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1059
-- * def set_update_callback(self, cb):
-- * with nogil:
-- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
-- * self.update_cb = cb
-- *
-- */
-- mpv_render_context_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1058
-- *
-- * def set_update_callback(self, cb):
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-- * self.update_cb = cb
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1060
-- * with nogil:
-- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-- * self.update_cb = cb # <<<<<<<<<<<<<<
-- *
-- * def update(self):
-- */
-- __Pyx_INCREF(__pyx_v_cb);
-- __Pyx_GIVEREF(__pyx_v_cb);
-- __Pyx_GOTREF(__pyx_v_self->update_cb);
-- __Pyx_DECREF(__pyx_v_self->update_cb);
-- __pyx_v_self->update_cb = __pyx_v_cb;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1057
-- * return RenderFrameInfo()._from_struct(&info)
-- *
-- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
-+ /* "(tree fragment)":1
-+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state):
- */
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1062
-- * self.update_cb = cb
-- *
-- * def update(self): # <<<<<<<<<<<<<<
-- * cdef uint64_t ret
-- * with nogil:
-+/* "(tree fragment)":3
-+ * def __reduce_cython__(self):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("update (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-- uint64_t __pyx_v_ret;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("update", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1064
-- * def update(self):
-- * cdef uint64_t ret
-- * with nogil: # <<<<<<<<<<<<<<
-- * ret = mpv_render_context_update(self._ctx)
-- * return ret
-- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1065
-- * cdef uint64_t ret
-- * with nogil:
-- * ret = mpv_render_context_update(self._ctx) # <<<<<<<<<<<<<<
-- * return ret
-- *
-- */
-- __pyx_v_ret = mpv_render_context_update(__pyx_v_self->_ctx);
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1064
-- * def update(self):
-- * cdef uint64_t ret
-- * with nogil: # <<<<<<<<<<<<<<
-- * ret = mpv_render_context_update(self._ctx)
-- * return ret
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-- }
-- __pyx_L5:;
-- }
-- }
-+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1066
-- * with nogil:
-- * ret = mpv_render_context_update(self._ctx)
-- * return ret # <<<<<<<<<<<<<<
-- *
-- * @_errors
-+ /* "(tree fragment)":4
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __PYX_ERR(1, 4, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1062
-- * self.update_cb = cb
-- *
-- * def update(self): # <<<<<<<<<<<<<<
-- * cdef uint64_t ret
-- * with nogil:
-+ /* "(tree fragment)":3
-+ * def __reduce_cython__(self):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
- */
-
- /* function exit code */
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
-- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1069
-+/* "vidcutter/libs/pympv/mpv.pyx":1133
- *
-- * @_errors
-- * def render(self, # <<<<<<<<<<<<<<
-- * opengl_fbo=None,
-- * flip_y=False,
-+ * class CallbackThread(Thread):
-+ * def __init__(self): # <<<<<<<<<<<<<<
-+ * Thread.__init__(self)
-+ * self.daemon = True
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_opengl_fbo = 0;
-- PyObject *__pyx_v_flip_y = 0;
-- PyObject *__pyx_v_depth = 0;
-- PyObject *__pyx_v_block_for_target_time = 0;
-- PyObject *__pyx_v_skip_rendering = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__ = {"__init__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, METH_O, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("render (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_opengl_fbo,&__pyx_n_s_flip_y,&__pyx_n_s_depth,&__pyx_n_s_block_for_target_time,&__pyx_n_s_skip_rendering,0};
-- PyObject* values[5] = {0,0,0,0,0};
-+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(__pyx_self, ((PyObject *)__pyx_v_self));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1070
-- * @_errors
-- * def render(self,
-- * opengl_fbo=None, # <<<<<<<<<<<<<<
-- * flip_y=False,
-- * depth=None,
-- */
-- values[0] = ((PyObject *)Py_None);
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1071
-- * def render(self,
-- * opengl_fbo=None,
-- * flip_y=False, # <<<<<<<<<<<<<<
-- * depth=None,
-- * block_for_target_time=True,
-- */
-- values[1] = ((PyObject *)Py_False);
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__init__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1072
-- * opengl_fbo=None,
-- * flip_y=False,
-- * depth=None, # <<<<<<<<<<<<<<
-- * block_for_target_time=True,
-- * skip_rendering=False):
-+ /* "vidcutter/libs/pympv/mpv.pyx":1134
-+ * class CallbackThread(Thread):
-+ * def __init__(self):
-+ * Thread.__init__(self) # <<<<<<<<<<<<<<
-+ * self.daemon = True
-+ * self.lock = Semaphore()
- */
-- values[2] = ((PyObject *)Py_None);
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_2 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
-+ if (likely(__pyx_t_2)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_2);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_3, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self);
-+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1073
-- * flip_y=False,
-- * depth=None,
-- * block_for_target_time=True, # <<<<<<<<<<<<<<
-- * skip_rendering=False):
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":1135
-+ * def __init__(self):
-+ * Thread.__init__(self)
-+ * self.daemon = True # <<<<<<<<<<<<<<
-+ * self.lock = Semaphore()
-+ * self.lock.acquire(True)
- */
-- values[3] = ((PyObject *)Py_True);
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1074
-- * depth=None,
-- * block_for_target_time=True,
-- * skip_rendering=False): # <<<<<<<<<<<<<<
-- *
-- * cdef:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1136
-+ * Thread.__init__(self)
-+ * self.daemon = True
-+ * self.lock = Semaphore() # <<<<<<<<<<<<<<
-+ * self.lock.acquire(True)
-+ * self.callback = None
- */
-- values[4] = ((PyObject *)Py_False);
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-- CYTHON_FALLTHROUGH;
-- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-- CYTHON_FALLTHROUGH;
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_opengl_fbo);
-- if (value) { values[0] = value; kw_args--; }
-- }
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flip_y);
-- if (value) { values[1] = value; kw_args--; }
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_depth);
-- if (value) { values[2] = value; kw_args--; }
-- }
-- CYTHON_FALLTHROUGH;
-- case 3:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_block_for_target_time);
-- if (value) { values[3] = value; kw_args--; }
-- }
-- CYTHON_FALLTHROUGH;
-- case 4:
-- if (kw_args > 0) {
-- PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_skip_rendering);
-- if (value) { values[4] = value; kw_args--; }
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1069, __pyx_L3_error)
-- }
-- } else {
-- switch (PyTuple_GET_SIZE(__pyx_args)) {
-- case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
-- CYTHON_FALLTHROUGH;
-- case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
-- CYTHON_FALLTHROUGH;
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_2 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
-+ if (likely(__pyx_t_2)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_2);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_3, function);
- }
-- __pyx_v_opengl_fbo = values[0];
-- __pyx_v_flip_y = values[1];
-- __pyx_v_depth = values[2];
-- __pyx_v_block_for_target_time = values[3];
-- __pyx_v_skip_rendering = values[4];
- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1069, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1137
-+ * self.daemon = True
-+ * self.lock = Semaphore()
-+ * self.lock.acquire(True) # <<<<<<<<<<<<<<
-+ * self.callback = None
-+ * self.isshutdown = False
-+ */
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __pyx_t_3 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_True);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1138
-+ * self.lock = Semaphore()
-+ * self.lock.acquire(True)
-+ * self.callback = None # <<<<<<<<<<<<<<
-+ * self.isshutdown = False
-+ *
-+ */
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1139
-+ * self.lock.acquire(True)
-+ * self.callback = None
-+ * self.isshutdown = False # <<<<<<<<<<<<<<
-+ *
-+ * def shutdown(self):
-+ */
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1133
-+ *
-+ * class CallbackThread(Thread):
-+ * def __init__(self): # <<<<<<<<<<<<<<
-+ * Thread.__init__(self)
-+ * self.daemon = True
-+ */
-+
-+ /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_opengl_fbo, __pyx_v_flip_y, __pyx_v_depth, __pyx_v_block_for_target_time, __pyx_v_skip_rendering);
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1069
-+/* "vidcutter/libs/pympv/mpv.pyx":1141
-+ * self.isshutdown = False
- *
-- * @_errors
-- * def render(self, # <<<<<<<<<<<<<<
-- * opengl_fbo=None,
-- * flip_y=False,
-+ * def shutdown(self): # <<<<<<<<<<<<<<
-+ * self.isshutdown = True
-+ * self.callback = None
- */
-
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown = {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, METH_O, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(__pyx_self, ((PyObject *)__pyx_v_self));
-+
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, PyObject *__pyx_v_opengl_fbo, PyObject *__pyx_v_flip_y, PyObject *__pyx_v_depth, PyObject *__pyx_v_block_for_target_time, PyObject *__pyx_v_skip_rendering) {
-- struct mpv_opengl_fbo __pyx_v_fbo;
-- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *__pyx_v_params = NULL;
-- int __pyx_v_ret;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- int __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- int __pyx_t_5;
-- int __pyx_t_6;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("render", 0);
-+ __Pyx_RefNannySetupContext("shutdown", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1079
-- * mpv_opengl_fbo fbo
-- *
-- * params = _RenderParams() # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1142
- *
-- * if opengl_fbo:
-+ * def shutdown(self):
-+ * self.isshutdown = True # <<<<<<<<<<<<<<
-+ * self.callback = None
-+ * self.lock.release()
- */
-- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
-- __pyx_t_1 = 0;
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1081
-- * params = _RenderParams()
-+ /* "vidcutter/libs/pympv/mpv.pyx":1143
-+ * def shutdown(self):
-+ * self.isshutdown = True
-+ * self.callback = None # <<<<<<<<<<<<<<
-+ * self.lock.release()
- *
-- * if opengl_fbo: # <<<<<<<<<<<<<<
-- * memset(&fbo, 0, sizeof(fbo))
-- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
- */
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
-- if (__pyx_t_2) {
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1082
-+ /* "vidcutter/libs/pympv/mpv.pyx":1144
-+ * self.isshutdown = True
-+ * self.callback = None
-+ * self.lock.release() # <<<<<<<<<<<<<<
- *
-- * if opengl_fbo:
-- * memset(&fbo, 0, sizeof(fbo)) # <<<<<<<<<<<<<<
-- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
-- * fbo.w = opengl_fbo["w"]
-- */
-- (void)(memset((&__pyx_v_fbo), 0, (sizeof(__pyx_v_fbo))));
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1083
-- * if opengl_fbo:
-- * memset(&fbo, 0, sizeof(fbo))
-- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
-- * fbo.w = opengl_fbo["w"]
-- * fbo.h = opengl_fbo["h"]
-+ * def call(self):
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
-- if (!__pyx_t_2) {
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- } else {
-- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error)
-- __pyx_t_3 = __pyx_t_5;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- goto __pyx_L4_bool_binop_done;
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_2 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
-+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
-+ if (likely(__pyx_t_2)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_2);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_3, function);
- }
-- __pyx_t_3 = 0;
-- __pyx_L4_bool_binop_done:;
-- __pyx_v_fbo.fbo = __pyx_t_3;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1084
-- * memset(&fbo, 0, sizeof(fbo))
-- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
-- * fbo.w = opengl_fbo["w"] # <<<<<<<<<<<<<<
-- * fbo.h = opengl_fbo["h"]
-- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
-- */
-- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __pyx_v_fbo.w = __pyx_t_3;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1085
-- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
-- * fbo.w = opengl_fbo["w"]
-- * fbo.h = opengl_fbo["h"] # <<<<<<<<<<<<<<
-- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
-- */
-- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __pyx_v_fbo.h = __pyx_t_3;
-+ }
-+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1086
-- * fbo.w = opengl_fbo["w"]
-- * fbo.h = opengl_fbo["h"]
-- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
-- * if flip_y:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1141
-+ * self.isshutdown = False
-+ *
-+ * def shutdown(self): # <<<<<<<<<<<<<<
-+ * self.isshutdown = True
-+ * self.callback = None
- */
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error)
-- if (!__pyx_t_2) {
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- } else {
-- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
-- __pyx_t_3 = __pyx_t_5;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- goto __pyx_L6_bool_binop_done;
-- }
-- __pyx_t_3 = 0;
-- __pyx_L6_bool_binop_done:;
-- __pyx_v_fbo.internal_format = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1087
-- * fbo.h = opengl_fbo["h"]
-- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo) # <<<<<<<<<<<<<<
-- * if flip_y:
-- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1081
-- * params = _RenderParams()
-+/* "vidcutter/libs/pympv/mpv.pyx":1146
-+ * self.lock.release()
-+ *
-+ * def call(self): # <<<<<<<<<<<<<<
-+ * self.lock.release()
- *
-- * if opengl_fbo: # <<<<<<<<<<<<<<
-- * memset(&fbo, 0, sizeof(fbo))
-- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
- */
-- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1088
-- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
-- * if flip_y: # <<<<<<<<<<<<<<
-- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-- * if depth is not None:
-- */
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
-- if (__pyx_t_2) {
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call = {"call", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call, METH_O, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("call (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(__pyx_self, ((PyObject *)__pyx_v_self));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1089
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
-- * if flip_y:
-- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1) # <<<<<<<<<<<<<<
-- * if depth is not None:
-- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1088
-- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
-- * if flip_y: # <<<<<<<<<<<<<<
-- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-- * if depth is not None:
-- */
-- }
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("call", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1090
-- * if flip_y:
-- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-- * if depth is not None: # <<<<<<<<<<<<<<
-- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-- * if not block_for_target_time:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1147
-+ *
-+ * def call(self):
-+ * self.lock.release() # <<<<<<<<<<<<<<
-+ *
-+ * def set(self, callback):
- */
-- __pyx_t_2 = (__pyx_v_depth != Py_None);
-- __pyx_t_6 = (__pyx_t_2 != 0);
-- if (__pyx_t_6) {
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_2 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
-+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
-+ if (likely(__pyx_t_2)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_2);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_3, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1091
-- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-- * if depth is not None:
-- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth) # <<<<<<<<<<<<<<
-- * if not block_for_target_time:
-- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1146
-+ * self.lock.release()
-+ *
-+ * def call(self): # <<<<<<<<<<<<<<
-+ * self.lock.release()
-+ *
- */
-- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1090
-- * if flip_y:
-- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
-- * if depth is not None: # <<<<<<<<<<<<<<
-- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-- * if not block_for_target_time:
-- */
-- }
-+ /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.call", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1092
-- * if depth is not None:
-- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-- * if not block_for_target_time: # <<<<<<<<<<<<<<
-- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
-- * if skip_rendering:
-+/* "vidcutter/libs/pympv/mpv.pyx":1149
-+ * self.lock.release()
-+ *
-+ * def set(self, callback): # <<<<<<<<<<<<<<
-+ * self.callback = callback
-+ *
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
-- __pyx_t_2 = ((!__pyx_t_6) != 0);
-- if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1093
-- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-- * if not block_for_target_time:
-- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0) # <<<<<<<<<<<<<<
-- * if skip_rendering:
-- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
-- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1092
-- * if depth is not None:
-- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
-- * if not block_for_target_time: # <<<<<<<<<<<<<<
-- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
-- * if skip_rendering:
-- */
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1094
-- * if not block_for_target_time:
-- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
-- * if skip_rendering: # <<<<<<<<<<<<<<
-- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
-- *
-- */
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
-- if (__pyx_t_2) {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1095
-- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
-- * if skip_rendering:
-- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1) # <<<<<<<<<<<<<<
-- *
-- * with nogil:
-- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1094
-- * if not block_for_target_time:
-- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
-- * if skip_rendering: # <<<<<<<<<<<<<<
-- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
-- *
-- */
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1097
-- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
-- *
-- * with nogil: # <<<<<<<<<<<<<<
-- * ret = mpv_render_context_render(self._ctx, params.params)
-- * return ret
-- */
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set = {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set, METH_VARARGS|METH_KEYWORDS, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v_self = 0;
-+ PyObject *__pyx_v_callback = 0;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("set (wrapper)", 0);
- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1098
-- *
-- * with nogil:
-- * ret = mpv_render_context_render(self._ctx, params.params) # <<<<<<<<<<<<<<
-- * return ret
-- *
-- */
-- __pyx_v_ret = mpv_render_context_render(__pyx_v_self->_ctx, __pyx_v_params->params);
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
-+ PyObject* values[2] = {0,0};
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1097
-- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
-- *
-- * with nogil: # <<<<<<<<<<<<<<
-- * ret = mpv_render_context_render(self._ctx, params.params)
-- * return ret
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L14;
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1149, __pyx_L3_error)
- }
-- __pyx_L14:;
- }
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1149, __pyx_L3_error)
-+ }
-+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-+ goto __pyx_L5_argtuple_error;
-+ } else {
-+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ }
-+ __pyx_v_self = values[0];
-+ __pyx_v_callback = values[1];
- }
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1149, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(__pyx_self, __pyx_v_self, __pyx_v_callback);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1099
-- * with nogil:
-- * ret = mpv_render_context_render(self._ctx, params.params)
-- * return ret # <<<<<<<<<<<<<<
-+ /* function exit code */
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("set", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1150
- *
-- * def report_swap(self):
-+ * def set(self, callback):
-+ * self.callback = callback # <<<<<<<<<<<<<<
-+ *
-+ * def run(self):
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_r = __pyx_t_1;
-- __pyx_t_1 = 0;
-- goto __pyx_L0;
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1069
-+ /* "vidcutter/libs/pympv/mpv.pyx":1149
-+ * self.lock.release()
-+ *
-+ * def set(self, callback): # <<<<<<<<<<<<<<
-+ * self.callback = callback
- *
-- * @_errors
-- * def render(self, # <<<<<<<<<<<<<<
-- * opengl_fbo=None,
-- * flip_y=False,
- */
-
- /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF((PyObject *)__pyx_v_params);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1101
-- * return ret
-+/* "vidcutter/libs/pympv/mpv.pyx":1152
-+ * self.callback = callback
- *
-- * def report_swap(self): # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_render_context_report_swap(self._ctx)
-+ * def run(self): # <<<<<<<<<<<<<<
-+ * while not self.isshutdown:
-+ * self.lock.acquire(True)
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run = {"run", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run, METH_O, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("report_swap (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("run (wrapper)", 0);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(__pyx_self, ((PyObject *)__pyx_v_self));
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("report_swap", 0);
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_2;
-+ int __pyx_t_3;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("run", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1102
-- *
-- * def report_swap(self):
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_render_context_report_swap(self._ctx)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1153
- *
-+ * def run(self):
-+ * while not self.isshutdown: # <<<<<<<<<<<<<<
-+ * self.lock.acquire(True)
-+ * self.mpv_callback(self.callback) if self.callback else None
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ while (1) {
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_3 = ((!__pyx_t_2) != 0);
-+ if (!__pyx_t_3) break;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1103
-- * def report_swap(self):
-- * with nogil:
-- * mpv_render_context_report_swap(self._ctx) # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1154
-+ * def run(self):
-+ * while not self.isshutdown:
-+ * self.lock.acquire(True) # <<<<<<<<<<<<<<
-+ * self.mpv_callback(self.callback) if self.callback else None
- *
-- * def free(self):
- */
-- mpv_render_context_report_swap(__pyx_v_self->_ctx);
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1102
-- *
-- * def report_swap(self):
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_render_context_report_swap(self._ctx)
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_5, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_True);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1155
-+ * while not self.isshutdown:
-+ * self.lock.acquire(True)
-+ * self.mpv_callback(self.callback) if self.callback else None # <<<<<<<<<<<<<<
- *
-+ * def mpv_callback(self, callback):
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L5;
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ if (__pyx_t_3) {
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1155, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_7 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
-+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
-+ if (likely(__pyx_t_7)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-+ __Pyx_INCREF(__pyx_t_7);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_4, function);
- }
-- __pyx_L5:;
- }
-+ __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_1 = __pyx_t_5;
-+ __pyx_t_5 = 0;
-+ } else {
-+ __Pyx_INCREF(Py_None);
-+ __pyx_t_1 = Py_None;
-+ }
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1101
-- * return ret
-+ /* "vidcutter/libs/pympv/mpv.pyx":1152
-+ * self.callback = callback
- *
-- * def report_swap(self): # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_render_context_report_swap(self._ctx)
-+ * def run(self): # <<<<<<<<<<<<<<
-+ * while not self.isshutdown:
-+ * self.lock.acquire(True)
- */
-
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
-+ __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1105
-- * mpv_render_context_report_swap(self._ctx)
-+/* "vidcutter/libs/pympv/mpv.pyx":1157
-+ * self.mpv_callback(self.callback) if self.callback else None
- *
-- * def free(self): # <<<<<<<<<<<<<<
-- * if not self.inited:
-- * return
-+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
-+ * try:
-+ * callback()
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback = {"mpv_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, METH_VARARGS|METH_KEYWORDS, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
-+ PyObject *__pyx_v_callback = 0;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("free (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("mpv_callback (wrapper)", 0);
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
-+ PyObject* values[2] = {0,0};
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1157, __pyx_L3_error)
-+ }
-+ }
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error)
-+ }
-+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-+ goto __pyx_L5_argtuple_error;
-+ } else {
-+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ }
-+ __pyx_v_self = values[0];
-+ __pyx_v_callback = values[1];
-+ }
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1157, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(__pyx_self, __pyx_v_self, __pyx_v_callback);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
-+ PyObject *__pyx_v_e = NULL;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- __Pyx_RefNannySetupContext("free", 0);
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ PyObject *__pyx_t_6 = NULL;
-+ int __pyx_t_7;
-+ PyObject *__pyx_t_8 = NULL;
-+ PyObject *__pyx_t_9 = NULL;
-+ PyObject *__pyx_t_10 = NULL;
-+ PyObject *__pyx_t_11 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("mpv_callback", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1106
-+ /* "vidcutter/libs/pympv/mpv.pyx":1158
- *
-- * def free(self):
-- * if not self.inited: # <<<<<<<<<<<<<<
-- * return
-- * with nogil:
-+ * def mpv_callback(self, callback):
-+ * try: # <<<<<<<<<<<<<<
-+ * callback()
-+ * except Exception as e:
- */
-- __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
-- if (__pyx_t_1) {
-+ {
-+ __Pyx_PyThreadState_declare
-+ __Pyx_PyThreadState_assign
-+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
-+ __Pyx_XGOTREF(__pyx_t_1);
-+ __Pyx_XGOTREF(__pyx_t_2);
-+ __Pyx_XGOTREF(__pyx_t_3);
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1107
-- * def free(self):
-- * if not self.inited:
-- * return # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_render_context_free(self._ctx)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1159
-+ * def mpv_callback(self, callback):
-+ * try:
-+ * callback() # <<<<<<<<<<<<<<
-+ * except Exception as e:
-+ * sys.stderr.write("pympv error during callback: %s\n" % e)
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-+ __Pyx_INCREF(__pyx_v_callback);
-+ __pyx_t_5 = __pyx_v_callback; __pyx_t_6 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
-+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
-+ if (likely(__pyx_t_6)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-+ __Pyx_INCREF(__pyx_t_6);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_5, function);
-+ }
-+ }
-+ __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L3_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1106
-+ /* "vidcutter/libs/pympv/mpv.pyx":1158
- *
-- * def free(self):
-- * if not self.inited: # <<<<<<<<<<<<<<
-- * return
-- * with nogil:
-+ * def mpv_callback(self, callback):
-+ * try: # <<<<<<<<<<<<<<
-+ * callback()
-+ * except Exception as e:
- */
-- }
-+ }
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ goto __pyx_L8_try_end;
-+ __pyx_L3_error:;
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1108
-- * if not self.inited:
-- * return
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_render_context_free(self._ctx)
-- * self.inited = False
-- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1109
-- * return
-- * with nogil:
-- * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
-- * self.inited = False
-+ /* "vidcutter/libs/pympv/mpv.pyx":1160
-+ * try:
-+ * callback()
-+ * except Exception as e: # <<<<<<<<<<<<<<
-+ * sys.stderr.write("pympv error during callback: %s\n" % e)
- *
- */
-- mpv_render_context_free(__pyx_v_self->_ctx);
-- }
-+ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-+ if (__pyx_t_7) {
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1160, __pyx_L5_except_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __pyx_v_e = __pyx_t_5;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1108
-- * if not self.inited:
-- * return
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_render_context_free(self._ctx)
-- * self.inited = False
-+ /* "vidcutter/libs/pympv/mpv.pyx":1161
-+ * callback()
-+ * except Exception as e:
-+ * sys.stderr.write("pympv error during callback: %s\n" % e) # <<<<<<<<<<<<<<
-+ *
-+ * cdef void _c_callback(void* d) with gil:
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L6;
-+ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-+ __Pyx_GOTREF(__pyx_t_9);
-+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-+ __Pyx_GOTREF(__pyx_t_10);
-+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-+ __Pyx_GOTREF(__pyx_t_9);
-+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-+ __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-+ __Pyx_GOTREF(__pyx_t_10);
-+ __pyx_t_11 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
-+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
-+ if (likely(__pyx_t_11)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
-+ __Pyx_INCREF(__pyx_t_11);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_9, function);
- }
-- __pyx_L6:;
- }
-- }
-+ __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
-+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-+ if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-+ __Pyx_GOTREF(__pyx_t_8);
-+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ goto __pyx_L4_exception_handled;
-+ }
-+ goto __pyx_L5_except_error;
-+ __pyx_L5_except_error:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1110
-- * with nogil:
-- * mpv_render_context_free(self._ctx)
-- * self.inited = False # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":1158
- *
-- * def close(self):
-+ * def mpv_callback(self, callback):
-+ * try: # <<<<<<<<<<<<<<
-+ * callback()
-+ * except Exception as e:
- */
-- __pyx_v_self->inited = 0;
-+ __Pyx_XGIVEREF(__pyx_t_1);
-+ __Pyx_XGIVEREF(__pyx_t_2);
-+ __Pyx_XGIVEREF(__pyx_t_3);
-+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-+ goto __pyx_L1_error;
-+ __pyx_L4_exception_handled:;
-+ __Pyx_XGIVEREF(__pyx_t_1);
-+ __Pyx_XGIVEREF(__pyx_t_2);
-+ __Pyx_XGIVEREF(__pyx_t_3);
-+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-+ __pyx_L8_try_end:;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1105
-- * mpv_render_context_report_swap(self._ctx)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1157
-+ * self.mpv_callback(self.callback) if self.callback else None
- *
-- * def free(self): # <<<<<<<<<<<<<<
-- * if not self.inited:
-- * return
-+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
-+ * try:
-+ * callback()
- */
-
- /* function exit code */
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_8);
-+ __Pyx_XDECREF(__pyx_t_9);
-+ __Pyx_XDECREF(__pyx_t_10);
-+ __Pyx_XDECREF(__pyx_t_11);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = NULL;
- __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_e);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1112
-- * self.inited = False
-+/* "vidcutter/libs/pympv/mpv.pyx":1163
-+ * sys.stderr.write("pympv error during callback: %s\n" % e)
- *
-- * def close(self): # <<<<<<<<<<<<<<
-- * if not self.inited:
-- * return
-+ * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
-+ * cdef uint64_t name = <uint64_t>d
-+ * callback = _callbacks.get(name)
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("close (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-+static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
-+ uint64_t __pyx_v_name;
-+ PyObject *__pyx_v_callback = NULL;
- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- __Pyx_RefNannySetupContext("close", 0);
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ #ifdef WITH_THREAD
-+ PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
-+ #endif
-+ __Pyx_RefNannySetupContext("_c_callback", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1113
-+ /* "vidcutter/libs/pympv/mpv.pyx":1164
- *
-- * def close(self):
-- * if not self.inited: # <<<<<<<<<<<<<<
-- * return
-- * with nogil:
-+ * cdef void _c_callback(void* d) with gil:
-+ * cdef uint64_t name = <uint64_t>d # <<<<<<<<<<<<<<
-+ * callback = _callbacks.get(name)
-+ * callback.call()
- */
-- __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
-- if (__pyx_t_1) {
-+ __pyx_v_name = ((uint64_t)__pyx_v_d);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1114
-- * def close(self):
-- * if not self.inited:
-- * return # <<<<<<<<<<<<<<
-- * with nogil:
-- * mpv_render_context_free(self._ctx)
-+ /* "vidcutter/libs/pympv/mpv.pyx":1165
-+ * cdef void _c_callback(void* d) with gil:
-+ * cdef uint64_t name = <uint64_t>d
-+ * callback = _callbacks.get(name) # <<<<<<<<<<<<<<
-+ * callback.call()
- */
-- __Pyx_XDECREF(__pyx_r);
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v_callback = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1113
-- *
-- * def close(self):
-- * if not self.inited: # <<<<<<<<<<<<<<
-- * return
-- * with nogil:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1166
-+ * cdef uint64_t name = <uint64_t>d
-+ * callback = _callbacks.get(name)
-+ * callback.call() # <<<<<<<<<<<<<<
- */
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_3 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_3)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
- }
-+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1115
-- * if not self.inited:
-- * return
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_render_context_free(self._ctx)
-- * self.inited = False
-- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1116
-- * return
-- * with nogil:
-- * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
-- * self.inited = False
-- *
-- */
-- mpv_render_context_free(__pyx_v_self->_ctx);
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1115
-- * if not self.inited:
-- * return
-- * with nogil: # <<<<<<<<<<<<<<
-- * mpv_render_context_free(self._ctx)
-- * self.inited = False
-- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L6;
-- }
-- __pyx_L6:;
-- }
-- }
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1117
-- * with nogil:
-- * mpv_render_context_free(self._ctx)
-- * self.inited = False # <<<<<<<<<<<<<<
-- *
-- * def __dealloc__(self):
-- */
-- __pyx_v_self->inited = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1112
-- * self.inited = False
-- *
-- * def close(self): # <<<<<<<<<<<<<<
-- * if not self.inited:
-- * return
-- */
--
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":1119
-- * self.inited = False
-- *
-- * def __dealloc__(self): # <<<<<<<<<<<<<<
-- * self.close()
-- *
-- */
--
--/* Python wrapper */
--static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self); /*proto*/
--static void __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(PyObject *__pyx_v_self) {
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
-- __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
--}
--
--static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__dealloc__", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1120
-- *
-- * def __dealloc__(self):
-- * self.close() # <<<<<<<<<<<<<<
-- *
-- * cdef class OpenGLRenderContext(RenderContext):
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1119
-- * self.inited = False
-- *
-- * def __dealloc__(self): # <<<<<<<<<<<<<<
-- * self.close()
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":1163
-+ * sys.stderr.write("pympv error during callback: %s\n" % e)
-+ *
-+ * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
-+ * cdef uint64_t name = <uint64_t>d
-+ * callback = _callbacks.get(name)
- */
-
- /* function exit code */
-@@ -21415,774 +20550,1244 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct
- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_WriteUnraisable("vidcutter.libs.mpv.RenderContext.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
- __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v_callback);
- __Pyx_RefNannyFinishContext();
-+ #ifdef WITH_THREAD
-+ __Pyx_PyGILState_Release(__pyx_gilstate_save);
-+ #endif
- }
-
- /* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-+ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached = {"__pyx_unpickle_EndOfFileReached", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, METH_VARARGS|METH_KEYWORDS, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v___pyx_type = 0;
-+ long __pyx_v___pyx_checksum;
-+ PyObject *__pyx_v___pyx_state = 0;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached (wrapper)", 0);
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
-+ PyObject* values[3] = {0,0,0};
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ CYTHON_FALLTHROUGH;
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 2:
-+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
-+ }
-+ }
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_EndOfFileReached") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
-+ }
-+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
-+ goto __pyx_L5_argtuple_error;
-+ } else {
-+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ }
-+ __pyx_v___pyx_type = values[0];
-+ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
-+ __pyx_v___pyx_state = values[2];
-+ }
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_22__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_v___pyx_PickleError = 0;
-+ PyObject *__pyx_v___pyx_result = 0;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_1;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ int __pyx_t_6;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached", 0);
-
-- /* "(tree fragment)":2
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ /* "(tree fragment)":4
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
- */
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(1, 2, __pyx_L1_error)
-+ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x56be9b6) != 0);
-+ if (__pyx_t_1) {
-
-- /* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-+ /* "(tree fragment)":5
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0x56be9b6:
-+ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
-+ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
- */
-+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_n_s_PickleError);
-+ __Pyx_GIVEREF(__pyx_n_s_PickleError);
-+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
-+ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_2);
-+ __pyx_v___pyx_PickleError = __pyx_t_2;
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "(tree fragment)":3
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ /* "(tree fragment)":6
-+ * if __pyx_checksum != 0x56be9b6:
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum) # <<<<<<<<<<<<<<
-+ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
-+ * if __pyx_state is not None:
- */
-+ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_INCREF(__pyx_v___pyx_PickleError);
-+ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __PYX_ERR(1, 6, __pyx_L1_error)
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
-+ /* "(tree fragment)":4
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
-+ */
-+ }
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
-+ /* "(tree fragment)":7
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
-+ * __pyx_result = EndOfFileReached.__new__(__pyx_type) # <<<<<<<<<<<<<<
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-+ */
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v___pyx_result = __pyx_t_3;
-+ __pyx_t_3 = 0;
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-+ /* "(tree fragment)":8
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
-+ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
-+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ */
-+ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
-+ __pyx_t_6 = (__pyx_t_1 != 0);
-+ if (__pyx_t_6) {
-
-- /* "(tree fragment)":4
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-+ /* "(tree fragment)":9
-+ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
- */
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(1, 4, __pyx_L1_error)
-+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
-+ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-- /* "(tree fragment)":3
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ /* "(tree fragment)":8
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
-+ * __pyx_result = EndOfFileReached.__new__(__pyx_type)
-+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ */
-+ }
-+
-+ /* "(tree fragment)":10
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-+ * return __pyx_result # <<<<<<<<<<<<<<
-+ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
-+ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v___pyx_result);
-+ __pyx_r = __pyx_v___pyx_result;
-+ goto __pyx_L0;
-+
-+ /* "(tree fragment)":1
-+ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
- */
-
- /* function exit code */
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
-+ __Pyx_XDECREF(__pyx_v___pyx_result);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1123
-- *
-- * cdef class OpenGLRenderContext(RenderContext):
-- * def __init__(self, mpv, # <<<<<<<<<<<<<<
-- * get_proc_address,
-- * *args, **kwargs):
-+/* "(tree fragment)":11
-+ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
- */
-
--/* Python wrapper */
--static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_mpv = 0;
-- PyObject *__pyx_v_get_proc_address = 0;
-- PyObject *__pyx_v_args = 0;
-- PyObject *__pyx_v_kwargs = 0;
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_r = NULL;
-+ __Pyx_RefNannyDeclarations
-+ PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_2;
-+ Py_ssize_t __pyx_t_3;
-+ int __pyx_t_4;
-+ int __pyx_t_5;
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ PyObject *__pyx_t_8 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- int __pyx_r;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-- __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
-- __Pyx_GOTREF(__pyx_v_kwargs);
-- if (PyTuple_GET_SIZE(__pyx_args) > 2) {
-- __pyx_v_args = PyTuple_GetSlice(__pyx_args, 2, PyTuple_GET_SIZE(__pyx_args));
-- if (unlikely(!__pyx_v_args)) {
-- __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
-- __Pyx_RefNannyFinishContext();
-- return -1;
-- }
-- __Pyx_GOTREF(__pyx_v_args);
-- } else {
-- __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached__set_state", 0);
-+
-+ /* "(tree fragment)":12
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
-+ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1] # <<<<<<<<<<<<<<
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-+ * __pyx_result.__dict__.update(__pyx_state[2])
-+ */
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
- }
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_get_proc_address,0};
-- PyObject* values[2] = {0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- default:
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mpv)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1123, __pyx_L3_error)
-- }
-- }
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v___pyx_result->error);
-+ __Pyx_DECREF(__pyx_v___pyx_result->error);
-+ __pyx_v___pyx_result->error = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
-+ }
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v___pyx_result->reason);
-+ __Pyx_DECREF(__pyx_v___pyx_result->reason);
-+ __pyx_v___pyx_result->reason = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+
-+ /* "(tree fragment)":13
-+ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
-+ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-+ * __pyx_result.__dict__.update(__pyx_state[2])
-+ */
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-+ __PYX_ERR(1, 13, __pyx_L1_error)
-+ }
-+ __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
-+ if (__pyx_t_4) {
-+ } else {
-+ __pyx_t_2 = __pyx_t_4;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __pyx_t_5 = (__pyx_t_4 != 0);
-+ __pyx_t_2 = __pyx_t_5;
-+ __pyx_L4_bool_binop_done:;
-+ if (__pyx_t_2) {
-+
-+ /* "(tree fragment)":14
-+ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-+ * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
-+ */
-+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 14, __pyx_L1_error)
-+ }
-+ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_8 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-+ if (likely(__pyx_t_8)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-+ __Pyx_INCREF(__pyx_t_8);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_7, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "(tree fragment)":13
-+ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
-+ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-+ * __pyx_result.__dict__.update(__pyx_state[2])
-+ */
-+ }
-+
-+ /* "(tree fragment)":11
-+ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-+ */
-+
-+ /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_XDECREF(__pyx_t_8);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
-+ __pyx_L0:;
-+ __Pyx_XGIVEREF(__pyx_r);
-+ __Pyx_RefNannyFinishContext();
-+ return __pyx_r;
-+}
-+
-+/* "(tree fragment)":1
-+ * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ */
-+
-+/* Python wrapper */
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage = {"__pyx_unpickle_LogMessage", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage, METH_VARARGS|METH_KEYWORDS, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v___pyx_type = 0;
-+ long __pyx_v___pyx_checksum;
-+ PyObject *__pyx_v___pyx_state = 0;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ PyObject *__pyx_r = 0;
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage (wrapper)", 0);
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
-+ PyObject* values[3] = {0,0,0};
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ CYTHON_FALLTHROUGH;
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 2:
-+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
-+ }
-+ }
- if (unlikely(kw_args > 0)) {
-- const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1123, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_LogMessage") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
-+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- }
-- __pyx_v_mpv = values[0];
-- __pyx_v_get_proc_address = values[1];
-+ __pyx_v___pyx_type = values[0];
-+ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
-+ __pyx_v___pyx_state = values[2];
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1123, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
- __pyx_L3_error:;
-- __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
-- __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-- return -1;
-+ return NULL;
- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_get_proc_address, __pyx_v_args, __pyx_v_kwargs);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_LogMessage(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
-
- /* function exit code */
-- __Pyx_XDECREF(__pyx_v_args);
-- __Pyx_XDECREF(__pyx_v_kwargs);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, PyObject *__pyx_v_mpv, PyObject *__pyx_v_get_proc_address, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
-- PyObject *__pyx_v_init_params = NULL;
-- int __pyx_r;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_v___pyx_PickleError = 0;
-+ PyObject *__pyx_v___pyx_result = 0;
-+ PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ int __pyx_t_6;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__init__", 0);
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1127
-- * *args, **kwargs):
-- * init_params = {
-- * "get_proc_address": get_proc_address # <<<<<<<<<<<<<<
-- * }
-- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
-+ /* "(tree fragment)":4
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
- */
-- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1127, __pyx_L1_error)
-- __pyx_v_init_params = ((PyObject*)__pyx_t_1);
-- __pyx_t_1 = 0;
-+ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x8774fae) != 0);
-+ if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1129
-- * "get_proc_address": get_proc_address
-- * }
-- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
-- * init_params, *args, **kwargs)
-- *
-+ /* "(tree fragment)":5
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0x8774fae:
-+ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
-+ * __pyx_result = LogMessage.__new__(__pyx_type)
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_n_s_PickleError);
-+ __Pyx_GIVEREF(__pyx_n_s_PickleError);
-+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
-+ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_2);
-+ __pyx_v___pyx_PickleError = __pyx_t_2;
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1130
-- * }
-- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
-- * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
-- *
-- * class CallbackThread(Thread):
-+ /* "(tree fragment)":6
-+ * if __pyx_checksum != 0x8774fae:
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum) # <<<<<<<<<<<<<<
-+ * __pyx_result = LogMessage.__new__(__pyx_type)
-+ * if __pyx_state is not None:
- */
-- __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_INCREF(((PyObject *)__pyx_v_self));
-- __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-- PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
-- __Pyx_INCREF(__pyx_v_mpv);
-- __Pyx_GIVEREF(__pyx_v_mpv);
-- PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_mpv);
-- __Pyx_GIVEREF(__pyx_t_2);
-- PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
-- __Pyx_INCREF(__pyx_v_init_params);
-- __Pyx_GIVEREF(__pyx_v_init_params);
-- PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_init_params);
-- __pyx_t_2 = 0;
-+ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_INCREF(__pyx_v___pyx_PickleError);
-+ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __PYX_ERR(1, 6, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1129
-- * "get_proc_address": get_proc_address
-- * }
-- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
-- * init_params, *args, **kwargs)
-- *
-+ /* "(tree fragment)":4
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
- */
-- __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1130
-- * }
-- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
-- * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
-- *
-- * class CallbackThread(Thread):
-+ /* "(tree fragment)":7
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
-+ * __pyx_result = LogMessage.__new__(__pyx_type) # <<<<<<<<<<<<<<
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
- */
-- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __pyx_v___pyx_result = __pyx_t_3;
-+ __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1123
-- *
-- * cdef class OpenGLRenderContext(RenderContext):
-- * def __init__(self, mpv, # <<<<<<<<<<<<<<
-- * get_proc_address,
-- * *args, **kwargs):
-+ /* "(tree fragment)":8
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
-+ * __pyx_result = LogMessage.__new__(__pyx_type)
-+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-+ * return __pyx_result
- */
-+ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
-+ __pyx_t_6 = (__pyx_t_1 != 0);
-+ if (__pyx_t_6) {
-
-- /* function exit code */
-- __pyx_r = 0;
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = -1;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_init_params);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-+ /* "(tree fragment)":9
-+ * __pyx_result = LogMessage.__new__(__pyx_type)
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
- */
-+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
-+ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__reduce_cython__", 0);
-+ /* "(tree fragment)":8
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
-+ * __pyx_result = LogMessage.__new__(__pyx_type)
-+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ */
-+ }
-
-- /* "(tree fragment)":2
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ /* "(tree fragment)":10
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-+ * return __pyx_result # <<<<<<<<<<<<<<
-+ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
-+ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
- */
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(1, 2, __pyx_L1_error)
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v___pyx_result);
-+ __pyx_r = __pyx_v___pyx_result;
-+ goto __pyx_L0;
-
- /* "(tree fragment)":1
-- * def __reduce_cython__(self): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-+ * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
- */
-
- /* function exit code */
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
-+ __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
-+ __Pyx_XDECREF(__pyx_v___pyx_result);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "(tree fragment)":3
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+/* "(tree fragment)":11
-+ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_2;
-+ Py_ssize_t __pyx_t_3;
-+ int __pyx_t_4;
-+ int __pyx_t_5;
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ PyObject *__pyx_t_8 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__setstate_cython__", 0);
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage__set_state", 0);
-
-- /* "(tree fragment)":4
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-+ /* "(tree fragment)":12
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
-+ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3] # <<<<<<<<<<<<<<
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-+ * __pyx_result.__dict__.update(__pyx_state[4])
- */
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
-+ }
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(1, 4, __pyx_L1_error)
--
-- /* "(tree fragment)":3
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- */
--
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.OpenGLRenderContext.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v___pyx_result->level);
-+ __Pyx_DECREF(__pyx_v___pyx_result->level);
-+ __pyx_v___pyx_result->level = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
-+ }
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v___pyx_result->log_level);
-+ __Pyx_DECREF(__pyx_v___pyx_result->log_level);
-+ __pyx_v___pyx_result->log_level = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
-+ }
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v___pyx_result->prefix);
-+ __Pyx_DECREF(__pyx_v___pyx_result->prefix);
-+ __pyx_v___pyx_result->prefix = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
-+ }
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v___pyx_result->text);
-+ __Pyx_DECREF(__pyx_v___pyx_result->text);
-+ __pyx_v___pyx_result->text = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+
-+ /* "(tree fragment)":13
-+ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
-+ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-+ * __pyx_result.__dict__.update(__pyx_state[4])
-+ */
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-+ __PYX_ERR(1, 13, __pyx_L1_error)
-+ }
-+ __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __pyx_t_4 = ((__pyx_t_3 > 4) != 0);
-+ if (__pyx_t_4) {
-+ } else {
-+ __pyx_t_2 = __pyx_t_4;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __pyx_t_5 = (__pyx_t_4 != 0);
-+ __pyx_t_2 = __pyx_t_5;
-+ __pyx_L4_bool_binop_done:;
-+ if (__pyx_t_2) {
-+
-+ /* "(tree fragment)":14
-+ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-+ * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
-+ */
-+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 14, __pyx_L1_error)
-+ }
-+ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_8 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-+ if (likely(__pyx_t_8)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-+ __Pyx_INCREF(__pyx_t_8);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_7, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "(tree fragment)":13
-+ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
-+ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-+ * __pyx_result.__dict__.update(__pyx_state[4])
-+ */
-+ }
-+
-+ /* "(tree fragment)":11
-+ * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-+ */
-+
-+ /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_XDECREF(__pyx_t_8);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
-+ __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1133
-- *
-- * class CallbackThread(Thread):
-- * def __init__(self): # <<<<<<<<<<<<<<
-- * Thread.__init__(self)
-- * self.daemon = True
-+/* "(tree fragment)":1
-+ * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__ = {"__init__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, METH_O, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property = {"__pyx_unpickle_Property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property, METH_VARARGS|METH_KEYWORDS, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v___pyx_type = 0;
-+ long __pyx_v___pyx_checksum;
-+ PyObject *__pyx_v___pyx_state = 0;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(__pyx_self, ((PyObject *)__pyx_v_self));
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_Property (wrapper)", 0);
-+ {
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
-+ PyObject* values[3] = {0,0,0};
-+ if (unlikely(__pyx_kwds)) {
-+ Py_ssize_t kw_args;
-+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-+ switch (pos_args) {
-+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ CYTHON_FALLTHROUGH;
-+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ CYTHON_FALLTHROUGH;
-+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ CYTHON_FALLTHROUGH;
-+ case 0: break;
-+ default: goto __pyx_L5_argtuple_error;
-+ }
-+ kw_args = PyDict_Size(__pyx_kwds);
-+ switch (pos_args) {
-+ case 0:
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
-+ else goto __pyx_L5_argtuple_error;
-+ CYTHON_FALLTHROUGH;
-+ case 1:
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 2:
-+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
-+ }
-+ }
-+ if (unlikely(kw_args > 0)) {
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Property") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
-+ }
-+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
-+ goto __pyx_L5_argtuple_error;
-+ } else {
-+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ }
-+ __pyx_v___pyx_type = values[0];
-+ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
-+ __pyx_v___pyx_state = values[2];
-+ }
-+ goto __pyx_L4_argument_unpacking_done;
-+ __pyx_L5_argtuple_error:;
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
-+ __pyx_L3_error:;
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_RefNannyFinishContext();
-+ return NULL;
-+ __pyx_L4_argument_unpacking_done:;
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_Property(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_v___pyx_PickleError = 0;
-+ PyObject *__pyx_v___pyx_result = 0;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ int __pyx_t_6;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__init__", 0);
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_Property", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1134
-- * class CallbackThread(Thread):
-- * def __init__(self):
-- * Thread.__init__(self) # <<<<<<<<<<<<<<
-- * self.daemon = True
-- * self.lock = Semaphore()
-+ /* "(tree fragment)":4
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_2 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_2)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_2);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self);
-- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0572d11) != 0);
-+ if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1135
-- * def __init__(self):
-- * Thread.__init__(self)
-- * self.daemon = True # <<<<<<<<<<<<<<
-- * self.lock = Semaphore()
-- * self.lock.acquire(True)
-- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
-+ /* "(tree fragment)":5
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0x0572d11:
-+ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
-+ * __pyx_result = Property.__new__(__pyx_type)
-+ */
-+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_n_s_PickleError);
-+ __Pyx_GIVEREF(__pyx_n_s_PickleError);
-+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
-+ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_2);
-+ __pyx_v___pyx_PickleError = __pyx_t_2;
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1136
-- * Thread.__init__(self)
-- * self.daemon = True
-- * self.lock = Semaphore() # <<<<<<<<<<<<<<
-- * self.lock.acquire(True)
-- * self.callback = None
-+ /* "(tree fragment)":6
-+ * if __pyx_checksum != 0x0572d11:
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum) # <<<<<<<<<<<<<<
-+ * __pyx_result = Property.__new__(__pyx_type)
-+ * if __pyx_state is not None:
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_2)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_2);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-+ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_INCREF(__pyx_v___pyx_PickleError);
-+ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
- }
-+ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __PYX_ERR(1, 6, __pyx_L1_error)
-+
-+ /* "(tree fragment)":4
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
-+ */
- }
-- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1137
-- * self.daemon = True
-- * self.lock = Semaphore()
-- * self.lock.acquire(True) # <<<<<<<<<<<<<<
-- * self.callback = None
-- * self.isshutdown = False
-+ /* "(tree fragment)":7
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
-+ * __pyx_result = Property.__new__(__pyx_type) # <<<<<<<<<<<<<<
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
- */
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_t_3 = NULL;
-+ __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-+ __Pyx_INCREF(__pyx_t_4);
- __Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_2, function);
- }
- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_True);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v___pyx_result = __pyx_t_3;
-+ __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1138
-- * self.lock = Semaphore()
-- * self.lock.acquire(True)
-- * self.callback = None # <<<<<<<<<<<<<<
-- * self.isshutdown = False
-- *
-+ /* "(tree fragment)":8
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
-+ * __pyx_result = Property.__new__(__pyx_type)
-+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-+ * return __pyx_result
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
-+ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
-+ __pyx_t_6 = (__pyx_t_1 != 0);
-+ if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1139
-- * self.lock.acquire(True)
-- * self.callback = None
-- * self.isshutdown = False # <<<<<<<<<<<<<<
-- *
-- * def shutdown(self):
-+ /* "(tree fragment)":9
-+ * __pyx_result = Property.__new__(__pyx_type)
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
-+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
-+ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1133
-- *
-- * class CallbackThread(Thread):
-- * def __init__(self): # <<<<<<<<<<<<<<
-- * Thread.__init__(self)
-- * self.daemon = True
-+ /* "(tree fragment)":8
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
-+ * __pyx_result = Property.__new__(__pyx_type)
-+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-+ * return __pyx_result
- */
-+ }
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ /* "(tree fragment)":10
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-+ * return __pyx_result # <<<<<<<<<<<<<<
-+ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v___pyx_result);
-+ __pyx_r = __pyx_v___pyx_result;
- goto __pyx_L0;
-+
-+ /* "(tree fragment)":1
-+ * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ */
-+
-+ /* function exit code */
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
-+ __Pyx_XDECREF(__pyx_v___pyx_result);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1141
-- * self.isshutdown = False
-- *
-- * def shutdown(self): # <<<<<<<<<<<<<<
-- * self.isshutdown = True
-- * self.callback = None
-+/* "(tree fragment)":11
-+ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown = {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, METH_O, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(__pyx_self, ((PyObject *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-+ int __pyx_t_2;
-+ Py_ssize_t __pyx_t_3;
-+ int __pyx_t_4;
-+ int __pyx_t_5;
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ PyObject *__pyx_t_8 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("shutdown", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1142
-- *
-- * def shutdown(self):
-- * self.isshutdown = True # <<<<<<<<<<<<<<
-- * self.callback = None
-- * self.lock.release()
-- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_Property__set_state", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1143
-- * def shutdown(self):
-- * self.isshutdown = True
-- * self.callback = None # <<<<<<<<<<<<<<
-- * self.lock.release()
-- *
-+ /* "(tree fragment)":12
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<<
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-+ * __pyx_result.__dict__.update(__pyx_state[2])
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1144
-- * self.isshutdown = True
-- * self.callback = None
-- * self.lock.release() # <<<<<<<<<<<<<<
-- *
-- * def call(self):
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_2 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_2)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_2);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- }
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
- }
-- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v___pyx_result->data);
-+ __Pyx_DECREF(__pyx_v___pyx_result->data);
-+ __pyx_v___pyx_result->data = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
-+ }
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v___pyx_result->name);
-+ __Pyx_DECREF(__pyx_v___pyx_result->name);
-+ __pyx_v___pyx_result->name = __pyx_t_1;
-+ __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1141
-- * self.isshutdown = False
-- *
-- * def shutdown(self): # <<<<<<<<<<<<<<
-- * self.isshutdown = True
-- * self.callback = None
-+ /* "(tree fragment)":13
-+ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-+ * __pyx_result.__dict__.update(__pyx_state[2])
- */
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-+ __PYX_ERR(1, 13, __pyx_L1_error)
-+ }
-+ __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
-+ if (__pyx_t_4) {
-+ } else {
-+ __pyx_t_2 = __pyx_t_4;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __pyx_t_5 = (__pyx_t_4 != 0);
-+ __pyx_t_2 = __pyx_t_5;
-+ __pyx_L4_bool_binop_done:;
-+ if (__pyx_t_2) {
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "vidcutter/libs/pympv/mpv.pyx":1146
-- * self.lock.release()
-- *
-- * def call(self): # <<<<<<<<<<<<<<
-- * self.lock.release()
-- *
-+ /* "(tree fragment)":14
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-+ * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
- */
-+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 14, __pyx_L1_error)
-+ }
-+ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_8 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-+ if (likely(__pyx_t_8)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-+ __Pyx_INCREF(__pyx_t_8);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_7, function);
-+ }
-+ }
-+ __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call = {"call", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call, METH_O, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_5call(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("call (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(__pyx_self, ((PyObject *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("call", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1147
-- *
-- * def call(self):
-- * self.lock.release() # <<<<<<<<<<<<<<
-- *
-- * def set(self, callback):
-+ /* "(tree fragment)":13
-+ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-+ * __pyx_result.__dict__.update(__pyx_state[2])
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_2 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
-- __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
-- if (likely(__pyx_t_2)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
-- __Pyx_INCREF(__pyx_t_2);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_3, function);
-- }
- }
-- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1146
-- * self.lock.release()
-- *
-- * def call(self): # <<<<<<<<<<<<<<
-- * self.lock.release()
-- *
-+ /* "(tree fragment)":11
-+ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
- */
-
- /* function exit code */
-@@ -22190,43 +21795,45 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.call", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_XDECREF(__pyx_t_8);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1149
-- * self.lock.release()
-- *
-- * def set(self, callback): # <<<<<<<<<<<<<<
-- * self.callback = callback
-- *
-+/* "(tree fragment)":1
-+ * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set = {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set, METH_VARARGS|METH_KEYWORDS, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v_self = 0;
-- PyObject *__pyx_v_callback = 0;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event = {"__pyx_unpickle_Event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event, METH_VARARGS|METH_KEYWORDS, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v___pyx_type = 0;
-+ long __pyx_v___pyx_checksum;
-+ PyObject *__pyx_v___pyx_state = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("set (wrapper)", 0);
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_Event (wrapper)", 0);
- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
-- PyObject* values[2] = {0,0};
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
-+ PyObject* values[3] = {0,0,0};
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
-+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ CYTHON_FALLTHROUGH;
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- CYTHON_FALLTHROUGH;
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -22237,207 +21844,378 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
- else goto __pyx_L5_argtuple_error;
- CYTHON_FALLTHROUGH;
- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
- else {
-- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1149, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 2:
-+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1149, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Event") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- }
-- __pyx_v_self = values[0];
-- __pyx_v_callback = values[1];
-+ __pyx_v___pyx_type = values[0];
-+ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
-+ __pyx_v___pyx_state = values[2];
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1149, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(__pyx_self, __pyx_v_self, __pyx_v_callback);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Event(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_v___pyx_PickleError = 0;
-+ PyObject *__pyx_v___pyx_result = 0;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-+ int __pyx_t_1;
-+ PyObject *__pyx_t_2 = NULL;
-+ PyObject *__pyx_t_3 = NULL;
-+ PyObject *__pyx_t_4 = NULL;
-+ PyObject *__pyx_t_5 = NULL;
-+ int __pyx_t_6;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("set", 0);
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_Event", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1150
-- *
-- * def set(self, callback):
-- * self.callback = callback # <<<<<<<<<<<<<<
-- *
-- * def run(self):
-+ /* "(tree fragment)":4
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
-+ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xda38c25) != 0);
-+ if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1149
-- * self.lock.release()
-- *
-- * def set(self, callback): # <<<<<<<<<<<<<<
-- * self.callback = callback
-- *
-+ /* "(tree fragment)":5
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0xda38c25:
-+ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
-+ * __pyx_result = Event.__new__(__pyx_type)
- */
-+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_n_s_PickleError);
-+ __Pyx_GIVEREF(__pyx_n_s_PickleError);
-+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
-+ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_2);
-+ __pyx_v___pyx_PickleError = __pyx_t_2;
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-+ /* "(tree fragment)":6
-+ * if __pyx_checksum != 0xda38c25:
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum) # <<<<<<<<<<<<<<
-+ * __pyx_result = Event.__new__(__pyx_type)
-+ * if __pyx_state is not None:
-+ */
-+ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_INCREF(__pyx_v___pyx_PickleError);
-+ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __PYX_ERR(1, 6, __pyx_L1_error)
-+
-+ /* "(tree fragment)":4
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
-+ */
-+ }
-+
-+ /* "(tree fragment)":7
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
-+ * __pyx_result = Event.__new__(__pyx_type) # <<<<<<<<<<<<<<
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-+ */
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
-+ }
-+ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v___pyx_result = __pyx_t_3;
-+ __pyx_t_3 = 0;
-+
-+ /* "(tree fragment)":8
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
-+ * __pyx_result = Event.__new__(__pyx_type)
-+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ */
-+ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
-+ __pyx_t_6 = (__pyx_t_1 != 0);
-+ if (__pyx_t_6) {
-+
-+ /* "(tree fragment)":9
-+ * __pyx_result = Event.__new__(__pyx_type)
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
-+ */
-+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
-+ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+
-+ /* "(tree fragment)":8
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
-+ * __pyx_result = Event.__new__(__pyx_type)
-+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ */
-+ }
-+
-+ /* "(tree fragment)":10
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-+ * return __pyx_result # <<<<<<<<<<<<<<
-+ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v___pyx_result);
-+ __pyx_r = __pyx_v___pyx_result;
- goto __pyx_L0;
-+
-+ /* "(tree fragment)":1
-+ * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ */
-+
-+ /* function exit code */
- __pyx_L1_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-+ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
-+ __Pyx_XDECREF(__pyx_v___pyx_result);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1152
-- * self.callback = callback
-- *
-- * def run(self): # <<<<<<<<<<<<<<
-- * while not self.isshutdown:
-- * self.lock.acquire(True)
-+/* "(tree fragment)":11
-+ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
- */
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run = {"run", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run, METH_O, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_9run(PyObject *__pyx_self, PyObject *__pyx_v_self) {
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("run (wrapper)", 0);
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(__pyx_self, ((PyObject *)__pyx_v_self));
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
- int __pyx_t_2;
-- int __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-+ enum mpv_event_id __pyx_t_3;
-+ int __pyx_t_4;
-+ Py_ssize_t __pyx_t_5;
-+ int __pyx_t_6;
-+ int __pyx_t_7;
-+ PyObject *__pyx_t_8 = NULL;
-+ PyObject *__pyx_t_9 = NULL;
-+ PyObject *__pyx_t_10 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("run", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1153
-- *
-- * def run(self):
-- * while not self.isshutdown: # <<<<<<<<<<<<<<
-- * self.lock.acquire(True)
-- * self.mpv_callback(self.callback) if self.callback else None
-- */
-- while (1) {
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_3 = ((!__pyx_t_2) != 0);
-- if (!__pyx_t_3) break;
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_Event__set_state", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1154
-- * def run(self):
-- * while not self.isshutdown:
-- * self.lock.acquire(True) # <<<<<<<<<<<<<<
-- * self.mpv_callback(self.callback) if self.callback else None
-- *
-+ /* "(tree fragment)":12
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3] # <<<<<<<<<<<<<<
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-+ * __pyx_result.__dict__.update(__pyx_state[4])
- */
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-- __Pyx_INCREF(__pyx_t_4);
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
-+ }
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v___pyx_result->data);
-+ __Pyx_DECREF(__pyx_v___pyx_result->data);
-+ __pyx_v___pyx_result->data = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
-+ }
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v___pyx_result->error = __pyx_t_2;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
-+ }
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_v___pyx_result->id = __pyx_t_3;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
-+ }
-+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ __Pyx_GOTREF(__pyx_v___pyx_result->reply_userdata);
-+ __Pyx_DECREF(__pyx_v___pyx_result->reply_userdata);
-+ __pyx_v___pyx_result->reply_userdata = __pyx_t_1;
-+ __pyx_t_1 = 0;
-+
-+ /* "(tree fragment)":13
-+ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-+ * __pyx_result.__dict__.update(__pyx_state[4])
-+ */
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-+ __PYX_ERR(1, 13, __pyx_L1_error)
-+ }
-+ __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __pyx_t_6 = ((__pyx_t_5 > 4) != 0);
-+ if (__pyx_t_6) {
-+ } else {
-+ __pyx_t_4 = __pyx_t_6;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __pyx_t_7 = (__pyx_t_6 != 0);
-+ __pyx_t_4 = __pyx_t_7;
-+ __pyx_L4_bool_binop_done:;
-+ if (__pyx_t_4) {
-+
-+ /* "(tree fragment)":14
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-+ * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
-+ */
-+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_8);
-+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_9);
-+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 14, __pyx_L1_error)
-+ }
-+ __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_8);
-+ __pyx_t_10 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
-+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
-+ if (likely(__pyx_t_10)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
-+ __Pyx_INCREF(__pyx_t_10);
- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_5, function);
-+ __Pyx_DECREF_SET(__pyx_t_9, function);
- }
- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_True);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
-+ __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
-+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1155
-- * while not self.isshutdown:
-- * self.lock.acquire(True)
-- * self.mpv_callback(self.callback) if self.callback else None # <<<<<<<<<<<<<<
-- *
-- * def mpv_callback(self, callback):
-+ /* "(tree fragment)":13
-+ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-+ * __pyx_result.__dict__.update(__pyx_state[4])
- */
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (__pyx_t_3) {
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1155, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
-- __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
-- if (likely(__pyx_t_7)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
-- __Pyx_INCREF(__pyx_t_7);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_4, function);
-- }
-- }
-- __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __pyx_t_1 = __pyx_t_5;
-- __pyx_t_5 = 0;
-- } else {
-- __Pyx_INCREF(Py_None);
-- __pyx_t_1 = Py_None;
-- }
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1152
-- * self.callback = callback
-- *
-- * def run(self): # <<<<<<<<<<<<<<
-- * while not self.isshutdown:
-- * self.lock.acquire(True)
-+ /* "(tree fragment)":11
-+ * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-+ * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
- */
-
- /* function exit code */
-@@ -22445,45 +22223,45 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
- goto __pyx_L0;
- __pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-+ __Pyx_XDECREF(__pyx_t_8);
-+ __Pyx_XDECREF(__pyx_t_9);
-+ __Pyx_XDECREF(__pyx_t_10);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
- __pyx_L0:;
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1157
-- * self.mpv_callback(self.callback) if self.callback else None
-- *
-- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
-- * try:
-- * callback()
-+/* "(tree fragment)":1
-+ * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
- */
-
- /* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback = {"mpv_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, METH_VARARGS|METH_KEYWORDS, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- CYTHON_UNUSED PyObject *__pyx_v_self = 0;
-- PyObject *__pyx_v_callback = 0;
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-+static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo = {"__pyx_unpickle_RenderFrameInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo, METH_VARARGS|METH_KEYWORDS, 0};
-+static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-+ PyObject *__pyx_v___pyx_type = 0;
-+ long __pyx_v___pyx_checksum;
-+ PyObject *__pyx_v___pyx_state = 0;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- PyObject *__pyx_r = 0;
- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("mpv_callback (wrapper)", 0);
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo (wrapper)", 0);
- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_callback,0};
-- PyObject* values[2] = {0,0};
-+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
-+ PyObject* values[3] = {0,0,0};
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args;
- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
- switch (pos_args) {
-+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-+ CYTHON_FALLTHROUGH;
- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
- CYTHON_FALLTHROUGH;
- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-@@ -22494,6068 +22272,2370 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(
- kw_args = PyDict_Size(__pyx_kwds);
- switch (pos_args) {
- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
-+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
- else goto __pyx_L5_argtuple_error;
- CYTHON_FALLTHROUGH;
- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
-+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
- else {
-- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1157, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 2:
-+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
-+ else {
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RenderFrameInfo") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
-+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
- goto __pyx_L5_argtuple_error;
- } else {
- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
- }
-- __pyx_v_self = values[0];
-- __pyx_v_callback = values[1];
-+ __pyx_v___pyx_type = values[0];
-+ __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
-+ __pyx_v___pyx_state = values[2];
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1157, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
- return NULL;
- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(__pyx_self, __pyx_v_self, __pyx_v_callback);
-+ __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_RenderFrameInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
-
- /* function exit code */
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
-- PyObject *__pyx_v_e = NULL;
-+static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_v___pyx_PickleError = 0;
-+ PyObject *__pyx_v___pyx_result = 0;
- PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-+ int __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- PyObject *__pyx_t_3 = NULL;
- PyObject *__pyx_t_4 = NULL;
- PyObject *__pyx_t_5 = NULL;
-- PyObject *__pyx_t_6 = NULL;
-- int __pyx_t_7;
-- PyObject *__pyx_t_8 = NULL;
-- PyObject *__pyx_t_9 = NULL;
-- PyObject *__pyx_t_10 = NULL;
-- PyObject *__pyx_t_11 = NULL;
-+ int __pyx_t_6;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("mpv_callback", 0);
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1158
-- *
-- * def mpv_callback(self, callback):
-- * try: # <<<<<<<<<<<<<<
-- * callback()
-- * except Exception as e:
-+ /* "(tree fragment)":4
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
- */
-- {
-- __Pyx_PyThreadState_declare
-- __Pyx_PyThreadState_assign
-- __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
-- __Pyx_XGOTREF(__pyx_t_1);
-- __Pyx_XGOTREF(__pyx_t_2);
-- __Pyx_XGOTREF(__pyx_t_3);
-- /*try:*/ {
-+ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
-+ if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1159
-- * def mpv_callback(self, callback):
-- * try:
-- * callback() # <<<<<<<<<<<<<<
-- * except Exception as e:
-- * sys.stderr.write("pympv error during callback: %s\n" % e)
-+ /* "(tree fragment)":5
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0xd41d8cd:
-+ * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
-+ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
- */
-- __Pyx_INCREF(__pyx_v_callback);
-- __pyx_t_5 = __pyx_v_callback; __pyx_t_6 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
-- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
-- if (likely(__pyx_t_6)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
-- __Pyx_INCREF(__pyx_t_6);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_5, function);
-- }
-- }
-- __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L3_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_n_s_PickleError);
-+ __Pyx_GIVEREF(__pyx_n_s_PickleError);
-+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
-+ __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_2);
-+ __pyx_v___pyx_PickleError = __pyx_t_2;
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1158
-- *
-- * def mpv_callback(self, callback):
-- * try: # <<<<<<<<<<<<<<
-- * callback()
-- * except Exception as e:
-+ /* "(tree fragment)":6
-+ * if __pyx_checksum != 0xd41d8cd:
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<<
-+ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
-+ * if __pyx_state is not None:
- */
-+ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_INCREF(__pyx_v___pyx_PickleError);
-+ __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_5)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_5);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
-+ }
- }
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- goto __pyx_L8_try_end;
-- __pyx_L3_error:;
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+ __PYX_ERR(1, 6, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1160
-- * try:
-- * callback()
-- * except Exception as e: # <<<<<<<<<<<<<<
-- * sys.stderr.write("pympv error during callback: %s\n" % e)
-- *
-+ /* "(tree fragment)":4
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
- */
-- __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-- if (__pyx_t_7) {
-- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1160, __pyx_L5_except_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_5);
-- __pyx_v_e = __pyx_t_5;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1161
-- * callback()
-- * except Exception as e:
-- * sys.stderr.write("pympv error during callback: %s\n" % e) # <<<<<<<<<<<<<<
-- *
-- * cdef void _c_callback(void* d) with gil:
-+ /* "(tree fragment)":7
-+ * from pickle import PickleError as __pyx_PickleError
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
-+ * __pyx_result = RenderFrameInfo.__new__(__pyx_type) # <<<<<<<<<<<<<<
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-- __Pyx_GOTREF(__pyx_t_9);
-- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-- __Pyx_GOTREF(__pyx_t_10);
-- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-- __Pyx_GOTREF(__pyx_t_9);
-- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-- __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-- __Pyx_GOTREF(__pyx_t_10);
-- __pyx_t_11 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
-- __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
-- if (likely(__pyx_t_11)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
-- __Pyx_INCREF(__pyx_t_11);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_9, function);
-- }
-- }
-- __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
-- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-- __Pyx_GOTREF(__pyx_t_8);
-- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- goto __pyx_L4_exception_handled;
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __pyx_t_4 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-+ if (likely(__pyx_t_4)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-+ __Pyx_INCREF(__pyx_t_4);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_2, function);
- }
-- goto __pyx_L5_except_error;
-- __pyx_L5_except_error:;
-+ }
-+ __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
-+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_v___pyx_result = __pyx_t_3;
-+ __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1158
-- *
-- * def mpv_callback(self, callback):
-- * try: # <<<<<<<<<<<<<<
-- * callback()
-- * except Exception as e:
-+ /* "(tree fragment)":8
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
-+ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
-+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ */
-+ __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
-+ __pyx_t_6 = (__pyx_t_1 != 0);
-+ if (__pyx_t_6) {
-+
-+ /* "(tree fragment)":9
-+ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
-+ */
-+ if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
-+ __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_3);
-+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+
-+ /* "(tree fragment)":8
-+ * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
-+ * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
-+ * if __pyx_state is not None: # <<<<<<<<<<<<<<
-+ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
-+ * return __pyx_result
- */
-- __Pyx_XGIVEREF(__pyx_t_1);
-- __Pyx_XGIVEREF(__pyx_t_2);
-- __Pyx_XGIVEREF(__pyx_t_3);
-- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-- goto __pyx_L1_error;
-- __pyx_L4_exception_handled:;
-- __Pyx_XGIVEREF(__pyx_t_1);
-- __Pyx_XGIVEREF(__pyx_t_2);
-- __Pyx_XGIVEREF(__pyx_t_3);
-- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
-- __pyx_L8_try_end:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1157
-- * self.mpv_callback(self.callback) if self.callback else None
-- *
-- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
-- * try:
-- * callback()
-+ /* "(tree fragment)":10
-+ * if __pyx_state is not None:
-+ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
-+ * return __pyx_result # <<<<<<<<<<<<<<
-+ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
-+ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
-+ */
-+ __Pyx_XDECREF(__pyx_r);
-+ __Pyx_INCREF(__pyx_v___pyx_result);
-+ __pyx_r = __pyx_v___pyx_result;
-+ goto __pyx_L0;
-+
-+ /* "(tree fragment)":1
-+ * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
- */
-
- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
- __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_XDECREF(__pyx_t_9);
-- __Pyx_XDECREF(__pyx_t_10);
-- __Pyx_XDECREF(__pyx_t_11);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __pyx_r = NULL;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_e);
-+ __Pyx_XDECREF(__pyx_v___pyx_PickleError);
-+ __Pyx_XDECREF(__pyx_v___pyx_result);
- __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1163
-- * sys.stderr.write("pympv error during callback: %s\n" % e)
-- *
-- * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
-- * cdef uint64_t name = <uint64_t>d
-- * callback = _callbacks.get(name)
-+/* "(tree fragment)":11
-+ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
-+ * __pyx_result.__dict__.update(__pyx_state[0])
- */
-
--static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
-- uint64_t __pyx_v_name;
-- PyObject *__pyx_v_callback = NULL;
-+static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
-+ PyObject *__pyx_r = NULL;
- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-+ int __pyx_t_1;
-+ Py_ssize_t __pyx_t_2;
-+ int __pyx_t_3;
-+ int __pyx_t_4;
-+ PyObject *__pyx_t_5 = NULL;
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ PyObject *__pyx_t_8 = NULL;
- int __pyx_lineno = 0;
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
-- #ifdef WITH_THREAD
-- PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
-- #endif
-- __Pyx_RefNannySetupContext("_c_callback", 0);
-+ __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo__set_state", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1164
-- *
-- * cdef void _c_callback(void* d) with gil:
-- * cdef uint64_t name = <uint64_t>d # <<<<<<<<<<<<<<
-- * callback = _callbacks.get(name)
-- * callback.call()
-+ /* "(tree fragment)":12
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
-+ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-+ * __pyx_result.__dict__.update(__pyx_state[0])
- */
-- __pyx_v_name = ((uint64_t)__pyx_v_d);
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-+ __PYX_ERR(1, 12, __pyx_L1_error)
-+ }
-+ __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
-+ if (__pyx_t_3) {
-+ } else {
-+ __pyx_t_1 = __pyx_t_3;
-+ goto __pyx_L4_bool_binop_done;
-+ }
-+ __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
-+ __pyx_t_4 = (__pyx_t_3 != 0);
-+ __pyx_t_1 = __pyx_t_4;
-+ __pyx_L4_bool_binop_done:;
-+ if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1165
-- * cdef void _c_callback(void* d) with gil:
-- * cdef uint64_t name = <uint64_t>d
-- * callback = _callbacks.get(name) # <<<<<<<<<<<<<<
-- * callback.call()
-+ /* "(tree fragment)":13
-+ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
-+ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
-+ * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<<
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(__pyx_v___pyx_state == Py_None)) {
-+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-+ __PYX_ERR(1, 13, __pyx_L1_error)
- }
-- }
-- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v_callback = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_8 = NULL;
-+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-+ if (likely(__pyx_t_8)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-+ __Pyx_INCREF(__pyx_t_8);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_7, function);
-+ }
-+ }
-+ __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_5);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1166
-- * cdef uint64_t name = <uint64_t>d
-- * callback = _callbacks.get(name)
-- * callback.call() # <<<<<<<<<<<<<<
-+ /* "(tree fragment)":12
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
-+ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-+ * __pyx_result.__dict__.update(__pyx_state[0])
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_3)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_3);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
- }
-- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1163
-- * sys.stderr.write("pympv error during callback: %s\n" % e)
-- *
-- * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
-- * cdef uint64_t name = <uint64_t>d
-- * callback = _callbacks.get(name)
-+ /* "(tree fragment)":11
-+ * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
-+ * __pyx_result.__dict__.update(__pyx_state[0])
- */
-
- /* function exit code */
-+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_WriteUnraisable("vidcutter.libs.mpv._c_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
-+ __Pyx_XDECREF(__pyx_t_5);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ __Pyx_XDECREF(__pyx_t_8);
-+ __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ __pyx_r = 0;
- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v_callback);
-+ __Pyx_XGIVEREF(__pyx_r);
- __Pyx_RefNannyFinishContext();
-- #ifdef WITH_THREAD
-- __Pyx_PyGILState_Release(__pyx_gilstate_save);
-+ return __pyx_r;
-+}
-+static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
-+
-+static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p;
-+ PyObject *o;
-+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-+ o = (*t->tp_alloc)(t, 0);
-+ } else {
-+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-+ }
-+ if (unlikely(!o)) return 0;
-+ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o);
-+ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
-+ p->reason = Py_None; Py_INCREF(Py_None);
-+ p->error = Py_None; Py_INCREF(Py_None);
-+ return o;
-+}
-+
-+static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
-+ #if CYTHON_USE_TP_FINALIZE
-+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-+ if (PyObject_CallFinalizerFromDealloc(o)) return;
-+ }
- #endif
-+ PyObject_GC_UnTrack(o);
-+ Py_CLEAR(p->reason);
-+ Py_CLEAR(p->error);
-+ (*Py_TYPE(o)->tp_free)(o);
- }
-
--/* "(tree fragment)":1
-- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
-+static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o, visitproc v, void *a) {
-+ int e;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
-+ if (p->reason) {
-+ e = (*v)(p->reason, a); if (e) return e;
-+ }
-+ if (p->error) {
-+ e = (*v)(p->error, a); if (e) return e;
-+ }
-+ return 0;
-+}
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached = {"__pyx_unpickle_EndOfFileReached", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, METH_VARARGS|METH_KEYWORDS, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v___pyx_type = 0;
-- long __pyx_v___pyx_checksum;
-- PyObject *__pyx_v___pyx_state = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
-- PyObject* values[3] = {0,0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_EndOfFileReached") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- }
-- __pyx_v___pyx_type = values[0];
-- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_v___pyx_state = values[2];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_EndOfFileReached", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static int __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
-+ PyObject* tmp;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
-+ tmp = ((PyObject*)p->reason);
-+ p->reason = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->error);
-+ p->error = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ return 0;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_6__pyx_unpickle_EndOfFileReached(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_v___pyx_PickleError = 0;
-- PyObject *__pyx_v___pyx_result = 0;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- int __pyx_t_6;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached", 0);
--
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
-- */
-- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x56be9b6) != 0);
-- if (__pyx_t_1) {
--
-- /* "(tree fragment)":5
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0x56be9b6:
-- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
-- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
-- */
-- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_n_s_PickleError);
-- __Pyx_GIVEREF(__pyx_n_s_PickleError);
-- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
-- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_2);
-- __pyx_v___pyx_PickleError = __pyx_t_2;
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
--
-- /* "(tree fragment)":6
-- * if __pyx_checksum != 0x56be9b6:
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum) # <<<<<<<<<<<<<<
-- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- */
-- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_INCREF(__pyx_v___pyx_PickleError);
-- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __PYX_ERR(1, 6, __pyx_L1_error)
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_1__get__(o);
-+}
-
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0x56be9b6: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
-- */
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_3__set__(o, v);
- }
--
-- /* "(tree fragment)":7
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
-- * __pyx_result = EndOfFileReached.__new__(__pyx_type) # <<<<<<<<<<<<<<
-- * if __pyx_state is not None:
-- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-+ else {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_5__del__(o);
- }
-- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v___pyx_result = __pyx_t_3;
-- __pyx_t_3 = 0;
--
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
-- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
-- __pyx_t_6 = (__pyx_t_1 != 0);
-- if (__pyx_t_6) {
-+}
-
-- /* "(tree fragment)":9
-- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
-- * return __pyx_result
-- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
-- */
-- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
-- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_1__get__(o);
-+}
-
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x56be9b6 = (error, reason))" % __pyx_checksum)
-- * __pyx_result = EndOfFileReached.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_3__set__(o, v);
-+ }
-+ else {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_5__del__(o);
- }
--
-- /* "(tree fragment)":10
-- * if __pyx_state is not None:
-- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-- * return __pyx_result # <<<<<<<<<<<<<<
-- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
-- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v___pyx_result);
-- __pyx_r = __pyx_v___pyx_result;
-- goto __pyx_L0;
--
-- /* "(tree fragment)":1
-- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
--
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
-- __Pyx_XDECREF(__pyx_v___pyx_result);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
- }
-
--/* "(tree fragment)":11
-- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- */
-+static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
-+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_1__reduce_cython__, METH_NOARGS, 0},
-+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_3__setstate_cython__, METH_O, 0},
-+ {0, 0, 0, 0}
-+};
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_EndOfFileReached__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- Py_ssize_t __pyx_t_3;
-- int __pyx_t_4;
-- int __pyx_t_5;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-- PyObject *__pyx_t_8 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_EndOfFileReached__set_state", 0);
-+static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
-+ {(char *)"reason", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, (char *)0, 0},
-+ {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, (char *)0, 0},
-+ {0, 0, 0, 0, 0}
-+};
-
-- /* "(tree fragment)":12
-- * return __pyx_result
-- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
-- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1] # <<<<<<<<<<<<<<
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[2])
-- */
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->error);
-- __Pyx_DECREF(__pyx_v___pyx_result->error);
-- __pyx_v___pyx_result->error = __pyx_t_1;
-- __pyx_t_1 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->reason);
-- __Pyx_DECREF(__pyx_v___pyx_result->reason);
-- __pyx_v___pyx_result->reason = __pyx_t_1;
-- __pyx_t_1 = 0;
-+static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached = {
-+ PyVarObject_HEAD_INIT(0, 0)
-+ "vidcutter.libs.mpv.EndOfFileReached", /*tp_name*/
-+ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached), /*tp_basicsize*/
-+ 0, /*tp_itemsize*/
-+ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_dealloc*/
-+ #if PY_VERSION_HEX < 0x030800b4
-+ 0, /*tp_print*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4
-+ 0, /*tp_vectorcall_offset*/
-+ #endif
-+ 0, /*tp_getattr*/
-+ 0, /*tp_setattr*/
-+ #if PY_MAJOR_VERSION < 3
-+ 0, /*tp_compare*/
-+ #endif
-+ #if PY_MAJOR_VERSION >= 3
-+ 0, /*tp_as_async*/
-+ #endif
-+ 0, /*tp_repr*/
-+ 0, /*tp_as_number*/
-+ 0, /*tp_as_sequence*/
-+ 0, /*tp_as_mapping*/
-+ 0, /*tp_hash*/
-+ 0, /*tp_call*/
-+ 0, /*tp_str*/
-+ 0, /*tp_getattro*/
-+ 0, /*tp_setattro*/
-+ 0, /*tp_as_buffer*/
-+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-+ "Data field for MPV_EVENT_END_FILE events\n\n Wraps: mpv_event_end_file\n ", /*tp_doc*/
-+ __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_traverse*/
-+ __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_clear*/
-+ 0, /*tp_richcompare*/
-+ 0, /*tp_weaklistoffset*/
-+ 0, /*tp_iter*/
-+ 0, /*tp_iternext*/
-+ __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_methods*/
-+ 0, /*tp_members*/
-+ __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_getset*/
-+ 0, /*tp_base*/
-+ 0, /*tp_dict*/
-+ 0, /*tp_descr_get*/
-+ 0, /*tp_descr_set*/
-+ 0, /*tp_dictoffset*/
-+ 0, /*tp_init*/
-+ 0, /*tp_alloc*/
-+ __pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_new*/
-+ 0, /*tp_free*/
-+ 0, /*tp_is_gc*/
-+ 0, /*tp_bases*/
-+ 0, /*tp_mro*/
-+ 0, /*tp_cache*/
-+ 0, /*tp_subclasses*/
-+ 0, /*tp_weaklist*/
-+ 0, /*tp_del*/
-+ 0, /*tp_version_tag*/
-+ #if PY_VERSION_HEX >= 0x030400a1
-+ 0, /*tp_finalize*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
-+ 0, /*tp_vectorcall*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-+ 0, /*tp_print*/
-+ #endif
-+ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
-+ 0, /*tp_pypy_flags*/
-+ #endif
-+};
-+static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
-
-- /* "(tree fragment)":13
-- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
-- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[2])
-- */
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-- __PYX_ERR(1, 13, __pyx_L1_error)
-- }
-- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-- __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
-- if (__pyx_t_4) {
-+static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p;
-+ PyObject *o;
-+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-+ o = (*t->tp_alloc)(t, 0);
- } else {
-- __pyx_t_2 = __pyx_t_4;
-- goto __pyx_L4_bool_binop_done;
-+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
-- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-- __pyx_t_5 = (__pyx_t_4 != 0);
-- __pyx_t_2 = __pyx_t_5;
-- __pyx_L4_bool_binop_done:;
-- if (__pyx_t_2) {
-+ if (unlikely(!o)) return 0;
-+ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o);
-+ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage;
-+ p->prefix = Py_None; Py_INCREF(Py_None);
-+ p->level = Py_None; Py_INCREF(Py_None);
-+ p->text = Py_None; Py_INCREF(Py_None);
-+ p->log_level = Py_None; Py_INCREF(Py_None);
-+ return o;
-+}
-
-- /* "(tree fragment)":14
-- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
-- */
-- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 14, __pyx_L1_error)
-- }
-- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_8 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-- if (likely(__pyx_t_8)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-- __Pyx_INCREF(__pyx_t_8);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_7, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
-+ #if CYTHON_USE_TP_FINALIZE
-+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-+ if (PyObject_CallFinalizerFromDealloc(o)) return;
-+ }
-+ #endif
-+ PyObject_GC_UnTrack(o);
-+ Py_CLEAR(p->prefix);
-+ Py_CLEAR(p->level);
-+ Py_CLEAR(p->text);
-+ Py_CLEAR(p->log_level);
-+ (*Py_TYPE(o)->tp_free)(o);
-+}
-
-- /* "(tree fragment)":13
-- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state):
-- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[2])
-- */
-+static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage(PyObject *o, visitproc v, void *a) {
-+ int e;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
-+ if (p->prefix) {
-+ e = (*v)(p->prefix, a); if (e) return e;
-+ }
-+ if (p->level) {
-+ e = (*v)(p->level, a); if (e) return e;
-+ }
-+ if (p->text) {
-+ e = (*v)(p->text, a); if (e) return e;
-+ }
-+ if (p->log_level) {
-+ e = (*v)(p->log_level, a); if (e) return e;
- }
-+ return 0;
-+}
-
-- /* "(tree fragment)":11
-- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- */
-+static int __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
-+ PyObject* tmp;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
-+ tmp = ((PyObject*)p->prefix);
-+ p->prefix = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->level);
-+ p->level = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->text);
-+ p->text = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->log_level);
-+ p->log_level = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ return 0;
-+}
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_EndOfFileReached__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(o);
- }
-
--/* "(tree fragment)":1
-- * def __pyx_unpickle_InputDispatch(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
--
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch = {"__pyx_unpickle_InputDispatch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch, METH_VARARGS|METH_KEYWORDS, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v___pyx_type = 0;
-- long __pyx_v___pyx_checksum;
-- PyObject *__pyx_v___pyx_state = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__pyx_unpickle_InputDispatch (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
-- PyObject* values[3] = {0,0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_InputDispatch", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_InputDispatch", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_InputDispatch") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- }
-- __pyx_v___pyx_type = values[0];
-- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_v___pyx_state = values[2];
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(o, v);
-+ }
-+ else {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(o);
- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_InputDispatch", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_InputDispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_InputDispatch(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8__pyx_unpickle_InputDispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_v___pyx_PickleError = 0;
-- PyObject *__pyx_v___pyx_result = 0;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- int __pyx_t_6;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_InputDispatch", 0);
--
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0xbf641a9: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
-- */
-- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xbf641a9) != 0);
-- if (__pyx_t_1) {
--
-- /* "(tree fragment)":5
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0xbf641a9:
-- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
-- * __pyx_result = InputDispatch.__new__(__pyx_type)
-- */
-- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_n_s_PickleError);
-- __Pyx_GIVEREF(__pyx_n_s_PickleError);
-- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
-- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_2);
-- __pyx_v___pyx_PickleError = __pyx_t_2;
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
--
-- /* "(tree fragment)":6
-- * if __pyx_checksum != 0xbf641a9:
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum) # <<<<<<<<<<<<<<
-- * __pyx_result = InputDispatch.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- */
-- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xbf, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_INCREF(__pyx_v___pyx_PickleError);
-- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __PYX_ERR(1, 6, __pyx_L1_error)
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(o);
-+}
-
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0xbf641a9: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
-- */
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(o, v);
- }
--
-- /* "(tree fragment)":7
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
-- * __pyx_result = InputDispatch.__new__(__pyx_type) # <<<<<<<<<<<<<<
-- * if __pyx_state is not None:
-- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-+ else {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(o);
- }
-- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v___pyx_result = __pyx_t_3;
-- __pyx_t_3 = 0;
--
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
-- * __pyx_result = InputDispatch.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
-- __pyx_t_6 = (__pyx_t_1 != 0);
-- if (__pyx_t_6) {
-+}
-
-- /* "(tree fragment)":9
-- * __pyx_result = InputDispatch.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
-- * return __pyx_result
-- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
-- */
-- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
-- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(o);
-+}
-
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xbf641a9 = (arg0, type))" % __pyx_checksum)
-- * __pyx_result = InputDispatch.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(o, v);
- }
-+ else {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(o);
-+ }
-+}
-
-- /* "(tree fragment)":10
-- * if __pyx_state is not None:
-- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
-- * return __pyx_result # <<<<<<<<<<<<<<
-- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
-- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v___pyx_result);
-- __pyx_r = __pyx_v___pyx_result;
-- goto __pyx_L0;
--
-- /* "(tree fragment)":1
-- * def __pyx_unpickle_InputDispatch(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(o);
-+}
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_InputDispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
-- __Pyx_XDECREF(__pyx_v___pyx_result);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(o, v);
-+ }
-+ else {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(o);
-+ }
- }
-
--/* "(tree fragment)":11
-- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- */
-+static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_LogMessage[] = {
-+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__, METH_NOARGS, 0},
-+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__, METH_O, 0},
-+ {0, 0, 0, 0}
-+};
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_InputDispatch__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- Py_ssize_t __pyx_t_3;
-- int __pyx_t_4;
-- int __pyx_t_5;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-- PyObject *__pyx_t_8 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_InputDispatch__set_state", 0);
-+static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage[] = {
-+ {(char *)"prefix", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, (char *)0, 0},
-+ {(char *)"level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level, (char *)0, 0},
-+ {(char *)"text", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text, (char *)0, 0},
-+ {(char *)"log_level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, (char *)0, 0},
-+ {0, 0, 0, 0, 0}
-+};
-
-- /* "(tree fragment)":12
-- * return __pyx_result
-- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
-- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1] # <<<<<<<<<<<<<<
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[2])
-- */
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-+static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_LogMessage = {
-+ PyVarObject_HEAD_INIT(0, 0)
-+ "vidcutter.libs.mpv.LogMessage", /*tp_name*/
-+ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage), /*tp_basicsize*/
-+ 0, /*tp_itemsize*/
-+ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage, /*tp_dealloc*/
-+ #if PY_VERSION_HEX < 0x030800b4
-+ 0, /*tp_print*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4
-+ 0, /*tp_vectorcall_offset*/
-+ #endif
-+ 0, /*tp_getattr*/
-+ 0, /*tp_setattr*/
-+ #if PY_MAJOR_VERSION < 3
-+ 0, /*tp_compare*/
-+ #endif
-+ #if PY_MAJOR_VERSION >= 3
-+ 0, /*tp_as_async*/
-+ #endif
-+ 0, /*tp_repr*/
-+ 0, /*tp_as_number*/
-+ 0, /*tp_as_sequence*/
-+ 0, /*tp_as_mapping*/
-+ 0, /*tp_hash*/
-+ 0, /*tp_call*/
-+ 0, /*tp_str*/
-+ 0, /*tp_getattro*/
-+ 0, /*tp_setattro*/
-+ 0, /*tp_as_buffer*/
-+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-+ "Data field for MPV_EVENT_LOG_MESSAGE events.\n\n Wraps: mpv_event_log_message\n ", /*tp_doc*/
-+ __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage, /*tp_traverse*/
-+ __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage, /*tp_clear*/
-+ 0, /*tp_richcompare*/
-+ 0, /*tp_weaklistoffset*/
-+ 0, /*tp_iter*/
-+ 0, /*tp_iternext*/
-+ __pyx_methods_9vidcutter_4libs_3mpv_LogMessage, /*tp_methods*/
-+ 0, /*tp_members*/
-+ __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage, /*tp_getset*/
-+ 0, /*tp_base*/
-+ 0, /*tp_dict*/
-+ 0, /*tp_descr_get*/
-+ 0, /*tp_descr_set*/
-+ 0, /*tp_dictoffset*/
-+ 0, /*tp_init*/
-+ 0, /*tp_alloc*/
-+ __pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage, /*tp_new*/
-+ 0, /*tp_free*/
-+ 0, /*tp_is_gc*/
-+ 0, /*tp_bases*/
-+ 0, /*tp_mro*/
-+ 0, /*tp_cache*/
-+ 0, /*tp_subclasses*/
-+ 0, /*tp_weaklist*/
-+ 0, /*tp_del*/
-+ 0, /*tp_version_tag*/
-+ #if PY_VERSION_HEX >= 0x030400a1
-+ 0, /*tp_finalize*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
-+ 0, /*tp_vectorcall*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-+ 0, /*tp_print*/
-+ #endif
-+ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
-+ 0, /*tp_pypy_flags*/
-+ #endif
-+};
-+static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property __pyx_vtable_9vidcutter_4libs_3mpv_Property;
-+
-+static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Property(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p;
-+ PyObject *o;
-+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-+ o = (*t->tp_alloc)(t, 0);
-+ } else {
-+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->arg0);
-- __Pyx_DECREF(__pyx_v___pyx_result->arg0);
-- __pyx_v___pyx_result->arg0 = __pyx_t_1;
-- __pyx_t_1 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-+ if (unlikely(!o)) return 0;
-+ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o);
-+ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Property;
-+ p->name = Py_None; Py_INCREF(Py_None);
-+ p->data = Py_None; Py_INCREF(Py_None);
-+ return o;
-+}
-+
-+static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property(PyObject *o) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
-+ #if CYTHON_USE_TP_FINALIZE
-+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-+ if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->type);
-- __Pyx_DECREF(__pyx_v___pyx_result->type);
-- __pyx_v___pyx_result->type = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ #endif
-+ PyObject_GC_UnTrack(o);
-+ Py_CLEAR(p->name);
-+ Py_CLEAR(p->data);
-+ (*Py_TYPE(o)->tp_free)(o);
-+}
-
-- /* "(tree fragment)":13
-- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
-- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[2])
-- */
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-- __PYX_ERR(1, 13, __pyx_L1_error)
-+static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property(PyObject *o, visitproc v, void *a) {
-+ int e;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
-+ if (p->name) {
-+ e = (*v)(p->name, a); if (e) return e;
- }
-- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-- __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
-- if (__pyx_t_4) {
-- } else {
-- __pyx_t_2 = __pyx_t_4;
-- goto __pyx_L4_bool_binop_done;
-+ if (p->data) {
-+ e = (*v)(p->data, a); if (e) return e;
- }
-- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-- __pyx_t_5 = (__pyx_t_4 != 0);
-- __pyx_t_2 = __pyx_t_5;
-- __pyx_L4_bool_binop_done:;
-- if (__pyx_t_2) {
-+ return 0;
-+}
-
-- /* "(tree fragment)":14
-- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
-- */
-- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 14, __pyx_L1_error)
-- }
-- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_8 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-- if (likely(__pyx_t_8)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-- __Pyx_INCREF(__pyx_t_8);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_7, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Property(PyObject *o) {
-+ PyObject* tmp;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
-+ tmp = ((PyObject*)p->name);
-+ p->name = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->data);
-+ p->data = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ return 0;
-+}
-
-- /* "(tree fragment)":13
-- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state):
-- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[2])
-- */
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(o);
-+}
-+
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(o, v);
-+ }
-+ else {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(o);
- }
-+}
-
-- /* "(tree fragment)":11
-- * __pyx_unpickle_InputDispatch__set_state(<InputDispatch> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_InputDispatch__set_state(InputDispatch __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.arg0 = __pyx_state[0]; __pyx_result.type = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- */
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(o);
-+}
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_InputDispatch__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(o, v);
-+ }
-+ else {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(o);
-+ }
- }
-
--/* "(tree fragment)":1
-- * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
-+static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Property[] = {
-+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__, METH_NOARGS, 0},
-+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__, METH_O, 0},
-+ {0, 0, 0, 0}
-+};
-
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage = {"__pyx_unpickle_LogMessage", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage, METH_VARARGS|METH_KEYWORDS, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v___pyx_type = 0;
-- long __pyx_v___pyx_checksum;
-- PyObject *__pyx_v___pyx_state = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
-- PyObject* values[3] = {0,0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_LogMessage") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- }
-- __pyx_v___pyx_type = values[0];
-- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_v___pyx_state = values[2];
-+static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Property[] = {
-+ {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_name, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name, (char *)0, 0},
-+ {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_data, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data, (char *)0, 0},
-+ {0, 0, 0, 0, 0}
-+};
-+
-+static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Property = {
-+ PyVarObject_HEAD_INIT(0, 0)
-+ "vidcutter.libs.mpv.Property", /*tp_name*/
-+ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Property), /*tp_basicsize*/
-+ 0, /*tp_itemsize*/
-+ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property, /*tp_dealloc*/
-+ #if PY_VERSION_HEX < 0x030800b4
-+ 0, /*tp_print*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4
-+ 0, /*tp_vectorcall_offset*/
-+ #endif
-+ 0, /*tp_getattr*/
-+ 0, /*tp_setattr*/
-+ #if PY_MAJOR_VERSION < 3
-+ 0, /*tp_compare*/
-+ #endif
-+ #if PY_MAJOR_VERSION >= 3
-+ 0, /*tp_as_async*/
-+ #endif
-+ 0, /*tp_repr*/
-+ 0, /*tp_as_number*/
-+ 0, /*tp_as_sequence*/
-+ 0, /*tp_as_mapping*/
-+ 0, /*tp_hash*/
-+ 0, /*tp_call*/
-+ 0, /*tp_str*/
-+ 0, /*tp_getattro*/
-+ 0, /*tp_setattro*/
-+ 0, /*tp_as_buffer*/
-+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-+ "Data field for MPV_EVENT_PROPERTY_CHANGE and MPV_EVENT_GET_PROPERTY_REPLY.\n\n Wraps: mpv_event_property\n ", /*tp_doc*/
-+ __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property, /*tp_traverse*/
-+ __pyx_tp_clear_9vidcutter_4libs_3mpv_Property, /*tp_clear*/
-+ 0, /*tp_richcompare*/
-+ 0, /*tp_weaklistoffset*/
-+ 0, /*tp_iter*/
-+ 0, /*tp_iternext*/
-+ __pyx_methods_9vidcutter_4libs_3mpv_Property, /*tp_methods*/
-+ 0, /*tp_members*/
-+ __pyx_getsets_9vidcutter_4libs_3mpv_Property, /*tp_getset*/
-+ 0, /*tp_base*/
-+ 0, /*tp_dict*/
-+ 0, /*tp_descr_get*/
-+ 0, /*tp_descr_set*/
-+ 0, /*tp_dictoffset*/
-+ 0, /*tp_init*/
-+ 0, /*tp_alloc*/
-+ __pyx_tp_new_9vidcutter_4libs_3mpv_Property, /*tp_new*/
-+ 0, /*tp_free*/
-+ 0, /*tp_is_gc*/
-+ 0, /*tp_bases*/
-+ 0, /*tp_mro*/
-+ 0, /*tp_cache*/
-+ 0, /*tp_subclasses*/
-+ 0, /*tp_weaklist*/
-+ 0, /*tp_del*/
-+ 0, /*tp_version_tag*/
-+ #if PY_VERSION_HEX >= 0x030400a1
-+ 0, /*tp_finalize*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
-+ 0, /*tp_vectorcall*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-+ 0, /*tp_print*/
-+ #endif
-+ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
-+ 0, /*tp_pypy_flags*/
-+ #endif
-+};
-+static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event __pyx_vtable_9vidcutter_4libs_3mpv_Event;
-+
-+static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Event(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p;
-+ PyObject *o;
-+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-+ o = (*t->tp_alloc)(t, 0);
-+ } else {
-+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_LogMessage", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_LogMessage(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
-+ if (unlikely(!o)) return 0;
-+ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o);
-+ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Event;
-+ p->data = Py_None; Py_INCREF(Py_None);
-+ p->reply_userdata = Py_None; Py_INCREF(Py_None);
-+ return o;
-+}
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event(PyObject *o) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
-+ #if CYTHON_USE_TP_FINALIZE
-+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-+ if (PyObject_CallFinalizerFromDealloc(o)) return;
-+ }
-+ #endif
-+ PyObject_GC_UnTrack(o);
-+ Py_CLEAR(p->data);
-+ Py_CLEAR(p->reply_userdata);
-+ (*Py_TYPE(o)->tp_free)(o);
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10__pyx_unpickle_LogMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_v___pyx_PickleError = 0;
-- PyObject *__pyx_v___pyx_result = 0;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- int __pyx_t_6;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage", 0);
-+static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event(PyObject *o, visitproc v, void *a) {
-+ int e;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
-+ if (p->data) {
-+ e = (*v)(p->data, a); if (e) return e;
-+ }
-+ if (p->reply_userdata) {
-+ e = (*v)(p->reply_userdata, a); if (e) return e;
-+ }
-+ return 0;
-+}
-
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
-- */
-- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x8774fae) != 0);
-- if (__pyx_t_1) {
-+static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Event(PyObject *o) {
-+ PyObject* tmp;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
-+ tmp = ((PyObject*)p->data);
-+ p->data = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->reply_userdata);
-+ p->reply_userdata = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ return 0;
-+}
-
-- /* "(tree fragment)":5
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0x8774fae:
-- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
-- * __pyx_result = LogMessage.__new__(__pyx_type)
-- */
-- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_n_s_PickleError);
-- __Pyx_GIVEREF(__pyx_n_s_PickleError);
-- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
-- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_2);
-- __pyx_v___pyx_PickleError = __pyx_t_2;
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(o);
-+}
-
-- /* "(tree fragment)":6
-- * if __pyx_checksum != 0x8774fae:
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum) # <<<<<<<<<<<<<<
-- * __pyx_result = LogMessage.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- */
-- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_INCREF(__pyx_v___pyx_PickleError);
-- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __PYX_ERR(1, 6, __pyx_L1_error)
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_name(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(o);
-+}
-
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0x8774fae: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
-- */
-- }
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(o);
-+}
-
-- /* "(tree fragment)":7
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
-- * __pyx_result = LogMessage.__new__(__pyx_type) # <<<<<<<<<<<<<<
-- * if __pyx_state is not None:
-- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(o, v);
- }
-- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v___pyx_result = __pyx_t_3;
-- __pyx_t_3 = 0;
--
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
-- * __pyx_result = LogMessage.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
-- __pyx_t_6 = (__pyx_t_1 != 0);
-- if (__pyx_t_6) {
--
-- /* "(tree fragment)":9
-- * __pyx_result = LogMessage.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
-- * return __pyx_result
-- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
-- */
-- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
-- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
--
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x8774fae = (level, log_level, prefix, text))" % __pyx_checksum)
-- * __pyx_result = LogMessage.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-+ else {
-+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
-+ return -1;
- }
--
-- /* "(tree fragment)":10
-- * if __pyx_state is not None:
-- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-- * return __pyx_result # <<<<<<<<<<<<<<
-- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
-- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v___pyx_result);
-- __pyx_r = __pyx_v___pyx_result;
-- goto __pyx_L0;
--
-- /* "(tree fragment)":1
-- * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
--
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
-- __Pyx_XDECREF(__pyx_v___pyx_result);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
- }
-
--/* "(tree fragment)":11
-- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-- */
--
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_LogMessage__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- Py_ssize_t __pyx_t_3;
-- int __pyx_t_4;
-- int __pyx_t_5;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-- PyObject *__pyx_t_8 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_LogMessage__set_state", 0);
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(o);
-+}
-
-- /* "(tree fragment)":12
-- * return __pyx_result
-- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
-- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3] # <<<<<<<<<<<<<<
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[4])
-- */
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(o, v);
- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->level);
-- __Pyx_DECREF(__pyx_v___pyx_result->level);
-- __pyx_v___pyx_result->level = __pyx_t_1;
-- __pyx_t_1 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-+ else {
-+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
-+ return -1;
- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->log_level);
-- __Pyx_DECREF(__pyx_v___pyx_result->log_level);
-- __pyx_v___pyx_result->log_level = __pyx_t_1;
-- __pyx_t_1 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-+}
-+
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(o);
-+}
-+
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(o, v);
- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->prefix);
-- __Pyx_DECREF(__pyx_v___pyx_result->prefix);
-- __pyx_v___pyx_result->prefix = __pyx_t_1;
-- __pyx_t_1 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-+ else {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(o);
- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->text);
-- __Pyx_DECREF(__pyx_v___pyx_result->text);
-- __pyx_v___pyx_result->text = __pyx_t_1;
-- __pyx_t_1 = 0;
-+}
-
-- /* "(tree fragment)":13
-- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
-- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[4])
-- */
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-- __PYX_ERR(1, 13, __pyx_L1_error)
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(o);
-+}
-+
-+static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-+ if (v) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(o, v);
- }
-- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-- __pyx_t_4 = ((__pyx_t_3 > 4) != 0);
-- if (__pyx_t_4) {
-- } else {
-- __pyx_t_2 = __pyx_t_4;
-- goto __pyx_L4_bool_binop_done;
-+ else {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(o);
- }
-- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-- __pyx_t_5 = (__pyx_t_4 != 0);
-- __pyx_t_2 = __pyx_t_5;
-- __pyx_L4_bool_binop_done:;
-- if (__pyx_t_2) {
-+}
-
-- /* "(tree fragment)":14
-- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
-- */
-- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 14, __pyx_L1_error)
-- }
-- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_8 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-- if (likely(__pyx_t_8)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-- __Pyx_INCREF(__pyx_t_8);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_7, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Event[] = {
-+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__, METH_NOARGS, 0},
-+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__, METH_O, 0},
-+ {0, 0, 0, 0}
-+};
-
-- /* "(tree fragment)":13
-- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state):
-- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[4])
-- */
-- }
-+static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Event[] = {
-+ {(char *)"error_str", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str, 0, (char *)"mpv_error_string of the error proeprty", 0},
-+ {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_name, 0, (char *)"mpv_event_name of the event id", 0},
-+ {(char *)"id", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_id, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id, (char *)0, 0},
-+ {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error, (char *)0, 0},
-+ {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_data, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data, (char *)0, 0},
-+ {(char *)"reply_userdata", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, (char *)0, 0},
-+ {0, 0, 0, 0, 0}
-+};
-
-- /* "(tree fragment)":11
-- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-- */
-+static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Event = {
-+ PyVarObject_HEAD_INIT(0, 0)
-+ "vidcutter.libs.mpv.Event", /*tp_name*/
-+ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Event), /*tp_basicsize*/
-+ 0, /*tp_itemsize*/
-+ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event, /*tp_dealloc*/
-+ #if PY_VERSION_HEX < 0x030800b4
-+ 0, /*tp_print*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4
-+ 0, /*tp_vectorcall_offset*/
-+ #endif
-+ 0, /*tp_getattr*/
-+ 0, /*tp_setattr*/
-+ #if PY_MAJOR_VERSION < 3
-+ 0, /*tp_compare*/
-+ #endif
-+ #if PY_MAJOR_VERSION >= 3
-+ 0, /*tp_as_async*/
-+ #endif
-+ 0, /*tp_repr*/
-+ 0, /*tp_as_number*/
-+ 0, /*tp_as_sequence*/
-+ 0, /*tp_as_mapping*/
-+ 0, /*tp_hash*/
-+ 0, /*tp_call*/
-+ 0, /*tp_str*/
-+ 0, /*tp_getattro*/
-+ 0, /*tp_setattro*/
-+ 0, /*tp_as_buffer*/
-+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-+ "Wraps: mpv_event", /*tp_doc*/
-+ __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event, /*tp_traverse*/
-+ __pyx_tp_clear_9vidcutter_4libs_3mpv_Event, /*tp_clear*/
-+ 0, /*tp_richcompare*/
-+ 0, /*tp_weaklistoffset*/
-+ 0, /*tp_iter*/
-+ 0, /*tp_iternext*/
-+ __pyx_methods_9vidcutter_4libs_3mpv_Event, /*tp_methods*/
-+ 0, /*tp_members*/
-+ __pyx_getsets_9vidcutter_4libs_3mpv_Event, /*tp_getset*/
-+ 0, /*tp_base*/
-+ 0, /*tp_dict*/
-+ 0, /*tp_descr_get*/
-+ 0, /*tp_descr_set*/
-+ 0, /*tp_dictoffset*/
-+ 0, /*tp_init*/
-+ 0, /*tp_alloc*/
-+ __pyx_tp_new_9vidcutter_4libs_3mpv_Event, /*tp_new*/
-+ 0, /*tp_free*/
-+ 0, /*tp_is_gc*/
-+ 0, /*tp_bases*/
-+ 0, /*tp_mro*/
-+ 0, /*tp_cache*/
-+ 0, /*tp_subclasses*/
-+ 0, /*tp_weaklist*/
-+ 0, /*tp_del*/
-+ 0, /*tp_version_tag*/
-+ #if PY_VERSION_HEX >= 0x030400a1
-+ 0, /*tp_finalize*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
-+ 0, /*tp_vectorcall*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-+ 0, /*tp_print*/
-+ #endif
-+ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
-+ 0, /*tp_pypy_flags*/
-+ #endif
-+};
-+static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context __pyx_vtable_9vidcutter_4libs_3mpv_Context;
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_LogMessage__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Context(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p;
-+ PyObject *o;
-+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-+ o = (*t->tp_alloc)(t, 0);
-+ } else {
-+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-+ }
-+ if (unlikely(!o)) return 0;
-+ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o);
-+ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Context;
-+ p->callback = Py_None; Py_INCREF(Py_None);
-+ p->callbackthread = Py_None; Py_INCREF(Py_None);
-+ p->reply_userdata = Py_None; Py_INCREF(Py_None);
-+ if (unlikely(__pyx_pw_9vidcutter_4libs_3mpv_7Context_33__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
-+ return o;
-+ bad:
-+ Py_DECREF(o); o = 0;
-+ return NULL;
- }
-
--/* "(tree fragment)":1
-- * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
--
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property = {"__pyx_unpickle_Property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property, METH_VARARGS|METH_KEYWORDS, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v___pyx_type = 0;
-- long __pyx_v___pyx_checksum;
-- PyObject *__pyx_v___pyx_state = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__pyx_unpickle_Property (wrapper)", 0);
-+static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context(PyObject *o) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
-+ #if CYTHON_USE_TP_FINALIZE
-+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-+ if (PyObject_CallFinalizerFromDealloc(o)) return;
-+ }
-+ #endif
-+ PyObject_GC_UnTrack(o);
- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
-- PyObject* values[3] = {0,0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Property") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- }
-- __pyx_v___pyx_type = values[0];
-- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_v___pyx_state = values[2];
-+ PyObject *etype, *eval, *etb;
-+ PyErr_Fetch(&etype, &eval, &etb);
-+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
-+ __pyx_pw_9vidcutter_4libs_3mpv_7Context_41__dealloc__(o);
-+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
-+ PyErr_Restore(etype, eval, etb);
- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Property", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Property(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
-+ Py_CLEAR(p->callback);
-+ Py_CLEAR(p->callbackthread);
-+ Py_CLEAR(p->reply_userdata);
-+ (*Py_TYPE(o)->tp_free)(o);
-+}
-
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context(PyObject *o, visitproc v, void *a) {
-+ int e;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
-+ if (p->callback) {
-+ e = (*v)(p->callback, a); if (e) return e;
-+ }
-+ if (p->callbackthread) {
-+ e = (*v)(p->callbackthread, a); if (e) return e;
-+ }
-+ if (p->reply_userdata) {
-+ e = (*v)(p->reply_userdata, a); if (e) return e;
-+ }
-+ return 0;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_12__pyx_unpickle_Property(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_v___pyx_PickleError = 0;
-- PyObject *__pyx_v___pyx_result = 0;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- int __pyx_t_6;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_Property", 0);
--
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
-- */
-- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x0572d11) != 0);
-- if (__pyx_t_1) {
-+static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Context(PyObject *o) {
-+ PyObject* tmp;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
-+ tmp = ((PyObject*)p->callback);
-+ p->callback = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->callbackthread);
-+ p->callbackthread = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->reply_userdata);
-+ p->reply_userdata = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ return 0;
-+}
-
-- /* "(tree fragment)":5
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0x0572d11:
-- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
-- * __pyx_result = Property.__new__(__pyx_type)
-- */
-- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_n_s_PickleError);
-- __Pyx_GIVEREF(__pyx_n_s_PickleError);
-- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
-- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_2);
-- __pyx_v___pyx_PickleError = __pyx_t_2;
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(o);
-+}
-
-- /* "(tree fragment)":6
-- * if __pyx_checksum != 0x0572d11:
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum) # <<<<<<<<<<<<<<
-- * __pyx_result = Property.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- */
-- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_INCREF(__pyx_v___pyx_PickleError);
-- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __PYX_ERR(1, 6, __pyx_L1_error)
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_name(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(o);
-+}
-
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0x0572d11: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
-- */
-- }
-+static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_time(PyObject *o, CYTHON_UNUSED void *x) {
-+ return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(o);
-+}
-
-- /* "(tree fragment)":7
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
-- * __pyx_result = Property.__new__(__pyx_type) # <<<<<<<<<<<<<<
-- * if __pyx_state is not None:
-- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v___pyx_result = __pyx_t_3;
-- __pyx_t_3 = 0;
-+static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Context[] = {
-+ {"request_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_request_event},
-+ {"set_log_level", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_3set_log_level, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_2set_log_level},
-+ {"load_config", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_5load_config, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_4load_config},
-+ {"_format_for", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_7_format_for, METH_O, 0},
-+ {"command", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_8command},
-+ {"get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_10get_property_async},
-+ {"try_get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_async, METH_VARARGS|METH_KEYWORDS, 0},
-+ {"try_get_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property, METH_VARARGS|METH_KEYWORDS, 0},
-+ {"get_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_17get_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_16get_property},
-+ {"set_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_18set_property},
-+ {"set_option", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_20set_option},
-+ {"initialize", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_23initialize, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_22initialize},
-+ {"wait_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_24wait_event},
-+ {"wakeup", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_27wakeup, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_26wakeup},
-+ {"set_wakeup_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_29set_wakeup_callback, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback},
-+ {"get_wakeup_pipe", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_31get_wakeup_pipe, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe},
-+ {"observe_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_34observe_property},
-+ {"unobserve_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_37unobserve_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_36unobserve_property},
-+ {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_39shutdown, METH_NOARGS, 0},
-+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_43__reduce_cython__, METH_NOARGS, 0},
-+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_45__setstate_cython__, METH_O, 0},
-+ {0, 0, 0, 0}
-+};
-
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
-- * __pyx_result = Property.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
-- __pyx_t_6 = (__pyx_t_1 != 0);
-- if (__pyx_t_6) {
-+static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Context[] = {
-+ {(char *)"api_version", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version, 0, (char *)0, 0},
-+ {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_name, 0, (char *)"Unique name for every context created.\n\n Wraps: mpv_client_name\n ", 0},
-+ {(char *)"time", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_time, 0, (char *)"Internal mpv client time.\n\n Has an arbitrary start offset, but will never wrap or go backwards.\n\n Wraps: mpv_get_time_us\n ", 0},
-+ {0, 0, 0, 0, 0}
-+};
-
-- /* "(tree fragment)":9
-- * __pyx_result = Property.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
-- * return __pyx_result
-- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
-- */
-- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
-- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Context = {
-+ PyVarObject_HEAD_INIT(0, 0)
-+ "vidcutter.libs.mpv.Context", /*tp_name*/
-+ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Context), /*tp_basicsize*/
-+ 0, /*tp_itemsize*/
-+ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context, /*tp_dealloc*/
-+ #if PY_VERSION_HEX < 0x030800b4
-+ 0, /*tp_print*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4
-+ 0, /*tp_vectorcall_offset*/
-+ #endif
-+ 0, /*tp_getattr*/
-+ 0, /*tp_setattr*/
-+ #if PY_MAJOR_VERSION < 3
-+ 0, /*tp_compare*/
-+ #endif
-+ #if PY_MAJOR_VERSION >= 3
-+ 0, /*tp_as_async*/
-+ #endif
-+ 0, /*tp_repr*/
-+ 0, /*tp_as_number*/
-+ 0, /*tp_as_sequence*/
-+ 0, /*tp_as_mapping*/
-+ 0, /*tp_hash*/
-+ 0, /*tp_call*/
-+ 0, /*tp_str*/
-+ 0, /*tp_getattro*/
-+ 0, /*tp_setattro*/
-+ 0, /*tp_as_buffer*/
-+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-+ "Base class wrapping a context to interact with mpv.\n\n Assume all calls can raise MPVError.\n\n Wraps: mpv_create, mpv_destroy and all mpv_handle related calls\n ", /*tp_doc*/
-+ __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context, /*tp_traverse*/
-+ __pyx_tp_clear_9vidcutter_4libs_3mpv_Context, /*tp_clear*/
-+ 0, /*tp_richcompare*/
-+ 0, /*tp_weaklistoffset*/
-+ 0, /*tp_iter*/
-+ 0, /*tp_iternext*/
-+ __pyx_methods_9vidcutter_4libs_3mpv_Context, /*tp_methods*/
-+ 0, /*tp_members*/
-+ __pyx_getsets_9vidcutter_4libs_3mpv_Context, /*tp_getset*/
-+ 0, /*tp_base*/
-+ 0, /*tp_dict*/
-+ 0, /*tp_descr_get*/
-+ 0, /*tp_descr_set*/
-+ 0, /*tp_dictoffset*/
-+ 0, /*tp_init*/
-+ 0, /*tp_alloc*/
-+ __pyx_tp_new_9vidcutter_4libs_3mpv_Context, /*tp_new*/
-+ 0, /*tp_free*/
-+ 0, /*tp_is_gc*/
-+ 0, /*tp_bases*/
-+ 0, /*tp_mro*/
-+ 0, /*tp_cache*/
-+ 0, /*tp_subclasses*/
-+ 0, /*tp_weaklist*/
-+ 0, /*tp_del*/
-+ 0, /*tp_version_tag*/
-+ #if PY_VERSION_HEX >= 0x030400a1
-+ 0, /*tp_finalize*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
-+ 0, /*tp_vectorcall*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-+ 0, /*tp_print*/
-+ #endif
-+ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
-+ 0, /*tp_pypy_flags*/
-+ #endif
-+};
-+static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
-
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0x0572d11 = (data, name))" % __pyx_checksum)
-- * __pyx_result = Property.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-+static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p;
-+ PyObject *o;
-+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-+ o = (*t->tp_alloc)(t, 0);
-+ } else {
-+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
-+ if (unlikely(!o)) return 0;
-+ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o);
-+ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams;
-+ p->owned = Py_None; Py_INCREF(Py_None);
-+ return o;
-+}
-
-- /* "(tree fragment)":10
-- * if __pyx_state is not None:
-- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-- * return __pyx_result # <<<<<<<<<<<<<<
-- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v___pyx_result);
-- __pyx_r = __pyx_v___pyx_result;
-- goto __pyx_L0;
-+static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
-+ #if CYTHON_USE_TP_FINALIZE
-+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-+ if (PyObject_CallFinalizerFromDealloc(o)) return;
-+ }
-+ #endif
-+ PyObject_GC_UnTrack(o);
-+ {
-+ PyObject *etype, *eval, *etb;
-+ PyErr_Fetch(&etype, &eval, &etb);
-+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
-+ __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(o);
-+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
-+ PyErr_Restore(etype, eval, etb);
-+ }
-+ Py_CLEAR(p->owned);
-+ (*Py_TYPE(o)->tp_free)(o);
-+}
-
-- /* "(tree fragment)":1
-- * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
-+static int __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams(PyObject *o, visitproc v, void *a) {
-+ int e;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
-+ if (p->owned) {
-+ e = (*v)(p->owned, a); if (e) return e;
-+ }
-+ return 0;
-+}
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
-- __Pyx_XDECREF(__pyx_v___pyx_result);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static int __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
-+ PyObject* tmp;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
-+ tmp = ((PyObject*)p->owned);
-+ p->owned = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ return 0;
- }
-
--/* "(tree fragment)":11
-- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- */
-+static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv__RenderParams[] = {
-+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__, METH_NOARGS, 0},
-+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__, METH_O, 0},
-+ {0, 0, 0, 0}
-+};
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Property__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- Py_ssize_t __pyx_t_3;
-- int __pyx_t_4;
-- int __pyx_t_5;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-- PyObject *__pyx_t_8 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_Property__set_state", 0);
-+static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv__RenderParams = {
-+ PyVarObject_HEAD_INIT(0, 0)
-+ "vidcutter.libs.mpv._RenderParams", /*tp_name*/
-+ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams), /*tp_basicsize*/
-+ 0, /*tp_itemsize*/
-+ __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams, /*tp_dealloc*/
-+ #if PY_VERSION_HEX < 0x030800b4
-+ 0, /*tp_print*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4
-+ 0, /*tp_vectorcall_offset*/
-+ #endif
-+ 0, /*tp_getattr*/
-+ 0, /*tp_setattr*/
-+ #if PY_MAJOR_VERSION < 3
-+ 0, /*tp_compare*/
-+ #endif
-+ #if PY_MAJOR_VERSION >= 3
-+ 0, /*tp_as_async*/
-+ #endif
-+ 0, /*tp_repr*/
-+ 0, /*tp_as_number*/
-+ 0, /*tp_as_sequence*/
-+ 0, /*tp_as_mapping*/
-+ 0, /*tp_hash*/
-+ 0, /*tp_call*/
-+ 0, /*tp_str*/
-+ 0, /*tp_getattro*/
-+ 0, /*tp_setattro*/
-+ 0, /*tp_as_buffer*/
-+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-+ 0, /*tp_doc*/
-+ __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams, /*tp_traverse*/
-+ __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams, /*tp_clear*/
-+ 0, /*tp_richcompare*/
-+ 0, /*tp_weaklistoffset*/
-+ 0, /*tp_iter*/
-+ 0, /*tp_iternext*/
-+ __pyx_methods_9vidcutter_4libs_3mpv__RenderParams, /*tp_methods*/
-+ 0, /*tp_members*/
-+ 0, /*tp_getset*/
-+ 0, /*tp_base*/
-+ 0, /*tp_dict*/
-+ 0, /*tp_descr_get*/
-+ 0, /*tp_descr_set*/
-+ 0, /*tp_dictoffset*/
-+ __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__, /*tp_init*/
-+ 0, /*tp_alloc*/
-+ __pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams, /*tp_new*/
-+ 0, /*tp_free*/
-+ 0, /*tp_is_gc*/
-+ 0, /*tp_bases*/
-+ 0, /*tp_mro*/
-+ 0, /*tp_cache*/
-+ 0, /*tp_subclasses*/
-+ 0, /*tp_weaklist*/
-+ 0, /*tp_del*/
-+ 0, /*tp_version_tag*/
-+ #if PY_VERSION_HEX >= 0x030400a1
-+ 0, /*tp_finalize*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
-+ 0, /*tp_vectorcall*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-+ 0, /*tp_print*/
-+ #endif
-+ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
-+ 0, /*tp_pypy_flags*/
-+ #endif
-+};
-+static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
-
-- /* "(tree fragment)":12
-- * return __pyx_result
-- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1] # <<<<<<<<<<<<<<
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[2])
-- */
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->data);
-- __Pyx_DECREF(__pyx_v___pyx_result->data);
-- __pyx_v___pyx_result->data = __pyx_t_1;
-- __pyx_t_1 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-+static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *p;
-+ PyObject *o;
-+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-+ o = (*t->tp_alloc)(t, 0);
-+ } else {
-+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->name);
-- __Pyx_DECREF(__pyx_v___pyx_result->name);
-- __pyx_v___pyx_result->name = __pyx_t_1;
-- __pyx_t_1 = 0;
-+ if (unlikely(!o)) return 0;
-+ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)o);
-+ p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo;
-+ return o;
-+}
-
-- /* "(tree fragment)":13
-- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[2])
-- */
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-- __PYX_ERR(1, 13, __pyx_L1_error)
-- }
-- __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-- __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
-- if (__pyx_t_4) {
-- } else {
-- __pyx_t_2 = __pyx_t_4;
-- goto __pyx_L4_bool_binop_done;
-+static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo(PyObject *o) {
-+ #if CYTHON_USE_TP_FINALIZE
-+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
-+ if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
-- __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-- __pyx_t_5 = (__pyx_t_4 != 0);
-- __pyx_t_2 = __pyx_t_5;
-- __pyx_L4_bool_binop_done:;
-- if (__pyx_t_2) {
-+ #endif
-+ (*Py_TYPE(o)->tp_free)(o);
-+}
-
-- /* "(tree fragment)":14
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
-- */
-- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 14, __pyx_L1_error)
-- }
-- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_8 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-- if (likely(__pyx_t_8)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-- __Pyx_INCREF(__pyx_t_8);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_7, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo[] = {
-+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__, METH_NOARGS, 0},
-+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__, METH_O, 0},
-+ {0, 0, 0, 0}
-+};
-
-- /* "(tree fragment)":13
-- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state):
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[2])
-- */
-- }
--
-- /* "(tree fragment)":11
-- * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-- */
-+static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo = {
-+ PyVarObject_HEAD_INIT(0, 0)
-+ "vidcutter.libs.mpv.RenderFrameInfo", /*tp_name*/
-+ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo), /*tp_basicsize*/
-+ 0, /*tp_itemsize*/
-+ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_dealloc*/
-+ #if PY_VERSION_HEX < 0x030800b4
-+ 0, /*tp_print*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4
-+ 0, /*tp_vectorcall_offset*/
-+ #endif
-+ 0, /*tp_getattr*/
-+ 0, /*tp_setattr*/
-+ #if PY_MAJOR_VERSION < 3
-+ 0, /*tp_compare*/
-+ #endif
-+ #if PY_MAJOR_VERSION >= 3
-+ 0, /*tp_as_async*/
-+ #endif
-+ 0, /*tp_repr*/
-+ 0, /*tp_as_number*/
-+ 0, /*tp_as_sequence*/
-+ 0, /*tp_as_mapping*/
-+ 0, /*tp_hash*/
-+ 0, /*tp_call*/
-+ 0, /*tp_str*/
-+ 0, /*tp_getattro*/
-+ 0, /*tp_setattro*/
-+ 0, /*tp_as_buffer*/
-+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-+ 0, /*tp_doc*/
-+ 0, /*tp_traverse*/
-+ 0, /*tp_clear*/
-+ 0, /*tp_richcompare*/
-+ 0, /*tp_weaklistoffset*/
-+ 0, /*tp_iter*/
-+ 0, /*tp_iternext*/
-+ __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_methods*/
-+ 0, /*tp_members*/
-+ 0, /*tp_getset*/
-+ 0, /*tp_base*/
-+ 0, /*tp_dict*/
-+ 0, /*tp_descr_get*/
-+ 0, /*tp_descr_set*/
-+ 0, /*tp_dictoffset*/
-+ 0, /*tp_init*/
-+ 0, /*tp_alloc*/
-+ __pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_new*/
-+ 0, /*tp_free*/
-+ 0, /*tp_is_gc*/
-+ 0, /*tp_bases*/
-+ 0, /*tp_mro*/
-+ 0, /*tp_cache*/
-+ 0, /*tp_subclasses*/
-+ 0, /*tp_weaklist*/
-+ 0, /*tp_del*/
-+ 0, /*tp_version_tag*/
-+ #if PY_VERSION_HEX >= 0x030400a1
-+ 0, /*tp_finalize*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
-+ 0, /*tp_vectorcall*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-+ 0, /*tp_print*/
-+ #endif
-+ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
-+ 0, /*tp_pypy_flags*/
-+ #endif
-+};
-
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Property__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p;
-+ PyObject *o;
-+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-+ o = (*t->tp_alloc)(t, 0);
-+ } else {
-+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-+ }
-+ if (unlikely(!o)) return 0;
-+ p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o);
-+ p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
-+ p->update_cb = Py_None; Py_INCREF(Py_None);
-+ p->_x11_display = Py_None; Py_INCREF(Py_None);
-+ p->_wl_display = Py_None; Py_INCREF(Py_None);
-+ p->_get_proc_address = Py_None; Py_INCREF(Py_None);
-+ return o;
- }
-
--/* "(tree fragment)":1
-- * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
--
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event = {"__pyx_unpickle_Event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event, METH_VARARGS|METH_KEYWORDS, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v___pyx_type = 0;
-- long __pyx_v___pyx_checksum;
-- PyObject *__pyx_v___pyx_state = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__pyx_unpickle_Event (wrapper)", 0);
-+static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
-+ #if CYTHON_USE_TP_FINALIZE
-+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-+ if (PyObject_CallFinalizerFromDealloc(o)) return;
-+ }
-+ #endif
-+ PyObject_GC_UnTrack(o);
- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
-- PyObject* values[3] = {0,0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Event") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- }
-- __pyx_v___pyx_type = values[0];
-- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_v___pyx_state = values[2];
-+ PyObject *etype, *eval, *etb;
-+ PyErr_Fetch(&etype, &eval, &etb);
-+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
-+ __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(o);
-+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
-+ PyErr_Restore(etype, eval, etb);
- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Event", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_Event(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+ Py_CLEAR(p->_mpv);
-+ Py_CLEAR(p->update_cb);
-+ Py_CLEAR(p->_x11_display);
-+ Py_CLEAR(p->_wl_display);
-+ Py_CLEAR(p->_get_proc_address);
-+ (*Py_TYPE(o)->tp_free)(o);
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_v___pyx_PickleError = 0;
-- PyObject *__pyx_v___pyx_result = 0;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- int __pyx_t_6;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_Event", 0);
--
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
-- */
-- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xda38c25) != 0);
-- if (__pyx_t_1) {
-+static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext(PyObject *o, visitproc v, void *a) {
-+ int e;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
-+ if (p->_mpv) {
-+ e = (*v)(((PyObject *)p->_mpv), a); if (e) return e;
-+ }
-+ if (p->update_cb) {
-+ e = (*v)(p->update_cb, a); if (e) return e;
-+ }
-+ if (p->_x11_display) {
-+ e = (*v)(p->_x11_display, a); if (e) return e;
-+ }
-+ if (p->_wl_display) {
-+ e = (*v)(p->_wl_display, a); if (e) return e;
-+ }
-+ if (p->_get_proc_address) {
-+ e = (*v)(p->_get_proc_address, a); if (e) return e;
-+ }
-+ return 0;
-+}
-
-- /* "(tree fragment)":5
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0xda38c25:
-- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
-- * __pyx_result = Event.__new__(__pyx_type)
-- */
-- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_n_s_PickleError);
-- __Pyx_GIVEREF(__pyx_n_s_PickleError);
-- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
-- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_2);
-- __pyx_v___pyx_PickleError = __pyx_t_2;
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
--
-- /* "(tree fragment)":6
-- * if __pyx_checksum != 0xda38c25:
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum) # <<<<<<<<<<<<<<
-- * __pyx_result = Event.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- */
-- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_INCREF(__pyx_v___pyx_PickleError);
-- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __PYX_ERR(1, 6, __pyx_L1_error)
--
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0xda38c25: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
-- */
-- }
--
-- /* "(tree fragment)":7
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
-- * __pyx_result = Event.__new__(__pyx_type) # <<<<<<<<<<<<<<
-- * if __pyx_state is not None:
-- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v___pyx_result = __pyx_t_3;
-- __pyx_t_3 = 0;
--
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
-- * __pyx_result = Event.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
-- __pyx_t_6 = (__pyx_t_1 != 0);
-- if (__pyx_t_6) {
--
-- /* "(tree fragment)":9
-- * __pyx_result = Event.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
-- * return __pyx_result
-- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
-- */
-- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
-- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
--
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xda38c25 = (data, error, id, reply_userdata))" % __pyx_checksum)
-- * __pyx_result = Event.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-- }
-+static int __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
-+ PyObject* tmp;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
-+ tmp = ((PyObject*)p->_mpv);
-+ p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->update_cb);
-+ p->update_cb = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->_x11_display);
-+ p->_x11_display = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->_wl_display);
-+ p->_wl_display = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ tmp = ((PyObject*)p->_get_proc_address);
-+ p->_get_proc_address = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ return 0;
-+}
-
-- /* "(tree fragment)":10
-- * if __pyx_state is not None:
-- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-- * return __pyx_result # <<<<<<<<<<<<<<
-- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v___pyx_result);
-- __pyx_r = __pyx_v___pyx_result;
-- goto __pyx_L0;
-+static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderContext[] = {
-+ {"set_icc_profile", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile, METH_O, 0},
-+ {"set_ambient_light", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light, METH_O, 0},
-+ {"get_next_frame_info", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info, METH_NOARGS, 0},
-+ {"set_update_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback, METH_O, 0},
-+ {"update", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update, METH_NOARGS, 0},
-+ {"render", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render, METH_VARARGS|METH_KEYWORDS, 0},
-+ {"report_swap", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap, METH_NOARGS, 0},
-+ {"free", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free, METH_NOARGS, 0},
-+ {"close", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close, METH_NOARGS, 0},
-+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__, METH_NOARGS, 0},
-+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__, METH_O, 0},
-+ {0, 0, 0, 0}
-+};
-
-- /* "(tree fragment)":1
-- * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
-+static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderContext = {
-+ PyVarObject_HEAD_INIT(0, 0)
-+ "vidcutter.libs.mpv.RenderContext", /*tp_name*/
-+ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext), /*tp_basicsize*/
-+ 0, /*tp_itemsize*/
-+ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
-+ #if PY_VERSION_HEX < 0x030800b4
-+ 0, /*tp_print*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4
-+ 0, /*tp_vectorcall_offset*/
-+ #endif
-+ 0, /*tp_getattr*/
-+ 0, /*tp_setattr*/
-+ #if PY_MAJOR_VERSION < 3
-+ 0, /*tp_compare*/
-+ #endif
-+ #if PY_MAJOR_VERSION >= 3
-+ 0, /*tp_as_async*/
-+ #endif
-+ 0, /*tp_repr*/
-+ 0, /*tp_as_number*/
-+ 0, /*tp_as_sequence*/
-+ 0, /*tp_as_mapping*/
-+ 0, /*tp_hash*/
-+ 0, /*tp_call*/
-+ 0, /*tp_str*/
-+ 0, /*tp_getattro*/
-+ 0, /*tp_setattro*/
-+ 0, /*tp_as_buffer*/
-+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-+ 0, /*tp_doc*/
-+ __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
-+ __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
-+ 0, /*tp_richcompare*/
-+ 0, /*tp_weaklistoffset*/
-+ 0, /*tp_iter*/
-+ 0, /*tp_iternext*/
-+ __pyx_methods_9vidcutter_4libs_3mpv_RenderContext, /*tp_methods*/
-+ 0, /*tp_members*/
-+ 0, /*tp_getset*/
-+ 0, /*tp_base*/
-+ 0, /*tp_dict*/
-+ 0, /*tp_descr_get*/
-+ 0, /*tp_descr_set*/
-+ 0, /*tp_dictoffset*/
-+ __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__, /*tp_init*/
-+ 0, /*tp_alloc*/
-+ __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext, /*tp_new*/
-+ 0, /*tp_free*/
-+ 0, /*tp_is_gc*/
-+ 0, /*tp_bases*/
-+ 0, /*tp_mro*/
-+ 0, /*tp_cache*/
-+ 0, /*tp_subclasses*/
-+ 0, /*tp_weaklist*/
-+ 0, /*tp_del*/
-+ 0, /*tp_version_tag*/
-+ #if PY_VERSION_HEX >= 0x030400a1
-+ 0, /*tp_finalize*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
-+ 0, /*tp_vectorcall*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-+ 0, /*tp_print*/
-+ #endif
-+ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
-+ 0, /*tp_pypy_flags*/
-+ #endif
-+};
-
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
-- __Pyx_XDECREF(__pyx_v___pyx_result);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeObject *t, PyObject *a, PyObject *k) {
-+ PyObject *o = __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(t, a, k);
-+ if (unlikely(!o)) return 0;
-+ return o;
- }
-
--/* "(tree fragment)":11
-- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-- */
-+static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext[] = {
-+ {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__, METH_NOARGS, 0},
-+ {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__, METH_O, 0},
-+ {0, 0, 0, 0}
-+};
-
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_Event__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- PyObject *__pyx_t_1 = NULL;
-- int __pyx_t_2;
-- enum mpv_event_id __pyx_t_3;
-- int __pyx_t_4;
-- Py_ssize_t __pyx_t_5;
-- int __pyx_t_6;
-- int __pyx_t_7;
-- PyObject *__pyx_t_8 = NULL;
-- PyObject *__pyx_t_9 = NULL;
-- PyObject *__pyx_t_10 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_Event__set_state", 0);
-+static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext = {
-+ PyVarObject_HEAD_INIT(0, 0)
-+ "vidcutter.libs.mpv.OpenGLRenderContext", /*tp_name*/
-+ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext), /*tp_basicsize*/
-+ 0, /*tp_itemsize*/
-+ __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
-+ #if PY_VERSION_HEX < 0x030800b4
-+ 0, /*tp_print*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4
-+ 0, /*tp_vectorcall_offset*/
-+ #endif
-+ 0, /*tp_getattr*/
-+ 0, /*tp_setattr*/
-+ #if PY_MAJOR_VERSION < 3
-+ 0, /*tp_compare*/
-+ #endif
-+ #if PY_MAJOR_VERSION >= 3
-+ 0, /*tp_as_async*/
-+ #endif
-+ 0, /*tp_repr*/
-+ 0, /*tp_as_number*/
-+ 0, /*tp_as_sequence*/
-+ 0, /*tp_as_mapping*/
-+ 0, /*tp_hash*/
-+ 0, /*tp_call*/
-+ 0, /*tp_str*/
-+ 0, /*tp_getattro*/
-+ 0, /*tp_setattro*/
-+ 0, /*tp_as_buffer*/
-+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-+ 0, /*tp_doc*/
-+ __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
-+ __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
-+ 0, /*tp_richcompare*/
-+ 0, /*tp_weaklistoffset*/
-+ 0, /*tp_iter*/
-+ 0, /*tp_iternext*/
-+ __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_methods*/
-+ 0, /*tp_members*/
-+ 0, /*tp_getset*/
-+ 0, /*tp_base*/
-+ 0, /*tp_dict*/
-+ 0, /*tp_descr_get*/
-+ 0, /*tp_descr_set*/
-+ 0, /*tp_dictoffset*/
-+ __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__, /*tp_init*/
-+ 0, /*tp_alloc*/
-+ __pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_new*/
-+ 0, /*tp_free*/
-+ 0, /*tp_is_gc*/
-+ 0, /*tp_bases*/
-+ 0, /*tp_mro*/
-+ 0, /*tp_cache*/
-+ 0, /*tp_subclasses*/
-+ 0, /*tp_weaklist*/
-+ 0, /*tp_del*/
-+ 0, /*tp_version_tag*/
-+ #if PY_VERSION_HEX >= 0x030400a1
-+ 0, /*tp_finalize*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
-+ 0, /*tp_vectorcall*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-+ 0, /*tp_print*/
-+ #endif
-+ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
-+ 0, /*tp_pypy_flags*/
-+ #endif
-+};
-
-- /* "(tree fragment)":12
-- * return __pyx_result
-- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3] # <<<<<<<<<<<<<<
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[4])
-- */
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->data);
-- __Pyx_DECREF(__pyx_v___pyx_result->data);
-- __pyx_v___pyx_result->data = __pyx_t_1;
-- __pyx_t_1 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v___pyx_result->error = __pyx_t_2;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_v___pyx_result->id = __pyx_t_3;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-- }
-- __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_1);
-- __Pyx_GOTREF(__pyx_v___pyx_result->reply_userdata);
-- __Pyx_DECREF(__pyx_v___pyx_result->reply_userdata);
-- __pyx_v___pyx_result->reply_userdata = __pyx_t_1;
-- __pyx_t_1 = 0;
-+static struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[8];
-+static int __pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = 0;
-
-- /* "(tree fragment)":13
-- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[4])
-- */
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-- __PYX_ERR(1, 13, __pyx_L1_error)
-- }
-- __pyx_t_5 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-- __pyx_t_6 = ((__pyx_t_5 > 4) != 0);
-- if (__pyx_t_6) {
-+static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-+ PyObject *o;
-+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
-+ o = (PyObject*)__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[--__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors];
-+ memset(o, 0, sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors));
-+ (void) PyObject_INIT(o, t);
-+ PyObject_GC_Track(o);
- } else {
-- __pyx_t_4 = __pyx_t_6;
-- goto __pyx_L4_bool_binop_done;
-+ o = (*t->tp_alloc)(t, 0);
-+ if (unlikely(!o)) return 0;
- }
-- __pyx_t_6 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
-- __pyx_t_7 = (__pyx_t_6 != 0);
-- __pyx_t_4 = __pyx_t_7;
-- __pyx_L4_bool_binop_done:;
-- if (__pyx_t_4) {
--
-- /* "(tree fragment)":14
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
-- */
-- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_8);
-- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_9);
-- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 14, __pyx_L1_error)
-- }
-- __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_8);
-- __pyx_t_10 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
-- __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
-- if (likely(__pyx_t_10)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
-- __Pyx_INCREF(__pyx_t_10);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_9, function);
-- }
-- }
-- __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8);
-- __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
-- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ return o;
-+}
-
-- /* "(tree fragment)":13
-- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state):
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[4])
-- */
-+static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
-+ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
-+ PyObject_GC_UnTrack(o);
-+ Py_CLEAR(p->__pyx_v_fn);
-+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
-+ __pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors++] = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o);
-+ } else {
-+ (*Py_TYPE(o)->tp_free)(o);
- }
-+}
-
-- /* "(tree fragment)":11
-- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-- */
--
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_XDECREF(__pyx_t_9);
-- __Pyx_XDECREF(__pyx_t_10);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_Event__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static int __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o, visitproc v, void *a) {
-+ int e;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
-+ if (p->__pyx_v_fn) {
-+ e = (*v)(p->__pyx_v_fn, a); if (e) return e;
-+ }
-+ return 0;
- }
-
--/* "(tree fragment)":1
-- * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
--
--/* Python wrapper */
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
--static PyMethodDef __pyx_mdef_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo = {"__pyx_unpickle_RenderFrameInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo, METH_VARARGS|METH_KEYWORDS, 0};
--static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
-- PyObject *__pyx_v___pyx_type = 0;
-- long __pyx_v___pyx_checksum;
-- PyObject *__pyx_v___pyx_state = 0;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- PyObject *__pyx_r = 0;
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo (wrapper)", 0);
-- {
-- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
-- PyObject* values[3] = {0,0,0};
-- if (unlikely(__pyx_kwds)) {
-- Py_ssize_t kw_args;
-- const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
-- switch (pos_args) {
-- case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- CYTHON_FALLTHROUGH;
-- case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- CYTHON_FALLTHROUGH;
-- case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- CYTHON_FALLTHROUGH;
-- case 0: break;
-- default: goto __pyx_L5_argtuple_error;
-- }
-- kw_args = PyDict_Size(__pyx_kwds);
-- switch (pos_args) {
-- case 0:
-- if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
-- else goto __pyx_L5_argtuple_error;
-- CYTHON_FALLTHROUGH;
-- case 1:
-- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
-- else {
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- }
-- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RenderFrameInfo") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
-- }
-- } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
-- goto __pyx_L5_argtuple_error;
-- } else {
-- values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
-- values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
-- values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
-- }
-- __pyx_v___pyx_type = values[0];
-- __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_v___pyx_state = values[2];
-- }
-- goto __pyx_L4_argument_unpacking_done;
-- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RenderFrameInfo", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
-- __pyx_L3_error:;
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __Pyx_RefNannyFinishContext();
-- return NULL;
-- __pyx_L4_argument_unpacking_done:;
-- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_16__pyx_unpickle_RenderFrameInfo(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
--
-- /* function exit code */
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
-+static int __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
-+ PyObject* tmp;
-+ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
-+ tmp = ((PyObject*)p->__pyx_v_fn);
-+ p->__pyx_v_fn = Py_None; Py_INCREF(Py_None);
-+ Py_XDECREF(tmp);
-+ return 0;
- }
-
--static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16__pyx_unpickle_RenderFrameInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_v___pyx_PickleError = 0;
-- PyObject *__pyx_v___pyx_result = 0;
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- PyObject *__pyx_t_2 = NULL;
-- PyObject *__pyx_t_3 = NULL;
-- PyObject *__pyx_t_4 = NULL;
-- PyObject *__pyx_t_5 = NULL;
-- int __pyx_t_6;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo", 0);
--
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
-- */
-- __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xd41d8cd) != 0);
-- if (__pyx_t_1) {
--
-- /* "(tree fragment)":5
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0xd41d8cd:
-- * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
-- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
-- */
-- __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_n_s_PickleError);
-- __Pyx_GIVEREF(__pyx_n_s_PickleError);
-- PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
-- __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_2);
-- __pyx_v___pyx_PickleError = __pyx_t_2;
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-+static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = {
-+ PyVarObject_HEAD_INIT(0, 0)
-+ "vidcutter.libs.mpv.__pyx_scope_struct___errors", /*tp_name*/
-+ sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors), /*tp_basicsize*/
-+ 0, /*tp_itemsize*/
-+ __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_dealloc*/
-+ #if PY_VERSION_HEX < 0x030800b4
-+ 0, /*tp_print*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4
-+ 0, /*tp_vectorcall_offset*/
-+ #endif
-+ 0, /*tp_getattr*/
-+ 0, /*tp_setattr*/
-+ #if PY_MAJOR_VERSION < 3
-+ 0, /*tp_compare*/
-+ #endif
-+ #if PY_MAJOR_VERSION >= 3
-+ 0, /*tp_as_async*/
-+ #endif
-+ 0, /*tp_repr*/
-+ 0, /*tp_as_number*/
-+ 0, /*tp_as_sequence*/
-+ 0, /*tp_as_mapping*/
-+ 0, /*tp_hash*/
-+ 0, /*tp_call*/
-+ 0, /*tp_str*/
-+ 0, /*tp_getattro*/
-+ 0, /*tp_setattro*/
-+ 0, /*tp_as_buffer*/
-+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-+ 0, /*tp_doc*/
-+ __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_traverse*/
-+ __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_clear*/
-+ 0, /*tp_richcompare*/
-+ 0, /*tp_weaklistoffset*/
-+ 0, /*tp_iter*/
-+ 0, /*tp_iternext*/
-+ 0, /*tp_methods*/
-+ 0, /*tp_members*/
-+ 0, /*tp_getset*/
-+ 0, /*tp_base*/
-+ 0, /*tp_dict*/
-+ 0, /*tp_descr_get*/
-+ 0, /*tp_descr_set*/
-+ 0, /*tp_dictoffset*/
-+ 0, /*tp_init*/
-+ 0, /*tp_alloc*/
-+ __pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_new*/
-+ 0, /*tp_free*/
-+ 0, /*tp_is_gc*/
-+ 0, /*tp_bases*/
-+ 0, /*tp_mro*/
-+ 0, /*tp_cache*/
-+ 0, /*tp_subclasses*/
-+ 0, /*tp_weaklist*/
-+ 0, /*tp_del*/
-+ 0, /*tp_version_tag*/
-+ #if PY_VERSION_HEX >= 0x030400a1
-+ 0, /*tp_finalize*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
-+ 0, /*tp_vectorcall*/
-+ #endif
-+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-+ 0, /*tp_print*/
-+ #endif
-+ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
-+ 0, /*tp_pypy_flags*/
-+ #endif
-+};
-
-- /* "(tree fragment)":6
-- * if __pyx_checksum != 0xd41d8cd:
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum) # <<<<<<<<<<<<<<
-- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- */
-- __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_INCREF(__pyx_v___pyx_PickleError);
-- __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_5)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_5);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __PYX_ERR(1, 6, __pyx_L1_error)
-+static PyMethodDef __pyx_methods[] = {
-+ {0, 0, 0, 0}
-+};
-
-- /* "(tree fragment)":4
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- * if __pyx_checksum != 0xd41d8cd: # <<<<<<<<<<<<<<
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
-- */
-- }
-+#if PY_MAJOR_VERSION >= 3
-+#if CYTHON_PEP489_MULTI_PHASE_INIT
-+static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
-+static int __pyx_pymod_exec_mpv(PyObject* module); /*proto*/
-+static PyModuleDef_Slot __pyx_moduledef_slots[] = {
-+ {Py_mod_create, (void*)__pyx_pymod_create},
-+ {Py_mod_exec, (void*)__pyx_pymod_exec_mpv},
-+ {0, NULL}
-+};
-+#endif
-
-- /* "(tree fragment)":7
-- * from pickle import PickleError as __pyx_PickleError
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
-- * __pyx_result = RenderFrameInfo.__new__(__pyx_type) # <<<<<<<<<<<<<<
-- * if __pyx_state is not None:
-- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
-- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-- __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
-- if (likely(__pyx_t_4)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
-- __Pyx_INCREF(__pyx_t_4);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_2, function);
-- }
-- }
-- __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
-- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_v___pyx_result = __pyx_t_3;
-- __pyx_t_3 = 0;
--
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
-- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-- __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
-- __pyx_t_6 = (__pyx_t_1 != 0);
-- if (__pyx_t_6) {
--
-- /* "(tree fragment)":9
-- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
-- * if __pyx_state is not None:
-- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
-- * return __pyx_result
-- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
-- */
-- if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
-- __pyx_t_3 = __pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_3);
-- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
--
-- /* "(tree fragment)":8
-- * raise __pyx_PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
-- * __pyx_result = RenderFrameInfo.__new__(__pyx_type)
-- * if __pyx_state is not None: # <<<<<<<<<<<<<<
-- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
-- * return __pyx_result
-- */
-- }
--
-- /* "(tree fragment)":10
-- * if __pyx_state is not None:
-- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
-- * return __pyx_result # <<<<<<<<<<<<<<
-- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
-- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
-- */
-- __Pyx_XDECREF(__pyx_r);
-- __Pyx_INCREF(__pyx_v___pyx_result);
-- __pyx_r = __pyx_v___pyx_result;
-- goto __pyx_L0;
--
-- /* "(tree fragment)":1
-- * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
--
-- /* function exit code */
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_3);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = NULL;
-- __pyx_L0:;
-- __Pyx_XDECREF(__pyx_v___pyx_PickleError);
-- __Pyx_XDECREF(__pyx_v___pyx_result);
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--
--/* "(tree fragment)":11
-- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[0])
-- */
--
--static PyObject *__pyx_f_9vidcutter_4libs_3mpv___pyx_unpickle_RenderFrameInfo__set_state(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
-- PyObject *__pyx_r = NULL;
-- __Pyx_RefNannyDeclarations
-- int __pyx_t_1;
-- Py_ssize_t __pyx_t_2;
-- int __pyx_t_3;
-- int __pyx_t_4;
-- PyObject *__pyx_t_5 = NULL;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-- PyObject *__pyx_t_8 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__pyx_unpickle_RenderFrameInfo__set_state", 0);
--
-- /* "(tree fragment)":12
-- * return __pyx_result
-- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
-- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[0])
-- */
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-- __PYX_ERR(1, 12, __pyx_L1_error)
-- }
-- __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
-- __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
-- if (__pyx_t_3) {
-- } else {
-- __pyx_t_1 = __pyx_t_3;
-- goto __pyx_L4_bool_binop_done;
-- }
-- __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
-- __pyx_t_4 = (__pyx_t_3 != 0);
-- __pyx_t_1 = __pyx_t_4;
-- __pyx_L4_bool_binop_done:;
-- if (__pyx_t_1) {
--
-- /* "(tree fragment)":13
-- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
-- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[0]) # <<<<<<<<<<<<<<
-- */
-- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(__pyx_v___pyx_state == Py_None)) {
-- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
-- __PYX_ERR(1, 13, __pyx_L1_error)
-- }
-- __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_8 = NULL;
-- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-- __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
-- if (likely(__pyx_t_8)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
-- __Pyx_INCREF(__pyx_t_8);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_7, function);
-- }
-- }
-- __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
--
-- /* "(tree fragment)":12
-- * return __pyx_result
-- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state):
-- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
-- * __pyx_result.__dict__.update(__pyx_state[0])
-- */
-- }
--
-- /* "(tree fragment)":11
-- * __pyx_unpickle_RenderFrameInfo__set_state(<RenderFrameInfo> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_RenderFrameInfo__set_state(RenderFrameInfo __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
-- * __pyx_result.__dict__.update(__pyx_state[0])
-- */
--
-- /* function exit code */
-- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_5);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- __Pyx_XDECREF(__pyx_t_8);
-- __Pyx_AddTraceback("vidcutter.libs.mpv.__pyx_unpickle_RenderFrameInfo__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- __pyx_r = 0;
-- __pyx_L0:;
-- __Pyx_XGIVEREF(__pyx_r);
-- __Pyx_RefNannyFinishContext();
-- return __pyx_r;
--}
--static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p;
-- PyObject *o;
-- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-- o = (*t->tp_alloc)(t, 0);
-- } else {
-- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-- }
-- if (unlikely(!o)) return 0;
-- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o);
-- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
-- p->reason = Py_None; Py_INCREF(Py_None);
-- p->error = Py_None; Py_INCREF(Py_None);
-- return o;
--}
--
--static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
-- #if CYTHON_USE_TP_FINALIZE
-- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-- if (PyObject_CallFinalizerFromDealloc(o)) return;
-- }
-+static struct PyModuleDef __pyx_moduledef = {
-+ PyModuleDef_HEAD_INIT,
-+ "mpv",
-+ __pyx_k_pympv_Python_wrapper_for_libmpv, /* m_doc */
-+ #if CYTHON_PEP489_MULTI_PHASE_INIT
-+ 0, /* m_size */
-+ #else
-+ -1, /* m_size */
- #endif
-- PyObject_GC_UnTrack(o);
-- Py_CLEAR(p->reason);
-- Py_CLEAR(p->error);
-- (*Py_TYPE(o)->tp_free)(o);
--}
-+ __pyx_methods /* m_methods */,
-+ #if CYTHON_PEP489_MULTI_PHASE_INIT
-+ __pyx_moduledef_slots, /* m_slots */
-+ #else
-+ NULL, /* m_reload */
-+ #endif
-+ NULL, /* m_traverse */
-+ NULL, /* m_clear */
-+ NULL /* m_free */
-+};
-+#endif
-+#ifndef CYTHON_SMALL_CODE
-+#if defined(__clang__)
-+ #define CYTHON_SMALL_CODE
-+#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
-+ #define CYTHON_SMALL_CODE __attribute__((cold))
-+#else
-+ #define CYTHON_SMALL_CODE
-+#endif
-+#endif
-
--static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o, visitproc v, void *a) {
-- int e;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
-- if (p->reason) {
-- e = (*v)(p->reason, a); if (e) return e;
-- }
-- if (p->error) {
-- e = (*v)(p->error, a); if (e) return e;
-- }
-- return 0;
--}
--
--static int __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached(PyObject *o) {
-- PyObject* tmp;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)o;
-- tmp = ((PyObject*)p->reason);
-- p->reason = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->error);
-- p->error = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- return 0;
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_6reason_5__del__(o);
-- }
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_5error_5__del__(o);
-- }
--}
--
--static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
-- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_1__reduce_cython__, METH_NOARGS, 0},
-- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_16EndOfFileReached_3__setstate_cython__, METH_O, 0},
-- {0, 0, 0, 0}
--};
--
--static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached[] = {
-- {(char *)"reason", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_reason, (char *)0, 0},
-- {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, __pyx_setprop_9vidcutter_4libs_3mpv_16EndOfFileReached_error, (char *)0, 0},
-- {0, 0, 0, 0, 0}
--};
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv.EndOfFileReached", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-- "Data field for MPV_EVENT_END_FILE events\n\n Wraps: mpv_event_end_file\n ", /*tp_doc*/
-- __pyx_tp_traverse_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_traverse*/
-- __pyx_tp_clear_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- __pyx_methods_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_methods*/
-- 0, /*tp_members*/
-- __pyx_getsets_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- 0, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv_EndOfFileReached, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_InputDispatch __pyx_vtable_9vidcutter_4libs_3mpv_InputDispatch;
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_InputDispatch(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p;
-- PyObject *o;
-- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-- o = (*t->tp_alloc)(t, 0);
-- } else {
-- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-- }
-- if (unlikely(!o)) return 0;
-- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o);
-- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch;
-- p->arg0 = Py_None; Py_INCREF(Py_None);
-- p->type = Py_None; Py_INCREF(Py_None);
-- return o;
--}
--
--static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_InputDispatch(PyObject *o) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o;
-- #if CYTHON_USE_TP_FINALIZE
-- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-- if (PyObject_CallFinalizerFromDealloc(o)) return;
-- }
-- #endif
-- PyObject_GC_UnTrack(o);
-- Py_CLEAR(p->arg0);
-- Py_CLEAR(p->type);
-- (*Py_TYPE(o)->tp_free)(o);
--}
--
--static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_InputDispatch(PyObject *o, visitproc v, void *a) {
-- int e;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o;
-- if (p->arg0) {
-- e = (*v)(p->arg0, a); if (e) return e;
-- }
-- if (p->type) {
-- e = (*v)(p->type, a); if (e) return e;
-- }
-- return 0;
--}
--
--static int __pyx_tp_clear_9vidcutter_4libs_3mpv_InputDispatch(PyObject *o) {
-- PyObject* tmp;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *)o;
-- tmp = ((PyObject*)p->arg0);
-- p->arg0 = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->type);
-- p->type = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- return 0;
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4arg0_5__del__(o);
-- }
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_type(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_4type_5__del__(o);
-- }
--}
--
--static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_InputDispatch[] = {
-- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_1__reduce_cython__, METH_NOARGS, 0},
-- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13InputDispatch_3__setstate_cython__, METH_O, 0},
-- {0, 0, 0, 0}
--};
--
--static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_InputDispatch[] = {
-- {(char *)"arg0", __pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0, __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_arg0, (char *)0, 0},
-- {(char *)"type", __pyx_getprop_9vidcutter_4libs_3mpv_13InputDispatch_type, __pyx_setprop_9vidcutter_4libs_3mpv_13InputDispatch_type, (char *)0, 0},
-- {0, 0, 0, 0, 0}
--};
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_InputDispatch = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv.InputDispatch", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_InputDispatch, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-- "Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.\n\n Wraps: mpv_event_script_input_dispatch\n ", /*tp_doc*/
-- __pyx_tp_traverse_9vidcutter_4libs_3mpv_InputDispatch, /*tp_traverse*/
-- __pyx_tp_clear_9vidcutter_4libs_3mpv_InputDispatch, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- __pyx_methods_9vidcutter_4libs_3mpv_InputDispatch, /*tp_methods*/
-- 0, /*tp_members*/
-- __pyx_getsets_9vidcutter_4libs_3mpv_InputDispatch, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- 0, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv_InputDispatch, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p;
-- PyObject *o;
-- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-- o = (*t->tp_alloc)(t, 0);
-- } else {
-- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-- }
-- if (unlikely(!o)) return 0;
-- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o);
-- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage;
-- p->prefix = Py_None; Py_INCREF(Py_None);
-- p->level = Py_None; Py_INCREF(Py_None);
-- p->text = Py_None; Py_INCREF(Py_None);
-- p->log_level = Py_None; Py_INCREF(Py_None);
-- return o;
--}
--
--static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
-- #if CYTHON_USE_TP_FINALIZE
-- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-- if (PyObject_CallFinalizerFromDealloc(o)) return;
-- }
-- #endif
-- PyObject_GC_UnTrack(o);
-- Py_CLEAR(p->prefix);
-- Py_CLEAR(p->level);
-- Py_CLEAR(p->text);
-- Py_CLEAR(p->log_level);
-- (*Py_TYPE(o)->tp_free)(o);
--}
--
--static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage(PyObject *o, visitproc v, void *a) {
-- int e;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
-- if (p->prefix) {
-- e = (*v)(p->prefix, a); if (e) return e;
-- }
-- if (p->level) {
-- e = (*v)(p->level, a); if (e) return e;
-- }
-- if (p->text) {
-- e = (*v)(p->text, a); if (e) return e;
-- }
-- if (p->log_level) {
-- e = (*v)(p->log_level, a); if (e) return e;
-- }
-- return 0;
--}
--
--static int __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage(PyObject *o) {
-- PyObject* tmp;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)o;
-- tmp = ((PyObject*)p->prefix);
-- p->prefix = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->level);
-- p->level = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->text);
-- p->text = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->log_level);
-- p->log_level = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- return 0;
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_6prefix_5__del__(o);
-- }
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_5level_5__del__(o);
-- }
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_4text_5__del__(o);
-- }
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_9log_level_5__del__(o);
-- }
--}
--
--static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_LogMessage[] = {
-- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_1__reduce_cython__, METH_NOARGS, 0},
-- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_10LogMessage_3__setstate_cython__, METH_O, 0},
-- {0, 0, 0, 0}
--};
--
--static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage[] = {
-- {(char *)"prefix", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_prefix, (char *)0, 0},
-- {(char *)"level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_level, (char *)0, 0},
-- {(char *)"text", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_text, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_text, (char *)0, 0},
-- {(char *)"log_level", __pyx_getprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, __pyx_setprop_9vidcutter_4libs_3mpv_10LogMessage_log_level, (char *)0, 0},
-- {0, 0, 0, 0, 0}
--};
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_LogMessage = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv.LogMessage", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_LogMessage, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-- "Data field for MPV_EVENT_LOG_MESSAGE events.\n\n Wraps: mpv_event_log_message\n ", /*tp_doc*/
-- __pyx_tp_traverse_9vidcutter_4libs_3mpv_LogMessage, /*tp_traverse*/
-- __pyx_tp_clear_9vidcutter_4libs_3mpv_LogMessage, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- __pyx_methods_9vidcutter_4libs_3mpv_LogMessage, /*tp_methods*/
-- 0, /*tp_members*/
-- __pyx_getsets_9vidcutter_4libs_3mpv_LogMessage, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- 0, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv_LogMessage, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property __pyx_vtable_9vidcutter_4libs_3mpv_Property;
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Property(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p;
-- PyObject *o;
-- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-- o = (*t->tp_alloc)(t, 0);
-- } else {
-- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-- }
-- if (unlikely(!o)) return 0;
-- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o);
-- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Property;
-- p->name = Py_None; Py_INCREF(Py_None);
-- p->data = Py_None; Py_INCREF(Py_None);
-- return o;
--}
--
--static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property(PyObject *o) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
-- #if CYTHON_USE_TP_FINALIZE
-- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-- if (PyObject_CallFinalizerFromDealloc(o)) return;
-- }
-- #endif
-- PyObject_GC_UnTrack(o);
-- Py_CLEAR(p->name);
-- Py_CLEAR(p->data);
-- (*Py_TYPE(o)->tp_free)(o);
--}
--
--static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property(PyObject *o, visitproc v, void *a) {
-- int e;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
-- if (p->name) {
-- e = (*v)(p->name, a); if (e) return e;
-- }
-- if (p->data) {
-- e = (*v)(p->data, a); if (e) return e;
-- }
-- return 0;
--}
--
--static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Property(PyObject *o) {
-- PyObject* tmp;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Property *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)o;
-- tmp = ((PyObject*)p->name);
-- p->name = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->data);
-- p->data = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- return 0;
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4name_5__del__(o);
-- }
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_8Property_4data_5__del__(o);
-- }
--}
--
--static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Property[] = {
-- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_1__reduce_cython__, METH_NOARGS, 0},
-- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_8Property_3__setstate_cython__, METH_O, 0},
-- {0, 0, 0, 0}
--};
--
--static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Property[] = {
-- {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_name, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_name, (char *)0, 0},
-- {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_8Property_data, __pyx_setprop_9vidcutter_4libs_3mpv_8Property_data, (char *)0, 0},
-- {0, 0, 0, 0, 0}
--};
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Property = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv.Property", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Property), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Property, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-- "Data field for MPV_EVENT_PROPERTY_CHANGE and MPV_EVENT_GET_PROPERTY_REPLY.\n\n Wraps: mpv_event_property\n ", /*tp_doc*/
-- __pyx_tp_traverse_9vidcutter_4libs_3mpv_Property, /*tp_traverse*/
-- __pyx_tp_clear_9vidcutter_4libs_3mpv_Property, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- __pyx_methods_9vidcutter_4libs_3mpv_Property, /*tp_methods*/
-- 0, /*tp_members*/
-- __pyx_getsets_9vidcutter_4libs_3mpv_Property, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- 0, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv_Property, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event __pyx_vtable_9vidcutter_4libs_3mpv_Event;
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Event(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p;
-- PyObject *o;
-- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-- o = (*t->tp_alloc)(t, 0);
-- } else {
-- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-- }
-- if (unlikely(!o)) return 0;
-- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o);
-- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Event;
-- p->data = Py_None; Py_INCREF(Py_None);
-- p->reply_userdata = Py_None; Py_INCREF(Py_None);
-- return o;
--}
--
--static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event(PyObject *o) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
-- #if CYTHON_USE_TP_FINALIZE
-- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-- if (PyObject_CallFinalizerFromDealloc(o)) return;
-- }
-- #endif
-- PyObject_GC_UnTrack(o);
-- Py_CLEAR(p->data);
-- Py_CLEAR(p->reply_userdata);
-- (*Py_TYPE(o)->tp_free)(o);
--}
--
--static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event(PyObject *o, visitproc v, void *a) {
-- int e;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
-- if (p->data) {
-- e = (*v)(p->data, a); if (e) return e;
-- }
-- if (p->reply_userdata) {
-- e = (*v)(p->reply_userdata, a); if (e) return e;
-- }
-- return 0;
--}
--
--static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Event(PyObject *o) {
-- PyObject* tmp;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Event *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)o;
-- tmp = ((PyObject*)p->data);
-- p->data = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->reply_userdata);
-- p->reply_userdata = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- return 0;
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_9error_str_1__get__(o);
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_name(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4name_1__get__(o);
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_2id_3__set__(o, v);
-- }
-- else {
-- PyErr_SetString(PyExc_NotImplementedError, "__del__");
-- return -1;
-- }
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_5error_3__set__(o, v);
-- }
-- else {
-- PyErr_SetString(PyExc_NotImplementedError, "__del__");
-- return -1;
-- }
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_4data_5__del__(o);
-- }
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_1__get__(o);
--}
--
--static int __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
-- if (v) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_3__set__(o, v);
-- }
-- else {
-- return __pyx_pw_9vidcutter_4libs_3mpv_5Event_14reply_userdata_5__del__(o);
-- }
--}
--
--static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Event[] = {
-- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_1__reduce_cython__, METH_NOARGS, 0},
-- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_5Event_3__setstate_cython__, METH_O, 0},
-- {0, 0, 0, 0}
--};
--
--static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Event[] = {
-- {(char *)"error_str", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error_str, 0, (char *)"mpv_error_string of the error proeprty", 0},
-- {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_name, 0, (char *)"mpv_event_name of the event id", 0},
-- {(char *)"id", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_id, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_id, (char *)0, 0},
-- {(char *)"error", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_error, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_error, (char *)0, 0},
-- {(char *)"data", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_data, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_data, (char *)0, 0},
-- {(char *)"reply_userdata", __pyx_getprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, __pyx_setprop_9vidcutter_4libs_3mpv_5Event_reply_userdata, (char *)0, 0},
-- {0, 0, 0, 0, 0}
--};
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Event = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv.Event", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Event), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Event, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-- "Wraps: mpv_event", /*tp_doc*/
-- __pyx_tp_traverse_9vidcutter_4libs_3mpv_Event, /*tp_traverse*/
-- __pyx_tp_clear_9vidcutter_4libs_3mpv_Event, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- __pyx_methods_9vidcutter_4libs_3mpv_Event, /*tp_methods*/
-- 0, /*tp_members*/
-- __pyx_getsets_9vidcutter_4libs_3mpv_Event, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- 0, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv_Event, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context __pyx_vtable_9vidcutter_4libs_3mpv_Context;
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_Context(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p;
-- PyObject *o;
-- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-- o = (*t->tp_alloc)(t, 0);
-- } else {
-- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-- }
-- if (unlikely(!o)) return 0;
-- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o);
-- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_Context;
-- p->callback = Py_None; Py_INCREF(Py_None);
-- p->callbackthread = Py_None; Py_INCREF(Py_None);
-- p->reply_userdata = Py_None; Py_INCREF(Py_None);
-- if (unlikely(__pyx_pw_9vidcutter_4libs_3mpv_7Context_37__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
-- return o;
-- bad:
-- Py_DECREF(o); o = 0;
-- return NULL;
--}
--
--static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context(PyObject *o) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
-- #if CYTHON_USE_TP_FINALIZE
-- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-- if (PyObject_CallFinalizerFromDealloc(o)) return;
-- }
-- #endif
-- PyObject_GC_UnTrack(o);
-- {
-- PyObject *etype, *eval, *etb;
-- PyErr_Fetch(&etype, &eval, &etb);
-- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
-- __pyx_pw_9vidcutter_4libs_3mpv_7Context_47__dealloc__(o);
-- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
-- PyErr_Restore(etype, eval, etb);
-- }
-- Py_CLEAR(p->callback);
-- Py_CLEAR(p->callbackthread);
-- Py_CLEAR(p->reply_userdata);
-- (*Py_TYPE(o)->tp_free)(o);
--}
--
--static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context(PyObject *o, visitproc v, void *a) {
-- int e;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
-- if (p->callback) {
-- e = (*v)(p->callback, a); if (e) return e;
-- }
-- if (p->callbackthread) {
-- e = (*v)(p->callbackthread, a); if (e) return e;
-- }
-- if (p->reply_userdata) {
-- e = (*v)(p->reply_userdata, a); if (e) return e;
-- }
-- return 0;
--}
--
--static int __pyx_tp_clear_9vidcutter_4libs_3mpv_Context(PyObject *o) {
-- PyObject* tmp;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_Context *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)o;
-- tmp = ((PyObject*)p->callback);
-- p->callback = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->callbackthread);
-- p->callbackthread = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->reply_userdata);
-- p->reply_userdata = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- return 0;
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_7Context_11api_version_1__get__(o);
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_name(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4name_1__get__(o);
--}
--
--static PyObject *__pyx_getprop_9vidcutter_4libs_3mpv_7Context_time(PyObject *o, CYTHON_UNUSED void *x) {
-- return __pyx_pw_9vidcutter_4libs_3mpv_7Context_4time_1__get__(o);
--}
--
--static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_Context[] = {
-- {"suspend", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_1suspend, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_suspend},
-- {"resume", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_3resume, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_2resume},
-- {"request_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_5request_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_4request_event},
-- {"set_log_level", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_7set_log_level, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_6set_log_level},
-- {"load_config", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_9load_config, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_8load_config},
-- {"_format_for", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_11_format_for, METH_O, 0},
-- {"command", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_13command, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_12command},
-- {"get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_15get_property_async, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_14get_property_async},
-- {"try_get_property_async", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_17try_get_property_async, METH_VARARGS|METH_KEYWORDS, 0},
-- {"try_get_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_19try_get_property, METH_VARARGS|METH_KEYWORDS, 0},
-- {"get_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_21get_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_20get_property},
-- {"set_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_23set_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_22set_property},
-- {"set_option", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_25set_option, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_24set_option},
-- {"initialize", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_27initialize, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_26initialize},
-- {"wait_event", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_29wait_event, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_28wait_event},
-- {"wakeup", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_31wakeup, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_30wakeup},
-- {"set_wakeup_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_33set_wakeup_callback, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_32set_wakeup_callback},
-- {"get_wakeup_pipe", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_35get_wakeup_pipe, METH_NOARGS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_34get_wakeup_pipe},
-- {"observe_property", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_7Context_39observe_property, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9vidcutter_4libs_3mpv_7Context_38observe_property},
-- {"unobserve_property", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_41unobserve_property, METH_O, __pyx_doc_9vidcutter_4libs_3mpv_7Context_40unobserve_property},
-- {"shutdown", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_43shutdown, METH_NOARGS, 0},
-- {"opengl_cb_api", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_45opengl_cb_api, METH_NOARGS, 0},
-- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_49__reduce_cython__, METH_NOARGS, 0},
-- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_7Context_51__setstate_cython__, METH_O, 0},
-- {0, 0, 0, 0}
--};
--
--static struct PyGetSetDef __pyx_getsets_9vidcutter_4libs_3mpv_Context[] = {
-- {(char *)"api_version", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_api_version, 0, (char *)0, 0},
-- {(char *)"name", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_name, 0, (char *)"Unique name for every context created.\n\n Wraps: mpv_client_name\n ", 0},
-- {(char *)"time", __pyx_getprop_9vidcutter_4libs_3mpv_7Context_time, 0, (char *)"Internal mpv client time.\n\n Has an arbitrary start offset, but will never wrap or go backwards.\n\n Wraps: mpv_get_time_us\n ", 0},
-- {0, 0, 0, 0, 0}
--};
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_Context = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv.Context", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_Context), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_Context, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-- "Base class wrapping a context to interact with mpv.\n\n Assume all calls can raise MPVError.\n\n Wraps: mpv_create, mpv_destroy and all mpv_handle related calls\n ", /*tp_doc*/
-- __pyx_tp_traverse_9vidcutter_4libs_3mpv_Context, /*tp_traverse*/
-- __pyx_tp_clear_9vidcutter_4libs_3mpv_Context, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- __pyx_methods_9vidcutter_4libs_3mpv_Context, /*tp_methods*/
-- 0, /*tp_members*/
-- __pyx_getsets_9vidcutter_4libs_3mpv_Context, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- 0, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv_Context, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p;
-- PyObject *o;
-- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-- o = (*t->tp_alloc)(t, 0);
-- } else {
-- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-- }
-- if (unlikely(!o)) return 0;
-- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o);
-- p->update_cb = Py_None; Py_INCREF(Py_None);
-- return o;
--}
--
--static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_OpenGLContext(PyObject *o) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o;
-- #if CYTHON_USE_TP_FINALIZE
-- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-- if (PyObject_CallFinalizerFromDealloc(o)) return;
-- }
-- #endif
-- PyObject_GC_UnTrack(o);
-- {
-- PyObject *etype, *eval, *etb;
-- PyErr_Fetch(&etype, &eval, &etb);
-- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
-- __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_13__dealloc__(o);
-- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
-- PyErr_Restore(etype, eval, etb);
-- }
-- Py_CLEAR(p->update_cb);
-- (*Py_TYPE(o)->tp_free)(o);
--}
--
--static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_OpenGLContext(PyObject *o, visitproc v, void *a) {
-- int e;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o;
-- if (p->update_cb) {
-- e = (*v)(p->update_cb, a); if (e) return e;
-- }
-- return 0;
--}
--
--static int __pyx_tp_clear_9vidcutter_4libs_3mpv_OpenGLContext(PyObject *o) {
-- PyObject* tmp;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext *)o;
-- tmp = ((PyObject*)p->update_cb);
-- p->update_cb = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- return 0;
--}
--
--static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_OpenGLContext[] = {
-- {"init_gl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_3init_gl, METH_VARARGS|METH_KEYWORDS, 0},
-- {"set_update_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_5set_update_callback, METH_O, 0},
-- {"draw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_7draw, METH_VARARGS|METH_KEYWORDS, 0},
-- {"report_flip", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_9report_flip, METH_O, 0},
-- {"uninit_gl", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_11uninit_gl, METH_NOARGS, 0},
-- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_15__reduce_cython__, METH_NOARGS, 0},
-- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_17__setstate_cython__, METH_O, 0},
-- {0, 0, 0, 0}
--};
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv.OpenGLContext", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLContext), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-- 0, /*tp_doc*/
-- __pyx_tp_traverse_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_traverse*/
-- __pyx_tp_clear_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- __pyx_methods_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_methods*/
-- 0, /*tp_members*/
-- 0, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- __pyx_pw_9vidcutter_4libs_3mpv_13OpenGLContext_1__init__, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLContext, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p;
-- PyObject *o;
-- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-- o = (*t->tp_alloc)(t, 0);
-- } else {
-- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-- }
-- if (unlikely(!o)) return 0;
-- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o);
-- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams;
-- p->owned = Py_None; Py_INCREF(Py_None);
-- return o;
--}
--
--static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
-- #if CYTHON_USE_TP_FINALIZE
-- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-- if (PyObject_CallFinalizerFromDealloc(o)) return;
-- }
-- #endif
-- PyObject_GC_UnTrack(o);
-- {
-- PyObject *etype, *eval, *etb;
-- PyErr_Fetch(&etype, &eval, &etb);
-- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
-- __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_3__dealloc__(o);
-- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
-- PyErr_Restore(etype, eval, etb);
-- }
-- Py_CLEAR(p->owned);
-- (*Py_TYPE(o)->tp_free)(o);
--}
--
--static int __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams(PyObject *o, visitproc v, void *a) {
-- int e;
-- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
-- if (p->owned) {
-- e = (*v)(p->owned, a); if (e) return e;
-- }
-- return 0;
--}
--
--static int __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams(PyObject *o) {
-- PyObject* tmp;
-- struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *p = (struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)o;
-- tmp = ((PyObject*)p->owned);
-- p->owned = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- return 0;
--}
--
--static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv__RenderParams[] = {
-- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_5__reduce_cython__, METH_NOARGS, 0},
-- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_7__setstate_cython__, METH_O, 0},
-- {0, 0, 0, 0}
--};
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv__RenderParams = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv._RenderParams", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv__RenderParams, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-- 0, /*tp_doc*/
-- __pyx_tp_traverse_9vidcutter_4libs_3mpv__RenderParams, /*tp_traverse*/
-- __pyx_tp_clear_9vidcutter_4libs_3mpv__RenderParams, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- __pyx_methods_9vidcutter_4libs_3mpv__RenderParams, /*tp_methods*/
-- 0, /*tp_members*/
-- 0, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- __pyx_pw_9vidcutter_4libs_3mpv_13_RenderParams_1__init__, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv__RenderParams, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *p;
-- PyObject *o;
-- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-- o = (*t->tp_alloc)(t, 0);
-- } else {
-- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-- }
-- if (unlikely(!o)) return 0;
-- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)o);
-- p->__pyx_vtab = __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo;
-- return o;
--}
--
--static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo(PyObject *o) {
-- #if CYTHON_USE_TP_FINALIZE
-- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
-- if (PyObject_CallFinalizerFromDealloc(o)) return;
-- }
-- #endif
-- (*Py_TYPE(o)->tp_free)(o);
--}
--
--static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo[] = {
-- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_1__reduce_cython__, METH_NOARGS, 0},
-- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_15RenderFrameInfo_3__setstate_cython__, METH_O, 0},
-- {0, 0, 0, 0}
--};
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv.RenderFrameInfo", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
-- 0, /*tp_doc*/
-- 0, /*tp_traverse*/
-- 0, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- __pyx_methods_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_methods*/
-- 0, /*tp_members*/
-- 0, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- 0, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv_RenderFrameInfo, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p;
-- PyObject *o;
-- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
-- o = (*t->tp_alloc)(t, 0);
-- } else {
-- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
-- }
-- if (unlikely(!o)) return 0;
-- p = ((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o);
-- p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
-- p->update_cb = Py_None; Py_INCREF(Py_None);
-- p->_x11_display = Py_None; Py_INCREF(Py_None);
-- p->_wl_display = Py_None; Py_INCREF(Py_None);
-- p->_get_proc_address = Py_None; Py_INCREF(Py_None);
-- return o;
--}
--
--static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
-- #if CYTHON_USE_TP_FINALIZE
-- if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
-- if (PyObject_CallFinalizerFromDealloc(o)) return;
-- }
-- #endif
-- PyObject_GC_UnTrack(o);
-- {
-- PyObject *etype, *eval, *etb;
-- PyErr_Fetch(&etype, &eval, &etb);
-- __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
-- __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_21__dealloc__(o);
-- __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
-- PyErr_Restore(etype, eval, etb);
-- }
-- Py_CLEAR(p->_mpv);
-- Py_CLEAR(p->update_cb);
-- Py_CLEAR(p->_x11_display);
-- Py_CLEAR(p->_wl_display);
-- Py_CLEAR(p->_get_proc_address);
-- (*Py_TYPE(o)->tp_free)(o);
--}
--
--static int __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext(PyObject *o, visitproc v, void *a) {
-- int e;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
-- if (p->_mpv) {
-- e = (*v)(((PyObject *)p->_mpv), a); if (e) return e;
-- }
-- if (p->update_cb) {
-- e = (*v)(p->update_cb, a); if (e) return e;
-- }
-- if (p->_x11_display) {
-- e = (*v)(p->_x11_display, a); if (e) return e;
-- }
-- if (p->_wl_display) {
-- e = (*v)(p->_wl_display, a); if (e) return e;
-- }
-- if (p->_get_proc_address) {
-- e = (*v)(p->_get_proc_address, a); if (e) return e;
-- }
-- return 0;
--}
--
--static int __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext(PyObject *o) {
-- PyObject* tmp;
-- struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *p = (struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)o;
-- tmp = ((PyObject*)p->_mpv);
-- p->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)Py_None); Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->update_cb);
-- p->update_cb = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->_x11_display);
-- p->_x11_display = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->_wl_display);
-- p->_wl_display = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- tmp = ((PyObject*)p->_get_proc_address);
-- p->_get_proc_address = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- return 0;
--}
--
--static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_RenderContext[] = {
-- {"set_icc_profile", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_3set_icc_profile, METH_O, 0},
-- {"set_ambient_light", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_5set_ambient_light, METH_O, 0},
-- {"get_next_frame_info", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_7get_next_frame_info, METH_NOARGS, 0},
-- {"set_update_callback", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_9set_update_callback, METH_O, 0},
-- {"update", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_11update, METH_NOARGS, 0},
-- {"render", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render, METH_VARARGS|METH_KEYWORDS, 0},
-- {"report_swap", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_15report_swap, METH_NOARGS, 0},
-- {"free", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_17free, METH_NOARGS, 0},
-- {"close", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_19close, METH_NOARGS, 0},
-- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_23__reduce_cython__, METH_NOARGS, 0},
-- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_25__setstate_cython__, METH_O, 0},
-- {0, 0, 0, 0}
--};
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_RenderContext = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv.RenderContext", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-- 0, /*tp_doc*/
-- __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
-- __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- __pyx_methods_9vidcutter_4libs_3mpv_RenderContext, /*tp_methods*/
-- 0, /*tp_members*/
-- 0, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeObject *t, PyObject *a, PyObject *k) {
-- PyObject *o = __pyx_tp_new_9vidcutter_4libs_3mpv_RenderContext(t, a, k);
-- if (unlikely(!o)) return 0;
-- return o;
--}
--
--static PyMethodDef __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext[] = {
-- {"__reduce_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_3__reduce_cython__, METH_NOARGS, 0},
-- {"__setstate_cython__", (PyCFunction)__pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_5__setstate_cython__, METH_O, 0},
-- {0, 0, 0, 0}
--};
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv.OpenGLRenderContext", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv_RenderContext, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-- 0, /*tp_doc*/
-- __pyx_tp_traverse_9vidcutter_4libs_3mpv_RenderContext, /*tp_traverse*/
-- __pyx_tp_clear_9vidcutter_4libs_3mpv_RenderContext, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- __pyx_methods_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_methods*/
-- 0, /*tp_members*/
-- 0, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--
--static struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[8];
--static int __pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = 0;
--
--static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
-- PyObject *o;
-- if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
-- o = (PyObject*)__pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[--__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors];
-- memset(o, 0, sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors));
-- (void) PyObject_INIT(o, t);
-- PyObject_GC_Track(o);
-- } else {
-- o = (*t->tp_alloc)(t, 0);
-- if (unlikely(!o)) return 0;
-- }
-- return o;
--}
--
--static void __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
-- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
-- PyObject_GC_UnTrack(o);
-- Py_CLEAR(p->__pyx_v_fn);
-- if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors)))) {
-- __pyx_freelist_9vidcutter_4libs_3mpv___pyx_scope_struct___errors[__pyx_freecount_9vidcutter_4libs_3mpv___pyx_scope_struct___errors++] = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o);
-- } else {
-- (*Py_TYPE(o)->tp_free)(o);
-- }
--}
--
--static int __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o, visitproc v, void *a) {
-- int e;
-- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
-- if (p->__pyx_v_fn) {
-- e = (*v)(p->__pyx_v_fn, a); if (e) return e;
-- }
-- return 0;
--}
--
--static int __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyObject *o) {
-- PyObject* tmp;
-- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *p = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)o;
-- tmp = ((PyObject*)p->__pyx_v_fn);
-- p->__pyx_v_fn = Py_None; Py_INCREF(Py_None);
-- Py_XDECREF(tmp);
-- return 0;
--}
--
--static PyTypeObject __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "vidcutter.libs.mpv.__pyx_scope_struct___errors", /*tp_name*/
-- sizeof(struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors), /*tp_basicsize*/
-- 0, /*tp_itemsize*/
-- __pyx_tp_dealloc_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_dealloc*/
-- #if PY_VERSION_HEX < 0x030800b4
-- 0, /*tp_print*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4
-- 0, /*tp_vectorcall_offset*/
-- #endif
-- 0, /*tp_getattr*/
-- 0, /*tp_setattr*/
-- #if PY_MAJOR_VERSION < 3
-- 0, /*tp_compare*/
-- #endif
-- #if PY_MAJOR_VERSION >= 3
-- 0, /*tp_as_async*/
-- #endif
-- 0, /*tp_repr*/
-- 0, /*tp_as_number*/
-- 0, /*tp_as_sequence*/
-- 0, /*tp_as_mapping*/
-- 0, /*tp_hash*/
-- 0, /*tp_call*/
-- 0, /*tp_str*/
-- 0, /*tp_getattro*/
-- 0, /*tp_setattro*/
-- 0, /*tp_as_buffer*/
-- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
-- 0, /*tp_doc*/
-- __pyx_tp_traverse_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_traverse*/
-- __pyx_tp_clear_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_clear*/
-- 0, /*tp_richcompare*/
-- 0, /*tp_weaklistoffset*/
-- 0, /*tp_iter*/
-- 0, /*tp_iternext*/
-- 0, /*tp_methods*/
-- 0, /*tp_members*/
-- 0, /*tp_getset*/
-- 0, /*tp_base*/
-- 0, /*tp_dict*/
-- 0, /*tp_descr_get*/
-- 0, /*tp_descr_set*/
-- 0, /*tp_dictoffset*/
-- 0, /*tp_init*/
-- 0, /*tp_alloc*/
-- __pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors, /*tp_new*/
-- 0, /*tp_free*/
-- 0, /*tp_is_gc*/
-- 0, /*tp_bases*/
-- 0, /*tp_mro*/
-- 0, /*tp_cache*/
-- 0, /*tp_subclasses*/
-- 0, /*tp_weaklist*/
-- 0, /*tp_del*/
-- 0, /*tp_version_tag*/
-- #if PY_VERSION_HEX >= 0x030400a1
-- 0, /*tp_finalize*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b1
-- 0, /*tp_vectorcall*/
-- #endif
-- #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0, /*tp_print*/
-- #endif
--};
--
--static PyMethodDef __pyx_methods[] = {
-- {0, 0, 0, 0}
--};
--
--#if PY_MAJOR_VERSION >= 3
--#if CYTHON_PEP489_MULTI_PHASE_INIT
--static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
--static int __pyx_pymod_exec_mpv(PyObject* module); /*proto*/
--static PyModuleDef_Slot __pyx_moduledef_slots[] = {
-- {Py_mod_create, (void*)__pyx_pymod_create},
-- {Py_mod_exec, (void*)__pyx_pymod_exec_mpv},
-- {0, NULL}
--};
--#endif
--
--static struct PyModuleDef __pyx_moduledef = {
-- PyModuleDef_HEAD_INIT,
-- "mpv",
-- __pyx_k_pympv_Python_wrapper_for_libmpv, /* m_doc */
-- #if CYTHON_PEP489_MULTI_PHASE_INIT
-- 0, /* m_size */
-- #else
-- -1, /* m_size */
-- #endif
-- __pyx_methods /* m_methods */,
-- #if CYTHON_PEP489_MULTI_PHASE_INIT
-- __pyx_moduledef_slots, /* m_slots */
-- #else
-- NULL, /* m_reload */
-- #endif
-- NULL, /* m_traverse */
-- NULL, /* m_clear */
-- NULL /* m_free */
--};
--#endif
--#ifndef CYTHON_SMALL_CODE
--#if defined(__clang__)
-- #define CYTHON_SMALL_CODE
--#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
-- #define CYTHON_SMALL_CODE __attribute__((cold))
--#else
-- #define CYTHON_SMALL_CODE
--#endif
--#endif
--
--static __Pyx_StringTabEntry __pyx_string_tab[] = {
-- {&__pyx_kp_s_0_3_0, __pyx_k_0_3_0, sizeof(__pyx_k_0_3_0), 0, 0, 1, 0},
-- {&__pyx_n_s_API_OPENGL, __pyx_k_API_OPENGL, sizeof(__pyx_k_API_OPENGL), 0, 0, 1, 1},
-- {&__pyx_kp_s_Andre_D, __pyx_k_Andre_D, sizeof(__pyx_k_Andre_D), 0, 0, 1, 0},
-- {&__pyx_n_s_CAPI_MAJOR, __pyx_k_CAPI_MAJOR, sizeof(__pyx_k_CAPI_MAJOR), 0, 0, 1, 1},
-- {&__pyx_n_s_CAPI_MINOR, __pyx_k_CAPI_MINOR, sizeof(__pyx_k_CAPI_MINOR), 0, 0, 1, 1},
-- {&__pyx_n_s_CallbackThread, __pyx_k_CallbackThread, sizeof(__pyx_k_CallbackThread), 0, 0, 1, 1},
-- {&__pyx_n_s_CallbackThread___init, __pyx_k_CallbackThread___init, sizeof(__pyx_k_CallbackThread___init), 0, 0, 1, 1},
-- {&__pyx_n_s_CallbackThread_call, __pyx_k_CallbackThread_call, sizeof(__pyx_k_CallbackThread_call), 0, 0, 1, 1},
-- {&__pyx_n_s_CallbackThread_mpv_callback, __pyx_k_CallbackThread_mpv_callback, sizeof(__pyx_k_CallbackThread_mpv_callback), 0, 0, 1, 1},
-- {&__pyx_n_s_CallbackThread_run, __pyx_k_CallbackThread_run, sizeof(__pyx_k_CallbackThread_run), 0, 0, 1, 1},
-- {&__pyx_n_s_CallbackThread_set, __pyx_k_CallbackThread_set, sizeof(__pyx_k_CallbackThread_set), 0, 0, 1, 1},
-- {&__pyx_n_s_CallbackThread_shutdown, __pyx_k_CallbackThread_shutdown, sizeof(__pyx_k_CallbackThread_shutdown), 0, 0, 1, 1},
-- {&__pyx_n_s_Context, __pyx_k_Context, sizeof(__pyx_k_Context), 0, 0, 1, 1},
-- {&__pyx_kp_s_Context_creation_error, __pyx_k_Context_creation_error, sizeof(__pyx_k_Context_creation_error), 0, 0, 1, 0},
-- {&__pyx_n_s_DeprecationWarning, __pyx_k_DeprecationWarning, sizeof(__pyx_k_DeprecationWarning), 0, 0, 1, 1},
-- {&__pyx_n_s_EOFReasons, __pyx_k_EOFReasons, sizeof(__pyx_k_EOFReasons), 0, 0, 1, 1},
-- {&__pyx_n_s_EndOfFileReached, __pyx_k_EndOfFileReached, sizeof(__pyx_k_EndOfFileReached), 0, 0, 1, 1},
-- {&__pyx_n_s_Errors, __pyx_k_Errors, sizeof(__pyx_k_Errors), 0, 0, 1, 1},
-- {&__pyx_n_s_Event, __pyx_k_Event, sizeof(__pyx_k_Event), 0, 0, 1, 1},
-- {&__pyx_n_s_Events, __pyx_k_Events, sizeof(__pyx_k_Events), 0, 0, 1, 1},
-- {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
-- {&__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_k_Incompatible_checksums_s_vs_0x05, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x05), 0, 0, 1, 0},
-- {&__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_k_Incompatible_checksums_s_vs_0x56, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x56), 0, 0, 1, 0},
-- {&__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_k_Incompatible_checksums_s_vs_0x87, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x87), 0, 0, 1, 0},
-- {&__pyx_kp_s_Incompatible_checksums_s_vs_0xbf, __pyx_k_Incompatible_checksums_s_vs_0xbf, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xbf), 0, 0, 1, 0},
-- {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0},
-- {&__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_k_Incompatible_checksums_s_vs_0xda, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xda), 0, 0, 1, 0},
-- {&__pyx_n_s_InputDispatch, __pyx_k_InputDispatch, sizeof(__pyx_k_InputDispatch), 0, 0, 1, 1},
-- {&__pyx_kp_s_Known_possible_values_for_EndOfF, __pyx_k_Known_possible_values_for_EndOfF, sizeof(__pyx_k_Known_possible_values_for_EndOfF), 0, 0, 1, 0},
-- {&__pyx_n_s_LogLevels, __pyx_k_LogLevels, sizeof(__pyx_k_LogLevels), 0, 0, 1, 1},
-- {&__pyx_n_s_LogMessage, __pyx_k_LogMessage, sizeof(__pyx_k_LogMessage), 0, 0, 1, 1},
-- {&__pyx_n_s_MIN_CAPI_MINOR, __pyx_k_MIN_CAPI_MINOR, sizeof(__pyx_k_MIN_CAPI_MINOR), 0, 0, 1, 1},
-- {&__pyx_n_s_MPVError, __pyx_k_MPVError, sizeof(__pyx_k_MPVError), 0, 0, 1, 1},
-- {&__pyx_n_s_MPVError___init, __pyx_k_MPVError___init, sizeof(__pyx_k_MPVError___init), 0, 0, 1, 1},
-- {&__pyx_n_s_OpenGLContext, __pyx_k_OpenGLContext, sizeof(__pyx_k_OpenGLContext), 0, 0, 1, 1},
-- {&__pyx_kp_s_OpenGLContext_is_deprecated_plea, __pyx_k_OpenGLContext_is_deprecated_plea, sizeof(__pyx_k_OpenGLContext_is_deprecated_plea), 0, 0, 1, 0},
-- {&__pyx_n_s_OpenGLRenderContext, __pyx_k_OpenGLRenderContext, sizeof(__pyx_k_OpenGLRenderContext), 0, 0, 1, 1},
-- {&__pyx_kp_s_OpenGL_API_not_available, __pyx_k_OpenGL_API_not_available, sizeof(__pyx_k_OpenGL_API_not_available), 0, 0, 1, 0},
-- {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
-- {&__pyx_n_s_Property, __pyx_k_Property, sizeof(__pyx_k_Property), 0, 0, 1, 1},
-- {&__pyx_n_s_PyMPVError, __pyx_k_PyMPVError, sizeof(__pyx_k_PyMPVError), 0, 0, 1, 1},
-- {&__pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_k_REQUIRED_CAPI_MAJOR, sizeof(__pyx_k_REQUIRED_CAPI_MAJOR), 0, 0, 1, 1},
-- {&__pyx_n_s_RenderContext, __pyx_k_RenderContext, sizeof(__pyx_k_RenderContext), 0, 0, 1, 1},
-- {&__pyx_n_s_RenderParams, __pyx_k_RenderParams, sizeof(__pyx_k_RenderParams), 0, 0, 1, 1},
-- {&__pyx_kp_s_RenderParams_overflow, __pyx_k_RenderParams_overflow, sizeof(__pyx_k_RenderParams_overflow), 0, 0, 1, 0},
-- {&__pyx_n_s_ReplyUserData, __pyx_k_ReplyUserData, sizeof(__pyx_k_ReplyUserData), 0, 0, 1, 1},
-- {&__pyx_n_s_ReplyUserData___init, __pyx_k_ReplyUserData___init, sizeof(__pyx_k_ReplyUserData___init), 0, 0, 1, 1},
-- {&__pyx_n_s_ReplyUserData_add, __pyx_k_ReplyUserData_add, sizeof(__pyx_k_ReplyUserData_add), 0, 0, 1, 1},
-- {&__pyx_n_s_ReplyUserData_remove, __pyx_k_ReplyUserData_remove, sizeof(__pyx_k_ReplyUserData_remove), 0, 0, 1, 1},
-- {&__pyx_n_s_Semaphore, __pyx_k_Semaphore, sizeof(__pyx_k_Semaphore), 0, 0, 1, 1},
-- {&__pyx_kp_s_Set_of_known_error_codes_from_Mp, __pyx_k_Set_of_known_error_codes_from_Mp, sizeof(__pyx_k_Set_of_known_error_codes_from_Mp), 0, 0, 1, 0},
-- {&__pyx_kp_s_Set_of_known_values_for_Event_id, __pyx_k_Set_of_known_values_for_Event_id, sizeof(__pyx_k_Set_of_known_values_for_Event_id), 0, 0, 1, 0},
-- {&__pyx_n_s_Thread, __pyx_k_Thread, sizeof(__pyx_k_Thread), 0, 0, 1, 1},
-- {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
-- {&__pyx_n_s_UPDATE_FRAME, __pyx_k_UPDATE_FRAME, sizeof(__pyx_k_UPDATE_FRAME), 0, 0, 1, 1},
-- {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1},
-- {&__pyx_n_s_UnicodeEncodeError, __pyx_k_UnicodeEncodeError, sizeof(__pyx_k_UnicodeEncodeError), 0, 0, 1, 1},
-- {&__pyx_kp_s_Unknown_api_type_r, __pyx_k_Unknown_api_type_r, sizeof(__pyx_k_Unknown_api_type_r), 0, 0, 1, 0},
-- {&__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_k_Unknown_or_invalid_pointer_objec, sizeof(__pyx_k_Unknown_or_invalid_pointer_objec), 0, 0, 1, 0},
-- {&__pyx_n_s_aborted, __pyx_k_aborted, sizeof(__pyx_k_aborted), 0, 0, 1, 1},
-- {&__pyx_n_s_acquire, __pyx_k_acquire, sizeof(__pyx_k_acquire), 0, 0, 1, 1},
-- {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
-- {&__pyx_n_s_advanced_control, __pyx_k_advanced_control, sizeof(__pyx_k_advanced_control), 0, 0, 1, 1},
-- {&__pyx_n_s_ao_init_failed, __pyx_k_ao_init_failed, sizeof(__pyx_k_ao_init_failed), 0, 0, 1, 1},
-- {&__pyx_n_s_api_type, __pyx_k_api_type, sizeof(__pyx_k_api_type), 0, 0, 1, 1},
-- {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
-- {&__pyx_n_s_asynchronous, __pyx_k_asynchronous, sizeof(__pyx_k_asynchronous), 0, 0, 1, 1},
-- {&__pyx_n_s_atomic_request_ptr, __pyx_k_atomic_request_ptr, sizeof(__pyx_k_atomic_request_ptr), 0, 0, 1, 1},
-- {&__pyx_n_s_audio_reconfig, __pyx_k_audio_reconfig, sizeof(__pyx_k_audio_reconfig), 0, 0, 1, 1},
-- {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1},
-- {&__pyx_n_s_block_for_target_time, __pyx_k_block_for_target_time, sizeof(__pyx_k_block_for_target_time), 0, 0, 1, 1},
-- {&__pyx_n_s_block_vsync, __pyx_k_block_vsync, sizeof(__pyx_k_block_vsync), 0, 0, 1, 1},
-- {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
-- {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
-- {&__pyx_n_s_chapter_change, __pyx_k_chapter_change, sizeof(__pyx_k_chapter_change), 0, 0, 1, 1},
-- {&__pyx_n_s_client_message, __pyx_k_client_message, sizeof(__pyx_k_client_message), 0, 0, 1, 1},
-- {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
-- {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
-- {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
-- {&__pyx_n_s_command_error, __pyx_k_command_error, sizeof(__pyx_k_command_error), 0, 0, 1, 1},
-- {&__pyx_n_s_command_reply, __pyx_k_command_reply, sizeof(__pyx_k_command_reply), 0, 0, 1, 1},
-- {&__pyx_n_s_connector_id, __pyx_k_connector_id, sizeof(__pyx_k_connector_id), 0, 0, 1, 1},
-- {&__pyx_n_s_counter, __pyx_k_counter, sizeof(__pyx_k_counter), 0, 0, 1, 1},
-- {&__pyx_n_s_crtc_id, __pyx_k_crtc_id, sizeof(__pyx_k_crtc_id), 0, 0, 1, 1},
-- {&__pyx_n_s_daemon, __pyx_k_daemon, sizeof(__pyx_k_daemon), 0, 0, 1, 1},
-- {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
-- {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
-- {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
-- {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
-- {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1},
-- {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
-- {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
-- {&__pyx_kp_s_drmModeAtomicReq, __pyx_k_drmModeAtomicReq, sizeof(__pyx_k_drmModeAtomicReq), 0, 0, 1, 0},
-- {&__pyx_n_s_drm_display, __pyx_k_drm_display, sizeof(__pyx_k_drm_display), 0, 0, 1, 1},
-- {&__pyx_n_s_drm_osd_size, __pyx_k_drm_osd_size, sizeof(__pyx_k_drm_osd_size), 0, 0, 1, 1},
-- {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
-- {&__pyx_n_s_e_i, __pyx_k_e_i, sizeof(__pyx_k_e_i), 0, 0, 1, 1},
-- {&__pyx_n_s_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 0, 1, 1},
-- {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
-- {&__pyx_n_s_end_file, __pyx_k_end_file, sizeof(__pyx_k_end_file), 0, 0, 1, 1},
-- {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
-- {&__pyx_n_s_eof, __pyx_k_eof, sizeof(__pyx_k_eof), 0, 0, 1, 1},
-- {&__pyx_n_s_err_c, __pyx_k_err_c, sizeof(__pyx_k_err_c), 0, 0, 1, 1},
-- {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
-- {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
-- {&__pyx_n_s_errors_locals_wrapped, __pyx_k_errors_locals_wrapped, sizeof(__pyx_k_errors_locals_wrapped), 0, 0, 1, 1},
-- {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1},
-- {&__pyx_n_s_exts, __pyx_k_exts, sizeof(__pyx_k_exts), 0, 0, 1, 1},
-- {&__pyx_n_s_fatal, __pyx_k_fatal, sizeof(__pyx_k_fatal), 0, 0, 1, 1},
-- {&__pyx_n_s_fbo, __pyx_k_fbo, sizeof(__pyx_k_fbo), 0, 0, 1, 1},
-- {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
-- {&__pyx_n_s_file_loaded, __pyx_k_file_loaded, sizeof(__pyx_k_file_loaded), 0, 0, 1, 1},
-- {&__pyx_n_s_flip_y, __pyx_k_flip_y, sizeof(__pyx_k_flip_y), 0, 0, 1, 1},
-- {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
-- {&__pyx_n_s_format_for, __pyx_k_format_for, sizeof(__pyx_k_format_for), 0, 0, 1, 1},
-- {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
-- {&__pyx_n_s_get_proc_address, __pyx_k_get_proc_address, sizeof(__pyx_k_get_proc_address), 0, 0, 1, 1},
-- {&__pyx_n_s_get_property, __pyx_k_get_property, sizeof(__pyx_k_get_property), 0, 0, 1, 1},
-- {&__pyx_n_s_get_property_async, __pyx_k_get_property_async, sizeof(__pyx_k_get_property_async), 0, 0, 1, 1},
-- {&__pyx_n_s_get_property_reply, __pyx_k_get_property_reply, sizeof(__pyx_k_get_property_reply), 0, 0, 1, 1},
-- {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
-- {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
-- {&__pyx_kp_s_icc_blob_should_be_a_bytes_insta, __pyx_k_icc_blob_should_be_a_bytes_insta, sizeof(__pyx_k_icc_blob_should_be_a_bytes_insta), 0, 0, 1, 0},
-- {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
-- {&__pyx_n_s_idle, __pyx_k_idle, sizeof(__pyx_k_idle), 0, 0, 1, 1},
-- {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
-- {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
-- {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
-- {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1},
-- {&__pyx_n_s_internal_format, __pyx_k_internal_format, sizeof(__pyx_k_internal_format), 0, 0, 1, 1},
-- {&__pyx_n_s_invalid_parameter, __pyx_k_invalid_parameter, sizeof(__pyx_k_invalid_parameter), 0, 0, 1, 1},
-- {&__pyx_n_s_is_py3, __pyx_k_is_py3, sizeof(__pyx_k_is_py3), 0, 0, 1, 1},
-- {&__pyx_n_s_isshutdown, __pyx_k_isshutdown, sizeof(__pyx_k_isshutdown), 0, 0, 1, 1},
-- {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
-- {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
-- {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
-- {&__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_k_libmpv_version_is_incorrect_Requ, sizeof(__pyx_k_libmpv_version_is_incorrect_Requ), 0, 0, 1, 0},
-- {&__pyx_n_s_load_config, __pyx_k_load_config, sizeof(__pyx_k_load_config), 0, 0, 1, 1},
-- {&__pyx_n_s_loading_failed, __pyx_k_loading_failed, sizeof(__pyx_k_loading_failed), 0, 0, 1, 1},
-- {&__pyx_n_s_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 0, 1, 1},
-- {&__pyx_n_s_log_message, __pyx_k_log_message, sizeof(__pyx_k_log_message), 0, 0, 1, 1},
-- {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
-- {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
-- {&__pyx_n_s_metadata_update, __pyx_k_metadata_update, sizeof(__pyx_k_metadata_update), 0, 0, 1, 1},
-- {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
-- {&__pyx_n_s_mpv, __pyx_k_mpv, sizeof(__pyx_k_mpv), 0, 0, 1, 1},
-- {&__pyx_n_s_mpv_callback, __pyx_k_mpv_callback, sizeof(__pyx_k_mpv_callback), 0, 0, 1, 1},
-- {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
-- {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
-- {&__pyx_n_s_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 0, 1, 1},
-- {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
-- {&__pyx_n_s_nomem, __pyx_k_nomem, sizeof(__pyx_k_nomem), 0, 0, 1, 1},
-- {&__pyx_n_s_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 0, 1, 1},
-- {&__pyx_n_s_not_found, __pyx_k_not_found, sizeof(__pyx_k_not_found), 0, 0, 1, 1},
-- {&__pyx_n_s_not_implemented, __pyx_k_not_implemented, sizeof(__pyx_k_not_implemented), 0, 0, 1, 1},
-- {&__pyx_n_s_nothing_to_play, __pyx_k_nothing_to_play, sizeof(__pyx_k_nothing_to_play), 0, 0, 1, 1},
-- {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
-- {&__pyx_n_s_observe_property, __pyx_k_observe_property, sizeof(__pyx_k_observe_property), 0, 0, 1, 1},
-- {&__pyx_n_s_observed, __pyx_k_observed, sizeof(__pyx_k_observed), 0, 0, 1, 1},
-- {&__pyx_n_s_opengl, __pyx_k_opengl, sizeof(__pyx_k_opengl), 0, 0, 1, 1},
-- {&__pyx_n_s_opengl_fbo, __pyx_k_opengl_fbo, sizeof(__pyx_k_opengl_fbo), 0, 0, 1, 1},
-- {&__pyx_n_s_opengl_init_params, __pyx_k_opengl_init_params, sizeof(__pyx_k_opengl_init_params), 0, 0, 1, 1},
-- {&__pyx_n_s_option_error, __pyx_k_option_error, sizeof(__pyx_k_option_error), 0, 0, 1, 1},
-- {&__pyx_n_s_option_format, __pyx_k_option_format, sizeof(__pyx_k_option_format), 0, 0, 1, 1},
-- {&__pyx_n_s_pause, __pyx_k_pause, sizeof(__pyx_k_pause), 0, 0, 1, 1},
-- {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
-- {&__pyx_n_s_playback_restart, __pyx_k_playback_restart, sizeof(__pyx_k_playback_restart), 0, 0, 1, 1},
-- {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
-- {&__pyx_n_s_present, __pyx_k_present, sizeof(__pyx_k_present), 0, 0, 1, 1},
-- {&__pyx_n_s_prop, __pyx_k_prop, sizeof(__pyx_k_prop), 0, 0, 1, 1},
-- {&__pyx_n_s_property_change, __pyx_k_property_change, sizeof(__pyx_k_property_change), 0, 0, 1, 1},
-- {&__pyx_n_s_property_error, __pyx_k_property_error, sizeof(__pyx_k_property_error), 0, 0, 1, 1},
-- {&__pyx_n_s_property_format, __pyx_k_property_format, sizeof(__pyx_k_property_format), 0, 0, 1, 1},
-- {&__pyx_n_s_property_unavailable, __pyx_k_property_unavailable, sizeof(__pyx_k_property_unavailable), 0, 0, 1, 1},
-- {&__pyx_kp_s_pympv_error_during_callback_s, __pyx_k_pympv_error_during_callback_s, sizeof(__pyx_k_pympv_error_during_callback_s), 0, 0, 1, 0},
-- {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
-- {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
-- {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
-- {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
-- {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
-- {&__pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_k_pyx_unpickle_EndOfFileReached, sizeof(__pyx_k_pyx_unpickle_EndOfFileReached), 0, 0, 1, 1},
-- {&__pyx_n_s_pyx_unpickle_Event, __pyx_k_pyx_unpickle_Event, sizeof(__pyx_k_pyx_unpickle_Event), 0, 0, 1, 1},
-- {&__pyx_n_s_pyx_unpickle_InputDispatch, __pyx_k_pyx_unpickle_InputDispatch, sizeof(__pyx_k_pyx_unpickle_InputDispatch), 0, 0, 1, 1},
-- {&__pyx_n_s_pyx_unpickle_LogMessage, __pyx_k_pyx_unpickle_LogMessage, sizeof(__pyx_k_pyx_unpickle_LogMessage), 0, 0, 1, 1},
-- {&__pyx_n_s_pyx_unpickle_Property, __pyx_k_pyx_unpickle_Property, sizeof(__pyx_k_pyx_unpickle_Property), 0, 0, 1, 1},
-- {&__pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_k_pyx_unpickle_RenderFrameInfo, sizeof(__pyx_k_pyx_unpickle_RenderFrameInfo), 0, 0, 1, 1},
-- {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
-- {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
-- {&__pyx_n_s_queue_full, __pyx_k_queue_full, sizeof(__pyx_k_queue_full), 0, 0, 1, 1},
-- {&__pyx_n_s_quit, __pyx_k_quit, sizeof(__pyx_k_quit), 0, 0, 1, 1},
-- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
-- {&__pyx_n_s_redraw, __pyx_k_redraw, sizeof(__pyx_k_redraw), 0, 0, 1, 1},
-- {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
-- {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
-- {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
-- {&__pyx_n_s_release, __pyx_k_release, sizeof(__pyx_k_release), 0, 0, 1, 1},
-- {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
-- {&__pyx_n_s_render, __pyx_k_render, sizeof(__pyx_k_render), 0, 0, 1, 1},
-- {&__pyx_n_s_render_fd, __pyx_k_render_fd, sizeof(__pyx_k_render_fd), 0, 0, 1, 1},
-- {&__pyx_n_s_repeat, __pyx_k_repeat, sizeof(__pyx_k_repeat), 0, 0, 1, 1},
-- {&__pyx_n_s_request_event, __pyx_k_request_event, sizeof(__pyx_k_request_event), 0, 0, 1, 1},
-- {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1},
-- {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
-- {&__pyx_n_s_script_input_dispatch, __pyx_k_script_input_dispatch, sizeof(__pyx_k_script_input_dispatch), 0, 0, 1, 1},
-- {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
-- {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
-- {&__pyx_kp_s_self__ctx_cannot_be_converted_to, __pyx_k_self__ctx_cannot_be_converted_to, sizeof(__pyx_k_self__ctx_cannot_be_converted_to), 0, 0, 1, 0},
-- {&__pyx_kp_s_self_params_cannot_be_converted, __pyx_k_self_params_cannot_be_converted, sizeof(__pyx_k_self_params_cannot_be_converted), 0, 0, 1, 0},
-- {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
-- {&__pyx_n_s_set_ambient_light, __pyx_k_set_ambient_light, sizeof(__pyx_k_set_ambient_light), 0, 0, 1, 1},
-- {&__pyx_n_s_set_icc_profile, __pyx_k_set_icc_profile, sizeof(__pyx_k_set_icc_profile), 0, 0, 1, 1},
-- {&__pyx_n_s_set_log_level, __pyx_k_set_log_level, sizeof(__pyx_k_set_log_level), 0, 0, 1, 1},
-- {&__pyx_n_s_set_option, __pyx_k_set_option, sizeof(__pyx_k_set_option), 0, 0, 1, 1},
-- {&__pyx_n_s_set_property, __pyx_k_set_property, sizeof(__pyx_k_set_property), 0, 0, 1, 1},
-- {&__pyx_n_s_set_property_reply, __pyx_k_set_property_reply, sizeof(__pyx_k_set_property_reply), 0, 0, 1, 1},
-- {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
-- {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
-- {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1},
-- {&__pyx_n_s_skip_rendering, __pyx_k_skip_rendering, sizeof(__pyx_k_skip_rendering), 0, 0, 1, 1},
-- {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
-- {&__pyx_n_s_start_file, __pyx_k_start_file, sizeof(__pyx_k_start_file), 0, 0, 1, 1},
-- {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
-- {&__pyx_n_s_strdec, __pyx_k_strdec, sizeof(__pyx_k_strdec), 0, 0, 1, 1},
-- {&__pyx_n_s_strdec_err, __pyx_k_strdec_err, sizeof(__pyx_k_strdec_err), 0, 0, 1, 1},
-- {&__pyx_n_s_strenc, __pyx_k_strenc, sizeof(__pyx_k_strenc), 0, 0, 1, 1},
-- {&__pyx_n_s_strict, __pyx_k_strict, sizeof(__pyx_k_strict), 0, 0, 1, 1},
-- {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
-- {&__pyx_n_s_success, __pyx_k_success, sizeof(__pyx_k_success), 0, 0, 1, 1},
-- {&__pyx_n_s_surrogateescape, __pyx_k_surrogateescape, sizeof(__pyx_k_surrogateescape), 0, 0, 1, 1},
-- {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
-- {&__pyx_n_s_target_time, __pyx_k_target_time, sizeof(__pyx_k_target_time), 0, 0, 1, 1},
-- {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
-- {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
-- {&__pyx_n_s_tick, __pyx_k_tick, sizeof(__pyx_k_tick), 0, 0, 1, 1},
-- {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
-- {&__pyx_n_s_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 0, 1, 1},
-- {&__pyx_n_s_tracks_changed, __pyx_k_tracks_changed, sizeof(__pyx_k_tracks_changed), 0, 0, 1, 1},
-- {&__pyx_n_s_tracks_switched, __pyx_k_tracks_switched, sizeof(__pyx_k_tracks_switched), 0, 0, 1, 1},
-- {&__pyx_n_s_uninit_gl, __pyx_k_uninit_gl, sizeof(__pyx_k_uninit_gl), 0, 0, 1, 1},
-- {&__pyx_n_s_uninitialized, __pyx_k_uninitialized, sizeof(__pyx_k_uninitialized), 0, 0, 1, 1},
-- {&__pyx_n_s_unknown_format, __pyx_k_unknown_format, sizeof(__pyx_k_unknown_format), 0, 0, 1, 1},
-- {&__pyx_n_s_unobserve_property, __pyx_k_unobserve_property, sizeof(__pyx_k_unobserve_property), 0, 0, 1, 1},
-- {&__pyx_n_s_unpause, __pyx_k_unpause, sizeof(__pyx_k_unpause), 0, 0, 1, 1},
-- {&__pyx_n_s_unsupported, __pyx_k_unsupported, sizeof(__pyx_k_unsupported), 0, 0, 1, 1},
-- {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
-- {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
-- {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
-- {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
-- {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
-- {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
-- {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
-- {&__pyx_n_s_vidcutter_libs_mpv, __pyx_k_vidcutter_libs_mpv, sizeof(__pyx_k_vidcutter_libs_mpv), 0, 0, 1, 1},
-- {&__pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_k_vidcutter_libs_pympv_mpv_pyx, sizeof(__pyx_k_vidcutter_libs_pympv_mpv_pyx), 0, 0, 1, 0},
-- {&__pyx_n_s_video_reconfig, __pyx_k_video_reconfig, sizeof(__pyx_k_video_reconfig), 0, 0, 1, 1},
-- {&__pyx_n_s_vo_init_failed, __pyx_k_vo_init_failed, sizeof(__pyx_k_vo_init_failed), 0, 0, 1, 1},
-- {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
-- {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
-- {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
-- {&__pyx_n_s_wl_display, __pyx_k_wl_display, sizeof(__pyx_k_wl_display), 0, 0, 1, 1},
-- {&__pyx_n_s_wrapped, __pyx_k_wrapped, sizeof(__pyx_k_wrapped), 0, 0, 1, 1},
-- {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
-- {&__pyx_n_s_x11_display, __pyx_k_x11_display, sizeof(__pyx_k_x11_display), 0, 0, 1, 1},
-- {0, 0, 0, 0, 0, 0, 0}
--};
--static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
-- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 44, __pyx_L1_error)
-- __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 346, __pyx_L1_error)
-- __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 58, __pyx_L1_error)
-- __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 66, __pyx_L1_error)
-- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 222, __pyx_L1_error)
-- __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 303, __pyx_L1_error)
-- __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 475, __pyx_L1_error)
-- __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
-- __pyx_builtin_DeprecationWarning = __Pyx_GetBuiltinName(__pyx_n_s_DeprecationWarning); if (!__pyx_builtin_DeprecationWarning) __PYX_ERR(0, 830, __pyx_L1_error)
-- return 0;
-- __pyx_L1_error:;
-- return -1;
--}
--
--static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":319
-- *
-- * def _errors(fn):
-- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
-- * v = fn(*k, **kw)
-- * if v < 0:
-- */
-- __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 319, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple_);
-- __Pyx_GIVEREF(__pyx_tuple_);
-- __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 319, __pyx_L1_error)
--
-- /* "(tree fragment)":2
-- * def __reduce_cython__(self):
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-- */
-- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__3);
-- __Pyx_GIVEREF(__pyx_tuple__3);
--
-- /* "(tree fragment)":4
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
-- */
-- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__4);
-- __Pyx_GIVEREF(__pyx_tuple__4);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":830
-- * def __init__(self):
-- * self.inited = False
-- * warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning) # <<<<<<<<<<<<<<
-- *
-- * def init_gl(self, exts, get_proc_address):
-- */
-- __pyx_tuple__5 = PyTuple_Pack(2, __pyx_kp_s_OpenGLContext_is_deprecated_plea, __pyx_builtin_DeprecationWarning); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 830, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__5);
-- __Pyx_GIVEREF(__pyx_tuple__5);
--
-- /* "(tree fragment)":2
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- */
-- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 2, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__6);
-- __Pyx_GIVEREF(__pyx_tuple__6);
--
-- /* "(tree fragment)":4
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- */
-- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 4, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__7);
-- __Pyx_GIVEREF(__pyx_tuple__7);
--
-- /* "(tree fragment)":2
-- * def __reduce_cython__(self):
-- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self.params cannot be converted to a Python object for pickling")
-- */
-- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 2, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__8);
-- __Pyx_GIVEREF(__pyx_tuple__8);
--
-- /* "(tree fragment)":4
-- * raise TypeError("self.params cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- */
-- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 4, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__9);
-- __Pyx_GIVEREF(__pyx_tuple__9);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":992
-- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-- * if drm_display:
-- * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
-- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-- * drm_params.connector_id = drm_display.get("connector_id", -1)
-- */
-- __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 992, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__10);
-- __Pyx_GIVEREF(__pyx_tuple__10);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":993
-- * if drm_display:
-- * drm_params.fd = drm_display.get("fd", -1)
-- * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
-- * drm_params.connector_id = drm_display.get("connector_id", -1)
-- * arp = drm_display.get("atomic_request_ptr", None)
-- */
-- __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 993, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__11);
-- __Pyx_GIVEREF(__pyx_tuple__11);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":994
-- * drm_params.fd = drm_display.get("fd", -1)
-- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-- * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
-- * arp = drm_display.get("atomic_request_ptr", None)
-- * if arp is not None:
-- */
-- __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 994, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__12);
-- __Pyx_GIVEREF(__pyx_tuple__12);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":995
-- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-- * drm_params.connector_id = drm_display.get("connector_id", -1)
-- * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
-- * if arp is not None:
-- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-- */
-- __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 995, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__13);
-- __Pyx_GIVEREF(__pyx_tuple__13);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":998
-- * if arp is not None:
-- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-- * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
-- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
-- * if drm_osd_size:
-- */
-- __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 998, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__14);
-- __Pyx_GIVEREF(__pyx_tuple__14);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1083
-- * if opengl_fbo:
-- * memset(&fbo, 0, sizeof(fbo))
-- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
-- * fbo.w = opengl_fbo["w"]
-- * fbo.h = opengl_fbo["h"]
-- */
-- __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1083, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__15);
-- __Pyx_GIVEREF(__pyx_tuple__15);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1086
-- * fbo.w = opengl_fbo["w"]
-- * fbo.h = opengl_fbo["h"]
-- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
-- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
-- * if flip_y:
-- */
-- __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1086, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__16);
-- __Pyx_GIVEREF(__pyx_tuple__16);
--
-- /* "(tree fragment)":2
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- */
-- __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 2, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__17);
-- __Pyx_GIVEREF(__pyx_tuple__17);
--
-- /* "(tree fragment)":4
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- */
-- __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 4, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__18);
-- __Pyx_GIVEREF(__pyx_tuple__18);
--
-- /* "(tree fragment)":2
-- * def __reduce_cython__(self):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- */
-- __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 2, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__19);
-- __Pyx_GIVEREF(__pyx_tuple__19);
--
-- /* "(tree fragment)":4
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-- * def __setstate_cython__(self, __pyx_state):
-- * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-- */
-- __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 4, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__20);
-- __Pyx_GIVEREF(__pyx_tuple__20);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":52
-- * void PyEval_InitThreads()
-- *
-- * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
-- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
-- * # mpv -> Python
-- */
-- __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 52, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__21);
-- __Pyx_GIVEREF(__pyx_tuple__21);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":55
-- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
-- * # mpv -> Python
-- * def _strdec(s): # <<<<<<<<<<<<<<
-- * try:
-- * return s.decode("utf-8", _strdec_err)
-- */
-- __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 55, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__22);
-- __Pyx_GIVEREF(__pyx_tuple__22);
-- __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 55, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":63
-- *
-- * # Python -> mpv
-- * def _strenc(s): # <<<<<<<<<<<<<<
-- * try:
-- * return s.encode("utf-8", _strdec_err)
-- */
-- __pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 63, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__24);
-- __Pyx_GIVEREF(__pyx_tuple__24);
-- __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 63, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":318
-- *
-- *
-- * def _errors(fn): # <<<<<<<<<<<<<<
-- * def wrapped(*k, **kw):
-- * v = fn(*k, **kw)
-- */
-- __pyx_tuple__26 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 318, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__26);
-- __Pyx_GIVEREF(__pyx_tuple__26);
-- __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 318, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":329
-- * code = None
-- *
-- * def __init__(self, e): # <<<<<<<<<<<<<<
-- * self.code = e
-- * cdef const char* err_c
-- */
-- __pyx_tuple__28 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 329, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__28);
-- __Pyx_GIVEREF(__pyx_tuple__28);
-- __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 329, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":346
-- * cdef _reply_userdatas = dict()
-- *
-- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
-- * def __init__(self, data):
-- * self.counter = 0
-- */
-- __pyx_tuple__30 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 346, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__30);
-- __Pyx_GIVEREF(__pyx_tuple__30);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":347
-- *
-- * class _ReplyUserData(object):
-- * def __init__(self, data): # <<<<<<<<<<<<<<
-- * self.counter = 0
-- * self.data = data
-- */
-- __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 347, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__31);
-- __Pyx_GIVEREF(__pyx_tuple__31);
-- __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 347, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":352
-- * self.observed = False
-- *
-- * def add(self): # <<<<<<<<<<<<<<
-- * self.counter += 1
-- *
-- */
-- __pyx_tuple__33 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 352, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__33);
-- __Pyx_GIVEREF(__pyx_tuple__33);
-- __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 352, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":355
-- * self.counter += 1
-- *
-- * def remove(self): # <<<<<<<<<<<<<<
-- * self.counter -= 1
-- *
-- */
-- __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 355, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__35);
-- __Pyx_GIVEREF(__pyx_tuple__35);
-- __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 355, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1133
-- *
-- * class CallbackThread(Thread):
-- * def __init__(self): # <<<<<<<<<<<<<<
-- * Thread.__init__(self)
-- * self.daemon = True
-- */
-- __pyx_tuple__37 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 1133, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__37);
-- __Pyx_GIVEREF(__pyx_tuple__37);
-- __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 1133, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1141
-- * self.isshutdown = False
-- *
-- * def shutdown(self): # <<<<<<<<<<<<<<
-- * self.isshutdown = True
-- * self.callback = None
-- */
-- __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 1141, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__39);
-- __Pyx_GIVEREF(__pyx_tuple__39);
-- __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 1141, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1146
-- * self.lock.release()
-- *
-- * def call(self): # <<<<<<<<<<<<<<
-- * self.lock.release()
-- *
-- */
-- __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1146, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__41);
-- __Pyx_GIVEREF(__pyx_tuple__41);
-- __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 1146, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1149
-- * self.lock.release()
-- *
-- * def set(self, callback): # <<<<<<<<<<<<<<
-- * self.callback = callback
-- *
-- */
-- __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1149, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__43);
-- __Pyx_GIVEREF(__pyx_tuple__43);
-- __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 1149, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1152
-- * self.callback = callback
-- *
-- * def run(self): # <<<<<<<<<<<<<<
-- * while not self.isshutdown:
-- * self.lock.acquire(True)
-- */
-- __pyx_tuple__45 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1152, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__45);
-- __Pyx_GIVEREF(__pyx_tuple__45);
-- __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 1152, __pyx_L1_error)
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1157
-- * self.mpv_callback(self.callback) if self.callback else None
-- *
-- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
-- * try:
-- * callback()
-- */
-- __pyx_tuple__47 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1157, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__47);
-- __Pyx_GIVEREF(__pyx_tuple__47);
-- __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 1157, __pyx_L1_error)
--
-- /* "(tree fragment)":1
-- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-- */
-- __pyx_tuple__49 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__49);
-- __Pyx_GIVEREF(__pyx_tuple__49);
-- __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_EndOfFileReached, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __pyx_tuple__51 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__51);
-- __Pyx_GIVEREF(__pyx_tuple__51);
-- __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_InputDispatch, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __pyx_tuple__53 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__53);
-- __Pyx_GIVEREF(__pyx_tuple__53);
-- __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_LogMessage, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __pyx_tuple__55 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__55);
-- __Pyx_GIVEREF(__pyx_tuple__55);
-- __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Property, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __pyx_tuple__57 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__57);
-- __Pyx_GIVEREF(__pyx_tuple__57);
-- __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Event, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __pyx_tuple__59 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_tuple__59);
-- __Pyx_GIVEREF(__pyx_tuple__59);
-- __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RenderFrameInfo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_RefNannyFinishContext();
-- return 0;
-- __pyx_L1_error:;
-- __Pyx_RefNannyFinishContext();
-- return -1;
--}
--
--static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
-- if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
-- __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_5713169 = PyInt_FromLong(5713169L); if (unlikely(!__pyx_int_5713169)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_90958262 = PyInt_FromLong(90958262L); if (unlikely(!__pyx_int_90958262)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_142036910 = PyInt_FromLong(142036910L); if (unlikely(!__pyx_int_142036910)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_200688041 = PyInt_FromLong(200688041L); if (unlikely(!__pyx_int_200688041)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_228822053 = PyInt_FromLong(228822053L); if (unlikely(!__pyx_int_228822053)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
-- return 0;
-- __pyx_L1_error:;
-- return -1;
--}
--
--static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
--static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
--static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
--static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
--static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
--static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
--static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
--
--static int __Pyx_modinit_global_init_code(void) {
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
-- /*--- Global init code ---*/
-- __pyx_v_9vidcutter_4libs_3mpv__callbacks = Py_None; Py_INCREF(Py_None);
-- __pyx_v_9vidcutter_4libs_3mpv__reply_userdatas = Py_None; Py_INCREF(Py_None);
-- __Pyx_RefNannyFinishContext();
-- return 0;
--}
--
--static int __Pyx_modinit_variable_export_code(void) {
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
-- /*--- Variable export code ---*/
-- __Pyx_RefNannyFinishContext();
-- return 0;
--}
--
--static int __Pyx_modinit_function_export_code(void) {
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
-- /*--- Function export code ---*/
-- __Pyx_RefNannyFinishContext();
-- return 0;
--}
--
--static int __Pyx_modinit_type_init_code(void) {
-- __Pyx_RefNannyDeclarations
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
-- /*--- Type init code ---*/
-- __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
-- __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, struct mpv_event_end_file *))__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-- __pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached;
-- __pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch = &__pyx_vtable_9vidcutter_4libs_3mpv_InputDispatch;
-- __pyx_vtable_9vidcutter_4libs_3mpv_InputDispatch._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_InputDispatch *, struct mpv_event_script_input_dispatch *))__pyx_f_9vidcutter_4libs_3mpv_13InputDispatch__init;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_InputDispatch.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_InputDispatch, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_InputDispatch) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
-- __pyx_ptype_9vidcutter_4libs_3mpv_InputDispatch = &__pyx_type_9vidcutter_4libs_3mpv_InputDispatch;
-- __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage = &__pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
-- __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, struct mpv_event_log_message *))__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-- __pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = &__pyx_type_9vidcutter_4libs_3mpv_LogMessage;
-- __pyx_vtabptr_9vidcutter_4libs_3mpv_Property = &__pyx_vtable_9vidcutter_4libs_3mpv_Property;
-- __pyx_vtable_9vidcutter_4libs_3mpv_Property._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, struct mpv_event_property *))__pyx_f_9vidcutter_4libs_3mpv_8Property__init;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv_Property.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-- __pyx_ptype_9vidcutter_4libs_3mpv_Property = &__pyx_type_9vidcutter_4libs_3mpv_Property;
-- __pyx_vtabptr_9vidcutter_4libs_3mpv_Event = &__pyx_vtable_9vidcutter_4libs_3mpv_Event;
-- __pyx_vtable_9vidcutter_4libs_3mpv_Event._data = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *))__pyx_f_9vidcutter_4libs_3mpv_5Event__data;
-- __pyx_vtable_9vidcutter_4libs_3mpv_Event._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_5Event__init;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv_Event.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-- __pyx_ptype_9vidcutter_4libs_3mpv_Event = &__pyx_type_9vidcutter_4libs_3mpv_Event;
-- __pyx_vtabptr_9vidcutter_4libs_3mpv_Context = &__pyx_vtable_9vidcutter_4libs_3mpv_Context;
-- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_list = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list;
-- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_map = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map;
-- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_native_value = (struct mpv_node (*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value;
-- __pyx_vtable_9vidcutter_4libs_3mpv_Context._free_native_value = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, struct mpv_node))__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv_Context.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-- __pyx_ptype_9vidcutter_4libs_3mpv_Context = &__pyx_type_9vidcutter_4libs_3mpv_Context;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv_OpenGLContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-- }
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
-- __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLContext;
-- __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams = &__pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
-- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_voidp = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, void *, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
-- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_int = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, int))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int;
-- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_string = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, char *))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-- __pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = &__pyx_type_9vidcutter_4libs_3mpv__RenderParams;
-- __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
-- __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo._from_struct = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *, struct mpv_render_frame_info *))__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
-- __pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-- }
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
-- __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = &__pyx_type_9vidcutter_4libs_3mpv_RenderContext;
-- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_base = __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-- }
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
-- __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLRenderContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
-- #if PY_VERSION_HEX < 0x030800B1
-- __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_print = 0;
-- #endif
-- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro == PyObject_GenericGetAttr)) {
-- __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
-- }
-- __pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = &__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors;
-- __Pyx_RefNannyFinishContext();
-- return 0;
-- __pyx_L1_error:;
-- __Pyx_RefNannyFinishContext();
-- return -1;
--}
--
--static int __Pyx_modinit_type_import_code(void) {
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
-- /*--- Type import code ---*/
-- __Pyx_RefNannyFinishContext();
-- return 0;
--}
--
--static int __Pyx_modinit_variable_import_code(void) {
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
-- /*--- Variable import code ---*/
-- __Pyx_RefNannyFinishContext();
-- return 0;
--}
--
--static int __Pyx_modinit_function_import_code(void) {
-- __Pyx_RefNannyDeclarations
-- __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
-- /*--- Function import code ---*/
-- __Pyx_RefNannyFinishContext();
-- return 0;
--}
--
--
--#ifndef CYTHON_NO_PYINIT_EXPORT
--#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
--#elif PY_MAJOR_VERSION < 3
--#ifdef __cplusplus
--#define __Pyx_PyMODINIT_FUNC extern "C" void
--#else
--#define __Pyx_PyMODINIT_FUNC void
--#endif
--#else
--#ifdef __cplusplus
--#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
--#else
--#define __Pyx_PyMODINIT_FUNC PyObject *
--#endif
--#endif
--
--
--#if PY_MAJOR_VERSION < 3
--__Pyx_PyMODINIT_FUNC initmpv(void) CYTHON_SMALL_CODE; /*proto*/
--__Pyx_PyMODINIT_FUNC initmpv(void)
--#else
--__Pyx_PyMODINIT_FUNC PyInit_mpv(void) CYTHON_SMALL_CODE; /*proto*/
--__Pyx_PyMODINIT_FUNC PyInit_mpv(void)
--#if CYTHON_PEP489_MULTI_PHASE_INIT
--{
-- return PyModuleDef_Init(&__pyx_moduledef);
--}
--static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
-- #if PY_VERSION_HEX >= 0x030700A1
-- static PY_INT64_T main_interpreter_id = -1;
-- PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
-- if (main_interpreter_id == -1) {
-- main_interpreter_id = current_id;
-- return (unlikely(current_id == -1)) ? -1 : 0;
-- } else if (unlikely(main_interpreter_id != current_id))
-- #else
-- static PyInterpreterState *main_interpreter = NULL;
-- PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
-- if (!main_interpreter) {
-- main_interpreter = current_interpreter;
-- } else if (unlikely(main_interpreter != current_interpreter))
-- #endif
-- {
-- PyErr_SetString(
-- PyExc_ImportError,
-- "Interpreter change detected - this module can only be loaded into one interpreter per process.");
-- return -1;
-- }
-- return 0;
--}
--static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
-- PyObject *value = PyObject_GetAttrString(spec, from_name);
-- int result = 0;
-- if (likely(value)) {
-- if (allow_none || value != Py_None) {
-- result = PyDict_SetItemString(moddict, to_name, value);
-- }
-- Py_DECREF(value);
-- } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
-- PyErr_Clear();
-- } else {
-- result = -1;
-- }
-- return result;
--}
--static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
-- PyObject *module = NULL, *moddict, *modname;
-- if (__Pyx_check_single_interpreter())
-- return NULL;
-- if (__pyx_m)
-- return __Pyx_NewRef(__pyx_m);
-- modname = PyObject_GetAttrString(spec, "name");
-- if (unlikely(!modname)) goto bad;
-- module = PyModule_NewObject(modname);
-- Py_DECREF(modname);
-- if (unlikely(!module)) goto bad;
-- moddict = PyModule_GetDict(module);
-- if (unlikely(!moddict)) goto bad;
-- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
-- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
-- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
-- if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
-- return module;
--bad:
-- Py_XDECREF(module);
-- return NULL;
--}
--
--
--static CYTHON_SMALL_CODE int __pyx_pymod_exec_mpv(PyObject *__pyx_pyinit_module)
--#endif
--#endif
--{
-- PyObject *__pyx_t_1 = NULL;
-- PyObject *__pyx_t_2 = NULL;
-- int __pyx_t_3;
-- PyObject *__pyx_t_4 = NULL;
-- int __pyx_t_5;
-- PyObject *__pyx_t_6 = NULL;
-- PyObject *__pyx_t_7 = NULL;
-- int __pyx_lineno = 0;
-- const char *__pyx_filename = NULL;
-- int __pyx_clineno = 0;
-- __Pyx_RefNannyDeclarations
-- #if CYTHON_PEP489_MULTI_PHASE_INIT
-- if (__pyx_m) {
-- if (__pyx_m == __pyx_pyinit_module) return 0;
-- PyErr_SetString(PyExc_RuntimeError, "Module 'mpv' has already been imported. Re-initialisation is not supported.");
-- return -1;
-- }
-- #elif PY_MAJOR_VERSION >= 3
-- if (__pyx_m) return __Pyx_NewRef(__pyx_m);
-- #endif
-- #if CYTHON_REFNANNY
--__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
--if (!__Pyx_RefNanny) {
-- PyErr_Clear();
-- __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
-- if (!__Pyx_RefNanny)
-- Py_FatalError("failed to import 'refnanny' module");
--}
--#endif
-- __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_mpv(void)", 0);
-- if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- #ifdef __Pxy_PyFrame_Initialize_Offsets
-- __Pxy_PyFrame_Initialize_Offsets();
-- #endif
-- __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
-- #ifdef __Pyx_CyFunction_USED
-- if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- #endif
-- #ifdef __Pyx_FusedFunction_USED
-- if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- #endif
-- #ifdef __Pyx_Coroutine_USED
-- if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- #endif
-- #ifdef __Pyx_Generator_USED
-- if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- #endif
-- #ifdef __Pyx_AsyncGen_USED
-- if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- #endif
-- #ifdef __Pyx_StopAsyncIteration_USED
-- if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- #endif
-- /*--- Library function declarations ---*/
-- /*--- Threads initialization code ---*/
-- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
-- #ifdef WITH_THREAD /* Python build with threading support? */
-- PyEval_InitThreads();
-- #endif
-- #endif
-- /*--- Module creation code ---*/
-- #if CYTHON_PEP489_MULTI_PHASE_INIT
-- __pyx_m = __pyx_pyinit_module;
-- Py_INCREF(__pyx_m);
-- #else
-- #if PY_MAJOR_VERSION < 3
-- __pyx_m = Py_InitModule4("mpv", __pyx_methods, __pyx_k_pympv_Python_wrapper_for_libmpv, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
-- #else
-- __pyx_m = PyModule_Create(&__pyx_moduledef);
-- #endif
-- if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
-- #endif
-- __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
-- Py_INCREF(__pyx_d);
-- __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
-- Py_INCREF(__pyx_b);
-- __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
-- Py_INCREF(__pyx_cython_runtime);
-- if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
-- /*--- Initialize various global constants etc. ---*/
-- if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
-- if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- #endif
-- if (__pyx_module_is_main_vidcutter__libs__mpv) {
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- }
-- #if PY_MAJOR_VERSION >= 3
-- {
-- PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
-- if (!PyDict_GetItemString(modules, "vidcutter.libs.mpv")) {
-- if (unlikely(PyDict_SetItemString(modules, "vidcutter.libs.mpv", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
-- }
-- }
-- #endif
-- /*--- Builtin init code ---*/
-- if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- /*--- Constants init code ---*/
-- if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- /*--- Global type/function init code ---*/
-- (void)__Pyx_modinit_global_init_code();
-- (void)__Pyx_modinit_variable_export_code();
-- (void)__Pyx_modinit_function_export_code();
-- if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
-- (void)__Pyx_modinit_type_import_code();
-- (void)__Pyx_modinit_variable_import_code();
-- (void)__Pyx_modinit_function_import_code();
-- /*--- Execution code ---*/
-- #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
-- if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- #endif
-+static __Pyx_StringTabEntry __pyx_string_tab[] = {
-+ {&__pyx_kp_s_0_3_0, __pyx_k_0_3_0, sizeof(__pyx_k_0_3_0), 0, 0, 1, 0},
-+ {&__pyx_n_s_API_OPENGL, __pyx_k_API_OPENGL, sizeof(__pyx_k_API_OPENGL), 0, 0, 1, 1},
-+ {&__pyx_kp_s_Andre_D, __pyx_k_Andre_D, sizeof(__pyx_k_Andre_D), 0, 0, 1, 0},
-+ {&__pyx_n_s_CAPI_MAJOR, __pyx_k_CAPI_MAJOR, sizeof(__pyx_k_CAPI_MAJOR), 0, 0, 1, 1},
-+ {&__pyx_n_s_CAPI_MINOR, __pyx_k_CAPI_MINOR, sizeof(__pyx_k_CAPI_MINOR), 0, 0, 1, 1},
-+ {&__pyx_n_s_CallbackThread, __pyx_k_CallbackThread, sizeof(__pyx_k_CallbackThread), 0, 0, 1, 1},
-+ {&__pyx_n_s_CallbackThread___init, __pyx_k_CallbackThread___init, sizeof(__pyx_k_CallbackThread___init), 0, 0, 1, 1},
-+ {&__pyx_n_s_CallbackThread_call, __pyx_k_CallbackThread_call, sizeof(__pyx_k_CallbackThread_call), 0, 0, 1, 1},
-+ {&__pyx_n_s_CallbackThread_mpv_callback, __pyx_k_CallbackThread_mpv_callback, sizeof(__pyx_k_CallbackThread_mpv_callback), 0, 0, 1, 1},
-+ {&__pyx_n_s_CallbackThread_run, __pyx_k_CallbackThread_run, sizeof(__pyx_k_CallbackThread_run), 0, 0, 1, 1},
-+ {&__pyx_n_s_CallbackThread_set, __pyx_k_CallbackThread_set, sizeof(__pyx_k_CallbackThread_set), 0, 0, 1, 1},
-+ {&__pyx_n_s_CallbackThread_shutdown, __pyx_k_CallbackThread_shutdown, sizeof(__pyx_k_CallbackThread_shutdown), 0, 0, 1, 1},
-+ {&__pyx_n_s_Context, __pyx_k_Context, sizeof(__pyx_k_Context), 0, 0, 1, 1},
-+ {&__pyx_kp_s_Context_creation_error, __pyx_k_Context_creation_error, sizeof(__pyx_k_Context_creation_error), 0, 0, 1, 0},
-+ {&__pyx_n_s_EOFReasons, __pyx_k_EOFReasons, sizeof(__pyx_k_EOFReasons), 0, 0, 1, 1},
-+ {&__pyx_n_s_EndOfFileReached, __pyx_k_EndOfFileReached, sizeof(__pyx_k_EndOfFileReached), 0, 0, 1, 1},
-+ {&__pyx_n_s_Errors, __pyx_k_Errors, sizeof(__pyx_k_Errors), 0, 0, 1, 1},
-+ {&__pyx_n_s_Event, __pyx_k_Event, sizeof(__pyx_k_Event), 0, 0, 1, 1},
-+ {&__pyx_n_s_Events, __pyx_k_Events, sizeof(__pyx_k_Events), 0, 0, 1, 1},
-+ {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
-+ {&__pyx_kp_s_Incompatible_checksums_s_vs_0x05, __pyx_k_Incompatible_checksums_s_vs_0x05, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x05), 0, 0, 1, 0},
-+ {&__pyx_kp_s_Incompatible_checksums_s_vs_0x56, __pyx_k_Incompatible_checksums_s_vs_0x56, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x56), 0, 0, 1, 0},
-+ {&__pyx_kp_s_Incompatible_checksums_s_vs_0x87, __pyx_k_Incompatible_checksums_s_vs_0x87, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x87), 0, 0, 1, 0},
-+ {&__pyx_kp_s_Incompatible_checksums_s_vs_0xd4, __pyx_k_Incompatible_checksums_s_vs_0xd4, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xd4), 0, 0, 1, 0},
-+ {&__pyx_kp_s_Incompatible_checksums_s_vs_0xda, __pyx_k_Incompatible_checksums_s_vs_0xda, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xda), 0, 0, 1, 0},
-+ {&__pyx_kp_s_Known_possible_values_for_EndOfF, __pyx_k_Known_possible_values_for_EndOfF, sizeof(__pyx_k_Known_possible_values_for_EndOfF), 0, 0, 1, 0},
-+ {&__pyx_n_s_LogLevels, __pyx_k_LogLevels, sizeof(__pyx_k_LogLevels), 0, 0, 1, 1},
-+ {&__pyx_n_s_LogMessage, __pyx_k_LogMessage, sizeof(__pyx_k_LogMessage), 0, 0, 1, 1},
-+ {&__pyx_n_s_MIN_CAPI_MINOR, __pyx_k_MIN_CAPI_MINOR, sizeof(__pyx_k_MIN_CAPI_MINOR), 0, 0, 1, 1},
-+ {&__pyx_n_s_MPVError, __pyx_k_MPVError, sizeof(__pyx_k_MPVError), 0, 0, 1, 1},
-+ {&__pyx_n_s_MPVError___init, __pyx_k_MPVError___init, sizeof(__pyx_k_MPVError___init), 0, 0, 1, 1},
-+ {&__pyx_n_s_OpenGLRenderContext, __pyx_k_OpenGLRenderContext, sizeof(__pyx_k_OpenGLRenderContext), 0, 0, 1, 1},
-+ {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
-+ {&__pyx_n_s_Property, __pyx_k_Property, sizeof(__pyx_k_Property), 0, 0, 1, 1},
-+ {&__pyx_n_s_PyMPVError, __pyx_k_PyMPVError, sizeof(__pyx_k_PyMPVError), 0, 0, 1, 1},
-+ {&__pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_k_REQUIRED_CAPI_MAJOR, sizeof(__pyx_k_REQUIRED_CAPI_MAJOR), 0, 0, 1, 1},
-+ {&__pyx_n_s_RenderContext, __pyx_k_RenderContext, sizeof(__pyx_k_RenderContext), 0, 0, 1, 1},
-+ {&__pyx_n_s_RenderParams, __pyx_k_RenderParams, sizeof(__pyx_k_RenderParams), 0, 0, 1, 1},
-+ {&__pyx_kp_s_RenderParams_overflow, __pyx_k_RenderParams_overflow, sizeof(__pyx_k_RenderParams_overflow), 0, 0, 1, 0},
-+ {&__pyx_n_s_ReplyUserData, __pyx_k_ReplyUserData, sizeof(__pyx_k_ReplyUserData), 0, 0, 1, 1},
-+ {&__pyx_n_s_ReplyUserData___init, __pyx_k_ReplyUserData___init, sizeof(__pyx_k_ReplyUserData___init), 0, 0, 1, 1},
-+ {&__pyx_n_s_ReplyUserData_add, __pyx_k_ReplyUserData_add, sizeof(__pyx_k_ReplyUserData_add), 0, 0, 1, 1},
-+ {&__pyx_n_s_ReplyUserData_remove, __pyx_k_ReplyUserData_remove, sizeof(__pyx_k_ReplyUserData_remove), 0, 0, 1, 1},
-+ {&__pyx_n_s_Semaphore, __pyx_k_Semaphore, sizeof(__pyx_k_Semaphore), 0, 0, 1, 1},
-+ {&__pyx_kp_s_Set_of_known_error_codes_from_Mp, __pyx_k_Set_of_known_error_codes_from_Mp, sizeof(__pyx_k_Set_of_known_error_codes_from_Mp), 0, 0, 1, 0},
-+ {&__pyx_kp_s_Set_of_known_values_for_Event_id, __pyx_k_Set_of_known_values_for_Event_id, sizeof(__pyx_k_Set_of_known_values_for_Event_id), 0, 0, 1, 0},
-+ {&__pyx_n_s_Thread, __pyx_k_Thread, sizeof(__pyx_k_Thread), 0, 0, 1, 1},
-+ {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
-+ {&__pyx_n_s_UPDATE_FRAME, __pyx_k_UPDATE_FRAME, sizeof(__pyx_k_UPDATE_FRAME), 0, 0, 1, 1},
-+ {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1},
-+ {&__pyx_n_s_UnicodeEncodeError, __pyx_k_UnicodeEncodeError, sizeof(__pyx_k_UnicodeEncodeError), 0, 0, 1, 1},
-+ {&__pyx_kp_s_Unknown_api_type_r, __pyx_k_Unknown_api_type_r, sizeof(__pyx_k_Unknown_api_type_r), 0, 0, 1, 0},
-+ {&__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_k_Unknown_or_invalid_pointer_objec, sizeof(__pyx_k_Unknown_or_invalid_pointer_objec), 0, 0, 1, 0},
-+ {&__pyx_n_s_aborted, __pyx_k_aborted, sizeof(__pyx_k_aborted), 0, 0, 1, 1},
-+ {&__pyx_n_s_acquire, __pyx_k_acquire, sizeof(__pyx_k_acquire), 0, 0, 1, 1},
-+ {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
-+ {&__pyx_n_s_advanced_control, __pyx_k_advanced_control, sizeof(__pyx_k_advanced_control), 0, 0, 1, 1},
-+ {&__pyx_n_s_ao_init_failed, __pyx_k_ao_init_failed, sizeof(__pyx_k_ao_init_failed), 0, 0, 1, 1},
-+ {&__pyx_n_s_api_type, __pyx_k_api_type, sizeof(__pyx_k_api_type), 0, 0, 1, 1},
-+ {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
-+ {&__pyx_n_s_asynchronous, __pyx_k_asynchronous, sizeof(__pyx_k_asynchronous), 0, 0, 1, 1},
-+ {&__pyx_n_s_atomic_request_ptr, __pyx_k_atomic_request_ptr, sizeof(__pyx_k_atomic_request_ptr), 0, 0, 1, 1},
-+ {&__pyx_n_s_audio_reconfig, __pyx_k_audio_reconfig, sizeof(__pyx_k_audio_reconfig), 0, 0, 1, 1},
-+ {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1},
-+ {&__pyx_n_s_block_for_target_time, __pyx_k_block_for_target_time, sizeof(__pyx_k_block_for_target_time), 0, 0, 1, 1},
-+ {&__pyx_n_s_block_vsync, __pyx_k_block_vsync, sizeof(__pyx_k_block_vsync), 0, 0, 1, 1},
-+ {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
-+ {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
-+ {&__pyx_n_s_client_message, __pyx_k_client_message, sizeof(__pyx_k_client_message), 0, 0, 1, 1},
-+ {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
-+ {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
-+ {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
-+ {&__pyx_n_s_command_error, __pyx_k_command_error, sizeof(__pyx_k_command_error), 0, 0, 1, 1},
-+ {&__pyx_n_s_command_reply, __pyx_k_command_reply, sizeof(__pyx_k_command_reply), 0, 0, 1, 1},
-+ {&__pyx_n_s_connector_id, __pyx_k_connector_id, sizeof(__pyx_k_connector_id), 0, 0, 1, 1},
-+ {&__pyx_n_s_counter, __pyx_k_counter, sizeof(__pyx_k_counter), 0, 0, 1, 1},
-+ {&__pyx_n_s_crtc_id, __pyx_k_crtc_id, sizeof(__pyx_k_crtc_id), 0, 0, 1, 1},
-+ {&__pyx_n_s_daemon, __pyx_k_daemon, sizeof(__pyx_k_daemon), 0, 0, 1, 1},
-+ {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
-+ {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
-+ {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
-+ {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
-+ {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1},
-+ {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
-+ {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
-+ {&__pyx_kp_s_drmModeAtomicReq, __pyx_k_drmModeAtomicReq, sizeof(__pyx_k_drmModeAtomicReq), 0, 0, 1, 0},
-+ {&__pyx_n_s_drm_display, __pyx_k_drm_display, sizeof(__pyx_k_drm_display), 0, 0, 1, 1},
-+ {&__pyx_n_s_drm_osd_size, __pyx_k_drm_osd_size, sizeof(__pyx_k_drm_osd_size), 0, 0, 1, 1},
-+ {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
-+ {&__pyx_n_s_e_i, __pyx_k_e_i, sizeof(__pyx_k_e_i), 0, 0, 1, 1},
-+ {&__pyx_n_s_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 0, 1, 1},
-+ {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
-+ {&__pyx_n_s_end_file, __pyx_k_end_file, sizeof(__pyx_k_end_file), 0, 0, 1, 1},
-+ {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
-+ {&__pyx_n_s_eof, __pyx_k_eof, sizeof(__pyx_k_eof), 0, 0, 1, 1},
-+ {&__pyx_n_s_err_c, __pyx_k_err_c, sizeof(__pyx_k_err_c), 0, 0, 1, 1},
-+ {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
-+ {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
-+ {&__pyx_n_s_errors_locals_wrapped, __pyx_k_errors_locals_wrapped, sizeof(__pyx_k_errors_locals_wrapped), 0, 0, 1, 1},
-+ {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1},
-+ {&__pyx_n_s_fatal, __pyx_k_fatal, sizeof(__pyx_k_fatal), 0, 0, 1, 1},
-+ {&__pyx_n_s_fbo, __pyx_k_fbo, sizeof(__pyx_k_fbo), 0, 0, 1, 1},
-+ {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1},
-+ {&__pyx_n_s_file_loaded, __pyx_k_file_loaded, sizeof(__pyx_k_file_loaded), 0, 0, 1, 1},
-+ {&__pyx_n_s_flip_y, __pyx_k_flip_y, sizeof(__pyx_k_flip_y), 0, 0, 1, 1},
-+ {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
-+ {&__pyx_n_s_format_for, __pyx_k_format_for, sizeof(__pyx_k_format_for), 0, 0, 1, 1},
-+ {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
-+ {&__pyx_n_s_get_proc_address, __pyx_k_get_proc_address, sizeof(__pyx_k_get_proc_address), 0, 0, 1, 1},
-+ {&__pyx_n_s_get_property, __pyx_k_get_property, sizeof(__pyx_k_get_property), 0, 0, 1, 1},
-+ {&__pyx_n_s_get_property_async, __pyx_k_get_property_async, sizeof(__pyx_k_get_property_async), 0, 0, 1, 1},
-+ {&__pyx_n_s_get_property_reply, __pyx_k_get_property_reply, sizeof(__pyx_k_get_property_reply), 0, 0, 1, 1},
-+ {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
-+ {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
-+ {&__pyx_kp_s_icc_blob_should_be_a_bytes_insta, __pyx_k_icc_blob_should_be_a_bytes_insta, sizeof(__pyx_k_icc_blob_should_be_a_bytes_insta), 0, 0, 1, 0},
-+ {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
-+ {&__pyx_n_s_idle, __pyx_k_idle, sizeof(__pyx_k_idle), 0, 0, 1, 1},
-+ {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
-+ {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
-+ {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
-+ {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1},
-+ {&__pyx_n_s_internal_format, __pyx_k_internal_format, sizeof(__pyx_k_internal_format), 0, 0, 1, 1},
-+ {&__pyx_n_s_invalid_parameter, __pyx_k_invalid_parameter, sizeof(__pyx_k_invalid_parameter), 0, 0, 1, 1},
-+ {&__pyx_n_s_is_py3, __pyx_k_is_py3, sizeof(__pyx_k_is_py3), 0, 0, 1, 1},
-+ {&__pyx_n_s_isshutdown, __pyx_k_isshutdown, sizeof(__pyx_k_isshutdown), 0, 0, 1, 1},
-+ {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
-+ {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
-+ {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
-+ {&__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_k_libmpv_version_is_incorrect_Requ, sizeof(__pyx_k_libmpv_version_is_incorrect_Requ), 0, 0, 1, 0},
-+ {&__pyx_n_s_load_config, __pyx_k_load_config, sizeof(__pyx_k_load_config), 0, 0, 1, 1},
-+ {&__pyx_n_s_loading_failed, __pyx_k_loading_failed, sizeof(__pyx_k_loading_failed), 0, 0, 1, 1},
-+ {&__pyx_n_s_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 0, 1, 1},
-+ {&__pyx_n_s_log_message, __pyx_k_log_message, sizeof(__pyx_k_log_message), 0, 0, 1, 1},
-+ {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
-+ {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
-+ {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
-+ {&__pyx_n_s_mpv, __pyx_k_mpv, sizeof(__pyx_k_mpv), 0, 0, 1, 1},
-+ {&__pyx_n_s_mpv_callback, __pyx_k_mpv_callback, sizeof(__pyx_k_mpv_callback), 0, 0, 1, 1},
-+ {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
-+ {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
-+ {&__pyx_n_s_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 0, 1, 1},
-+ {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
-+ {&__pyx_n_s_nomem, __pyx_k_nomem, sizeof(__pyx_k_nomem), 0, 0, 1, 1},
-+ {&__pyx_n_s_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 0, 1, 1},
-+ {&__pyx_n_s_not_found, __pyx_k_not_found, sizeof(__pyx_k_not_found), 0, 0, 1, 1},
-+ {&__pyx_n_s_not_implemented, __pyx_k_not_implemented, sizeof(__pyx_k_not_implemented), 0, 0, 1, 1},
-+ {&__pyx_n_s_nothing_to_play, __pyx_k_nothing_to_play, sizeof(__pyx_k_nothing_to_play), 0, 0, 1, 1},
-+ {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
-+ {&__pyx_n_s_observe_property, __pyx_k_observe_property, sizeof(__pyx_k_observe_property), 0, 0, 1, 1},
-+ {&__pyx_n_s_observed, __pyx_k_observed, sizeof(__pyx_k_observed), 0, 0, 1, 1},
-+ {&__pyx_n_s_opengl, __pyx_k_opengl, sizeof(__pyx_k_opengl), 0, 0, 1, 1},
-+ {&__pyx_n_s_opengl_fbo, __pyx_k_opengl_fbo, sizeof(__pyx_k_opengl_fbo), 0, 0, 1, 1},
-+ {&__pyx_n_s_opengl_init_params, __pyx_k_opengl_init_params, sizeof(__pyx_k_opengl_init_params), 0, 0, 1, 1},
-+ {&__pyx_n_s_option_error, __pyx_k_option_error, sizeof(__pyx_k_option_error), 0, 0, 1, 1},
-+ {&__pyx_n_s_option_format, __pyx_k_option_format, sizeof(__pyx_k_option_format), 0, 0, 1, 1},
-+ {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
-+ {&__pyx_n_s_playback_restart, __pyx_k_playback_restart, sizeof(__pyx_k_playback_restart), 0, 0, 1, 1},
-+ {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
-+ {&__pyx_n_s_present, __pyx_k_present, sizeof(__pyx_k_present), 0, 0, 1, 1},
-+ {&__pyx_n_s_prop, __pyx_k_prop, sizeof(__pyx_k_prop), 0, 0, 1, 1},
-+ {&__pyx_n_s_property_change, __pyx_k_property_change, sizeof(__pyx_k_property_change), 0, 0, 1, 1},
-+ {&__pyx_n_s_property_error, __pyx_k_property_error, sizeof(__pyx_k_property_error), 0, 0, 1, 1},
-+ {&__pyx_n_s_property_format, __pyx_k_property_format, sizeof(__pyx_k_property_format), 0, 0, 1, 1},
-+ {&__pyx_n_s_property_unavailable, __pyx_k_property_unavailable, sizeof(__pyx_k_property_unavailable), 0, 0, 1, 1},
-+ {&__pyx_kp_s_pympv_error_during_callback_s, __pyx_k_pympv_error_during_callback_s, sizeof(__pyx_k_pympv_error_during_callback_s), 0, 0, 1, 0},
-+ {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
-+ {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
-+ {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
-+ {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
-+ {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
-+ {&__pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_k_pyx_unpickle_EndOfFileReached, sizeof(__pyx_k_pyx_unpickle_EndOfFileReached), 0, 0, 1, 1},
-+ {&__pyx_n_s_pyx_unpickle_Event, __pyx_k_pyx_unpickle_Event, sizeof(__pyx_k_pyx_unpickle_Event), 0, 0, 1, 1},
-+ {&__pyx_n_s_pyx_unpickle_LogMessage, __pyx_k_pyx_unpickle_LogMessage, sizeof(__pyx_k_pyx_unpickle_LogMessage), 0, 0, 1, 1},
-+ {&__pyx_n_s_pyx_unpickle_Property, __pyx_k_pyx_unpickle_Property, sizeof(__pyx_k_pyx_unpickle_Property), 0, 0, 1, 1},
-+ {&__pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_k_pyx_unpickle_RenderFrameInfo, sizeof(__pyx_k_pyx_unpickle_RenderFrameInfo), 0, 0, 1, 1},
-+ {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
-+ {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
-+ {&__pyx_n_s_queue_full, __pyx_k_queue_full, sizeof(__pyx_k_queue_full), 0, 0, 1, 1},
-+ {&__pyx_n_s_quit, __pyx_k_quit, sizeof(__pyx_k_quit), 0, 0, 1, 1},
-+ {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
-+ {&__pyx_n_s_redraw, __pyx_k_redraw, sizeof(__pyx_k_redraw), 0, 0, 1, 1},
-+ {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
-+ {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
-+ {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
-+ {&__pyx_n_s_release, __pyx_k_release, sizeof(__pyx_k_release), 0, 0, 1, 1},
-+ {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
-+ {&__pyx_n_s_render, __pyx_k_render, sizeof(__pyx_k_render), 0, 0, 1, 1},
-+ {&__pyx_n_s_render_fd, __pyx_k_render_fd, sizeof(__pyx_k_render_fd), 0, 0, 1, 1},
-+ {&__pyx_n_s_repeat, __pyx_k_repeat, sizeof(__pyx_k_repeat), 0, 0, 1, 1},
-+ {&__pyx_n_s_request_event, __pyx_k_request_event, sizeof(__pyx_k_request_event), 0, 0, 1, 1},
-+ {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1},
-+ {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
-+ {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
-+ {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
-+ {&__pyx_kp_s_self__ctx_cannot_be_converted_to, __pyx_k_self__ctx_cannot_be_converted_to, sizeof(__pyx_k_self__ctx_cannot_be_converted_to), 0, 0, 1, 0},
-+ {&__pyx_kp_s_self_params_cannot_be_converted, __pyx_k_self_params_cannot_be_converted, sizeof(__pyx_k_self_params_cannot_be_converted), 0, 0, 1, 0},
-+ {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
-+ {&__pyx_n_s_set_ambient_light, __pyx_k_set_ambient_light, sizeof(__pyx_k_set_ambient_light), 0, 0, 1, 1},
-+ {&__pyx_n_s_set_icc_profile, __pyx_k_set_icc_profile, sizeof(__pyx_k_set_icc_profile), 0, 0, 1, 1},
-+ {&__pyx_n_s_set_log_level, __pyx_k_set_log_level, sizeof(__pyx_k_set_log_level), 0, 0, 1, 1},
-+ {&__pyx_n_s_set_option, __pyx_k_set_option, sizeof(__pyx_k_set_option), 0, 0, 1, 1},
-+ {&__pyx_n_s_set_property, __pyx_k_set_property, sizeof(__pyx_k_set_property), 0, 0, 1, 1},
-+ {&__pyx_n_s_set_property_reply, __pyx_k_set_property_reply, sizeof(__pyx_k_set_property_reply), 0, 0, 1, 1},
-+ {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
-+ {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
-+ {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1},
-+ {&__pyx_n_s_skip_rendering, __pyx_k_skip_rendering, sizeof(__pyx_k_skip_rendering), 0, 0, 1, 1},
-+ {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
-+ {&__pyx_n_s_start_file, __pyx_k_start_file, sizeof(__pyx_k_start_file), 0, 0, 1, 1},
-+ {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
-+ {&__pyx_n_s_strdec, __pyx_k_strdec, sizeof(__pyx_k_strdec), 0, 0, 1, 1},
-+ {&__pyx_n_s_strdec_err, __pyx_k_strdec_err, sizeof(__pyx_k_strdec_err), 0, 0, 1, 1},
-+ {&__pyx_n_s_strenc, __pyx_k_strenc, sizeof(__pyx_k_strenc), 0, 0, 1, 1},
-+ {&__pyx_n_s_strict, __pyx_k_strict, sizeof(__pyx_k_strict), 0, 0, 1, 1},
-+ {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
-+ {&__pyx_n_s_success, __pyx_k_success, sizeof(__pyx_k_success), 0, 0, 1, 1},
-+ {&__pyx_n_s_surrogateescape, __pyx_k_surrogateescape, sizeof(__pyx_k_surrogateescape), 0, 0, 1, 1},
-+ {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
-+ {&__pyx_n_s_target_time, __pyx_k_target_time, sizeof(__pyx_k_target_time), 0, 0, 1, 1},
-+ {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
-+ {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1},
-+ {&__pyx_n_s_tick, __pyx_k_tick, sizeof(__pyx_k_tick), 0, 0, 1, 1},
-+ {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
-+ {&__pyx_n_s_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 0, 1, 1},
-+ {&__pyx_n_s_uninitialized, __pyx_k_uninitialized, sizeof(__pyx_k_uninitialized), 0, 0, 1, 1},
-+ {&__pyx_n_s_unknown_format, __pyx_k_unknown_format, sizeof(__pyx_k_unknown_format), 0, 0, 1, 1},
-+ {&__pyx_n_s_unobserve_property, __pyx_k_unobserve_property, sizeof(__pyx_k_unobserve_property), 0, 0, 1, 1},
-+ {&__pyx_n_s_unsupported, __pyx_k_unsupported, sizeof(__pyx_k_unsupported), 0, 0, 1, 1},
-+ {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
-+ {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
-+ {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
-+ {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
-+ {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
-+ {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
-+ {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
-+ {&__pyx_n_s_vidcutter_libs_mpv, __pyx_k_vidcutter_libs_mpv, sizeof(__pyx_k_vidcutter_libs_mpv), 0, 0, 1, 1},
-+ {&__pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_k_vidcutter_libs_pympv_mpv_pyx, sizeof(__pyx_k_vidcutter_libs_pympv_mpv_pyx), 0, 0, 1, 0},
-+ {&__pyx_n_s_video_reconfig, __pyx_k_video_reconfig, sizeof(__pyx_k_video_reconfig), 0, 0, 1, 1},
-+ {&__pyx_n_s_vo_init_failed, __pyx_k_vo_init_failed, sizeof(__pyx_k_vo_init_failed), 0, 0, 1, 1},
-+ {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
-+ {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
-+ {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
-+ {&__pyx_n_s_wl_display, __pyx_k_wl_display, sizeof(__pyx_k_wl_display), 0, 0, 1, 1},
-+ {&__pyx_n_s_wrapped, __pyx_k_wrapped, sizeof(__pyx_k_wrapped), 0, 0, 1, 1},
-+ {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
-+ {&__pyx_n_s_x11_display, __pyx_k_x11_display, sizeof(__pyx_k_x11_display), 0, 0, 1, 1},
-+ {0, 0, 0, 0, 0, 0, 0}
-+};
-+static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
-+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 44, __pyx_L1_error)
-+ __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 346, __pyx_L1_error)
-+ __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 58, __pyx_L1_error)
-+ __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 66, __pyx_L1_error)
-+ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 222, __pyx_L1_error)
-+ __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 303, __pyx_L1_error)
-+ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
-+ return 0;
-+ __pyx_L1_error:;
-+ return -1;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":22
-+static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":319
- *
-- * import cython
-- * import sys, warnings # <<<<<<<<<<<<<<
-- * from threading import Thread, Semaphore
-- * from libc.stdlib cimport malloc, free
-+ * def _errors(fn):
-+ * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
-+ * v = fn(*k, **kw)
-+ * if v < 0:
- */
-- __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 319, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple_);
-+ __Pyx_GIVEREF(__pyx_tuple_);
-+ __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 319, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":23
-- * import cython
-- * import sys, warnings
-- * from threading import Thread, Semaphore # <<<<<<<<<<<<<<
-- * from libc.stdlib cimport malloc, free
-- * from libc.string cimport strcpy, strlen, memset
-+ /* "(tree fragment)":2
-+ * def __reduce_cython__(self):
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
- */
-- __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_INCREF(__pyx_n_s_Thread);
-- __Pyx_GIVEREF(__pyx_n_s_Thread);
-- PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Thread);
-- __Pyx_INCREF(__pyx_n_s_Semaphore);
-- __Pyx_GIVEREF(__pyx_n_s_Semaphore);
-- PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Semaphore);
-- __pyx_t_2 = __Pyx_Import(__pyx_n_s_threading, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Thread, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Semaphore, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__3);
-+ __Pyx_GIVEREF(__pyx_tuple__3);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":30
-- * from client cimport *
-- *
-- * __version__ = "0.3.0" # <<<<<<<<<<<<<<
-- * __author__ = "Andre D"
-- *
-+ /* "(tree fragment)":4
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
- */
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_3_0) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
-+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__4);
-+ __Pyx_GIVEREF(__pyx_tuple__4);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":31
-- *
-- * __version__ = "0.3.0"
-- * __author__ = "Andre D" # <<<<<<<<<<<<<<
-- *
-- * _REQUIRED_CAPI_MAJOR = 1
-+ /* "(tree fragment)":2
-+ * def __reduce_cython__(self):
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling")
- */
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_s_Andre_D) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
-+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 2, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__5);
-+ __Pyx_GIVEREF(__pyx_tuple__5);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":33
-- * __author__ = "Andre D"
-- *
-- * _REQUIRED_CAPI_MAJOR = 1 # <<<<<<<<<<<<<<
-- * _MIN_CAPI_MINOR = 9
-- *
-+ /* "(tree fragment)":4
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("self.params cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
- */
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
-+ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_self_params_cannot_be_converted); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 4, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__6);
-+ __Pyx_GIVEREF(__pyx_tuple__6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":34
-- *
-- * _REQUIRED_CAPI_MAJOR = 1
-- * _MIN_CAPI_MINOR = 9 # <<<<<<<<<<<<<<
-- *
-- * cdef unsigned long _CAPI_VERSION
-+ /* "vidcutter/libs/pympv/mpv.pyx":992
-+ * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
-+ * if drm_display:
-+ * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
-+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-+ * drm_params.connector_id = drm_display.get("connector_id", -1)
- */
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_9) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
-+ __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 992, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__7);
-+ __Pyx_GIVEREF(__pyx_tuple__7);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":37
-- *
-- * cdef unsigned long _CAPI_VERSION
-- * with nogil: # <<<<<<<<<<<<<<
-- * _CAPI_VERSION = mpv_client_api_version()
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":993
-+ * if drm_display:
-+ * drm_params.fd = drm_display.get("fd", -1)
-+ * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
-+ * drm_params.connector_id = drm_display.get("connector_id", -1)
-+ * arp = drm_display.get("atomic_request_ptr", None)
- */
-- {
-- #ifdef WITH_THREAD
-- PyThreadState *_save;
-- Py_UNBLOCK_THREADS
-- __Pyx_FastGIL_Remember();
-- #endif
-- /*try:*/ {
-+ __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 993, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__8);
-+ __Pyx_GIVEREF(__pyx_tuple__8);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":38
-- * cdef unsigned long _CAPI_VERSION
-- * with nogil:
-- * _CAPI_VERSION = mpv_client_api_version() # <<<<<<<<<<<<<<
-- *
-- * _CAPI_MAJOR = _CAPI_VERSION >> 16
-+ /* "vidcutter/libs/pympv/mpv.pyx":994
-+ * drm_params.fd = drm_display.get("fd", -1)
-+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-+ * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
-+ * arp = drm_display.get("atomic_request_ptr", None)
-+ * if arp is not None:
- */
-- __pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION = mpv_client_api_version();
-- }
-+ __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 994, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__9);
-+ __Pyx_GIVEREF(__pyx_tuple__9);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":37
-- *
-- * cdef unsigned long _CAPI_VERSION
-- * with nogil: # <<<<<<<<<<<<<<
-- * _CAPI_VERSION = mpv_client_api_version()
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":995
-+ * drm_params.crtc_id = drm_display.get("crtc_id", -1)
-+ * drm_params.connector_id = drm_display.get("connector_id", -1)
-+ * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
-+ * if arp is not None:
-+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
- */
-- /*finally:*/ {
-- /*normal exit:*/{
-- #ifdef WITH_THREAD
-- __Pyx_FastGIL_Forget();
-- Py_BLOCK_THREADS
-- #endif
-- goto __pyx_L4;
-- }
-- __pyx_L4:;
-- }
-- }
-+ __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 995, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__10);
-+ __Pyx_GIVEREF(__pyx_tuple__10);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":40
-- * _CAPI_VERSION = mpv_client_api_version()
-- *
-- * _CAPI_MAJOR = _CAPI_VERSION >> 16 # <<<<<<<<<<<<<<
-- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":998
-+ * if arp is not None:
-+ * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
-+ * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
-+ * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
-+ * if drm_osd_size:
- */
-- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 998, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__11);
-+ __Pyx_GIVEREF(__pyx_tuple__11);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":41
-- *
-- * _CAPI_MAJOR = _CAPI_VERSION >> 16
-- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF # <<<<<<<<<<<<<<
-- *
-- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
-+ /* "vidcutter/libs/pympv/mpv.pyx":1083
-+ * if opengl_fbo:
-+ * memset(&fbo, 0, sizeof(fbo))
-+ * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
-+ * fbo.w = opengl_fbo["w"]
-+ * fbo.h = opengl_fbo["h"]
- */
-- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 1083, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__12);
-+ __Pyx_GIVEREF(__pyx_tuple__12);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":43
-- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
-- *
-- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
-- * raise ImportError(
-- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (!__pyx_t_5) {
-- } else {
-- __pyx_t_3 = __pyx_t_5;
-- goto __pyx_L6_bool_binop_done;
-- }
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_3 = __pyx_t_5;
-- __pyx_L6_bool_binop_done:;
-- if (unlikely(__pyx_t_3)) {
-+ /* "vidcutter/libs/pympv/mpv.pyx":1086
-+ * fbo.w = opengl_fbo["w"]
-+ * fbo.h = opengl_fbo["h"]
-+ * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
-+ * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
-+ * if flip_y:
-+ */
-+ __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1086, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__13);
-+ __Pyx_GIVEREF(__pyx_tuple__13);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":46
-- * raise ImportError(
-- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
-- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR) # <<<<<<<<<<<<<<
-- * )
-- *
-+ /* "(tree fragment)":2
-+ * def __reduce_cython__(self):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_GIVEREF(__pyx_t_2);
-- PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
-- __Pyx_GIVEREF(__pyx_t_1);
-- PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
-- __Pyx_GIVEREF(__pyx_t_4);
-- PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4);
-- __Pyx_GIVEREF(__pyx_t_6);
-- PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
-- __pyx_t_2 = 0;
-- __pyx_t_1 = 0;
-- __pyx_t_4 = 0;
-- __pyx_t_6 = 0;
-+ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 2, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__14);
-+ __Pyx_GIVEREF(__pyx_tuple__14);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":45
-- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
-- * raise ImportError(
-- * "libmpv version is incorrect. Required %d.%d got %d.%d." % # <<<<<<<<<<<<<<
-- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
-- * )
-+ /* "(tree fragment)":4
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
- */
-- __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 4, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__15);
-+ __Pyx_GIVEREF(__pyx_tuple__15);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":44
-- *
-- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
-- * raise ImportError( # <<<<<<<<<<<<<<
-- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
-- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
-+ /* "(tree fragment)":2
-+ * def __reduce_cython__(self):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
- */
-- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __PYX_ERR(0, 44, __pyx_L1_error)
-+ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 2, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__16);
-+ __Pyx_GIVEREF(__pyx_tuple__16);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":43
-- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
-- *
-- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
-- * raise ImportError(
-- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
-+ /* "(tree fragment)":4
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling")
-+ * def __setstate_cython__(self, __pyx_state):
-+ * raise TypeError("self._ctx cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
- */
-- }
-+ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_self__ctx_cannot_be_converted_to); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 4, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__17);
-+ __Pyx_GIVEREF(__pyx_tuple__17);
-
- /* "vidcutter/libs/pympv/mpv.pyx":52
-- * void PyEval_InitThreads()
-+ * void Py_Initialize()
- *
- * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
- * # mpv -> Python
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__21, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":53
-- *
-- * _is_py3 = sys.version_info >= (3,)
-- * _strdec_err = "surrogateescape" if _is_py3 else "strict" # <<<<<<<<<<<<<<
-- * # mpv -> Python
-- * def _strdec(s):
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 53, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (__pyx_t_3) {
-- __Pyx_INCREF(__pyx_n_s_surrogateescape);
-- __pyx_t_7 = __pyx_n_s_surrogateescape;
-- } else {
-- __Pyx_INCREF(__pyx_n_s_strict);
-- __pyx_t_7 = __pyx_n_s_strict;
-- }
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 52, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__18);
-+ __Pyx_GIVEREF(__pyx_tuple__18);
-
- /* "vidcutter/libs/pympv/mpv.pyx":55
- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
-@@ -28564,10 +24644,10 @@ if (!__Pyx_RefNanny) {
- * try:
- * return s.decode("utf-8", _strdec_err)
- */
-- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 55, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__19);
-+ __Pyx_GIVEREF(__pyx_tuple__19);
-+ __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 55, __pyx_L1_error)
-
- /* "vidcutter/libs/pympv/mpv.pyx":63
- *
-@@ -28576,5040 +24656,5555 @@ if (!__Pyx_RefNanny) {
- * try:
- * return s.encode("utf-8", _strdec_err)
- */
-- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 63, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__21);
-+ __Pyx_GIVEREF(__pyx_tuple__21);
-+ __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 63, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":70
-- * return s
-+ /* "vidcutter/libs/pympv/mpv.pyx":318
- *
-- * PyEval_InitThreads() # <<<<<<<<<<<<<<
- *
-- * class Errors:
-+ * def _errors(fn): # <<<<<<<<<<<<<<
-+ * def wrapped(*k, **kw):
-+ * v = fn(*k, **kw)
- */
-- PyEval_InitThreads();
-+ __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 318, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__23);
-+ __Pyx_GIVEREF(__pyx_tuple__23);
-+ __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 318, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":72
-- * PyEval_InitThreads()
-+ /* "vidcutter/libs/pympv/mpv.pyx":329
-+ * code = None
- *
-- * class Errors: # <<<<<<<<<<<<<<
-- * """Set of known error codes from MpvError and Event responses.
-+ * def __init__(self, e): # <<<<<<<<<<<<<<
-+ * self.code = e
-+ * cdef const char* err_c
-+ */
-+ __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 329, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__25);
-+ __Pyx_GIVEREF(__pyx_tuple__25);
-+ __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 329, __pyx_L1_error)
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":346
-+ * cdef _reply_userdatas = dict()
- *
-+ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
-+ * def __init__(self, data):
-+ * self.counter = 0
- */
-- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 72, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 346, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__27);
-+ __Pyx_GIVEREF(__pyx_tuple__27);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":79
-- * You should handle the possibility that error codes may not be any of these values.
-- * """
-- * success = MPV_ERROR_SUCCESS # <<<<<<<<<<<<<<
-- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
-- * nomem = MPV_ERROR_NOMEM
-+ /* "vidcutter/libs/pympv/mpv.pyx":347
-+ *
-+ * class _ReplyUserData(object):
-+ * def __init__(self, data): # <<<<<<<<<<<<<<
-+ * self.counter = 0
-+ * self.data = data
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 347, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__28);
-+ __Pyx_GIVEREF(__pyx_tuple__28);
-+ __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 347, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":80
-- * """
-- * success = MPV_ERROR_SUCCESS
-- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL # <<<<<<<<<<<<<<
-- * nomem = MPV_ERROR_NOMEM
-- * uninitialized = MPV_ERROR_UNINITIALIZED
-+ /* "vidcutter/libs/pympv/mpv.pyx":352
-+ * self.observed = False
-+ *
-+ * def add(self): # <<<<<<<<<<<<<<
-+ * self.counter += 1
-+ *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 352, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__30);
-+ __Pyx_GIVEREF(__pyx_tuple__30);
-+ __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 352, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":81
-- * success = MPV_ERROR_SUCCESS
-- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
-- * nomem = MPV_ERROR_NOMEM # <<<<<<<<<<<<<<
-- * uninitialized = MPV_ERROR_UNINITIALIZED
-- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
-+ /* "vidcutter/libs/pympv/mpv.pyx":355
-+ * self.counter += 1
-+ *
-+ * def remove(self): # <<<<<<<<<<<<<<
-+ * self.counter -= 1
-+ *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 355, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__32);
-+ __Pyx_GIVEREF(__pyx_tuple__32);
-+ __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 355, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":82
-- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
-- * nomem = MPV_ERROR_NOMEM
-- * uninitialized = MPV_ERROR_UNINITIALIZED # <<<<<<<<<<<<<<
-- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
-- * not_found = MPV_ERROR_OPTION_NOT_FOUND
-+ /* "vidcutter/libs/pympv/mpv.pyx":1133
-+ *
-+ * class CallbackThread(Thread):
-+ * def __init__(self): # <<<<<<<<<<<<<<
-+ * Thread.__init__(self)
-+ * self.daemon = True
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1133, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__34);
-+ __Pyx_GIVEREF(__pyx_tuple__34);
-+ __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1133, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":83
-- * nomem = MPV_ERROR_NOMEM
-- * uninitialized = MPV_ERROR_UNINITIALIZED
-- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER # <<<<<<<<<<<<<<
-- * not_found = MPV_ERROR_OPTION_NOT_FOUND
-- * option_format = MPV_ERROR_OPTION_FORMAT
-+ /* "vidcutter/libs/pympv/mpv.pyx":1141
-+ * self.isshutdown = False
-+ *
-+ * def shutdown(self): # <<<<<<<<<<<<<<
-+ * self.isshutdown = True
-+ * self.callback = None
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1141, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__36);
-+ __Pyx_GIVEREF(__pyx_tuple__36);
-+ __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1141, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":84
-- * uninitialized = MPV_ERROR_UNINITIALIZED
-- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
-- * not_found = MPV_ERROR_OPTION_NOT_FOUND # <<<<<<<<<<<<<<
-- * option_format = MPV_ERROR_OPTION_FORMAT
-- * option_error = MPV_ERROR_OPTION_ERROR
-+ /* "vidcutter/libs/pympv/mpv.pyx":1146
-+ * self.lock.release()
-+ *
-+ * def call(self): # <<<<<<<<<<<<<<
-+ * self.lock.release()
-+ *
-+ */
-+ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1146, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__38);
-+ __Pyx_GIVEREF(__pyx_tuple__38);
-+ __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1146, __pyx_L1_error)
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1149
-+ * self.lock.release()
-+ *
-+ * def set(self, callback): # <<<<<<<<<<<<<<
-+ * self.callback = callback
-+ *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1149, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__40);
-+ __Pyx_GIVEREF(__pyx_tuple__40);
-+ __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1149, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":85
-- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
-- * not_found = MPV_ERROR_OPTION_NOT_FOUND
-- * option_format = MPV_ERROR_OPTION_FORMAT # <<<<<<<<<<<<<<
-- * option_error = MPV_ERROR_OPTION_ERROR
-- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
-+ /* "vidcutter/libs/pympv/mpv.pyx":1152
-+ * self.callback = callback
-+ *
-+ * def run(self): # <<<<<<<<<<<<<<
-+ * while not self.isshutdown:
-+ * self.lock.acquire(True)
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1152, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__42);
-+ __Pyx_GIVEREF(__pyx_tuple__42);
-+ __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 1152, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":86
-- * not_found = MPV_ERROR_OPTION_NOT_FOUND
-- * option_format = MPV_ERROR_OPTION_FORMAT
-- * option_error = MPV_ERROR_OPTION_ERROR # <<<<<<<<<<<<<<
-- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
-- * property_format = MPV_ERROR_PROPERTY_FORMAT
-+ /* "vidcutter/libs/pympv/mpv.pyx":1157
-+ * self.mpv_callback(self.callback) if self.callback else None
-+ *
-+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
-+ * try:
-+ * callback()
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1157, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__44);
-+ __Pyx_GIVEREF(__pyx_tuple__44);
-+ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1157, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":87
-- * option_format = MPV_ERROR_OPTION_FORMAT
-- * option_error = MPV_ERROR_OPTION_ERROR
-- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND # <<<<<<<<<<<<<<
-- * property_format = MPV_ERROR_PROPERTY_FORMAT
-- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
-+ /* "(tree fragment)":1
-+ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_tuple__46 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__46);
-+ __Pyx_GIVEREF(__pyx_tuple__46);
-+ __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_EndOfFileReached, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __pyx_tuple__48 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__48);
-+ __Pyx_GIVEREF(__pyx_tuple__48);
-+ __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_LogMessage, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __pyx_tuple__50 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__50);
-+ __Pyx_GIVEREF(__pyx_tuple__50);
-+ __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Property, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __pyx_tuple__52 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__52);
-+ __Pyx_GIVEREF(__pyx_tuple__52);
-+ __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Event, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __pyx_tuple__54 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_tuple__54);
-+ __Pyx_GIVEREF(__pyx_tuple__54);
-+ __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RenderFrameInfo, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_RefNannyFinishContext();
-+ return 0;
-+ __pyx_L1_error:;
-+ __Pyx_RefNannyFinishContext();
-+ return -1;
-+}
-+
-+static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
-+ if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
-+ __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_int_5713169 = PyInt_FromLong(5713169L); if (unlikely(!__pyx_int_5713169)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_int_90958262 = PyInt_FromLong(90958262L); if (unlikely(!__pyx_int_90958262)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_int_142036910 = PyInt_FromLong(142036910L); if (unlikely(!__pyx_int_142036910)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_int_228822053 = PyInt_FromLong(228822053L); if (unlikely(!__pyx_int_228822053)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ return 0;
-+ __pyx_L1_error:;
-+ return -1;
-+}
-+
-+static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
-+static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
-+static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
-+static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
-+static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
-+static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
-+static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
-+
-+static int __Pyx_modinit_global_init_code(void) {
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
-+ /*--- Global init code ---*/
-+ __pyx_v_9vidcutter_4libs_3mpv__callbacks = Py_None; Py_INCREF(Py_None);
-+ __pyx_v_9vidcutter_4libs_3mpv__reply_userdatas = Py_None; Py_INCREF(Py_None);
-+ __Pyx_RefNannyFinishContext();
-+ return 0;
-+}
-+
-+static int __Pyx_modinit_variable_export_code(void) {
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
-+ /*--- Variable export code ---*/
-+ __Pyx_RefNannyFinishContext();
-+ return 0;
-+}
-+
-+static int __Pyx_modinit_function_export_code(void) {
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
-+ /*--- Function export code ---*/
-+ __Pyx_RefNannyFinishContext();
-+ return 0;
-+}
-+
-+static int __Pyx_modinit_type_init_code(void) {
-+ __Pyx_RefNannyDeclarations
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
-+ /*--- Type init code ---*/
-+ __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
-+ __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, struct mpv_event_end_file *))__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init;
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-+ #if PY_VERSION_HEX < 0x030800B1
-+ __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_print = 0;
-+ #endif
-+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro == PyObject_GenericGetAttr)) {
-+ __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-+ }
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-+ __pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached;
-+ __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage = &__pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
-+ __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, struct mpv_event_log_message *))__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init;
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-+ #if PY_VERSION_HEX < 0x030800B1
-+ __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_print = 0;
-+ #endif
-+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro == PyObject_GenericGetAttr)) {
-+ __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-+ }
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-+ __pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = &__pyx_type_9vidcutter_4libs_3mpv_LogMessage;
-+ __pyx_vtabptr_9vidcutter_4libs_3mpv_Property = &__pyx_vtable_9vidcutter_4libs_3mpv_Property;
-+ __pyx_vtable_9vidcutter_4libs_3mpv_Property._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, struct mpv_event_property *))__pyx_f_9vidcutter_4libs_3mpv_8Property__init;
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-+ #if PY_VERSION_HEX < 0x030800B1
-+ __pyx_type_9vidcutter_4libs_3mpv_Property.tp_print = 0;
-+ #endif
-+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro == PyObject_GenericGetAttr)) {
-+ __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-+ }
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-+ __pyx_ptype_9vidcutter_4libs_3mpv_Property = &__pyx_type_9vidcutter_4libs_3mpv_Property;
-+ __pyx_vtabptr_9vidcutter_4libs_3mpv_Event = &__pyx_vtable_9vidcutter_4libs_3mpv_Event;
-+ __pyx_vtable_9vidcutter_4libs_3mpv_Event._data = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *))__pyx_f_9vidcutter_4libs_3mpv_5Event__data;
-+ __pyx_vtable_9vidcutter_4libs_3mpv_Event._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_5Event__init;
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-+ #if PY_VERSION_HEX < 0x030800B1
-+ __pyx_type_9vidcutter_4libs_3mpv_Event.tp_print = 0;
-+ #endif
-+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro == PyObject_GenericGetAttr)) {
-+ __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-+ }
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-+ __pyx_ptype_9vidcutter_4libs_3mpv_Event = &__pyx_type_9vidcutter_4libs_3mpv_Event;
-+ __pyx_vtabptr_9vidcutter_4libs_3mpv_Context = &__pyx_vtable_9vidcutter_4libs_3mpv_Context;
-+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_list = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list;
-+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_map = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map;
-+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_native_value = (struct mpv_node (*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value;
-+ __pyx_vtable_9vidcutter_4libs_3mpv_Context._free_native_value = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, struct mpv_node))__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value;
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-+ #if PY_VERSION_HEX < 0x030800B1
-+ __pyx_type_9vidcutter_4libs_3mpv_Context.tp_print = 0;
-+ #endif
-+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro == PyObject_GenericGetAttr)) {
-+ __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-+ }
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-+ __pyx_ptype_9vidcutter_4libs_3mpv_Context = &__pyx_type_9vidcutter_4libs_3mpv_Context;
-+ __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams = &__pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
-+ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_voidp = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, void *, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
-+ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_int = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, int))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int;
-+ __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_string = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, char *))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string;
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-+ #if PY_VERSION_HEX < 0x030800B1
-+ __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_print = 0;
-+ #endif
-+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro == PyObject_GenericGetAttr)) {
-+ __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-+ }
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-+ __pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = &__pyx_type_9vidcutter_4libs_3mpv__RenderParams;
-+ __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
-+ __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo._from_struct = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *, struct mpv_render_frame_info *))__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct;
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
-+ #if PY_VERSION_HEX < 0x030800B1
-+ __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_print = 0;
-+ #endif
-+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro == PyObject_GenericGetAttr)) {
-+ __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-+ }
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
-+ __pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo;
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
-+ #if PY_VERSION_HEX < 0x030800B1
-+ __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_print = 0;
-+ #endif
-+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro == PyObject_GenericGetAttr)) {
-+ __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-+ }
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
-+ __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = &__pyx_type_9vidcutter_4libs_3mpv_RenderContext;
-+ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_base = __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext;
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
-+ #if PY_VERSION_HEX < 0x030800B1
-+ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_print = 0;
-+ #endif
-+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro == PyObject_GenericGetAttr)) {
-+ __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
-+ }
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
-+ __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLRenderContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext;
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
-+ #if PY_VERSION_HEX < 0x030800B1
-+ __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_print = 0;
-+ #endif
-+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro == PyObject_GenericGetAttr)) {
-+ __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
-+ }
-+ __pyx_ptype_9vidcutter_4libs_3mpv___pyx_scope_struct___errors = &__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors;
-+ __Pyx_RefNannyFinishContext();
-+ return 0;
-+ __pyx_L1_error:;
-+ __Pyx_RefNannyFinishContext();
-+ return -1;
-+}
-+
-+static int __Pyx_modinit_type_import_code(void) {
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
-+ /*--- Type import code ---*/
-+ __Pyx_RefNannyFinishContext();
-+ return 0;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":88
-- * option_error = MPV_ERROR_OPTION_ERROR
-- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
-- * property_format = MPV_ERROR_PROPERTY_FORMAT # <<<<<<<<<<<<<<
-- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
-- * property_error = MPV_ERROR_PROPERTY_ERROR
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+static int __Pyx_modinit_variable_import_code(void) {
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
-+ /*--- Variable import code ---*/
-+ __Pyx_RefNannyFinishContext();
-+ return 0;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":89
-- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
-- * property_format = MPV_ERROR_PROPERTY_FORMAT
-- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE # <<<<<<<<<<<<<<
-- * property_error = MPV_ERROR_PROPERTY_ERROR
-- * command_error = MPV_ERROR_COMMAND
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+static int __Pyx_modinit_function_import_code(void) {
-+ __Pyx_RefNannyDeclarations
-+ __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
-+ /*--- Function import code ---*/
-+ __Pyx_RefNannyFinishContext();
-+ return 0;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":90
-- * property_format = MPV_ERROR_PROPERTY_FORMAT
-- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
-- * property_error = MPV_ERROR_PROPERTY_ERROR # <<<<<<<<<<<<<<
-- * command_error = MPV_ERROR_COMMAND
-- * loading_failed = MPV_ERROR_LOADING_FAILED
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":91
-- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
-- * property_error = MPV_ERROR_PROPERTY_ERROR
-- * command_error = MPV_ERROR_COMMAND # <<<<<<<<<<<<<<
-- * loading_failed = MPV_ERROR_LOADING_FAILED
-- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+#ifndef CYTHON_NO_PYINIT_EXPORT
-+#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
-+#elif PY_MAJOR_VERSION < 3
-+#ifdef __cplusplus
-+#define __Pyx_PyMODINIT_FUNC extern "C" void
-+#else
-+#define __Pyx_PyMODINIT_FUNC void
-+#endif
-+#else
-+#ifdef __cplusplus
-+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
-+#else
-+#define __Pyx_PyMODINIT_FUNC PyObject *
-+#endif
-+#endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":92
-- * property_error = MPV_ERROR_PROPERTY_ERROR
-- * command_error = MPV_ERROR_COMMAND
-- * loading_failed = MPV_ERROR_LOADING_FAILED # <<<<<<<<<<<<<<
-- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
-- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":93
-- * command_error = MPV_ERROR_COMMAND
-- * loading_failed = MPV_ERROR_LOADING_FAILED
-- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED # <<<<<<<<<<<<<<
-- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
-- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+#if PY_MAJOR_VERSION < 3
-+__Pyx_PyMODINIT_FUNC initmpv(void) CYTHON_SMALL_CODE; /*proto*/
-+__Pyx_PyMODINIT_FUNC initmpv(void)
-+#else
-+__Pyx_PyMODINIT_FUNC PyInit_mpv(void) CYTHON_SMALL_CODE; /*proto*/
-+__Pyx_PyMODINIT_FUNC PyInit_mpv(void)
-+#if CYTHON_PEP489_MULTI_PHASE_INIT
-+{
-+ return PyModuleDef_Init(&__pyx_moduledef);
-+}
-+static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
-+ #if PY_VERSION_HEX >= 0x030700A1
-+ static PY_INT64_T main_interpreter_id = -1;
-+ PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
-+ if (main_interpreter_id == -1) {
-+ main_interpreter_id = current_id;
-+ return (unlikely(current_id == -1)) ? -1 : 0;
-+ } else if (unlikely(main_interpreter_id != current_id))
-+ #else
-+ static PyInterpreterState *main_interpreter = NULL;
-+ PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
-+ if (!main_interpreter) {
-+ main_interpreter = current_interpreter;
-+ } else if (unlikely(main_interpreter != current_interpreter))
-+ #endif
-+ {
-+ PyErr_SetString(
-+ PyExc_ImportError,
-+ "Interpreter change detected - this module can only be loaded into one interpreter per process.");
-+ return -1;
-+ }
-+ return 0;
-+}
-+static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
-+ PyObject *value = PyObject_GetAttrString(spec, from_name);
-+ int result = 0;
-+ if (likely(value)) {
-+ if (allow_none || value != Py_None) {
-+ result = PyDict_SetItemString(moddict, to_name, value);
-+ }
-+ Py_DECREF(value);
-+ } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
-+ PyErr_Clear();
-+ } else {
-+ result = -1;
-+ }
-+ return result;
-+}
-+static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
-+ PyObject *module = NULL, *moddict, *modname;
-+ if (__Pyx_check_single_interpreter())
-+ return NULL;
-+ if (__pyx_m)
-+ return __Pyx_NewRef(__pyx_m);
-+ modname = PyObject_GetAttrString(spec, "name");
-+ if (unlikely(!modname)) goto bad;
-+ module = PyModule_NewObject(modname);
-+ Py_DECREF(modname);
-+ if (unlikely(!module)) goto bad;
-+ moddict = PyModule_GetDict(module);
-+ if (unlikely(!moddict)) goto bad;
-+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
-+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
-+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
-+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
-+ return module;
-+bad:
-+ Py_XDECREF(module);
-+ return NULL;
-+}
-
-- /* "vidcutter/libs/pympv/mpv.pyx":94
-- * loading_failed = MPV_ERROR_LOADING_FAILED
-- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
-- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED # <<<<<<<<<<<<<<
-- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
-- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":95
-- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
-- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
-- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY # <<<<<<<<<<<<<<
-- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
-- * unsupported = MPV_ERROR_UNSUPPORTED
-+static CYTHON_SMALL_CODE int __pyx_pymod_exec_mpv(PyObject *__pyx_pyinit_module)
-+#endif
-+#endif
-+{
-+ PyObject *__pyx_t_1 = NULL;
-+ PyObject *__pyx_t_2 = NULL;
-+ int __pyx_t_3;
-+ PyObject *__pyx_t_4 = NULL;
-+ int __pyx_t_5;
-+ PyObject *__pyx_t_6 = NULL;
-+ PyObject *__pyx_t_7 = NULL;
-+ int __pyx_lineno = 0;
-+ const char *__pyx_filename = NULL;
-+ int __pyx_clineno = 0;
-+ __Pyx_RefNannyDeclarations
-+ #if CYTHON_PEP489_MULTI_PHASE_INIT
-+ if (__pyx_m) {
-+ if (__pyx_m == __pyx_pyinit_module) return 0;
-+ PyErr_SetString(PyExc_RuntimeError, "Module 'mpv' has already been imported. Re-initialisation is not supported.");
-+ return -1;
-+ }
-+ #elif PY_MAJOR_VERSION >= 3
-+ if (__pyx_m) return __Pyx_NewRef(__pyx_m);
-+ #endif
-+ #if CYTHON_REFNANNY
-+__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
-+if (!__Pyx_RefNanny) {
-+ PyErr_Clear();
-+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
-+ if (!__Pyx_RefNanny)
-+ Py_FatalError("failed to import 'refnanny' module");
-+}
-+#endif
-+ __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_mpv(void)", 0);
-+ if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #ifdef __Pxy_PyFrame_Initialize_Offsets
-+ __Pxy_PyFrame_Initialize_Offsets();
-+ #endif
-+ __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #ifdef __Pyx_CyFunction_USED
-+ if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #endif
-+ #ifdef __Pyx_FusedFunction_USED
-+ if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #endif
-+ #ifdef __Pyx_Coroutine_USED
-+ if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #endif
-+ #ifdef __Pyx_Generator_USED
-+ if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #endif
-+ #ifdef __Pyx_AsyncGen_USED
-+ if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #endif
-+ #ifdef __Pyx_StopAsyncIteration_USED
-+ if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #endif
-+ /*--- Library function declarations ---*/
-+ /*--- Threads initialization code ---*/
-+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
-+ PyEval_InitThreads();
-+ #endif
-+ /*--- Module creation code ---*/
-+ #if CYTHON_PEP489_MULTI_PHASE_INIT
-+ __pyx_m = __pyx_pyinit_module;
-+ Py_INCREF(__pyx_m);
-+ #else
-+ #if PY_MAJOR_VERSION < 3
-+ __pyx_m = Py_InitModule4("mpv", __pyx_methods, __pyx_k_pympv_Python_wrapper_for_libmpv, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
-+ #else
-+ __pyx_m = PyModule_Create(&__pyx_moduledef);
-+ #endif
-+ if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #endif
-+ __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ Py_INCREF(__pyx_d);
-+ __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ Py_INCREF(__pyx_b);
-+ __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ Py_INCREF(__pyx_cython_runtime);
-+ if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
-+ /*--- Initialize various global constants etc. ---*/
-+ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
-+ if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #endif
-+ if (__pyx_module_is_main_vidcutter__libs__mpv) {
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ }
-+ #if PY_MAJOR_VERSION >= 3
-+ {
-+ PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ if (!PyDict_GetItemString(modules, "vidcutter.libs.mpv")) {
-+ if (unlikely(PyDict_SetItemString(modules, "vidcutter.libs.mpv", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ }
-+ }
-+ #endif
-+ /*--- Builtin init code ---*/
-+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ /*--- Constants init code ---*/
-+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ /*--- Global type/function init code ---*/
-+ (void)__Pyx_modinit_global_init_code();
-+ (void)__Pyx_modinit_variable_export_code();
-+ (void)__Pyx_modinit_function_export_code();
-+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ (void)__Pyx_modinit_type_import_code();
-+ (void)__Pyx_modinit_variable_import_code();
-+ (void)__Pyx_modinit_function_import_code();
-+ /*--- Execution code ---*/
-+ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
-+ if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ #endif
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":22
-+ *
-+ * import cython
-+ * import sys, warnings # <<<<<<<<<<<<<<
-+ * from threading import Thread, Semaphore
-+ * from libc.stdlib cimport malloc, free
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_warnings, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":96
-- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
-- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
-- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT # <<<<<<<<<<<<<<
-- * unsupported = MPV_ERROR_UNSUPPORTED
-- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
-+ /* "vidcutter/libs/pympv/mpv.pyx":23
-+ * import cython
-+ * import sys, warnings
-+ * from threading import Thread, Semaphore # <<<<<<<<<<<<<<
-+ * from libc.stdlib cimport malloc, free
-+ * from libc.string cimport strcpy, strlen, memset
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_INCREF(__pyx_n_s_Thread);
-+ __Pyx_GIVEREF(__pyx_n_s_Thread);
-+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Thread);
-+ __Pyx_INCREF(__pyx_n_s_Semaphore);
-+ __Pyx_GIVEREF(__pyx_n_s_Semaphore);
-+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Semaphore);
-+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_threading, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Thread, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Semaphore, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":97
-- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
-- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
-- * unsupported = MPV_ERROR_UNSUPPORTED # <<<<<<<<<<<<<<
-- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
-+ /* "vidcutter/libs/pympv/mpv.pyx":30
-+ * from client cimport *
-+ *
-+ * __version__ = "0.3.0" # <<<<<<<<<<<<<<
-+ * __author__ = "Andre D"
- *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_3_0) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":98
-- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
-- * unsupported = MPV_ERROR_UNSUPPORTED
-- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":31
- *
-+ * __version__ = "0.3.0"
-+ * __author__ = "Andre D" # <<<<<<<<<<<<<<
- *
-+ * _REQUIRED_CAPI_MAJOR = 2
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_s_Andre_D) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":72
-- * PyEval_InitThreads()
-+ /* "vidcutter/libs/pympv/mpv.pyx":33
-+ * __author__ = "Andre D"
- *
-- * class Errors: # <<<<<<<<<<<<<<
-- * """Set of known error codes from MpvError and Event responses.
-+ * _REQUIRED_CAPI_MAJOR = 2 # <<<<<<<<<<<<<<
-+ * _MIN_CAPI_MINOR = 0
- *
- */
-- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":101
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":34
- *
-- * class Events: # <<<<<<<<<<<<<<
-- * """Set of known values for Event ids.
-+ * _REQUIRED_CAPI_MAJOR = 2
-+ * _MIN_CAPI_MINOR = 0 # <<<<<<<<<<<<<<
- *
-+ * cdef unsigned long _CAPI_VERSION
- */
-- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":108
-- * You should handle the possibility that event ids may not be any of these values.
-- * """
-- * none = MPV_EVENT_NONE # <<<<<<<<<<<<<<
-- * shutdown = MPV_EVENT_SHUTDOWN
-- * log_message = MPV_EVENT_LOG_MESSAGE
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":109
-- * """
-- * none = MPV_EVENT_NONE
-- * shutdown = MPV_EVENT_SHUTDOWN # <<<<<<<<<<<<<<
-- * log_message = MPV_EVENT_LOG_MESSAGE
-- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 109, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":110
-- * none = MPV_EVENT_NONE
-- * shutdown = MPV_EVENT_SHUTDOWN
-- * log_message = MPV_EVENT_LOG_MESSAGE # <<<<<<<<<<<<<<
-- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
-- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":111
-- * shutdown = MPV_EVENT_SHUTDOWN
-- * log_message = MPV_EVENT_LOG_MESSAGE
-- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY # <<<<<<<<<<<<<<
-- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
-- * command_reply = MPV_EVENT_COMMAND_REPLY
-- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_0) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":112
-- * log_message = MPV_EVENT_LOG_MESSAGE
-- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
-- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY # <<<<<<<<<<<<<<
-- * command_reply = MPV_EVENT_COMMAND_REPLY
-- * start_file = MPV_EVENT_START_FILE
-+ /* "vidcutter/libs/pympv/mpv.pyx":37
-+ *
-+ * cdef unsigned long _CAPI_VERSION
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * _CAPI_VERSION = mpv_client_api_version()
-+ *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ {
-+ #ifdef WITH_THREAD
-+ PyThreadState *_save;
-+ Py_UNBLOCK_THREADS
-+ __Pyx_FastGIL_Remember();
-+ #endif
-+ /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":113
-- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
-- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
-- * command_reply = MPV_EVENT_COMMAND_REPLY # <<<<<<<<<<<<<<
-- * start_file = MPV_EVENT_START_FILE
-- * end_file = MPV_EVENT_END_FILE
-+ /* "vidcutter/libs/pympv/mpv.pyx":38
-+ * cdef unsigned long _CAPI_VERSION
-+ * with nogil:
-+ * _CAPI_VERSION = mpv_client_api_version() # <<<<<<<<<<<<<<
-+ *
-+ * _CAPI_MAJOR = _CAPI_VERSION >> 16
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION = mpv_client_api_version();
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":114
-- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
-- * command_reply = MPV_EVENT_COMMAND_REPLY
-- * start_file = MPV_EVENT_START_FILE # <<<<<<<<<<<<<<
-- * end_file = MPV_EVENT_END_FILE
-- * file_loaded = MPV_EVENT_FILE_LOADED
-+ /* "vidcutter/libs/pympv/mpv.pyx":37
-+ *
-+ * cdef unsigned long _CAPI_VERSION
-+ * with nogil: # <<<<<<<<<<<<<<
-+ * _CAPI_VERSION = mpv_client_api_version()
-+ *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ /*finally:*/ {
-+ /*normal exit:*/{
-+ #ifdef WITH_THREAD
-+ __Pyx_FastGIL_Forget();
-+ Py_BLOCK_THREADS
-+ #endif
-+ goto __pyx_L4;
-+ }
-+ __pyx_L4:;
-+ }
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":115
-- * command_reply = MPV_EVENT_COMMAND_REPLY
-- * start_file = MPV_EVENT_START_FILE
-- * end_file = MPV_EVENT_END_FILE # <<<<<<<<<<<<<<
-- * file_loaded = MPV_EVENT_FILE_LOADED
-- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
-+ /* "vidcutter/libs/pympv/mpv.pyx":40
-+ * _CAPI_VERSION = mpv_client_api_version()
-+ *
-+ * _CAPI_MAJOR = _CAPI_VERSION >> 16 # <<<<<<<<<<<<<<
-+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
-+ *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":116
-- * start_file = MPV_EVENT_START_FILE
-- * end_file = MPV_EVENT_END_FILE
-- * file_loaded = MPV_EVENT_FILE_LOADED # <<<<<<<<<<<<<<
-- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
-- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
-+ /* "vidcutter/libs/pympv/mpv.pyx":41
-+ *
-+ * _CAPI_MAJOR = _CAPI_VERSION >> 16
-+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF # <<<<<<<<<<<<<<
-+ *
-+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":117
-- * end_file = MPV_EVENT_END_FILE
-- * file_loaded = MPV_EVENT_FILE_LOADED
-- * tracks_changed = MPV_EVENT_TRACKS_CHANGED # <<<<<<<<<<<<<<
-- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
-- * idle = MPV_EVENT_IDLE
-+ /* "vidcutter/libs/pympv/mpv.pyx":43
-+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
-+ *
-+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
-+ * raise ImportError(
-+ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TRACKS_CHANGED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tracks_changed, __pyx_t_6) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (!__pyx_t_5) {
-+ } else {
-+ __pyx_t_3 = __pyx_t_5;
-+ goto __pyx_L6_bool_binop_done;
-+ }
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-+ __pyx_t_3 = __pyx_t_5;
-+ __pyx_L6_bool_binop_done:;
-+ if (unlikely(__pyx_t_3)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":118
-- * file_loaded = MPV_EVENT_FILE_LOADED
-- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
-- * tracks_switched = MPV_EVENT_TRACK_SWITCHED # <<<<<<<<<<<<<<
-- * idle = MPV_EVENT_IDLE
-- * pause = MPV_EVENT_PAUSE
-+ /* "vidcutter/libs/pympv/mpv.pyx":46
-+ * raise ImportError(
-+ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
-+ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR) # <<<<<<<<<<<<<<
-+ * )
-+ *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TRACK_SWITCHED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 118, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tracks_switched, __pyx_t_6) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_2);
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_GIVEREF(__pyx_t_2);
-+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
-+ __Pyx_GIVEREF(__pyx_t_1);
-+ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
-+ __Pyx_GIVEREF(__pyx_t_4);
-+ PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4);
-+ __Pyx_GIVEREF(__pyx_t_6);
-+ PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
-+ __pyx_t_2 = 0;
-+ __pyx_t_1 = 0;
-+ __pyx_t_4 = 0;
-+ __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":119
-- * tracks_changed = MPV_EVENT_TRACKS_CHANGED
-- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
-- * idle = MPV_EVENT_IDLE # <<<<<<<<<<<<<<
-- * pause = MPV_EVENT_PAUSE
-- * unpause = MPV_EVENT_UNPAUSE
-+ /* "vidcutter/libs/pympv/mpv.pyx":45
-+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
-+ * raise ImportError(
-+ * "libmpv version is incorrect. Required %d.%d got %d.%d." % # <<<<<<<<<<<<<<
-+ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
-+ * )
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":120
-- * tracks_switched = MPV_EVENT_TRACK_SWITCHED
-- * idle = MPV_EVENT_IDLE
-- * pause = MPV_EVENT_PAUSE # <<<<<<<<<<<<<<
-- * unpause = MPV_EVENT_UNPAUSE
-- * tick = MPV_EVENT_TICK
-+ /* "vidcutter/libs/pympv/mpv.pyx":44
-+ *
-+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
-+ * raise ImportError( # <<<<<<<<<<<<<<
-+ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
-+ * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PAUSE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_pause, __pyx_t_6) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_Raise(__pyx_t_7, 0, 0, 0);
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __PYX_ERR(0, 44, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":121
-- * idle = MPV_EVENT_IDLE
-- * pause = MPV_EVENT_PAUSE
-- * unpause = MPV_EVENT_UNPAUSE # <<<<<<<<<<<<<<
-- * tick = MPV_EVENT_TICK
-- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
-+ /* "vidcutter/libs/pympv/mpv.pyx":43
-+ * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
-+ *
-+ * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
-+ * raise ImportError(
-+ * "libmpv version is incorrect. Required %d.%d got %d.%d." %
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_UNPAUSE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 121, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unpause, __pyx_t_6) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":122
-- * pause = MPV_EVENT_PAUSE
-- * unpause = MPV_EVENT_UNPAUSE
-- * tick = MPV_EVENT_TICK # <<<<<<<<<<<<<<
-- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
-- * client_message = MPV_EVENT_CLIENT_MESSAGE
-+ /* "vidcutter/libs/pympv/mpv.pyx":52
-+ * void Py_Initialize()
-+ *
-+ * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
-+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
-+ * # mpv -> Python
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__18, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":123
-- * unpause = MPV_EVENT_UNPAUSE
-- * tick = MPV_EVENT_TICK
-- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH # <<<<<<<<<<<<<<
-- * client_message = MPV_EVENT_CLIENT_MESSAGE
-- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
-+ /* "vidcutter/libs/pympv/mpv.pyx":53
-+ *
-+ * _is_py3 = sys.version_info >= (3,)
-+ * _strdec_err = "surrogateescape" if _is_py3 else "strict" # <<<<<<<<<<<<<<
-+ * # mpv -> Python
-+ * def _strdec(s):
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SCRIPT_INPUT_DISPATCH); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 123, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_script_input_dispatch, __pyx_t_6) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 53, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (__pyx_t_3) {
-+ __Pyx_INCREF(__pyx_n_s_surrogateescape);
-+ __pyx_t_7 = __pyx_n_s_surrogateescape;
-+ } else {
-+ __Pyx_INCREF(__pyx_n_s_strict);
-+ __pyx_t_7 = __pyx_n_s_strict;
-+ }
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":124
-- * tick = MPV_EVENT_TICK
-- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
-- * client_message = MPV_EVENT_CLIENT_MESSAGE # <<<<<<<<<<<<<<
-- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
-- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
-+ /* "vidcutter/libs/pympv/mpv.pyx":55
-+ * _strdec_err = "surrogateescape" if _is_py3 else "strict"
-+ * # mpv -> Python
-+ * def _strdec(s): # <<<<<<<<<<<<<<
-+ * try:
-+ * return s.decode("utf-8", _strdec_err)
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":125
-- * script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
-- * client_message = MPV_EVENT_CLIENT_MESSAGE
-- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG # <<<<<<<<<<<<<<
-- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
-- * metadata_update = MPV_EVENT_METADATA_UPDATE
-+ /* "vidcutter/libs/pympv/mpv.pyx":63
-+ *
-+ * # Python -> mpv
-+ * def _strenc(s): # <<<<<<<<<<<<<<
-+ * try:
-+ * return s.encode("utf-8", _strdec_err)
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":126
-- * client_message = MPV_EVENT_CLIENT_MESSAGE
-- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
-- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG # <<<<<<<<<<<<<<
-- * metadata_update = MPV_EVENT_METADATA_UPDATE
-- * seek = MPV_EVENT_SEEK
-+ /* "vidcutter/libs/pympv/mpv.pyx":70
-+ * return s
-+ *
-+ * Py_Initialize() # <<<<<<<<<<<<<<
-+ *
-+ * class Errors:
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ Py_Initialize();
-
-- /* "vidcutter/libs/pympv/mpv.pyx":127
-- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
-- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
-- * metadata_update = MPV_EVENT_METADATA_UPDATE # <<<<<<<<<<<<<<
-- * seek = MPV_EVENT_SEEK
-- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
-+ /* "vidcutter/libs/pympv/mpv.pyx":72
-+ * Py_Initialize()
-+ *
-+ * class Errors: # <<<<<<<<<<<<<<
-+ * """Set of known error codes from MpvError and Event responses.
-+ *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_METADATA_UPDATE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 127, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_metadata_update, __pyx_t_6) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 72, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":128
-- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
-- * metadata_update = MPV_EVENT_METADATA_UPDATE
-- * seek = MPV_EVENT_SEEK # <<<<<<<<<<<<<<
-- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
-- * property_change = MPV_EVENT_PROPERTY_CHANGE
-+ /* "vidcutter/libs/pympv/mpv.pyx":79
-+ * You should handle the possibility that error codes may not be any of these values.
-+ * """
-+ * success = MPV_ERROR_SUCCESS # <<<<<<<<<<<<<<
-+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
-+ * nomem = MPV_ERROR_NOMEM
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":129
-- * metadata_update = MPV_EVENT_METADATA_UPDATE
-- * seek = MPV_EVENT_SEEK
-- * playback_restart = MPV_EVENT_PLAYBACK_RESTART # <<<<<<<<<<<<<<
-- * property_change = MPV_EVENT_PROPERTY_CHANGE
-- * chapter_change = MPV_EVENT_CHAPTER_CHANGE
-+ /* "vidcutter/libs/pympv/mpv.pyx":80
-+ * """
-+ * success = MPV_ERROR_SUCCESS
-+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL # <<<<<<<<<<<<<<
-+ * nomem = MPV_ERROR_NOMEM
-+ * uninitialized = MPV_ERROR_UNINITIALIZED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":130
-- * seek = MPV_EVENT_SEEK
-- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
-- * property_change = MPV_EVENT_PROPERTY_CHANGE # <<<<<<<<<<<<<<
-- * chapter_change = MPV_EVENT_CHAPTER_CHANGE
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":81
-+ * success = MPV_ERROR_SUCCESS
-+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
-+ * nomem = MPV_ERROR_NOMEM # <<<<<<<<<<<<<<
-+ * uninitialized = MPV_ERROR_UNINITIALIZED
-+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":131
-- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
-- * property_change = MPV_EVENT_PROPERTY_CHANGE
-- * chapter_change = MPV_EVENT_CHAPTER_CHANGE # <<<<<<<<<<<<<<
-- *
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":82
-+ * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
-+ * nomem = MPV_ERROR_NOMEM
-+ * uninitialized = MPV_ERROR_UNINITIALIZED # <<<<<<<<<<<<<<
-+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
-+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CHAPTER_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_chapter_change, __pyx_t_6) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":101
-- *
-- *
-- * class Events: # <<<<<<<<<<<<<<
-- * """Set of known values for Event ids.
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":83
-+ * nomem = MPV_ERROR_NOMEM
-+ * uninitialized = MPV_ERROR_UNINITIALIZED
-+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER # <<<<<<<<<<<<<<
-+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
-+ * option_format = MPV_ERROR_OPTION_FORMAT
- */
-- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":134
-- *
-- *
-- * class LogLevels: # <<<<<<<<<<<<<<
-- * no = MPV_LOG_LEVEL_NONE
-- * fatal = MPV_LOG_LEVEL_FATAL
-+ /* "vidcutter/libs/pympv/mpv.pyx":84
-+ * uninitialized = MPV_ERROR_UNINITIALIZED
-+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
-+ * not_found = MPV_ERROR_OPTION_NOT_FOUND # <<<<<<<<<<<<<<
-+ * option_format = MPV_ERROR_OPTION_FORMAT
-+ * option_error = MPV_ERROR_OPTION_ERROR
- */
-- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":135
-- *
-- * class LogLevels:
-- * no = MPV_LOG_LEVEL_NONE # <<<<<<<<<<<<<<
-- * fatal = MPV_LOG_LEVEL_FATAL
-- * error = MPV_LOG_LEVEL_ERROR
-+ /* "vidcutter/libs/pympv/mpv.pyx":85
-+ * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
-+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
-+ * option_format = MPV_ERROR_OPTION_FORMAT # <<<<<<<<<<<<<<
-+ * option_error = MPV_ERROR_OPTION_ERROR
-+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":136
-- * class LogLevels:
-- * no = MPV_LOG_LEVEL_NONE
-- * fatal = MPV_LOG_LEVEL_FATAL # <<<<<<<<<<<<<<
-- * error = MPV_LOG_LEVEL_ERROR
-- * warn = MPV_LOG_LEVEL_WARN
-+ /* "vidcutter/libs/pympv/mpv.pyx":86
-+ * not_found = MPV_ERROR_OPTION_NOT_FOUND
-+ * option_format = MPV_ERROR_OPTION_FORMAT
-+ * option_error = MPV_ERROR_OPTION_ERROR # <<<<<<<<<<<<<<
-+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
-+ * property_format = MPV_ERROR_PROPERTY_FORMAT
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":137
-- * no = MPV_LOG_LEVEL_NONE
-- * fatal = MPV_LOG_LEVEL_FATAL
-- * error = MPV_LOG_LEVEL_ERROR # <<<<<<<<<<<<<<
-- * warn = MPV_LOG_LEVEL_WARN
-- * info = MPV_LOG_LEVEL_INFO
-+ /* "vidcutter/libs/pympv/mpv.pyx":87
-+ * option_format = MPV_ERROR_OPTION_FORMAT
-+ * option_error = MPV_ERROR_OPTION_ERROR
-+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND # <<<<<<<<<<<<<<
-+ * property_format = MPV_ERROR_PROPERTY_FORMAT
-+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":138
-- * fatal = MPV_LOG_LEVEL_FATAL
-- * error = MPV_LOG_LEVEL_ERROR
-- * warn = MPV_LOG_LEVEL_WARN # <<<<<<<<<<<<<<
-- * info = MPV_LOG_LEVEL_INFO
-- * v = MPV_LOG_LEVEL_V
-+ /* "vidcutter/libs/pympv/mpv.pyx":88
-+ * option_error = MPV_ERROR_OPTION_ERROR
-+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
-+ * property_format = MPV_ERROR_PROPERTY_FORMAT # <<<<<<<<<<<<<<
-+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
-+ * property_error = MPV_ERROR_PROPERTY_ERROR
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":139
-- * error = MPV_LOG_LEVEL_ERROR
-- * warn = MPV_LOG_LEVEL_WARN
-- * info = MPV_LOG_LEVEL_INFO # <<<<<<<<<<<<<<
-- * v = MPV_LOG_LEVEL_V
-- * debug = MPV_LOG_LEVEL_DEBUG
-+ /* "vidcutter/libs/pympv/mpv.pyx":89
-+ * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
-+ * property_format = MPV_ERROR_PROPERTY_FORMAT
-+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE # <<<<<<<<<<<<<<
-+ * property_error = MPV_ERROR_PROPERTY_ERROR
-+ * command_error = MPV_ERROR_COMMAND
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":140
-- * warn = MPV_LOG_LEVEL_WARN
-- * info = MPV_LOG_LEVEL_INFO
-- * v = MPV_LOG_LEVEL_V # <<<<<<<<<<<<<<
-- * debug = MPV_LOG_LEVEL_DEBUG
-- * trace = MPV_LOG_LEVEL_TRACE
-+ /* "vidcutter/libs/pympv/mpv.pyx":90
-+ * property_format = MPV_ERROR_PROPERTY_FORMAT
-+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
-+ * property_error = MPV_ERROR_PROPERTY_ERROR # <<<<<<<<<<<<<<
-+ * command_error = MPV_ERROR_COMMAND
-+ * loading_failed = MPV_ERROR_LOADING_FAILED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":141
-- * info = MPV_LOG_LEVEL_INFO
-- * v = MPV_LOG_LEVEL_V
-- * debug = MPV_LOG_LEVEL_DEBUG # <<<<<<<<<<<<<<
-- * trace = MPV_LOG_LEVEL_TRACE
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":91
-+ * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
-+ * property_error = MPV_ERROR_PROPERTY_ERROR
-+ * command_error = MPV_ERROR_COMMAND # <<<<<<<<<<<<<<
-+ * loading_failed = MPV_ERROR_LOADING_FAILED
-+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":142
-- * v = MPV_LOG_LEVEL_V
-- * debug = MPV_LOG_LEVEL_DEBUG
-- * trace = MPV_LOG_LEVEL_TRACE # <<<<<<<<<<<<<<
-- *
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":92
-+ * property_error = MPV_ERROR_PROPERTY_ERROR
-+ * command_error = MPV_ERROR_COMMAND
-+ * loading_failed = MPV_ERROR_LOADING_FAILED # <<<<<<<<<<<<<<
-+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
-+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":134
-- *
-- *
-- * class LogLevels: # <<<<<<<<<<<<<<
-- * no = MPV_LOG_LEVEL_NONE
-- * fatal = MPV_LOG_LEVEL_FATAL
-+ /* "vidcutter/libs/pympv/mpv.pyx":93
-+ * command_error = MPV_ERROR_COMMAND
-+ * loading_failed = MPV_ERROR_LOADING_FAILED
-+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED # <<<<<<<<<<<<<<
-+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
-+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
- */
-- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":145
-- *
-- *
-- * class EOFReasons: # <<<<<<<<<<<<<<
-- * """Known possible values for EndOfFileReached reason.
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":94
-+ * loading_failed = MPV_ERROR_LOADING_FAILED
-+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
-+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED # <<<<<<<<<<<<<<
-+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
-+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
- */
-- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":150
-- * You should handle the possibility that the reason may not be any of these values.
-- * """
-- * eof = MPV_END_FILE_REASON_EOF # <<<<<<<<<<<<<<
-- * aborted = MPV_END_FILE_REASON_STOP
-- * quit = MPV_END_FILE_REASON_QUIT
-+ /* "vidcutter/libs/pympv/mpv.pyx":95
-+ * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
-+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
-+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY # <<<<<<<<<<<<<<
-+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
-+ * unsupported = MPV_ERROR_UNSUPPORTED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":151
-- * """
-- * eof = MPV_END_FILE_REASON_EOF
-- * aborted = MPV_END_FILE_REASON_STOP # <<<<<<<<<<<<<<
-- * quit = MPV_END_FILE_REASON_QUIT
-- * error = MPV_END_FILE_REASON_ERROR
-+ /* "vidcutter/libs/pympv/mpv.pyx":96
-+ * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
-+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
-+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT # <<<<<<<<<<<<<<
-+ * unsupported = MPV_ERROR_UNSUPPORTED
-+ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":152
-- * eof = MPV_END_FILE_REASON_EOF
-- * aborted = MPV_END_FILE_REASON_STOP
-- * quit = MPV_END_FILE_REASON_QUIT # <<<<<<<<<<<<<<
-- * error = MPV_END_FILE_REASON_ERROR
-+ /* "vidcutter/libs/pympv/mpv.pyx":97
-+ * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
-+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
-+ * unsupported = MPV_ERROR_UNSUPPORTED # <<<<<<<<<<<<<<
-+ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
- *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":153
-- * aborted = MPV_END_FILE_REASON_STOP
-- * quit = MPV_END_FILE_REASON_QUIT
-- * error = MPV_END_FILE_REASON_ERROR # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":98
-+ * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
-+ * unsupported = MPV_ERROR_UNSUPPORTED
-+ * not_implemented = MPV_ERROR_NOT_IMPLEMENTED # <<<<<<<<<<<<<<
- *
- *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":145
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":72
-+ * Py_Initialize()
- *
-- * class EOFReasons: # <<<<<<<<<<<<<<
-- * """Known possible values for EndOfFileReached reason.
-+ * class Errors: # <<<<<<<<<<<<<<
-+ * """Set of known error codes from MpvError and Event responses.
- *
- */
-- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":318
-- *
-- *
-- * def _errors(fn): # <<<<<<<<<<<<<<
-- * def wrapped(*k, **kw):
-- * v = fn(*k, **kw)
-- */
-- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
--
-- /* "vidcutter/libs/pympv/mpv.pyx":326
-+ /* "vidcutter/libs/pympv/mpv.pyx":101
- *
- *
-- * class MPVError(Exception): # <<<<<<<<<<<<<<
-- * code = None
-+ * class Events: # <<<<<<<<<<<<<<
-+ * """Set of known values for Event ids.
- *
- */
-- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-- __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-- PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":327
-- *
-- * class MPVError(Exception):
-- * code = None # <<<<<<<<<<<<<<
-- *
-- * def __init__(self, e):
-- */
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":329
-- * code = None
-- *
-- * def __init__(self, e): # <<<<<<<<<<<<<<
-- * self.code = e
-- * cdef const char* err_c
-+ /* "vidcutter/libs/pympv/mpv.pyx":108
-+ * You should handle the possibility that event ids may not be any of these values.
-+ * """
-+ * none = MPV_EVENT_NONE # <<<<<<<<<<<<<<
-+ * shutdown = MPV_EVENT_SHUTDOWN
-+ * log_message = MPV_EVENT_LOG_MESSAGE
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":326
-- *
-- *
-- * class MPVError(Exception): # <<<<<<<<<<<<<<
-- * code = None
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":109
-+ * """
-+ * none = MPV_EVENT_NONE
-+ * shutdown = MPV_EVENT_SHUTDOWN # <<<<<<<<<<<<<<
-+ * log_message = MPV_EVENT_LOG_MESSAGE
-+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
- */
-- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 109, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":340
-- * Exception.__init__(self, e)
-- *
-- * class PyMPVError(Exception): # <<<<<<<<<<<<<<
-- * pass
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":110
-+ * none = MPV_EVENT_NONE
-+ * shutdown = MPV_EVENT_SHUTDOWN
-+ * log_message = MPV_EVENT_LOG_MESSAGE # <<<<<<<<<<<<<<
-+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
-+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
- */
-- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-- __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-- PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 340, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":343
-- * pass
-- *
-- * cdef _callbacks = dict() # <<<<<<<<<<<<<<
-- * cdef _reply_userdatas = dict()
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":111
-+ * shutdown = MPV_EVENT_SHUTDOWN
-+ * log_message = MPV_EVENT_LOG_MESSAGE
-+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY # <<<<<<<<<<<<<<
-+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
-+ * command_reply = MPV_EVENT_COMMAND_REPLY
- */
-- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__callbacks);
-- __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_t_7);
-- __Pyx_GIVEREF(__pyx_t_7);
-- __pyx_t_7 = 0;
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":344
-- *
-- * cdef _callbacks = dict()
-- * cdef _reply_userdatas = dict() # <<<<<<<<<<<<<<
-- *
-- * class _ReplyUserData(object):
-+ /* "vidcutter/libs/pympv/mpv.pyx":112
-+ * log_message = MPV_EVENT_LOG_MESSAGE
-+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
-+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY # <<<<<<<<<<<<<<
-+ * command_reply = MPV_EVENT_COMMAND_REPLY
-+ * start_file = MPV_EVENT_START_FILE
- */
-- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas);
-- __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_t_7);
-- __Pyx_GIVEREF(__pyx_t_7);
-- __pyx_t_7 = 0;
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":346
-- * cdef _reply_userdatas = dict()
-- *
-- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
-- * def __init__(self, data):
-- * self.counter = 0
-+ /* "vidcutter/libs/pympv/mpv.pyx":113
-+ * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
-+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
-+ * command_reply = MPV_EVENT_COMMAND_REPLY # <<<<<<<<<<<<<<
-+ * start_file = MPV_EVENT_START_FILE
-+ * end_file = MPV_EVENT_END_FILE
- */
-- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__30); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__30, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":347
-- *
-- * class _ReplyUserData(object):
-- * def __init__(self, data): # <<<<<<<<<<<<<<
-- * self.counter = 0
-- * self.data = data
-+ /* "vidcutter/libs/pympv/mpv.pyx":114
-+ * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
-+ * command_reply = MPV_EVENT_COMMAND_REPLY
-+ * start_file = MPV_EVENT_START_FILE # <<<<<<<<<<<<<<
-+ * end_file = MPV_EVENT_END_FILE
-+ * file_loaded = MPV_EVENT_FILE_LOADED
- */
-- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":352
-- * self.observed = False
-- *
-- * def add(self): # <<<<<<<<<<<<<<
-- * self.counter += 1
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":115
-+ * command_reply = MPV_EVENT_COMMAND_REPLY
-+ * start_file = MPV_EVENT_START_FILE
-+ * end_file = MPV_EVENT_END_FILE # <<<<<<<<<<<<<<
-+ * file_loaded = MPV_EVENT_FILE_LOADED
-+ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
- */
-- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":355
-- * self.counter += 1
-- *
-- * def remove(self): # <<<<<<<<<<<<<<
-- * self.counter -= 1
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":116
-+ * start_file = MPV_EVENT_START_FILE
-+ * end_file = MPV_EVENT_END_FILE
-+ * file_loaded = MPV_EVENT_FILE_LOADED # <<<<<<<<<<<<<<
-+ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
-+ * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
- */
-- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":346
-- * cdef _reply_userdatas = dict()
-- *
-- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
-- * def __init__(self, data):
-- * self.counter = 0
-+ /* "vidcutter/libs/pympv/mpv.pyx":119
-+ * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
-+ * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
-+ * idle = MPV_EVENT_IDLE # <<<<<<<<<<<<<<
-+ * # pause = MPV_EVENT_PAUSE
-+ * # unpause = MPV_EVENT_UNPAUSE
- */
-- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__30, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":411
-- * mpv_resume(self._ctx)
-- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def request_event(self, event, enable):
-- * """Enable or disable a given event.
-+ /* "vidcutter/libs/pympv/mpv.pyx":122
-+ * # pause = MPV_EVENT_PAUSE
-+ * # unpause = MPV_EVENT_UNPAUSE
-+ * tick = MPV_EVENT_TICK # <<<<<<<<<<<<<<
-+ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
-+ * client_message = MPV_EVENT_CLIENT_MESSAGE
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":412
-- *
-- * @_errors
-- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
-- * """Enable or disable a given event.
-- *
-+ /* "vidcutter/libs/pympv/mpv.pyx":124
-+ * tick = MPV_EVENT_TICK
-+ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
-+ * client_message = MPV_EVENT_CLIENT_MESSAGE # <<<<<<<<<<<<<<
-+ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
-+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":429
-- * return err
-- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def set_log_level(self, loglevel):
-- * """Wraps: mpv_request_log_messages"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":125
-+ * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
-+ * client_message = MPV_EVENT_CLIENT_MESSAGE
-+ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG # <<<<<<<<<<<<<<
-+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
-+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":430
-- *
-- * @_errors
-- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_request_log_messages"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":126
-+ * client_message = MPV_EVENT_CLIENT_MESSAGE
-+ * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
-+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG # <<<<<<<<<<<<<<
-+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
-+ * seek = MPV_EVENT_SEEK
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":440
-- * return err
-- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def load_config(self, filename):
-- * """Wraps: mpv_load_config_file"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":128
-+ * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
-+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
-+ * seek = MPV_EVENT_SEEK # <<<<<<<<<<<<<<
-+ * playback_restart = MPV_EVENT_PLAYBACK_RESTART
-+ * property_change = MPV_EVENT_PROPERTY_CHANGE
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":441
-- *
-- * @_errors
-- * def load_config(self, filename): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_load_config_file"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":129
-+ * # metadata_update = MPV_EVENT_METADATA_UPDATE
-+ * seek = MPV_EVENT_SEEK
-+ * playback_restart = MPV_EVENT_PLAYBACK_RESTART # <<<<<<<<<<<<<<
-+ * property_change = MPV_EVENT_PROPERTY_CHANGE
-+ * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":573
-- * return result
-+ /* "vidcutter/libs/pympv/mpv.pyx":130
-+ * seek = MPV_EVENT_SEEK
-+ * playback_restart = MPV_EVENT_PLAYBACK_RESTART
-+ * property_change = MPV_EVENT_PROPERTY_CHANGE # <<<<<<<<<<<<<<
-+ * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def get_property_async(self, prop, data=None):
-- * """Gets the value of a property asynchronously.
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":574
-+ /* "vidcutter/libs/pympv/mpv.pyx":101
- *
-- * @_errors
-- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
-- * """Gets the value of a property asynchronously.
-+ *
-+ * class Events: # <<<<<<<<<<<<<<
-+ * """Set of known values for Event ids.
- *
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":635
-- * return v
-+ /* "vidcutter/libs/pympv/mpv.pyx":134
- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def set_property(self, prop, value=True, asynchronous=False, data=None):
-- * """Wraps: mpv_set_property and mpv_set_property_async"""
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":636
- *
-- * @_errors
-- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_set_property and mpv_set_property_async"""
-- * assert self._ctx
-+ * class LogLevels: # <<<<<<<<<<<<<<
-+ * no = MPV_LOG_LEVEL_NONE
-+ * fatal = MPV_LOG_LEVEL_FATAL
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":673
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":135
- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def set_option(self, prop, value=True):
-- * """Wraps: mpv_set_option"""
-+ * class LogLevels:
-+ * no = MPV_LOG_LEVEL_NONE # <<<<<<<<<<<<<<
-+ * fatal = MPV_LOG_LEVEL_FATAL
-+ * error = MPV_LOG_LEVEL_ERROR
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":674
-- *
-- * @_errors
-- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_set_option"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":136
-+ * class LogLevels:
-+ * no = MPV_LOG_LEVEL_NONE
-+ * fatal = MPV_LOG_LEVEL_FATAL # <<<<<<<<<<<<<<
-+ * error = MPV_LOG_LEVEL_ERROR
-+ * warn = MPV_LOG_LEVEL_WARN
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 674, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":695
-- * return err
-- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def initialize(self):
-- * """Wraps: mpv_initialize"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":137
-+ * no = MPV_LOG_LEVEL_NONE
-+ * fatal = MPV_LOG_LEVEL_FATAL
-+ * error = MPV_LOG_LEVEL_ERROR # <<<<<<<<<<<<<<
-+ * warn = MPV_LOG_LEVEL_WARN
-+ * info = MPV_LOG_LEVEL_INFO
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":696
-- *
-- * @_errors
-- * def initialize(self): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_initialize"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":138
-+ * fatal = MPV_LOG_LEVEL_FATAL
-+ * error = MPV_LOG_LEVEL_ERROR
-+ * warn = MPV_LOG_LEVEL_WARN # <<<<<<<<<<<<<<
-+ * info = MPV_LOG_LEVEL_INFO
-+ * v = MPV_LOG_LEVEL_V
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":748
-- * self.callbackthread.start()
-- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def observe_property(self, prop, data=None):
-- * """Wraps: mpv_observe_property"""
-+ /* "vidcutter/libs/pympv/mpv.pyx":139
-+ * error = MPV_LOG_LEVEL_ERROR
-+ * warn = MPV_LOG_LEVEL_WARN
-+ * info = MPV_LOG_LEVEL_INFO # <<<<<<<<<<<<<<
-+ * v = MPV_LOG_LEVEL_V
-+ * debug = MPV_LOG_LEVEL_DEBUG
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":749
-- *
-- * @_errors
-- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_observe_property"""
-- * assert self._ctx
-+ /* "vidcutter/libs/pympv/mpv.pyx":140
-+ * warn = MPV_LOG_LEVEL_WARN
-+ * info = MPV_LOG_LEVEL_INFO
-+ * v = MPV_LOG_LEVEL_V # <<<<<<<<<<<<<<
-+ * debug = MPV_LOG_LEVEL_DEBUG
-+ * trace = MPV_LOG_LEVEL_TRACE
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":770
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":141
-+ * info = MPV_LOG_LEVEL_INFO
-+ * v = MPV_LOG_LEVEL_V
-+ * debug = MPV_LOG_LEVEL_DEBUG # <<<<<<<<<<<<<<
-+ * trace = MPV_LOG_LEVEL_TRACE
- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def unobserve_property(self, data):
-- * """Wraps: mpv_unobserve_property"""
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":771
-+ /* "vidcutter/libs/pympv/mpv.pyx":142
-+ * v = MPV_LOG_LEVEL_V
-+ * debug = MPV_LOG_LEVEL_DEBUG
-+ * trace = MPV_LOG_LEVEL_TRACE # <<<<<<<<<<<<<<
-+ *
- *
-- * @_errors
-- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
-- * """Wraps: mpv_unobserve_property"""
-- * assert self._ctx
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":938
-+ /* "vidcutter/libs/pympv/mpv.pyx":134
- *
-- * cdef class RenderContext(object):
-- * API_OPENGL = "opengl" # <<<<<<<<<<<<<<
-- * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME
- *
-+ * class LogLevels: # <<<<<<<<<<<<<<
-+ * no = MPV_LOG_LEVEL_NONE
-+ * fatal = MPV_LOG_LEVEL_FATAL
- */
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-+ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":939
-- * cdef class RenderContext(object):
-- * API_OPENGL = "opengl"
-- * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":145
-+ *
-+ *
-+ * class EOFReasons: # <<<<<<<<<<<<<<
-+ * """Known possible values for EndOfFileReached reason.
- *
-- * cdef:
- */
-- __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 939, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1009
-- * self.inited = True
-- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def set_icc_profile(self, icc_blob):
-- * cdef:
-+ /* "vidcutter/libs/pympv/mpv.pyx":150
-+ * You should handle the possibility that the reason may not be any of these values.
-+ * """
-+ * eof = MPV_END_FILE_REASON_EOF # <<<<<<<<<<<<<<
-+ * aborted = MPV_END_FILE_REASON_STOP
-+ * quit = MPV_END_FILE_REASON_QUIT
-+ */
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":151
-+ * """
-+ * eof = MPV_END_FILE_REASON_EOF
-+ * aborted = MPV_END_FILE_REASON_STOP # <<<<<<<<<<<<<<
-+ * quit = MPV_END_FILE_REASON_QUIT
-+ * error = MPV_END_FILE_REASON_ERROR
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1009, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1010
-+ /* "vidcutter/libs/pympv/mpv.pyx":152
-+ * eof = MPV_END_FILE_REASON_EOF
-+ * aborted = MPV_END_FILE_REASON_STOP
-+ * quit = MPV_END_FILE_REASON_QUIT # <<<<<<<<<<<<<<
-+ * error = MPV_END_FILE_REASON_ERROR
- *
-- * @_errors
-- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
-- * cdef:
-- * mpv_render_param param
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1009, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1028
-- * return err
-+ /* "vidcutter/libs/pympv/mpv.pyx":153
-+ * aborted = MPV_END_FILE_REASON_STOP
-+ * quit = MPV_END_FILE_REASON_QUIT
-+ * error = MPV_END_FILE_REASON_ERROR # <<<<<<<<<<<<<<
-+ *
- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def set_ambient_light(self, lux):
-- * cdef:
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1029
-+ /* "vidcutter/libs/pympv/mpv.pyx":145
-+ *
-+ *
-+ * class EOFReasons: # <<<<<<<<<<<<<<
-+ * """Known possible values for EndOfFileReached reason.
- *
-- * @_errors
-- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
-- * cdef:
-- * mpv_render_param param
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1068
-- * return ret
-+ /* "vidcutter/libs/pympv/mpv.pyx":318
- *
-- * @_errors # <<<<<<<<<<<<<<
-- * def render(self,
-- * opengl_fbo=None,
-- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
--
-- /* "vidcutter/libs/pympv/mpv.pyx":1069
- *
-- * @_errors
-- * def render(self, # <<<<<<<<<<<<<<
-- * opengl_fbo=None,
-- * flip_y=False,
-+ * def _errors(fn): # <<<<<<<<<<<<<<
-+ * def wrapped(*k, **kw):
-+ * v = fn(*k, **kw)
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = NULL;
-- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-- __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-- if (likely(__pyx_t_1)) {
-- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-- __Pyx_INCREF(__pyx_t_1);
-- __Pyx_INCREF(function);
-- __Pyx_DECREF_SET(__pyx_t_6, function);
-- }
-- }
-- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error)
-+ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1132
-- * init_params, *args, **kwargs)
-+ /* "vidcutter/libs/pympv/mpv.pyx":326
-+ *
-+ *
-+ * class MPVError(Exception): # <<<<<<<<<<<<<<
-+ * code = None
- *
-- * class CallbackThread(Thread): # <<<<<<<<<<<<<<
-- * def __init__(self):
-- * Thread.__init__(self)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-+ __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-+ PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-+ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- __Pyx_GIVEREF(__pyx_t_7);
-- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
-- __pyx_t_7 = 0;
-- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1133
-+ /* "vidcutter/libs/pympv/mpv.pyx":327
- *
-- * class CallbackThread(Thread):
-- * def __init__(self): # <<<<<<<<<<<<<<
-- * Thread.__init__(self)
-- * self.daemon = True
-+ * class MPVError(Exception):
-+ * code = None # <<<<<<<<<<<<<<
-+ *
-+ * def __init__(self, e):
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1133, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1141
-- * self.isshutdown = False
-+ /* "vidcutter/libs/pympv/mpv.pyx":329
-+ * code = None
- *
-- * def shutdown(self): # <<<<<<<<<<<<<<
-- * self.isshutdown = True
-- * self.callback = None
-+ * def __init__(self, e): # <<<<<<<<<<<<<<
-+ * self.code = e
-+ * cdef const char* err_c
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1146
-- * self.lock.release()
-+ /* "vidcutter/libs/pympv/mpv.pyx":326
- *
-- * def call(self): # <<<<<<<<<<<<<<
-- * self.lock.release()
-+ *
-+ * class MPVError(Exception): # <<<<<<<<<<<<<<
-+ * code = None
- *
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1146, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1149
-- * self.lock.release()
-+ /* "vidcutter/libs/pympv/mpv.pyx":340
-+ * Exception.__init__(self, e)
- *
-- * def set(self, callback): # <<<<<<<<<<<<<<
-- * self.callback = callback
-+ * class PyMPVError(Exception): # <<<<<<<<<<<<<<
-+ * pass
- *
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
-+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-+ __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-+ PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-+ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 340, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1152
-- * self.callback = callback
-+ /* "vidcutter/libs/pympv/mpv.pyx":343
-+ * pass
- *
-- * def run(self): # <<<<<<<<<<<<<<
-- * while not self.isshutdown:
-- * self.lock.acquire(True)
-+ * cdef _callbacks = dict() # <<<<<<<<<<<<<<
-+ * cdef _reply_userdatas = dict()
-+ *
-+ */
-+ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__callbacks);
-+ __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_t_7);
-+ __Pyx_GIVEREF(__pyx_t_7);
-+ __pyx_t_7 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":344
-+ *
-+ * cdef _callbacks = dict()
-+ * cdef _reply_userdatas = dict() # <<<<<<<<<<<<<<
-+ *
-+ * class _ReplyUserData(object):
-+ */
-+ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas);
-+ __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_t_7);
-+ __Pyx_GIVEREF(__pyx_t_7);
-+ __pyx_t_7 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":346
-+ * cdef _reply_userdatas = dict()
-+ *
-+ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
-+ * def __init__(self, data):
-+ * self.counter = 0
-+ */
-+ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__27); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__27, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":347
-+ *
-+ * class _ReplyUserData(object):
-+ * def __init__(self, data): # <<<<<<<<<<<<<<
-+ * self.counter = 0
-+ * self.data = data
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1157
-- * self.mpv_callback(self.callback) if self.callback else None
-+ /* "vidcutter/libs/pympv/mpv.pyx":352
-+ * self.observed = False
-+ *
-+ * def add(self): # <<<<<<<<<<<<<<
-+ * self.counter += 1
- *
-- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
-- * try:
-- * callback()
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1157, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1132
-- * init_params, *args, **kwargs)
-+ /* "vidcutter/libs/pympv/mpv.pyx":355
-+ * self.counter += 1
-+ *
-+ * def remove(self): # <<<<<<<<<<<<<<
-+ * self.counter -= 1
- *
-- * class CallbackThread(Thread): # <<<<<<<<<<<<<<
-- * def __init__(self):
-- * Thread.__init__(self)
- */
-- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1132, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "(tree fragment)":1
-- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-+ /* "vidcutter/libs/pympv/mpv.pyx":346
-+ * cdef _reply_userdatas = dict()
-+ *
-+ * class _ReplyUserData(object): # <<<<<<<<<<<<<<
-+ * def __init__(self, data):
-+ * self.counter = 0
- */
-- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__27, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "(tree fragment)":11
-- * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-- * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-+ /* "vidcutter/libs/pympv/mpv.pyx":411
-+ * # mpv_resume(self._ctx)
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def request_event(self, event, enable):
-+ * """Enable or disable a given event.
- */
-- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_InputDispatch, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_InputDispatch, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "(tree fragment)":1
-- * def __pyx_unpickle_LogMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-+ /* "vidcutter/libs/pympv/mpv.pyx":412
-+ *
-+ * @_errors
-+ * def request_event(self, event, enable): # <<<<<<<<<<<<<<
-+ * """Enable or disable a given event.
-+ *
- */
-- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_LogMessage, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_LogMessage, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
-+ }
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "(tree fragment)":11
-- * __pyx_unpickle_LogMessage__set_state(<LogMessage> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_LogMessage__set_state(LogMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.level = __pyx_state[0]; __pyx_result.log_level = __pyx_state[1]; __pyx_result.prefix = __pyx_state[2]; __pyx_result.text = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-+ /* "vidcutter/libs/pympv/mpv.pyx":429
-+ * return err
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def set_log_level(self, loglevel):
-+ * """Wraps: mpv_request_log_messages"""
- */
-- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Property, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Property, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "(tree fragment)":1
-- * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-- * cdef object __pyx_PickleError
-- * cdef object __pyx_result
-+ /* "vidcutter/libs/pympv/mpv.pyx":430
-+ *
-+ * @_errors
-+ * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_request_log_messages"""
-+ * assert self._ctx
- */
-- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_Event, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Event, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
-+ }
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "(tree fragment)":11
-- * __pyx_unpickle_Event__set_state(<Event> __pyx_result, __pyx_state)
-- * return __pyx_result
-- * cdef __pyx_unpickle_Event__set_state(Event __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-- * __pyx_result.data = __pyx_state[0]; __pyx_result.error = __pyx_state[1]; __pyx_result.id = __pyx_state[2]; __pyx_result.reply_userdata = __pyx_state[3]
-- * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
-+ /* "vidcutter/libs/pympv/mpv.pyx":440
-+ * return err
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def load_config(self, filename):
-+ * """Wraps: mpv_load_config_file"""
- */
-- __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_17__pyx_unpickle_RenderFrameInfo, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1
-- * # This program is free software: you can redistribute it and/or modify # <<<<<<<<<<<<<<
-- * # it under the terms of the GNU General Public License as published by
-- * # the Free Software Foundation, either version 3 of the License, or
-+ /* "vidcutter/libs/pympv/mpv.pyx":441
-+ *
-+ * @_errors
-+ * def load_config(self, filename): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_load_config_file"""
-+ * assert self._ctx
- */
-- __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
--
-- /*--- Wrapped vars code ---*/
--
-- goto __pyx_L0;
-- __pyx_L1_error:;
-- __Pyx_XDECREF(__pyx_t_1);
-- __Pyx_XDECREF(__pyx_t_2);
-- __Pyx_XDECREF(__pyx_t_4);
-- __Pyx_XDECREF(__pyx_t_6);
-- __Pyx_XDECREF(__pyx_t_7);
-- if (__pyx_m) {
-- if (__pyx_d) {
-- __Pyx_AddTraceback("init vidcutter.libs.mpv", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- }
-- Py_CLEAR(__pyx_m);
-- } else if (!PyErr_Occurred()) {
-- PyErr_SetString(PyExc_ImportError, "init vidcutter.libs.mpv");
-- }
-- __pyx_L0:;
-- __Pyx_RefNannyFinishContext();
-- #if CYTHON_PEP489_MULTI_PHASE_INIT
-- return (__pyx_m != NULL) ? 0 : -1;
-- #elif PY_MAJOR_VERSION >= 3
-- return __pyx_m;
-- #else
-- return;
-- #endif
--}
--
--/* --- Runtime support code --- */
--/* Refnanny */
--#if CYTHON_REFNANNY
--static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
-- PyObject *m = NULL, *p = NULL;
-- void *r = NULL;
-- m = PyImport_ImportModule(modname);
-- if (!m) goto end;
-- p = PyObject_GetAttrString(m, "RefNannyAPI");
-- if (!p) goto end;
-- r = PyLong_AsVoidPtr(p);
--end:
-- Py_XDECREF(p);
-- Py_XDECREF(m);
-- return (__Pyx_RefNannyAPIStruct *)r;
--}
--#endif
--
--/* PyObjectGetAttrStr */
--#if CYTHON_USE_TYPE_SLOTS
--static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
-- PyTypeObject* tp = Py_TYPE(obj);
-- if (likely(tp->tp_getattro))
-- return tp->tp_getattro(obj, attr_name);
--#if PY_MAJOR_VERSION < 3
-- if (likely(tp->tp_getattr))
-- return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
--#endif
-- return PyObject_GetAttr(obj, attr_name);
--}
--#endif
--
--/* GetBuiltinName */
--static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
-- PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
-- if (unlikely(!result)) {
-- PyErr_Format(PyExc_NameError,
--#if PY_MAJOR_VERSION >= 3
-- "name '%U' is not defined", name);
--#else
-- "name '%.200s' is not defined", PyString_AS_STRING(name));
--#endif
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
- }
-- return result;
--}
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
--/* PyDictVersioning */
--#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
--static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
-- PyObject *dict = Py_TYPE(obj)->tp_dict;
-- return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
--}
--static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
-- PyObject **dictptr = NULL;
-- Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
-- if (offset) {
--#if CYTHON_COMPILING_IN_CPYTHON
-- dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
--#else
-- dictptr = _PyObject_GetDictPtr(obj);
--#endif
-- }
-- return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
--}
--static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
-- PyObject *dict = Py_TYPE(obj)->tp_dict;
-- if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
-- return 0;
-- return obj_dict_version == __Pyx_get_object_dict_version(obj);
--}
--#endif
-+ /* "vidcutter/libs/pympv/mpv.pyx":573
-+ * return result
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def get_property_async(self, prop, data=None):
-+ * """Gets the value of a property asynchronously.
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-
--/* GetModuleGlobalName */
--#if CYTHON_USE_DICT_VERSIONS
--static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
--#else
--static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
--#endif
--{
-- PyObject *result;
--#if !CYTHON_AVOID_BORROWED_REFS
--#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
-- result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
-- __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
-- if (likely(result)) {
-- return __Pyx_NewRef(result);
-- } else if (unlikely(PyErr_Occurred())) {
-- return NULL;
-- }
--#else
-- result = PyDict_GetItem(__pyx_d, name);
-- __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
-- if (likely(result)) {
-- return __Pyx_NewRef(result);
-- }
--#endif
--#else
-- result = PyObject_GetItem(__pyx_d, name);
-- __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
-- if (likely(result)) {
-- return __Pyx_NewRef(result);
-+ /* "vidcutter/libs/pympv/mpv.pyx":574
-+ *
-+ * @_errors
-+ * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
-+ * """Gets the value of a property asynchronously.
-+ *
-+ */
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
- }
-- PyErr_Clear();
--#endif
-- return __Pyx_GetBuiltinName(name);
--}
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
--/* PyFunctionFastCall */
--#if CYTHON_FAST_PYCALL
--static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
-- PyObject *globals) {
-- PyFrameObject *f;
-- PyThreadState *tstate = __Pyx_PyThreadState_Current;
-- PyObject **fastlocals;
-- Py_ssize_t i;
-- PyObject *result;
-- assert(globals != NULL);
-- /* XXX Perhaps we should create a specialized
-- PyFrame_New() that doesn't take locals, but does
-- take builtins without sanity checking them.
-- */
-- assert(tstate != NULL);
-- f = PyFrame_New(tstate, co, globals, NULL);
-- if (f == NULL) {
-- return NULL;
-- }
-- fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
-- for (i = 0; i < na; i++) {
-- Py_INCREF(*args);
-- fastlocals[i] = *args++;
-- }
-- result = PyEval_EvalFrameEx(f,0);
-- ++tstate->recursion_depth;
-- Py_DECREF(f);
-- --tstate->recursion_depth;
-- return result;
--}
--#if 1 || PY_VERSION_HEX < 0x030600B1
--static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
-- PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
-- PyObject *globals = PyFunction_GET_GLOBALS(func);
-- PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
-- PyObject *closure;
--#if PY_MAJOR_VERSION >= 3
-- PyObject *kwdefs;
--#endif
-- PyObject *kwtuple, **k;
-- PyObject **d;
-- Py_ssize_t nd;
-- Py_ssize_t nk;
-- PyObject *result;
-- assert(kwargs == NULL || PyDict_Check(kwargs));
-- nk = kwargs ? PyDict_Size(kwargs) : 0;
-- if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
-- return NULL;
-- }
-- if (
--#if PY_MAJOR_VERSION >= 3
-- co->co_kwonlyargcount == 0 &&
--#endif
-- likely(kwargs == NULL || nk == 0) &&
-- co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
-- if (argdefs == NULL && co->co_argcount == nargs) {
-- result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
-- goto done;
-- }
-- else if (nargs == 0 && argdefs != NULL
-- && co->co_argcount == Py_SIZE(argdefs)) {
-- /* function called with no arguments, but all parameters have
-- a default value: use default values as arguments .*/
-- args = &PyTuple_GET_ITEM(argdefs, 0);
-- result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
-- goto done;
-- }
-+ /* "vidcutter/libs/pympv/mpv.pyx":635
-+ * return v
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def set_property(self, prop, value=True, asynchronous=False, data=None):
-+ * """Wraps: mpv_set_property and mpv_set_property_async"""
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":636
-+ *
-+ * @_errors
-+ * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_set_property and mpv_set_property_async"""
-+ * assert self._ctx
-+ */
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
- }
-- if (kwargs != NULL) {
-- Py_ssize_t pos, i;
-- kwtuple = PyTuple_New(2 * nk);
-- if (kwtuple == NULL) {
-- result = NULL;
-- goto done;
-- }
-- k = &PyTuple_GET_ITEM(kwtuple, 0);
-- pos = i = 0;
-- while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
-- Py_INCREF(k[i]);
-- Py_INCREF(k[i+1]);
-- i += 2;
-- }
-- nk = i / 2;
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":673
-+ * return err
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def set_option(self, prop, value=True):
-+ * """Wraps: mpv_set_option"""
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":674
-+ *
-+ * @_errors
-+ * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_set_option"""
-+ * assert self._ctx
-+ */
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 674, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
- }
-- else {
-- kwtuple = NULL;
-- k = NULL;
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":695
-+ * return err
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def initialize(self):
-+ * """Wraps: mpv_initialize"""
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":696
-+ *
-+ * @_errors
-+ * def initialize(self): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_initialize"""
-+ * assert self._ctx
-+ */
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
- }
-- closure = PyFunction_GET_CLOSURE(func);
--#if PY_MAJOR_VERSION >= 3
-- kwdefs = PyFunction_GET_KW_DEFAULTS(func);
--#endif
-- if (argdefs != NULL) {
-- d = &PyTuple_GET_ITEM(argdefs, 0);
-- nd = Py_SIZE(argdefs);
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":748
-+ * self.callbackthread.start()
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def observe_property(self, prop, data=None):
-+ * """Wraps: mpv_observe_property"""
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":749
-+ *
-+ * @_errors
-+ * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_observe_property"""
-+ * assert self._ctx
-+ */
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
- }
-- else {
-- d = NULL;
-- nd = 0;
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":770
-+ * return err
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def unobserve_property(self, data):
-+ * """Wraps: mpv_unobserve_property"""
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":771
-+ *
-+ * @_errors
-+ * def unobserve_property(self, data): # <<<<<<<<<<<<<<
-+ * """Wraps: mpv_unobserve_property"""
-+ * assert self._ctx
-+ */
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
- }
--#if PY_MAJOR_VERSION >= 3
-- result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
-- args, (int)nargs,
-- k, (int)nk,
-- d, (int)nd, kwdefs, closure);
--#else
-- result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
-- args, (int)nargs,
-- k, (int)nk,
-- d, (int)nd, closure);
--#endif
-- Py_XDECREF(kwtuple);
--done:
-- Py_LeaveRecursiveCall();
-- return result;
--}
--#endif
--#endif
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
--/* PyCFunctionFastCall */
--#if CYTHON_FAST_PYCCALL
--static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
-- PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
-- PyCFunction meth = PyCFunction_GET_FUNCTION(func);
-- PyObject *self = PyCFunction_GET_SELF(func);
-- int flags = PyCFunction_GET_FLAGS(func);
-- assert(PyCFunction_Check(func));
-- assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
-- assert(nargs >= 0);
-- assert(nargs == 0 || args != NULL);
-- /* _PyCFunction_FastCallDict() must not be called with an exception set,
-- because it may clear it (directly or indirectly) and so the
-- caller loses its exception */
-- assert(!PyErr_Occurred());
-- if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
-- return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
-- } else {
-- return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
-+ /* "vidcutter/libs/pympv/mpv.pyx":938
-+ *
-+ * cdef class RenderContext(object):
-+ * API_OPENGL = "opengl" # <<<<<<<<<<<<<<
-+ * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME
-+ *
-+ */
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":939
-+ * cdef class RenderContext(object):
-+ * API_OPENGL = "opengl"
-+ * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME # <<<<<<<<<<<<<<
-+ *
-+ * cdef:
-+ */
-+ __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 939, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1009
-+ * self.inited = True
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def set_icc_profile(self, icc_blob):
-+ * cdef:
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1009, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1010
-+ *
-+ * @_errors
-+ * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
-+ * cdef:
-+ * mpv_render_param param
-+ */
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
-+ }
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1009, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1028
-+ * return err
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def set_ambient_light(self, lux):
-+ * cdef:
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1029
-+ *
-+ * @_errors
-+ * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
-+ * cdef:
-+ * mpv_render_param param
-+ */
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
- }
--}
--#endif
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-
--/* PyObjectCall */
--#if CYTHON_COMPILING_IN_CPYTHON
--static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
-- PyObject *result;
-- ternaryfunc call = func->ob_type->tp_call;
-- if (unlikely(!call))
-- return PyObject_Call(func, arg, kw);
-- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
-- return NULL;
-- result = (*call)(func, arg, kw);
-- Py_LeaveRecursiveCall();
-- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
-- PyErr_SetString(
-- PyExc_SystemError,
-- "NULL result without error in PyObject_Call");
-- }
-- return result;
--}
--#endif
-+ /* "vidcutter/libs/pympv/mpv.pyx":1068
-+ * return ret
-+ *
-+ * @_errors # <<<<<<<<<<<<<<
-+ * def render(self,
-+ * opengl_fbo=None,
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-
--/* GetTopmostException */
--#if CYTHON_USE_EXC_INFO_STACK
--static _PyErr_StackItem *
--__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
--{
-- _PyErr_StackItem *exc_info = tstate->exc_info;
-- while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
-- exc_info->previous_item != NULL)
-- {
-- exc_info = exc_info->previous_item;
-+ /* "vidcutter/libs/pympv/mpv.pyx":1069
-+ *
-+ * @_errors
-+ * def render(self, # <<<<<<<<<<<<<<
-+ * opengl_fbo=None,
-+ * flip_y=False,
-+ */
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-+ __pyx_t_1 = NULL;
-+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
-+ if (likely(__pyx_t_1)) {
-+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
-+ __Pyx_INCREF(__pyx_t_1);
-+ __Pyx_INCREF(function);
-+ __Pyx_DECREF_SET(__pyx_t_6, function);
- }
-- return exc_info;
--}
--#endif
-+ }
-+ __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-
--/* SaveResetException */
--#if CYTHON_FAST_THREAD_STATE
--static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
-- #if CYTHON_USE_EXC_INFO_STACK
-- _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
-- *type = exc_info->exc_type;
-- *value = exc_info->exc_value;
-- *tb = exc_info->exc_traceback;
-- #else
-- *type = tstate->exc_type;
-- *value = tstate->exc_value;
-- *tb = tstate->exc_traceback;
-- #endif
-- Py_XINCREF(*type);
-- Py_XINCREF(*value);
-- Py_XINCREF(*tb);
--}
--static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
-- PyObject *tmp_type, *tmp_value, *tmp_tb;
-- #if CYTHON_USE_EXC_INFO_STACK
-- _PyErr_StackItem *exc_info = tstate->exc_info;
-- tmp_type = exc_info->exc_type;
-- tmp_value = exc_info->exc_value;
-- tmp_tb = exc_info->exc_traceback;
-- exc_info->exc_type = type;
-- exc_info->exc_value = value;
-- exc_info->exc_traceback = tb;
-- #else
-- tmp_type = tstate->exc_type;
-- tmp_value = tstate->exc_value;
-- tmp_tb = tstate->exc_traceback;
-- tstate->exc_type = type;
-- tstate->exc_value = value;
-- tstate->exc_traceback = tb;
-- #endif
-- Py_XDECREF(tmp_type);
-- Py_XDECREF(tmp_value);
-- Py_XDECREF(tmp_tb);
--}
--#endif
-+ /* "vidcutter/libs/pympv/mpv.pyx":1132
-+ * init_params, *args, **kwargs)
-+ *
-+ * class CallbackThread(Thread): # <<<<<<<<<<<<<<
-+ * def __init__(self):
-+ * Thread.__init__(self)
-+ */
-+ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ __Pyx_GIVEREF(__pyx_t_7);
-+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
-+ __pyx_t_7 = 0;
-+ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_7);
-+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_4);
-
--/* PyErrExceptionMatches */
--#if CYTHON_FAST_THREAD_STATE
--static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
-- Py_ssize_t i, n;
-- n = PyTuple_GET_SIZE(tuple);
--#if PY_MAJOR_VERSION >= 3
-- for (i=0; i<n; i++) {
-- if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
-- }
--#endif
-- for (i=0; i<n; i++) {
-- if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
-- }
-- return 0;
--}
--static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
-- PyObject *exc_type = tstate->curexc_type;
-- if (exc_type == err) return 1;
-- if (unlikely(!exc_type)) return 0;
-- if (unlikely(PyTuple_Check(err)))
-- return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
-- return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
--}
--#endif
-+ /* "vidcutter/libs/pympv/mpv.pyx":1133
-+ *
-+ * class CallbackThread(Thread):
-+ * def __init__(self): # <<<<<<<<<<<<<<
-+ * Thread.__init__(self)
-+ * self.daemon = True
-+ */
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1133, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1141
-+ * self.isshutdown = False
-+ *
-+ * def shutdown(self): # <<<<<<<<<<<<<<
-+ * self.isshutdown = True
-+ * self.callback = None
-+ */
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1146
-+ * self.lock.release()
-+ *
-+ * def call(self): # <<<<<<<<<<<<<<
-+ * self.lock.release()
-+ *
-+ */
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1146, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1149
-+ * self.lock.release()
-+ *
-+ * def set(self, callback): # <<<<<<<<<<<<<<
-+ * self.callback = callback
-+ *
-+ */
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1152
-+ * self.callback = callback
-+ *
-+ * def run(self): # <<<<<<<<<<<<<<
-+ * while not self.isshutdown:
-+ * self.lock.acquire(True)
-+ */
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1157
-+ * self.mpv_callback(self.callback) if self.callback else None
-+ *
-+ * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
-+ * try:
-+ * callback()
-+ */
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1157, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+
-+ /* "vidcutter/libs/pympv/mpv.pyx":1132
-+ * init_params, *args, **kwargs)
-+ *
-+ * class CallbackThread(Thread): # <<<<<<<<<<<<<<
-+ * def __init__(self):
-+ * Thread.__init__(self)
-+ */
-+ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_1);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-+
-+ /* "(tree fragment)":1
-+ * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ */
-+ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_7__pyx_unpickle_EndOfFileReached, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_EndOfFileReached, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
--/* GetException */
--#if CYTHON_FAST_THREAD_STATE
--static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
--#else
--static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
--#endif
--{
-- PyObject *local_type, *local_value, *local_tb;
--#if CYTHON_FAST_THREAD_STATE
-- PyObject *tmp_type, *tmp_value, *tmp_tb;
-- local_type = tstate->curexc_type;
-- local_value = tstate->curexc_value;
-- local_tb = tstate->curexc_traceback;
-- tstate->curexc_type = 0;
-- tstate->curexc_value = 0;
-- tstate->curexc_traceback = 0;
--#else
-- PyErr_Fetch(&local_type, &local_value, &local_tb);
--#endif
-- PyErr_NormalizeException(&local_type, &local_value, &local_tb);
--#if CYTHON_FAST_THREAD_STATE
-- if (unlikely(tstate->curexc_type))
--#else
-- if (unlikely(PyErr_Occurred()))
--#endif
-- goto bad;
-- #if PY_MAJOR_VERSION >= 3
-- if (local_tb) {
-- if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
-- goto bad;
-- }
-- #endif
-- Py_XINCREF(local_tb);
-- Py_XINCREF(local_type);
-- Py_XINCREF(local_value);
-- *type = local_type;
-- *value = local_value;
-- *tb = local_tb;
--#if CYTHON_FAST_THREAD_STATE
-- #if CYTHON_USE_EXC_INFO_STACK
-- {
-- _PyErr_StackItem *exc_info = tstate->exc_info;
-- tmp_type = exc_info->exc_type;
-- tmp_value = exc_info->exc_value;
-- tmp_tb = exc_info->exc_traceback;
-- exc_info->exc_type = local_type;
-- exc_info->exc_value = local_value;
-- exc_info->exc_traceback = local_tb;
-- }
-- #else
-- tmp_type = tstate->exc_type;
-- tmp_value = tstate->exc_value;
-- tmp_tb = tstate->exc_traceback;
-- tstate->exc_type = local_type;
-- tstate->exc_value = local_value;
-- tstate->exc_traceback = local_tb;
-- #endif
-- Py_XDECREF(tmp_type);
-- Py_XDECREF(tmp_value);
-- Py_XDECREF(tmp_tb);
--#else
-- PyErr_SetExcInfo(local_type, local_value, local_tb);
--#endif
-- return 0;
--bad:
-- *type = 0;
-- *value = 0;
-- *tb = 0;
-- Py_XDECREF(local_type);
-- Py_XDECREF(local_value);
-- Py_XDECREF(local_tb);
-- return -1;
--}
-+ /* "(tree fragment)":11
-+ * __pyx_unpickle_EndOfFileReached__set_state(<EndOfFileReached> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_EndOfFileReached__set_state(EndOfFileReached __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_result.error = __pyx_state[0]; __pyx_result.reason = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-+ */
-+ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_9__pyx_unpickle_LogMessage, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_LogMessage, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
--/* PyObjectCallMethO */
--#if CYTHON_COMPILING_IN_CPYTHON
--static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
-- PyObject *self, *result;
-- PyCFunction cfunc;
-- cfunc = PyCFunction_GET_FUNCTION(func);
-- self = PyCFunction_GET_SELF(func);
-- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
-- return NULL;
-- result = cfunc(self, arg);
-- Py_LeaveRecursiveCall();
-- if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
-- PyErr_SetString(
-- PyExc_SystemError,
-- "NULL result without error in PyObject_Call");
-- }
-- return result;
--}
--#endif
-+ /* "(tree fragment)":1
-+ * def __pyx_unpickle_Property(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ */
-+ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_11__pyx_unpickle_Property, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Property, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
--/* PyObjectCallOneArg */
--#if CYTHON_COMPILING_IN_CPYTHON
--static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
-- PyObject *result;
-- PyObject *args = PyTuple_New(1);
-- if (unlikely(!args)) return NULL;
-- Py_INCREF(arg);
-- PyTuple_SET_ITEM(args, 0, arg);
-- result = __Pyx_PyObject_Call(func, args, NULL);
-- Py_DECREF(args);
-- return result;
--}
--static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
--#if CYTHON_FAST_PYCALL
-- if (PyFunction_Check(func)) {
-- return __Pyx_PyFunction_FastCall(func, &arg, 1);
-- }
--#endif
-- if (likely(PyCFunction_Check(func))) {
-- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
-- return __Pyx_PyObject_CallMethO(func, arg);
--#if CYTHON_FAST_PYCCALL
-- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
-- return __Pyx_PyCFunction_FastCall(func, &arg, 1);
--#endif
-- }
-- }
-- return __Pyx__PyObject_CallOneArg(func, arg);
--}
--#else
--static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
-- PyObject *result;
-- PyObject *args = PyTuple_Pack(1, arg);
-- if (unlikely(!args)) return NULL;
-- result = __Pyx_PyObject_Call(func, args, NULL);
-- Py_DECREF(args);
-- return result;
--}
--#endif
-+ /* "(tree fragment)":11
-+ * __pyx_unpickle_Property__set_state(<Property> __pyx_result, __pyx_state)
-+ * return __pyx_result
-+ * cdef __pyx_unpickle_Property__set_state(Property __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
-+ * __pyx_result.data = __pyx_state[0]; __pyx_result.name = __pyx_state[1]
-+ * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
-+ */
-+ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_13__pyx_unpickle_Event, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Event, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
--/* PyErrFetchRestore */
--#if CYTHON_FAST_THREAD_STATE
--static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
-- PyObject *tmp_type, *tmp_value, *tmp_tb;
-- tmp_type = tstate->curexc_type;
-- tmp_value = tstate->curexc_value;
-- tmp_tb = tstate->curexc_traceback;
-- tstate->curexc_type = type;
-- tstate->curexc_value = value;
-- tstate->curexc_traceback = tb;
-- Py_XDECREF(tmp_type);
-- Py_XDECREF(tmp_value);
-- Py_XDECREF(tmp_tb);
--}
--static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
-- *type = tstate->curexc_type;
-- *value = tstate->curexc_value;
-- *tb = tstate->curexc_traceback;
-- tstate->curexc_type = 0;
-- tstate->curexc_value = 0;
-- tstate->curexc_traceback = 0;
--}
--#endif
-+ /* "(tree fragment)":1
-+ * def __pyx_unpickle_RenderFrameInfo(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-+ * cdef object __pyx_PickleError
-+ * cdef object __pyx_result
-+ */
-+ __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_15__pyx_unpickle_RenderFrameInfo, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RenderFrameInfo, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
--/* GetAttr */
--static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
--#if CYTHON_USE_TYPE_SLOTS
--#if PY_MAJOR_VERSION >= 3
-- if (likely(PyUnicode_Check(n)))
--#else
-- if (likely(PyString_Check(n)))
--#endif
-- return __Pyx_PyObject_GetAttrStr(o, n);
--#endif
-- return PyObject_GetAttr(o, n);
--}
-+ /* "vidcutter/libs/pympv/mpv.pyx":1
-+ * # This program is free software: you can redistribute it and/or modify # <<<<<<<<<<<<<<
-+ * # it under the terms of the GNU General Public License as published by
-+ * # the Free Software Foundation, either version 3 of the License, or
-+ */
-+ __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __Pyx_GOTREF(__pyx_t_6);
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
--/* GetAttr3 */
--static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
-- __Pyx_PyThreadState_declare
-- __Pyx_PyThreadState_assign
-- if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
-- return NULL;
-- __Pyx_PyErr_Clear();
-- Py_INCREF(d);
-- return d;
-+ /*--- Wrapped vars code ---*/
-+
-+ goto __pyx_L0;
-+ __pyx_L1_error:;
-+ __Pyx_XDECREF(__pyx_t_1);
-+ __Pyx_XDECREF(__pyx_t_2);
-+ __Pyx_XDECREF(__pyx_t_4);
-+ __Pyx_XDECREF(__pyx_t_6);
-+ __Pyx_XDECREF(__pyx_t_7);
-+ if (__pyx_m) {
-+ if (__pyx_d) {
-+ __Pyx_AddTraceback("init vidcutter.libs.mpv", __pyx_clineno, __pyx_lineno, __pyx_filename);
-+ }
-+ Py_CLEAR(__pyx_m);
-+ } else if (!PyErr_Occurred()) {
-+ PyErr_SetString(PyExc_ImportError, "init vidcutter.libs.mpv");
-+ }
-+ __pyx_L0:;
-+ __Pyx_RefNannyFinishContext();
-+ #if CYTHON_PEP489_MULTI_PHASE_INIT
-+ return (__pyx_m != NULL) ? 0 : -1;
-+ #elif PY_MAJOR_VERSION >= 3
-+ return __pyx_m;
-+ #else
-+ return;
-+ #endif
- }
--static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
-- PyObject *r = __Pyx_GetAttr(o, n);
-- return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
-+
-+/* --- Runtime support code --- */
-+/* Refnanny */
-+#if CYTHON_REFNANNY
-+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
-+ PyObject *m = NULL, *p = NULL;
-+ void *r = NULL;
-+ m = PyImport_ImportModule(modname);
-+ if (!m) goto end;
-+ p = PyObject_GetAttrString(m, "RefNannyAPI");
-+ if (!p) goto end;
-+ r = PyLong_AsVoidPtr(p);
-+end:
-+ Py_XDECREF(p);
-+ Py_XDECREF(m);
-+ return (__Pyx_RefNannyAPIStruct *)r;
- }
-+#endif
-
--/* PyObjectCall2Args */
--static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
-- PyObject *args, *result = NULL;
-- #if CYTHON_FAST_PYCALL
-- if (PyFunction_Check(function)) {
-- PyObject *args[2] = {arg1, arg2};
-- return __Pyx_PyFunction_FastCall(function, args, 2);
-- }
-- #endif
-- #if CYTHON_FAST_PYCCALL
-- if (__Pyx_PyFastCFunction_Check(function)) {
-- PyObject *args[2] = {arg1, arg2};
-- return __Pyx_PyCFunction_FastCall(function, args, 2);
-- }
-- #endif
-- args = PyTuple_New(2);
-- if (unlikely(!args)) goto done;
-- Py_INCREF(arg1);
-- PyTuple_SET_ITEM(args, 0, arg1);
-- Py_INCREF(arg2);
-- PyTuple_SET_ITEM(args, 1, arg2);
-- Py_INCREF(function);
-- result = __Pyx_PyObject_Call(function, args, NULL);
-- Py_DECREF(args);
-- Py_DECREF(function);
--done:
-- return result;
-+/* PyObjectGetAttrStr */
-+#if CYTHON_USE_TYPE_SLOTS
-+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
-+ PyTypeObject* tp = Py_TYPE(obj);
-+ if (likely(tp->tp_getattro))
-+ return tp->tp_getattro(obj, attr_name);
-+#if PY_MAJOR_VERSION < 3
-+ if (likely(tp->tp_getattr))
-+ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
-+#endif
-+ return PyObject_GetAttr(obj, attr_name);
- }
--
--/* PyObjectGetMethod */
--static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
-- PyObject *attr;
--#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
-- PyTypeObject *tp = Py_TYPE(obj);
-- PyObject *descr;
-- descrgetfunc f = NULL;
-- PyObject **dictptr, *dict;
-- int meth_found = 0;
-- assert (*method == NULL);
-- if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
-- attr = __Pyx_PyObject_GetAttrStr(obj, name);
-- goto try_unpack;
-- }
-- if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
-- return 0;
-- }
-- descr = _PyType_Lookup(tp, name);
-- if (likely(descr != NULL)) {
-- Py_INCREF(descr);
--#if PY_MAJOR_VERSION >= 3
-- #ifdef __Pyx_CyFunction_USED
-- if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
-- #else
-- if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
-- #endif
--#else
-- #ifdef __Pyx_CyFunction_USED
-- if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
-- #else
-- if (likely(PyFunction_Check(descr)))
-- #endif
- #endif
-- {
-- meth_found = 1;
-- } else {
-- f = Py_TYPE(descr)->tp_descr_get;
-- if (f != NULL && PyDescr_IsData(descr)) {
-- attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
-- Py_DECREF(descr);
-- goto try_unpack;
-- }
-- }
-- }
-- dictptr = _PyObject_GetDictPtr(obj);
-- if (dictptr != NULL && (dict = *dictptr) != NULL) {
-- Py_INCREF(dict);
-- attr = __Pyx_PyDict_GetItemStr(dict, name);
-- if (attr != NULL) {
-- Py_INCREF(attr);
-- Py_DECREF(dict);
-- Py_XDECREF(descr);
-- goto try_unpack;
-- }
-- Py_DECREF(dict);
-- }
-- if (meth_found) {
-- *method = descr;
-- return 1;
-- }
-- if (f != NULL) {
-- attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
-- Py_DECREF(descr);
-- goto try_unpack;
-- }
-- if (descr != NULL) {
-- *method = descr;
-- return 0;
-- }
-- PyErr_Format(PyExc_AttributeError,
-+
-+/* GetBuiltinName */
-+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
-+ PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
-+ if (unlikely(!result)) {
-+ PyErr_Format(PyExc_NameError,
- #if PY_MAJOR_VERSION >= 3
-- "'%.50s' object has no attribute '%U'",
-- tp->tp_name, name);
--#else
-- "'%.50s' object has no attribute '%.400s'",
-- tp->tp_name, PyString_AS_STRING(name));
--#endif
-- return 0;
-+ "name '%U' is not defined", name);
- #else
-- attr = __Pyx_PyObject_GetAttrStr(obj, name);
-- goto try_unpack;
-+ "name '%.200s' is not defined", PyString_AS_STRING(name));
- #endif
--try_unpack:
--#if CYTHON_UNPACK_METHODS
-- if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
-- PyObject *function = PyMethod_GET_FUNCTION(attr);
-- Py_INCREF(function);
-- Py_DECREF(attr);
-- *method = function;
-- return 1;
- }
--#endif
-- *method = attr;
-- return 0;
--}
--
--/* PyObjectCallMethod1 */
--static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
-- PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
-- Py_DECREF(method);
- return result;
- }
--static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
-- PyObject *method = NULL, *result;
-- int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
-- if (likely(is_method)) {
-- result = __Pyx_PyObject_Call2Args(method, obj, arg);
-- Py_DECREF(method);
-- return result;
-- }
-- if (unlikely(!method)) return NULL;
-- return __Pyx__PyObject_CallMethod1(method, arg);
--}
-
--/* append */
--static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
-- if (likely(PyList_CheckExact(L))) {
-- if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
-- } else {
-- PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
-- if (unlikely(!retval))
-- return -1;
-- Py_DECREF(retval);
-- }
-- return 0;
-+/* PyDictVersioning */
-+#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
-+static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
-+ PyObject *dict = Py_TYPE(obj)->tp_dict;
-+ return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
- }
--
--/* PyObjectCallNoArg */
-+static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
-+ PyObject **dictptr = NULL;
-+ Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
-+ if (offset) {
- #if CYTHON_COMPILING_IN_CPYTHON
--static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
--#if CYTHON_FAST_PYCALL
-- if (PyFunction_Check(func)) {
-- return __Pyx_PyFunction_FastCall(func, NULL, 0);
-- }
--#endif
--#ifdef __Pyx_CyFunction_USED
-- if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
-+ dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
- #else
-- if (likely(PyCFunction_Check(func)))
-+ dictptr = _PyObject_GetDictPtr(obj);
- #endif
-- {
-- if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
-- return __Pyx_PyObject_CallMethO(func, NULL);
-- }
- }
-- return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
-+ return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
-+}
-+static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
-+ PyObject *dict = Py_TYPE(obj)->tp_dict;
-+ if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
-+ return 0;
-+ return obj_dict_version == __Pyx_get_object_dict_version(obj);
- }
- #endif
-
--/* GetItemInt */
--static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
-- PyObject *r;
-- if (!j) return NULL;
-- r = PyObject_GetItem(o, j);
-- Py_DECREF(j);
-- return r;
--}
--static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
-- CYTHON_NCP_UNUSED int wraparound,
-- CYTHON_NCP_UNUSED int boundscheck) {
--#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- Py_ssize_t wrapped_i = i;
-- if (wraparound & unlikely(i < 0)) {
-- wrapped_i += PyList_GET_SIZE(o);
-+/* GetModuleGlobalName */
-+#if CYTHON_USE_DICT_VERSIONS
-+static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
-+#else
-+static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
-+#endif
-+{
-+ PyObject *result;
-+#if !CYTHON_AVOID_BORROWED_REFS
-+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
-+ result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
-+ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
-+ if (likely(result)) {
-+ return __Pyx_NewRef(result);
-+ } else if (unlikely(PyErr_Occurred())) {
-+ return NULL;
- }
-- if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
-- PyObject *r = PyList_GET_ITEM(o, wrapped_i);
-- Py_INCREF(r);
-- return r;
-+#else
-+ result = PyDict_GetItem(__pyx_d, name);
-+ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
-+ if (likely(result)) {
-+ return __Pyx_NewRef(result);
-+ }
-+#endif
-+#else
-+ result = PyObject_GetItem(__pyx_d, name);
-+ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
-+ if (likely(result)) {
-+ return __Pyx_NewRef(result);
- }
-- return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
--#else
-- return PySequence_GetItem(o, i);
-+ PyErr_Clear();
- #endif
-+ return __Pyx_GetBuiltinName(name);
- }
--static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
-- CYTHON_NCP_UNUSED int wraparound,
-- CYTHON_NCP_UNUSED int boundscheck) {
--#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- Py_ssize_t wrapped_i = i;
-- if (wraparound & unlikely(i < 0)) {
-- wrapped_i += PyTuple_GET_SIZE(o);
-+
-+/* PyFunctionFastCall */
-+#if CYTHON_FAST_PYCALL
-+static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
-+ PyObject *globals) {
-+ PyFrameObject *f;
-+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
-+ PyObject **fastlocals;
-+ Py_ssize_t i;
-+ PyObject *result;
-+ assert(globals != NULL);
-+ /* XXX Perhaps we should create a specialized
-+ PyFrame_New() that doesn't take locals, but does
-+ take builtins without sanity checking them.
-+ */
-+ assert(tstate != NULL);
-+ f = PyFrame_New(tstate, co, globals, NULL);
-+ if (f == NULL) {
-+ return NULL;
- }
-- if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
-- PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
-- Py_INCREF(r);
-- return r;
-+ fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
-+ for (i = 0; i < na; i++) {
-+ Py_INCREF(*args);
-+ fastlocals[i] = *args++;
- }
-- return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
--#else
-- return PySequence_GetItem(o, i);
--#endif
-+ result = PyEval_EvalFrameEx(f,0);
-+ ++tstate->recursion_depth;
-+ Py_DECREF(f);
-+ --tstate->recursion_depth;
-+ return result;
- }
--static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
-- CYTHON_NCP_UNUSED int wraparound,
-- CYTHON_NCP_UNUSED int boundscheck) {
--#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
-- if (is_list || PyList_CheckExact(o)) {
-- Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
-- if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
-- PyObject *r = PyList_GET_ITEM(o, n);
-- Py_INCREF(r);
-- return r;
-+#if 1 || PY_VERSION_HEX < 0x030600B1
-+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
-+ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
-+ PyObject *globals = PyFunction_GET_GLOBALS(func);
-+ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
-+ PyObject *closure;
-+#if PY_MAJOR_VERSION >= 3
-+ PyObject *kwdefs;
-+#endif
-+ PyObject *kwtuple, **k;
-+ PyObject **d;
-+ Py_ssize_t nd;
-+ Py_ssize_t nk;
-+ PyObject *result;
-+ assert(kwargs == NULL || PyDict_Check(kwargs));
-+ nk = kwargs ? PyDict_Size(kwargs) : 0;
-+ if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
-+ return NULL;
-+ }
-+ if (
-+#if PY_MAJOR_VERSION >= 3
-+ co->co_kwonlyargcount == 0 &&
-+#endif
-+ likely(kwargs == NULL || nk == 0) &&
-+ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
-+ if (argdefs == NULL && co->co_argcount == nargs) {
-+ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
-+ goto done;
-+ }
-+ else if (nargs == 0 && argdefs != NULL
-+ && co->co_argcount == Py_SIZE(argdefs)) {
-+ /* function called with no arguments, but all parameters have
-+ a default value: use default values as arguments .*/
-+ args = &PyTuple_GET_ITEM(argdefs, 0);
-+ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
-+ goto done;
- }
- }
-- else if (PyTuple_CheckExact(o)) {
-- Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
-- if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
-- PyObject *r = PyTuple_GET_ITEM(o, n);
-- Py_INCREF(r);
-- return r;
-+ if (kwargs != NULL) {
-+ Py_ssize_t pos, i;
-+ kwtuple = PyTuple_New(2 * nk);
-+ if (kwtuple == NULL) {
-+ result = NULL;
-+ goto done;
- }
-- } else {
-- PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-- if (likely(m && m->sq_item)) {
-- if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
-- Py_ssize_t l = m->sq_length(o);
-- if (likely(l >= 0)) {
-- i += l;
-- } else {
-- if (!PyErr_ExceptionMatches(PyExc_OverflowError))
-- return NULL;
-- PyErr_Clear();
-- }
-- }
-- return m->sq_item(o, i);
-+ k = &PyTuple_GET_ITEM(kwtuple, 0);
-+ pos = i = 0;
-+ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
-+ Py_INCREF(k[i]);
-+ Py_INCREF(k[i+1]);
-+ i += 2;
- }
-+ nk = i / 2;
- }
--#else
-- if (is_list || PySequence_Check(o)) {
-- return PySequence_GetItem(o, i);
-+ else {
-+ kwtuple = NULL;
-+ k = NULL;
- }
-+ closure = PyFunction_GET_CLOSURE(func);
-+#if PY_MAJOR_VERSION >= 3
-+ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
- #endif
-- return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
--}
--
--/* DelItemInt */
--static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
-- int r;
-- if (!j) return -1;
-- r = PyObject_DelItem(o, j);
-- Py_DECREF(j);
-- return r;
--}
--static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
-- CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) {
--#if !CYTHON_USE_TYPE_SLOTS
-- if (is_list || PySequence_Check(o)) {
-- return PySequence_DelItem(o, i);
-+ if (argdefs != NULL) {
-+ d = &PyTuple_GET_ITEM(argdefs, 0);
-+ nd = Py_SIZE(argdefs);
-+ }
-+ else {
-+ d = NULL;
-+ nd = 0;
- }
-+#if PY_MAJOR_VERSION >= 3
-+ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
-+ args, (int)nargs,
-+ k, (int)nk,
-+ d, (int)nd, kwdefs, closure);
- #else
-- PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-- if (likely(m && m->sq_ass_item)) {
-- if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
-- Py_ssize_t l = m->sq_length(o);
-- if (likely(l >= 0)) {
-- i += l;
-- } else {
-- if (!PyErr_ExceptionMatches(PyExc_OverflowError))
-- return -1;
-- PyErr_Clear();
-- }
-- }
-- return m->sq_ass_item(o, i, (PyObject *)NULL);
-+ result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
-+ args, (int)nargs,
-+ k, (int)nk,
-+ d, (int)nd, closure);
-+#endif
-+ Py_XDECREF(kwtuple);
-+done:
-+ Py_LeaveRecursiveCall();
-+ return result;
-+}
-+#endif
-+#endif
-+
-+/* PyCFunctionFastCall */
-+#if CYTHON_FAST_PYCCALL
-+static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
-+ PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
-+ PyCFunction meth = PyCFunction_GET_FUNCTION(func);
-+ PyObject *self = PyCFunction_GET_SELF(func);
-+ int flags = PyCFunction_GET_FLAGS(func);
-+ assert(PyCFunction_Check(func));
-+ assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
-+ assert(nargs >= 0);
-+ assert(nargs == 0 || args != NULL);
-+ /* _PyCFunction_FastCallDict() must not be called with an exception set,
-+ because it may clear it (directly or indirectly) and so the
-+ caller loses its exception */
-+ assert(!PyErr_Occurred());
-+ if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
-+ return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
-+ } else {
-+ return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
- }
-+}
- #endif
-- return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
-+
-+/* PyObjectCall */
-+#if CYTHON_COMPILING_IN_CPYTHON
-+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
-+ PyObject *result;
-+ ternaryfunc call = Py_TYPE(func)->tp_call;
-+ if (unlikely(!call))
-+ return PyObject_Call(func, arg, kw);
-+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
-+ return NULL;
-+ result = (*call)(func, arg, kw);
-+ Py_LeaveRecursiveCall();
-+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
-+ PyErr_SetString(
-+ PyExc_SystemError,
-+ "NULL result without error in PyObject_Call");
-+ }
-+ return result;
- }
-+#endif
-
--/* KeywordStringCheck */
--static int __Pyx_CheckKeywordStrings(
-- PyObject *kwdict,
-- const char* function_name,
-- int kw_allowed)
-+/* GetTopmostException */
-+#if CYTHON_USE_EXC_INFO_STACK
-+static _PyErr_StackItem *
-+__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
- {
-- PyObject* key = 0;
-- Py_ssize_t pos = 0;
--#if CYTHON_COMPILING_IN_PYPY
-- if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
-- goto invalid_keyword;
-- return 1;
--#else
-- while (PyDict_Next(kwdict, &pos, &key, 0)) {
-- #if PY_MAJOR_VERSION < 3
-- if (unlikely(!PyString_Check(key)))
-- #endif
-- if (unlikely(!PyUnicode_Check(key)))
-- goto invalid_keyword_type;
-+ _PyErr_StackItem *exc_info = tstate->exc_info;
-+ while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
-+ exc_info->previous_item != NULL)
-+ {
-+ exc_info = exc_info->previous_item;
- }
-- if ((!kw_allowed) && unlikely(key))
-- goto invalid_keyword;
-- return 1;
--invalid_keyword_type:
-- PyErr_Format(PyExc_TypeError,
-- "%.200s() keywords must be strings", function_name);
-- return 0;
-+ return exc_info;
-+}
- #endif
--invalid_keyword:
-- PyErr_Format(PyExc_TypeError,
-- #if PY_MAJOR_VERSION < 3
-- "%.200s() got an unexpected keyword argument '%.200s'",
-- function_name, PyString_AsString(key));
-+
-+/* SaveResetException */
-+#if CYTHON_FAST_THREAD_STATE
-+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
-+ #if CYTHON_USE_EXC_INFO_STACK
-+ _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
-+ *type = exc_info->exc_type;
-+ *value = exc_info->exc_value;
-+ *tb = exc_info->exc_traceback;
- #else
-- "%s() got an unexpected keyword argument '%U'",
-- function_name, key);
-+ *type = tstate->exc_type;
-+ *value = tstate->exc_value;
-+ *tb = tstate->exc_traceback;
- #endif
-- return 0;
-+ Py_XINCREF(*type);
-+ Py_XINCREF(*value);
-+ Py_XINCREF(*tb);
- }
--
--/* None */
--static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
-- PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
-+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
-+ PyObject *tmp_type, *tmp_value, *tmp_tb;
-+ #if CYTHON_USE_EXC_INFO_STACK
-+ _PyErr_StackItem *exc_info = tstate->exc_info;
-+ tmp_type = exc_info->exc_type;
-+ tmp_value = exc_info->exc_value;
-+ tmp_tb = exc_info->exc_traceback;
-+ exc_info->exc_type = type;
-+ exc_info->exc_value = value;
-+ exc_info->exc_traceback = tb;
-+ #else
-+ tmp_type = tstate->exc_type;
-+ tmp_value = tstate->exc_value;
-+ tmp_tb = tstate->exc_traceback;
-+ tstate->exc_type = type;
-+ tstate->exc_value = value;
-+ tstate->exc_traceback = tb;
-+ #endif
-+ Py_XDECREF(tmp_type);
-+ Py_XDECREF(tmp_value);
-+ Py_XDECREF(tmp_tb);
- }
-+#endif
-
--/* RaiseException */
--#if PY_MAJOR_VERSION < 3
--static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
-- CYTHON_UNUSED PyObject *cause) {
-- __Pyx_PyThreadState_declare
-- Py_XINCREF(type);
-- if (!value || value == Py_None)
-- value = NULL;
-- else
-- Py_INCREF(value);
-- if (!tb || tb == Py_None)
-- tb = NULL;
-- else {
-- Py_INCREF(tb);
-- if (!PyTraceBack_Check(tb)) {
-- PyErr_SetString(PyExc_TypeError,
-- "raise: arg 3 must be a traceback or None");
-- goto raise_error;
-- }
-+/* PyErrExceptionMatches */
-+#if CYTHON_FAST_THREAD_STATE
-+static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
-+ Py_ssize_t i, n;
-+ n = PyTuple_GET_SIZE(tuple);
-+#if PY_MAJOR_VERSION >= 3
-+ for (i=0; i<n; i++) {
-+ if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
- }
-- if (PyType_Check(type)) {
--#if CYTHON_COMPILING_IN_PYPY
-- if (!value) {
-- Py_INCREF(Py_None);
-- value = Py_None;
-- }
- #endif
-- PyErr_NormalizeException(&type, &value, &tb);
-- } else {
-- if (value) {
-- PyErr_SetString(PyExc_TypeError,
-- "instance exception may not have a separate value");
-- goto raise_error;
-- }
-- value = type;
-- type = (PyObject*) Py_TYPE(type);
-- Py_INCREF(type);
-- if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
-- PyErr_SetString(PyExc_TypeError,
-- "raise: exception class must be a subclass of BaseException");
-- goto raise_error;
-- }
-+ for (i=0; i<n; i++) {
-+ if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
- }
-- __Pyx_PyThreadState_assign
-- __Pyx_ErrRestore(type, value, tb);
-- return;
--raise_error:
-- Py_XDECREF(value);
-- Py_XDECREF(type);
-- Py_XDECREF(tb);
-- return;
-+ return 0;
-+}
-+static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
-+ PyObject *exc_type = tstate->curexc_type;
-+ if (exc_type == err) return 1;
-+ if (unlikely(!exc_type)) return 0;
-+ if (unlikely(PyTuple_Check(err)))
-+ return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
-+ return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
- }
-+#endif
-+
-+/* GetException */
-+#if CYTHON_FAST_THREAD_STATE
-+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
- #else
--static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
-- PyObject* owned_instance = NULL;
-- if (tb == Py_None) {
-- tb = 0;
-- } else if (tb && !PyTraceBack_Check(tb)) {
-- PyErr_SetString(PyExc_TypeError,
-- "raise: arg 3 must be a traceback or None");
-+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
-+#endif
-+{
-+ PyObject *local_type, *local_value, *local_tb;
-+#if CYTHON_FAST_THREAD_STATE
-+ PyObject *tmp_type, *tmp_value, *tmp_tb;
-+ local_type = tstate->curexc_type;
-+ local_value = tstate->curexc_value;
-+ local_tb = tstate->curexc_traceback;
-+ tstate->curexc_type = 0;
-+ tstate->curexc_value = 0;
-+ tstate->curexc_traceback = 0;
-+#else
-+ PyErr_Fetch(&local_type, &local_value, &local_tb);
-+#endif
-+ PyErr_NormalizeException(&local_type, &local_value, &local_tb);
-+#if CYTHON_FAST_THREAD_STATE
-+ if (unlikely(tstate->curexc_type))
-+#else
-+ if (unlikely(PyErr_Occurred()))
-+#endif
- goto bad;
-- }
-- if (value == Py_None)
-- value = 0;
-- if (PyExceptionInstance_Check(type)) {
-- if (value) {
-- PyErr_SetString(PyExc_TypeError,
-- "instance exception may not have a separate value");
-+ #if PY_MAJOR_VERSION >= 3
-+ if (local_tb) {
-+ if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
- goto bad;
-- }
-- value = type;
-- type = (PyObject*) Py_TYPE(value);
-- } else if (PyExceptionClass_Check(type)) {
-- PyObject *instance_class = NULL;
-- if (value && PyExceptionInstance_Check(value)) {
-- instance_class = (PyObject*) Py_TYPE(value);
-- if (instance_class != type) {
-- int is_subclass = PyObject_IsSubclass(instance_class, type);
-- if (!is_subclass) {
-- instance_class = NULL;
-- } else if (unlikely(is_subclass == -1)) {
-- goto bad;
-- } else {
-- type = instance_class;
-- }
-- }
-- }
-- if (!instance_class) {
-- PyObject *args;
-- if (!value)
-- args = PyTuple_New(0);
-- else if (PyTuple_Check(value)) {
-- Py_INCREF(value);
-- args = value;
-- } else
-- args = PyTuple_Pack(1, value);
-- if (!args)
-- goto bad;
-- owned_instance = PyObject_Call(type, args, NULL);
-- Py_DECREF(args);
-- if (!owned_instance)
-- goto bad;
-- value = owned_instance;
-- if (!PyExceptionInstance_Check(value)) {
-- PyErr_Format(PyExc_TypeError,
-- "calling %R should have returned an instance of "
-- "BaseException, not %R",
-- type, Py_TYPE(value));
-- goto bad;
-- }
-- }
-- } else {
-- PyErr_SetString(PyExc_TypeError,
-- "raise: exception class must be a subclass of BaseException");
-- goto bad;
- }
-- if (cause) {
-- PyObject *fixed_cause;
-- if (cause == Py_None) {
-- fixed_cause = NULL;
-- } else if (PyExceptionClass_Check(cause)) {
-- fixed_cause = PyObject_CallObject(cause, NULL);
-- if (fixed_cause == NULL)
-- goto bad;
-- } else if (PyExceptionInstance_Check(cause)) {
-- fixed_cause = cause;
-- Py_INCREF(fixed_cause);
-- } else {
-- PyErr_SetString(PyExc_TypeError,
-- "exception causes must derive from "
-- "BaseException");
-- goto bad;
-+ #endif
-+ Py_XINCREF(local_tb);
-+ Py_XINCREF(local_type);
-+ Py_XINCREF(local_value);
-+ *type = local_type;
-+ *value = local_value;
-+ *tb = local_tb;
-+#if CYTHON_FAST_THREAD_STATE
-+ #if CYTHON_USE_EXC_INFO_STACK
-+ {
-+ _PyErr_StackItem *exc_info = tstate->exc_info;
-+ tmp_type = exc_info->exc_type;
-+ tmp_value = exc_info->exc_value;
-+ tmp_tb = exc_info->exc_traceback;
-+ exc_info->exc_type = local_type;
-+ exc_info->exc_value = local_value;
-+ exc_info->exc_traceback = local_tb;
-+ }
-+ #else
-+ tmp_type = tstate->exc_type;
-+ tmp_value = tstate->exc_value;
-+ tmp_tb = tstate->exc_traceback;
-+ tstate->exc_type = local_type;
-+ tstate->exc_value = local_value;
-+ tstate->exc_traceback = local_tb;
-+ #endif
-+ Py_XDECREF(tmp_type);
-+ Py_XDECREF(tmp_value);
-+ Py_XDECREF(tmp_tb);
-+#else
-+ PyErr_SetExcInfo(local_type, local_value, local_tb);
-+#endif
-+ return 0;
-+bad:
-+ *type = 0;
-+ *value = 0;
-+ *tb = 0;
-+ Py_XDECREF(local_type);
-+ Py_XDECREF(local_value);
-+ Py_XDECREF(local_tb);
-+ return -1;
-+}
-+
-+/* PyObjectCallMethO */
-+#if CYTHON_COMPILING_IN_CPYTHON
-+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
-+ PyObject *self, *result;
-+ PyCFunction cfunc;
-+ cfunc = PyCFunction_GET_FUNCTION(func);
-+ self = PyCFunction_GET_SELF(func);
-+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
-+ return NULL;
-+ result = cfunc(self, arg);
-+ Py_LeaveRecursiveCall();
-+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
-+ PyErr_SetString(
-+ PyExc_SystemError,
-+ "NULL result without error in PyObject_Call");
-+ }
-+ return result;
-+}
-+#endif
-+
-+/* PyObjectCallOneArg */
-+#if CYTHON_COMPILING_IN_CPYTHON
-+static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
-+ PyObject *result;
-+ PyObject *args = PyTuple_New(1);
-+ if (unlikely(!args)) return NULL;
-+ Py_INCREF(arg);
-+ PyTuple_SET_ITEM(args, 0, arg);
-+ result = __Pyx_PyObject_Call(func, args, NULL);
-+ Py_DECREF(args);
-+ return result;
-+}
-+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
-+#if CYTHON_FAST_PYCALL
-+ if (PyFunction_Check(func)) {
-+ return __Pyx_PyFunction_FastCall(func, &arg, 1);
-+ }
-+#endif
-+ if (likely(PyCFunction_Check(func))) {
-+ if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
-+ return __Pyx_PyObject_CallMethO(func, arg);
-+#if CYTHON_FAST_PYCCALL
-+ } else if (__Pyx_PyFastCFunction_Check(func)) {
-+ return __Pyx_PyCFunction_FastCall(func, &arg, 1);
-+#endif
- }
-- PyException_SetCause(value, fixed_cause);
- }
-- PyErr_SetObject(type, value);
-- if (tb) {
--#if CYTHON_COMPILING_IN_PYPY
-- PyObject *tmp_type, *tmp_value, *tmp_tb;
-- PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
-- Py_INCREF(tb);
-- PyErr_Restore(tmp_type, tmp_value, tb);
-- Py_XDECREF(tmp_tb);
-+ return __Pyx__PyObject_CallOneArg(func, arg);
-+}
- #else
-- PyThreadState *tstate = __Pyx_PyThreadState_Current;
-- PyObject* tmp_tb = tstate->curexc_traceback;
-- if (tb != tmp_tb) {
-- Py_INCREF(tb);
-- tstate->curexc_traceback = tb;
-- Py_XDECREF(tmp_tb);
-- }
-+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
-+ PyObject *result;
-+ PyObject *args = PyTuple_Pack(1, arg);
-+ if (unlikely(!args)) return NULL;
-+ result = __Pyx_PyObject_Call(func, args, NULL);
-+ Py_DECREF(args);
-+ return result;
-+}
- #endif
-- }
--bad:
-- Py_XDECREF(owned_instance);
-- return;
-+
-+/* PyErrFetchRestore */
-+#if CYTHON_FAST_THREAD_STATE
-+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
-+ PyObject *tmp_type, *tmp_value, *tmp_tb;
-+ tmp_type = tstate->curexc_type;
-+ tmp_value = tstate->curexc_value;
-+ tmp_tb = tstate->curexc_traceback;
-+ tstate->curexc_type = type;
-+ tstate->curexc_value = value;
-+ tstate->curexc_traceback = tb;
-+ Py_XDECREF(tmp_type);
-+ Py_XDECREF(tmp_value);
-+ Py_XDECREF(tmp_tb);
-+}
-+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
-+ *type = tstate->curexc_type;
-+ *value = tstate->curexc_value;
-+ *tb = tstate->curexc_traceback;
-+ tstate->curexc_type = 0;
-+ tstate->curexc_value = 0;
-+ tstate->curexc_traceback = 0;
- }
- #endif
-
--/* FetchCommonType */
--static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
-- PyObject* fake_module;
-- PyTypeObject* cached_type = NULL;
-- fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
-- if (!fake_module) return NULL;
-- Py_INCREF(fake_module);
-- cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
-- if (cached_type) {
-- if (!PyType_Check((PyObject*)cached_type)) {
-- PyErr_Format(PyExc_TypeError,
-- "Shared Cython type %.200s is not a type object",
-- type->tp_name);
-- goto bad;
-- }
-- if (cached_type->tp_basicsize != type->tp_basicsize) {
-- PyErr_Format(PyExc_TypeError,
-- "Shared Cython type %.200s has the wrong size, try recompiling",
-- type->tp_name);
-- goto bad;
-- }
-- } else {
-- if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
-- PyErr_Clear();
-- if (PyType_Ready(type) < 0) goto bad;
-- if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
-- goto bad;
-- Py_INCREF(type);
-- cached_type = type;
-+/* GetAttr */
-+static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
-+#if CYTHON_USE_TYPE_SLOTS
-+#if PY_MAJOR_VERSION >= 3
-+ if (likely(PyUnicode_Check(n)))
-+#else
-+ if (likely(PyString_Check(n)))
-+#endif
-+ return __Pyx_PyObject_GetAttrStr(o, n);
-+#endif
-+ return PyObject_GetAttr(o, n);
-+}
-+
-+/* GetAttr3 */
-+static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
-+ __Pyx_PyThreadState_declare
-+ __Pyx_PyThreadState_assign
-+ if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
-+ return NULL;
-+ __Pyx_PyErr_Clear();
-+ Py_INCREF(d);
-+ return d;
-+}
-+static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
-+ PyObject *r = __Pyx_GetAttr(o, n);
-+ return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
-+}
-+
-+/* PyObjectCall2Args */
-+static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
-+ PyObject *args, *result = NULL;
-+ #if CYTHON_FAST_PYCALL
-+ if (PyFunction_Check(function)) {
-+ PyObject *args[2] = {arg1, arg2};
-+ return __Pyx_PyFunction_FastCall(function, args, 2);
-+ }
-+ #endif
-+ #if CYTHON_FAST_PYCCALL
-+ if (__Pyx_PyFastCFunction_Check(function)) {
-+ PyObject *args[2] = {arg1, arg2};
-+ return __Pyx_PyCFunction_FastCall(function, args, 2);
- }
-+ #endif
-+ args = PyTuple_New(2);
-+ if (unlikely(!args)) goto done;
-+ Py_INCREF(arg1);
-+ PyTuple_SET_ITEM(args, 0, arg1);
-+ Py_INCREF(arg2);
-+ PyTuple_SET_ITEM(args, 1, arg2);
-+ Py_INCREF(function);
-+ result = __Pyx_PyObject_Call(function, args, NULL);
-+ Py_DECREF(args);
-+ Py_DECREF(function);
- done:
-- Py_DECREF(fake_module);
-- return cached_type;
--bad:
-- Py_XDECREF(cached_type);
-- cached_type = NULL;
-- goto done;
-+ return result;
- }
-
--/* CythonFunctionShared */
--#include <structmember.h>
--static PyObject *
--__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
--{
-- if (unlikely(op->func_doc == NULL)) {
-- if (op->func.m_ml->ml_doc) {
-+/* PyObjectGetMethod */
-+static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
-+ PyObject *attr;
-+#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
-+ PyTypeObject *tp = Py_TYPE(obj);
-+ PyObject *descr;
-+ descrgetfunc f = NULL;
-+ PyObject **dictptr, *dict;
-+ int meth_found = 0;
-+ assert (*method == NULL);
-+ if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
-+ attr = __Pyx_PyObject_GetAttrStr(obj, name);
-+ goto try_unpack;
-+ }
-+ if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
-+ return 0;
-+ }
-+ descr = _PyType_Lookup(tp, name);
-+ if (likely(descr != NULL)) {
-+ Py_INCREF(descr);
- #if PY_MAJOR_VERSION >= 3
-- op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
-+ #ifdef __Pyx_CyFunction_USED
-+ if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
-+ #else
-+ if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
-+ #endif
- #else
-- op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
-+ #ifdef __Pyx_CyFunction_USED
-+ if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
-+ #else
-+ if (likely(PyFunction_Check(descr)))
-+ #endif
- #endif
-- if (unlikely(op->func_doc == NULL))
-- return NULL;
-+ {
-+ meth_found = 1;
- } else {
-- Py_INCREF(Py_None);
-- return Py_None;
-+ f = Py_TYPE(descr)->tp_descr_get;
-+ if (f != NULL && PyDescr_IsData(descr)) {
-+ attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
-+ Py_DECREF(descr);
-+ goto try_unpack;
-+ }
-+ }
-+ }
-+ dictptr = _PyObject_GetDictPtr(obj);
-+ if (dictptr != NULL && (dict = *dictptr) != NULL) {
-+ Py_INCREF(dict);
-+ attr = __Pyx_PyDict_GetItemStr(dict, name);
-+ if (attr != NULL) {
-+ Py_INCREF(attr);
-+ Py_DECREF(dict);
-+ Py_XDECREF(descr);
-+ goto try_unpack;
- }
-+ Py_DECREF(dict);
- }
-- Py_INCREF(op->func_doc);
-- return op->func_doc;
--}
--static int
--__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
--{
-- PyObject *tmp = op->func_doc;
-- if (value == NULL) {
-- value = Py_None;
-+ if (meth_found) {
-+ *method = descr;
-+ return 1;
- }
-- Py_INCREF(value);
-- op->func_doc = value;
-- Py_XDECREF(tmp);
-- return 0;
--}
--static PyObject *
--__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
--{
-- if (unlikely(op->func_name == NULL)) {
--#if PY_MAJOR_VERSION >= 3
-- op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
--#else
-- op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
--#endif
-- if (unlikely(op->func_name == NULL))
-- return NULL;
-+ if (f != NULL) {
-+ attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
-+ Py_DECREF(descr);
-+ goto try_unpack;
- }
-- Py_INCREF(op->func_name);
-- return op->func_name;
--}
--static int
--__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
--{
-- PyObject *tmp;
-+ if (descr != NULL) {
-+ *method = descr;
-+ return 0;
-+ }
-+ PyErr_Format(PyExc_AttributeError,
- #if PY_MAJOR_VERSION >= 3
-- if (unlikely(value == NULL || !PyUnicode_Check(value)))
-+ "'%.50s' object has no attribute '%U'",
-+ tp->tp_name, name);
- #else
-- if (unlikely(value == NULL || !PyString_Check(value)))
-+ "'%.50s' object has no attribute '%.400s'",
-+ tp->tp_name, PyString_AS_STRING(name));
- #endif
-- {
-- PyErr_SetString(PyExc_TypeError,
-- "__name__ must be set to a string object");
-- return -1;
-- }
-- tmp = op->func_name;
-- Py_INCREF(value);
-- op->func_name = value;
-- Py_XDECREF(tmp);
- return 0;
--}
--static PyObject *
--__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
--{
-- Py_INCREF(op->func_qualname);
-- return op->func_qualname;
--}
--static int
--__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
--{
-- PyObject *tmp;
--#if PY_MAJOR_VERSION >= 3
-- if (unlikely(value == NULL || !PyUnicode_Check(value)))
- #else
-- if (unlikely(value == NULL || !PyString_Check(value)))
-+ attr = __Pyx_PyObject_GetAttrStr(obj, name);
-+ goto try_unpack;
- #endif
-- {
-- PyErr_SetString(PyExc_TypeError,
-- "__qualname__ must be set to a string object");
-- return -1;
-- }
-- tmp = op->func_qualname;
-- Py_INCREF(value);
-- op->func_qualname = value;
-- Py_XDECREF(tmp);
-- return 0;
--}
--static PyObject *
--__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
--{
-- PyObject *self;
-- self = m->func_closure;
-- if (self == NULL)
-- self = Py_None;
-- Py_INCREF(self);
-- return self;
--}
--static PyObject *
--__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
--{
-- if (unlikely(op->func_dict == NULL)) {
-- op->func_dict = PyDict_New();
-- if (unlikely(op->func_dict == NULL))
-- return NULL;
-- }
-- Py_INCREF(op->func_dict);
-- return op->func_dict;
--}
--static int
--__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
--{
-- PyObject *tmp;
-- if (unlikely(value == NULL)) {
-- PyErr_SetString(PyExc_TypeError,
-- "function's dictionary may not be deleted");
-- return -1;
-- }
-- if (unlikely(!PyDict_Check(value))) {
-- PyErr_SetString(PyExc_TypeError,
-- "setting function's dictionary to a non-dict");
-- return -1;
-+try_unpack:
-+#if CYTHON_UNPACK_METHODS
-+ if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
-+ PyObject *function = PyMethod_GET_FUNCTION(attr);
-+ Py_INCREF(function);
-+ Py_DECREF(attr);
-+ *method = function;
-+ return 1;
- }
-- tmp = op->func_dict;
-- Py_INCREF(value);
-- op->func_dict = value;
-- Py_XDECREF(tmp);
-+#endif
-+ *method = attr;
- return 0;
- }
--static PyObject *
--__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
--{
-- Py_INCREF(op->func_globals);
-- return op->func_globals;
--}
--static PyObject *
--__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
--{
-- Py_INCREF(Py_None);
-- return Py_None;
--}
--static PyObject *
--__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
--{
-- PyObject* result = (op->func_code) ? op->func_code : Py_None;
-- Py_INCREF(result);
-- return result;
--}
--static int
--__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
-- int result = 0;
-- PyObject *res = op->defaults_getter((PyObject *) op);
-- if (unlikely(!res))
-- return -1;
-- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
-- Py_INCREF(op->defaults_tuple);
-- op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
-- Py_INCREF(op->defaults_kwdict);
-- #else
-- op->defaults_tuple = PySequence_ITEM(res, 0);
-- if (unlikely(!op->defaults_tuple)) result = -1;
-- else {
-- op->defaults_kwdict = PySequence_ITEM(res, 1);
-- if (unlikely(!op->defaults_kwdict)) result = -1;
-- }
-- #endif
-- Py_DECREF(res);
-+
-+/* PyObjectCallMethod1 */
-+static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
-+ PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
-+ Py_DECREF(method);
- return result;
- }
--static int
--__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
-- PyObject* tmp;
-- if (!value) {
-- value = Py_None;
-- } else if (value != Py_None && !PyTuple_Check(value)) {
-- PyErr_SetString(PyExc_TypeError,
-- "__defaults__ must be set to a tuple object");
-- return -1;
-- }
-- Py_INCREF(value);
-- tmp = op->defaults_tuple;
-- op->defaults_tuple = value;
-- Py_XDECREF(tmp);
-- return 0;
--}
--static PyObject *
--__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
-- PyObject* result = op->defaults_tuple;
-- if (unlikely(!result)) {
-- if (op->defaults_getter) {
-- if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
-- result = op->defaults_tuple;
-- } else {
-- result = Py_None;
-- }
-+static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
-+ PyObject *method = NULL, *result;
-+ int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
-+ if (likely(is_method)) {
-+ result = __Pyx_PyObject_Call2Args(method, obj, arg);
-+ Py_DECREF(method);
-+ return result;
- }
-- Py_INCREF(result);
-- return result;
-+ if (unlikely(!method)) return NULL;
-+ return __Pyx__PyObject_CallMethod1(method, arg);
- }
--static int
--__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
-- PyObject* tmp;
-- if (!value) {
-- value = Py_None;
-- } else if (value != Py_None && !PyDict_Check(value)) {
-- PyErr_SetString(PyExc_TypeError,
-- "__kwdefaults__ must be set to a dict object");
-- return -1;
-+
-+/* append */
-+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
-+ if (likely(PyList_CheckExact(L))) {
-+ if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
-+ } else {
-+ PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
-+ if (unlikely(!retval))
-+ return -1;
-+ Py_DECREF(retval);
- }
-- Py_INCREF(value);
-- tmp = op->defaults_kwdict;
-- op->defaults_kwdict = value;
-- Py_XDECREF(tmp);
- return 0;
- }
--static PyObject *
--__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
-- PyObject* result = op->defaults_kwdict;
-- if (unlikely(!result)) {
-- if (op->defaults_getter) {
-- if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
-- result = op->defaults_kwdict;
-- } else {
-- result = Py_None;
-+
-+/* PyObjectCallNoArg */
-+#if CYTHON_COMPILING_IN_CPYTHON
-+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
-+#if CYTHON_FAST_PYCALL
-+ if (PyFunction_Check(func)) {
-+ return __Pyx_PyFunction_FastCall(func, NULL, 0);
-+ }
-+#endif
-+#ifdef __Pyx_CyFunction_USED
-+ if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
-+#else
-+ if (likely(PyCFunction_Check(func)))
-+#endif
-+ {
-+ if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
-+ return __Pyx_PyObject_CallMethO(func, NULL);
- }
- }
-- Py_INCREF(result);
-- return result;
-+ return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
- }
--static int
--__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
-- PyObject* tmp;
-- if (!value || value == Py_None) {
-- value = NULL;
-- } else if (!PyDict_Check(value)) {
-- PyErr_SetString(PyExc_TypeError,
-- "__annotations__ must be set to a dict object");
-- return -1;
-+#endif
-+
-+/* GetItemInt */
-+static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
-+ PyObject *r;
-+ if (!j) return NULL;
-+ r = PyObject_GetItem(o, j);
-+ Py_DECREF(j);
-+ return r;
-+}
-+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
-+ CYTHON_NCP_UNUSED int wraparound,
-+ CYTHON_NCP_UNUSED int boundscheck) {
-+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-+ Py_ssize_t wrapped_i = i;
-+ if (wraparound & unlikely(i < 0)) {
-+ wrapped_i += PyList_GET_SIZE(o);
- }
-- Py_XINCREF(value);
-- tmp = op->func_annotations;
-- op->func_annotations = value;
-- Py_XDECREF(tmp);
-- return 0;
-+ if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
-+ PyObject *r = PyList_GET_ITEM(o, wrapped_i);
-+ Py_INCREF(r);
-+ return r;
-+ }
-+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-+#else
-+ return PySequence_GetItem(o, i);
-+#endif
- }
--static PyObject *
--__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
-- PyObject* result = op->func_annotations;
-- if (unlikely(!result)) {
-- result = PyDict_New();
-- if (unlikely(!result)) return NULL;
-- op->func_annotations = result;
-+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
-+ CYTHON_NCP_UNUSED int wraparound,
-+ CYTHON_NCP_UNUSED int boundscheck) {
-+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-+ Py_ssize_t wrapped_i = i;
-+ if (wraparound & unlikely(i < 0)) {
-+ wrapped_i += PyTuple_GET_SIZE(o);
- }
-- Py_INCREF(result);
-- return result;
-+ if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
-+ PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
-+ Py_INCREF(r);
-+ return r;
-+ }
-+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-+#else
-+ return PySequence_GetItem(o, i);
-+#endif
- }
--static PyGetSetDef __pyx_CyFunction_getsets[] = {
-- {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
-- {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
-- {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
-- {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
-- {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
-- {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
-- {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
-- {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
-- {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
-- {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
-- {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
-- {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
-- {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
-- {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
-- {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
-- {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
-- {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
-- {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
-- {0, 0, 0, 0, 0}
--};
--static PyMemberDef __pyx_CyFunction_members[] = {
-- {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
-- {0, 0, 0, 0, 0}
--};
--static PyObject *
--__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
--{
--#if PY_MAJOR_VERSION >= 3
-- return PyUnicode_FromString(m->func.m_ml->ml_name);
-+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
-+ CYTHON_NCP_UNUSED int wraparound,
-+ CYTHON_NCP_UNUSED int boundscheck) {
-+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
-+ if (is_list || PyList_CheckExact(o)) {
-+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
-+ if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
-+ PyObject *r = PyList_GET_ITEM(o, n);
-+ Py_INCREF(r);
-+ return r;
-+ }
-+ }
-+ else if (PyTuple_CheckExact(o)) {
-+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
-+ if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
-+ PyObject *r = PyTuple_GET_ITEM(o, n);
-+ Py_INCREF(r);
-+ return r;
-+ }
-+ } else {
-+ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-+ if (likely(m && m->sq_item)) {
-+ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
-+ Py_ssize_t l = m->sq_length(o);
-+ if (likely(l >= 0)) {
-+ i += l;
-+ } else {
-+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
-+ return NULL;
-+ PyErr_Clear();
-+ }
-+ }
-+ return m->sq_item(o, i);
-+ }
-+ }
- #else
-- return PyString_FromString(m->func.m_ml->ml_name);
-+ if (is_list || PySequence_Check(o)) {
-+ return PySequence_GetItem(o, i);
-+ }
- #endif
-+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
- }
--static PyMethodDef __pyx_CyFunction_methods[] = {
-- {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
-- {0, 0, 0, 0}
--};
--#if PY_VERSION_HEX < 0x030500A0
--#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
-+
-+/* DelItemInt */
-+static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
-+ int r;
-+ if (!j) return -1;
-+ r = PyObject_DelItem(o, j);
-+ Py_DECREF(j);
-+ return r;
-+}
-+static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
-+ CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) {
-+#if !CYTHON_USE_TYPE_SLOTS
-+ if (is_list || PySequence_Check(o)) {
-+ return PySequence_DelItem(o, i);
-+ }
- #else
--#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
-+ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-+ if (likely(m && m->sq_ass_item)) {
-+ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
-+ Py_ssize_t l = m->sq_length(o);
-+ if (likely(l >= 0)) {
-+ i += l;
-+ } else {
-+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
-+ return -1;
-+ PyErr_Clear();
-+ }
-+ }
-+ return m->sq_ass_item(o, i, (PyObject *)NULL);
-+ }
- #endif
--static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
-- PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
-- if (unlikely(op == NULL))
-- return NULL;
-- op->flags = flags;
-- __Pyx_CyFunction_weakreflist(op) = NULL;
-- op->func.m_ml = ml;
-- op->func.m_self = (PyObject *) op;
-- Py_XINCREF(closure);
-- op->func_closure = closure;
-- Py_XINCREF(module);
-- op->func.m_module = module;
-- op->func_dict = NULL;
-- op->func_name = NULL;
-- Py_INCREF(qualname);
-- op->func_qualname = qualname;
-- op->func_doc = NULL;
-- op->func_classobj = NULL;
-- op->func_globals = globals;
-- Py_INCREF(op->func_globals);
-- Py_XINCREF(code);
-- op->func_code = code;
-- op->defaults_pyobjects = 0;
-- op->defaults_size = 0;
-- op->defaults = NULL;
-- op->defaults_tuple = NULL;
-- op->defaults_kwdict = NULL;
-- op->defaults_getter = NULL;
-- op->func_annotations = NULL;
-- return (PyObject *) op;
-+ return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
- }
--static int
--__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
-+
-+/* KeywordStringCheck */
-+static int __Pyx_CheckKeywordStrings(
-+ PyObject *kwdict,
-+ const char* function_name,
-+ int kw_allowed)
- {
-- Py_CLEAR(m->func_closure);
-- Py_CLEAR(m->func.m_module);
-- Py_CLEAR(m->func_dict);
-- Py_CLEAR(m->func_name);
-- Py_CLEAR(m->func_qualname);
-- Py_CLEAR(m->func_doc);
-- Py_CLEAR(m->func_globals);
-- Py_CLEAR(m->func_code);
-- Py_CLEAR(m->func_classobj);
-- Py_CLEAR(m->defaults_tuple);
-- Py_CLEAR(m->defaults_kwdict);
-- Py_CLEAR(m->func_annotations);
-- if (m->defaults) {
-- PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
-- int i;
-- for (i = 0; i < m->defaults_pyobjects; i++)
-- Py_XDECREF(pydefaults[i]);
-- PyObject_Free(m->defaults);
-- m->defaults = NULL;
-+ PyObject* key = 0;
-+ Py_ssize_t pos = 0;
-+#if CYTHON_COMPILING_IN_PYPY
-+ if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
-+ goto invalid_keyword;
-+ return 1;
-+#else
-+ while (PyDict_Next(kwdict, &pos, &key, 0)) {
-+ #if PY_MAJOR_VERSION < 3
-+ if (unlikely(!PyString_Check(key)))
-+ #endif
-+ if (unlikely(!PyUnicode_Check(key)))
-+ goto invalid_keyword_type;
- }
-+ if ((!kw_allowed) && unlikely(key))
-+ goto invalid_keyword;
-+ return 1;
-+invalid_keyword_type:
-+ PyErr_Format(PyExc_TypeError,
-+ "%.200s() keywords must be strings", function_name);
-+ return 0;
-+#endif
-+invalid_keyword:
-+ PyErr_Format(PyExc_TypeError,
-+ #if PY_MAJOR_VERSION < 3
-+ "%.200s() got an unexpected keyword argument '%.200s'",
-+ function_name, PyString_AsString(key));
-+ #else
-+ "%s() got an unexpected keyword argument '%U'",
-+ function_name, key);
-+ #endif
- return 0;
- }
--static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
--{
-- if (__Pyx_CyFunction_weakreflist(m) != NULL)
-- PyObject_ClearWeakRefs((PyObject *) m);
-- __Pyx_CyFunction_clear(m);
-- PyObject_GC_Del(m);
--}
--static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
--{
-- PyObject_GC_UnTrack(m);
-- __Pyx__CyFunction_dealloc(m);
-+
-+/* None */
-+static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
-+ PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
- }
--static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
--{
-- Py_VISIT(m->func_closure);
-- Py_VISIT(m->func.m_module);
-- Py_VISIT(m->func_dict);
-- Py_VISIT(m->func_name);
-- Py_VISIT(m->func_qualname);
-- Py_VISIT(m->func_doc);
-- Py_VISIT(m->func_globals);
-- Py_VISIT(m->func_code);
-- Py_VISIT(m->func_classobj);
-- Py_VISIT(m->defaults_tuple);
-- Py_VISIT(m->defaults_kwdict);
-- if (m->defaults) {
-- PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
-- int i;
-- for (i = 0; i < m->defaults_pyobjects; i++)
-- Py_VISIT(pydefaults[i]);
-+
-+/* RaiseException */
-+#if PY_MAJOR_VERSION < 3
-+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
-+ CYTHON_UNUSED PyObject *cause) {
-+ __Pyx_PyThreadState_declare
-+ Py_XINCREF(type);
-+ if (!value || value == Py_None)
-+ value = NULL;
-+ else
-+ Py_INCREF(value);
-+ if (!tb || tb == Py_None)
-+ tb = NULL;
-+ else {
-+ Py_INCREF(tb);
-+ if (!PyTraceBack_Check(tb)) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "raise: arg 3 must be a traceback or None");
-+ goto raise_error;
-+ }
- }
-- return 0;
-+ if (PyType_Check(type)) {
-+#if CYTHON_COMPILING_IN_PYPY
-+ if (!value) {
-+ Py_INCREF(Py_None);
-+ value = Py_None;
-+ }
-+#endif
-+ PyErr_NormalizeException(&type, &value, &tb);
-+ } else {
-+ if (value) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "instance exception may not have a separate value");
-+ goto raise_error;
-+ }
-+ value = type;
-+ type = (PyObject*) Py_TYPE(type);
-+ Py_INCREF(type);
-+ if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "raise: exception class must be a subclass of BaseException");
-+ goto raise_error;
-+ }
-+ }
-+ __Pyx_PyThreadState_assign
-+ __Pyx_ErrRestore(type, value, tb);
-+ return;
-+raise_error:
-+ Py_XDECREF(value);
-+ Py_XDECREF(type);
-+ Py_XDECREF(tb);
-+ return;
- }
--static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
--{
--#if PY_MAJOR_VERSION < 3
-- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-- if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
-- Py_INCREF(func);
-- return func;
-+#else
-+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
-+ PyObject* owned_instance = NULL;
-+ if (tb == Py_None) {
-+ tb = 0;
-+ } else if (tb && !PyTraceBack_Check(tb)) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "raise: arg 3 must be a traceback or None");
-+ goto bad;
- }
-- if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
-- if (type == NULL)
-- type = (PyObject *)(Py_TYPE(obj));
-- return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
-+ if (value == Py_None)
-+ value = 0;
-+ if (PyExceptionInstance_Check(type)) {
-+ if (value) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "instance exception may not have a separate value");
-+ goto bad;
-+ }
-+ value = type;
-+ type = (PyObject*) Py_TYPE(value);
-+ } else if (PyExceptionClass_Check(type)) {
-+ PyObject *instance_class = NULL;
-+ if (value && PyExceptionInstance_Check(value)) {
-+ instance_class = (PyObject*) Py_TYPE(value);
-+ if (instance_class != type) {
-+ int is_subclass = PyObject_IsSubclass(instance_class, type);
-+ if (!is_subclass) {
-+ instance_class = NULL;
-+ } else if (unlikely(is_subclass == -1)) {
-+ goto bad;
-+ } else {
-+ type = instance_class;
-+ }
-+ }
-+ }
-+ if (!instance_class) {
-+ PyObject *args;
-+ if (!value)
-+ args = PyTuple_New(0);
-+ else if (PyTuple_Check(value)) {
-+ Py_INCREF(value);
-+ args = value;
-+ } else
-+ args = PyTuple_Pack(1, value);
-+ if (!args)
-+ goto bad;
-+ owned_instance = PyObject_Call(type, args, NULL);
-+ Py_DECREF(args);
-+ if (!owned_instance)
-+ goto bad;
-+ value = owned_instance;
-+ if (!PyExceptionInstance_Check(value)) {
-+ PyErr_Format(PyExc_TypeError,
-+ "calling %R should have returned an instance of "
-+ "BaseException, not %R",
-+ type, Py_TYPE(value));
-+ goto bad;
-+ }
-+ }
-+ } else {
-+ PyErr_SetString(PyExc_TypeError,
-+ "raise: exception class must be a subclass of BaseException");
-+ goto bad;
- }
-- if (obj == Py_None)
-- obj = NULL;
-+ if (cause) {
-+ PyObject *fixed_cause;
-+ if (cause == Py_None) {
-+ fixed_cause = NULL;
-+ } else if (PyExceptionClass_Check(cause)) {
-+ fixed_cause = PyObject_CallObject(cause, NULL);
-+ if (fixed_cause == NULL)
-+ goto bad;
-+ } else if (PyExceptionInstance_Check(cause)) {
-+ fixed_cause = cause;
-+ Py_INCREF(fixed_cause);
-+ } else {
-+ PyErr_SetString(PyExc_TypeError,
-+ "exception causes must derive from "
-+ "BaseException");
-+ goto bad;
-+ }
-+ PyException_SetCause(value, fixed_cause);
-+ }
-+ PyErr_SetObject(type, value);
-+ if (tb) {
-+#if CYTHON_COMPILING_IN_PYPY
-+ PyObject *tmp_type, *tmp_value, *tmp_tb;
-+ PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
-+ Py_INCREF(tb);
-+ PyErr_Restore(tmp_type, tmp_value, tb);
-+ Py_XDECREF(tmp_tb);
-+#else
-+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
-+ PyObject* tmp_tb = tstate->curexc_traceback;
-+ if (tb != tmp_tb) {
-+ Py_INCREF(tb);
-+ tstate->curexc_traceback = tb;
-+ Py_XDECREF(tmp_tb);
-+ }
- #endif
-- return __Pyx_PyMethod_New(func, obj, type);
-+ }
-+bad:
-+ Py_XDECREF(owned_instance);
-+ return;
-+}
-+#endif
-+
-+/* FetchCommonType */
-+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
-+ PyObject* fake_module;
-+ PyTypeObject* cached_type = NULL;
-+ fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
-+ if (!fake_module) return NULL;
-+ Py_INCREF(fake_module);
-+ cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
-+ if (cached_type) {
-+ if (!PyType_Check((PyObject*)cached_type)) {
-+ PyErr_Format(PyExc_TypeError,
-+ "Shared Cython type %.200s is not a type object",
-+ type->tp_name);
-+ goto bad;
-+ }
-+ if (cached_type->tp_basicsize != type->tp_basicsize) {
-+ PyErr_Format(PyExc_TypeError,
-+ "Shared Cython type %.200s has the wrong size, try recompiling",
-+ type->tp_name);
-+ goto bad;
-+ }
-+ } else {
-+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
-+ PyErr_Clear();
-+ if (PyType_Ready(type) < 0) goto bad;
-+ if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
-+ goto bad;
-+ Py_INCREF(type);
-+ cached_type = type;
-+ }
-+done:
-+ Py_DECREF(fake_module);
-+ return cached_type;
-+bad:
-+ Py_XDECREF(cached_type);
-+ cached_type = NULL;
-+ goto done;
- }
--static PyObject*
--__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
-+
-+/* CythonFunctionShared */
-+#include <structmember.h>
-+static PyObject *
-+__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
- {
-+ if (unlikely(op->func_doc == NULL)) {
-+ if (op->func.m_ml->ml_doc) {
- #if PY_MAJOR_VERSION >= 3
-- return PyUnicode_FromFormat("<cyfunction %U at %p>",
-- op->func_qualname, (void *)op);
-+ op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
- #else
-- return PyString_FromFormat("<cyfunction %s at %p>",
-- PyString_AsString(op->func_qualname), (void *)op);
-+ op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
- #endif
--}
--static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
-- PyCFunctionObject* f = (PyCFunctionObject*)func;
-- PyCFunction meth = f->m_ml->ml_meth;
-- Py_ssize_t size;
-- switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
-- case METH_VARARGS:
-- if (likely(kw == NULL || PyDict_Size(kw) == 0))
-- return (*meth)(self, arg);
-- break;
-- case METH_VARARGS | METH_KEYWORDS:
-- return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
-- case METH_NOARGS:
-- if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
-- size = PyTuple_GET_SIZE(arg);
-- if (likely(size == 0))
-- return (*meth)(self, NULL);
-- PyErr_Format(PyExc_TypeError,
-- "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
-- f->m_ml->ml_name, size);
-- return NULL;
-- }
-- break;
-- case METH_O:
-- if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
-- size = PyTuple_GET_SIZE(arg);
-- if (likely(size == 1)) {
-- PyObject *result, *arg0;
-- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- arg0 = PyTuple_GET_ITEM(arg, 0);
-- #else
-- arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
-- #endif
-- result = (*meth)(self, arg0);
-- #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
-- Py_DECREF(arg0);
-- #endif
-- return result;
-- }
-- PyErr_Format(PyExc_TypeError,
-- "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
-- f->m_ml->ml_name, size);
-- return NULL;
-+ if (unlikely(op->func_doc == NULL))
-+ return NULL;
-+ } else {
-+ Py_INCREF(Py_None);
-+ return Py_None;
- }
-- break;
-- default:
-- PyErr_SetString(PyExc_SystemError, "Bad call flags in "
-- "__Pyx_CyFunction_Call. METH_OLDARGS is no "
-- "longer supported!");
-- return NULL;
- }
-- PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
-- f->m_ml->ml_name);
-- return NULL;
--}
--static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
-- return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
-+ Py_INCREF(op->func_doc);
-+ return op->func_doc;
- }
--static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
-- PyObject *result;
-- __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
-- if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
-- Py_ssize_t argc;
-- PyObject *new_args;
-- PyObject *self;
-- argc = PyTuple_GET_SIZE(args);
-- new_args = PyTuple_GetSlice(args, 1, argc);
-- if (unlikely(!new_args))
-- return NULL;
-- self = PyTuple_GetItem(args, 0);
-- if (unlikely(!self)) {
-- Py_DECREF(new_args);
-- return NULL;
-- }
-- result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
-- Py_DECREF(new_args);
-- } else {
-- result = __Pyx_CyFunction_Call(func, args, kw);
-+static int
-+__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
-+{
-+ PyObject *tmp = op->func_doc;
-+ if (value == NULL) {
-+ value = Py_None;
- }
-- return result;
-+ Py_INCREF(value);
-+ op->func_doc = value;
-+ Py_XDECREF(tmp);
-+ return 0;
- }
--static PyTypeObject __pyx_CyFunctionType_type = {
-- PyVarObject_HEAD_INIT(0, 0)
-- "cython_function_or_method",
-- sizeof(__pyx_CyFunctionObject),
-- 0,
-- (destructor) __Pyx_CyFunction_dealloc,
-- 0,
-- 0,
-- 0,
--#if PY_MAJOR_VERSION < 3
-- 0,
-+static PyObject *
-+__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
-+{
-+ if (unlikely(op->func_name == NULL)) {
-+#if PY_MAJOR_VERSION >= 3
-+ op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
- #else
-- 0,
-+ op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
- #endif
-- (reprfunc) __Pyx_CyFunction_repr,
-- 0,
-- 0,
-- 0,
-- 0,
-- __Pyx_CyFunction_CallAsMethod,
-- 0,
-- 0,
-- 0,
-- 0,
-- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
-- 0,
-- (traverseproc) __Pyx_CyFunction_traverse,
-- (inquiry) __Pyx_CyFunction_clear,
-- 0,
--#if PY_VERSION_HEX < 0x030500A0
-- offsetof(__pyx_CyFunctionObject, func_weakreflist),
-+ if (unlikely(op->func_name == NULL))
-+ return NULL;
-+ }
-+ Py_INCREF(op->func_name);
-+ return op->func_name;
-+}
-+static int
-+__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
-+{
-+ PyObject *tmp;
-+#if PY_MAJOR_VERSION >= 3
-+ if (unlikely(value == NULL || !PyUnicode_Check(value)))
- #else
-- offsetof(PyCFunctionObject, m_weakreflist),
--#endif
-- 0,
-- 0,
-- __pyx_CyFunction_methods,
-- __pyx_CyFunction_members,
-- __pyx_CyFunction_getsets,
-- 0,
-- 0,
-- __Pyx_CyFunction_descr_get,
-- 0,
-- offsetof(__pyx_CyFunctionObject, func_dict),
-- 0,
-- 0,
-- 0,
-- 0,
-- 0,
-- 0,
-- 0,
-- 0,
-- 0,
-- 0,
-- 0,
-- 0,
--#if PY_VERSION_HEX >= 0x030400a1
-- 0,
--#endif
--#if PY_VERSION_HEX >= 0x030800b1
-- 0,
--#endif
--#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-- 0,
-+ if (unlikely(value == NULL || !PyString_Check(value)))
- #endif
--};
--static int __pyx_CyFunction_init(void) {
-- __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
-- if (unlikely(__pyx_CyFunctionType == NULL)) {
-+ {
-+ PyErr_SetString(PyExc_TypeError,
-+ "__name__ must be set to a string object");
- return -1;
- }
-+ tmp = op->func_name;
-+ Py_INCREF(value);
-+ op->func_name = value;
-+ Py_XDECREF(tmp);
- return 0;
- }
--static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
-- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-- m->defaults = PyObject_Malloc(size);
-- if (unlikely(!m->defaults))
-- return PyErr_NoMemory();
-- memset(m->defaults, 0, size);
-- m->defaults_pyobjects = pyobjects;
-- m->defaults_size = size;
-- return m->defaults;
--}
--static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
-- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-- m->defaults_tuple = tuple;
-- Py_INCREF(tuple);
-+static PyObject *
-+__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
-+{
-+ Py_INCREF(op->func_qualname);
-+ return op->func_qualname;
- }
--static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
-- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-- m->defaults_kwdict = dict;
-- Py_INCREF(dict);
-+static int
-+__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
-+{
-+ PyObject *tmp;
-+#if PY_MAJOR_VERSION >= 3
-+ if (unlikely(value == NULL || !PyUnicode_Check(value)))
-+#else
-+ if (unlikely(value == NULL || !PyString_Check(value)))
-+#endif
-+ {
-+ PyErr_SetString(PyExc_TypeError,
-+ "__qualname__ must be set to a string object");
-+ return -1;
-+ }
-+ tmp = op->func_qualname;
-+ Py_INCREF(value);
-+ op->func_qualname = value;
-+ Py_XDECREF(tmp);
-+ return 0;
- }
--static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
-- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-- m->func_annotations = dict;
-- Py_INCREF(dict);
-+static PyObject *
-+__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
-+{
-+ PyObject *self;
-+ self = m->func_closure;
-+ if (self == NULL)
-+ self = Py_None;
-+ Py_INCREF(self);
-+ return self;
- }
--
--/* CythonFunction */
--static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
-- PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
-- PyObject *op = __Pyx_CyFunction_Init(
-- PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
-- ml, flags, qualname, closure, module, globals, code
-- );
-- if (likely(op)) {
-- PyObject_GC_Track(op);
-+static PyObject *
-+__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
-+{
-+ if (unlikely(op->func_dict == NULL)) {
-+ op->func_dict = PyDict_New();
-+ if (unlikely(op->func_dict == NULL))
-+ return NULL;
- }
-- return op;
-+ Py_INCREF(op->func_dict);
-+ return op->func_dict;
- }
--
--/* RaiseArgTupleInvalid */
--static void __Pyx_RaiseArgtupleInvalid(
-- const char* func_name,
-- int exact,
-- Py_ssize_t num_min,
-- Py_ssize_t num_max,
-- Py_ssize_t num_found)
-+static int
-+__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
- {
-- Py_ssize_t num_expected;
-- const char *more_or_less;
-- if (num_found < num_min) {
-- num_expected = num_min;
-- more_or_less = "at least";
-- } else {
-- num_expected = num_max;
-- more_or_less = "at most";
-+ PyObject *tmp;
-+ if (unlikely(value == NULL)) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "function's dictionary may not be deleted");
-+ return -1;
- }
-- if (exact) {
-- more_or_less = "exactly";
-+ if (unlikely(!PyDict_Check(value))) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "setting function's dictionary to a non-dict");
-+ return -1;
- }
-- PyErr_Format(PyExc_TypeError,
-- "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
-- func_name, more_or_less, num_expected,
-- (num_expected == 1) ? "" : "s", num_found);
-+ tmp = op->func_dict;
-+ Py_INCREF(value);
-+ op->func_dict = value;
-+ Py_XDECREF(tmp);
-+ return 0;
- }
--
--/* RaiseDoubleKeywords */
--static void __Pyx_RaiseDoubleKeywordsError(
-- const char* func_name,
-- PyObject* kw_name)
-+static PyObject *
-+__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
- {
-- PyErr_Format(PyExc_TypeError,
-- #if PY_MAJOR_VERSION >= 3
-- "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
-- #else
-- "%s() got multiple values for keyword argument '%s'", func_name,
-- PyString_AsString(kw_name));
-- #endif
-+ Py_INCREF(op->func_globals);
-+ return op->func_globals;
- }
--
--/* ParseKeywords */
--static int __Pyx_ParseOptionalKeywords(
-- PyObject *kwds,
-- PyObject **argnames[],
-- PyObject *kwds2,
-- PyObject *values[],
-- Py_ssize_t num_pos_args,
-- const char* function_name)
-+static PyObject *
-+__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
- {
-- PyObject *key = 0, *value = 0;
-- Py_ssize_t pos = 0;
-- PyObject*** name;
-- PyObject*** first_kw_arg = argnames + num_pos_args;
-- while (PyDict_Next(kwds, &pos, &key, &value)) {
-- name = first_kw_arg;
-- while (*name && (**name != key)) name++;
-- if (*name) {
-- values[name-argnames] = value;
-- continue;
-- }
-- name = first_kw_arg;
-- #if PY_MAJOR_VERSION < 3
-- if (likely(PyString_Check(key))) {
-- while (*name) {
-- if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
-- && _PyString_Eq(**name, key)) {
-- values[name-argnames] = value;
-- break;
-- }
-- name++;
-- }
-- if (*name) continue;
-- else {
-- PyObject*** argname = argnames;
-- while (argname != first_kw_arg) {
-- if ((**argname == key) || (
-- (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
-- && _PyString_Eq(**argname, key))) {
-- goto arg_passed_twice;
-- }
-- argname++;
-- }
-- }
-- } else
-- #endif
-- if (likely(PyUnicode_Check(key))) {
-- while (*name) {
-- int cmp = (**name == key) ? 0 :
-- #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
-- (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
-- #endif
-- PyUnicode_Compare(**name, key);
-- if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
-- if (cmp == 0) {
-- values[name-argnames] = value;
-- break;
-- }
-- name++;
-- }
-- if (*name) continue;
-- else {
-- PyObject*** argname = argnames;
-- while (argname != first_kw_arg) {
-- int cmp = (**argname == key) ? 0 :
-- #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
-- (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
-- #endif
-- PyUnicode_Compare(**argname, key);
-- if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
-- if (cmp == 0) goto arg_passed_twice;
-- argname++;
-- }
-- }
-- } else
-- goto invalid_keyword_type;
-- if (kwds2) {
-- if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
-- } else {
-- goto invalid_keyword;
-- }
-- }
-- return 0;
--arg_passed_twice:
-- __Pyx_RaiseDoubleKeywordsError(function_name, key);
-- goto bad;
--invalid_keyword_type:
-- PyErr_Format(PyExc_TypeError,
-- "%.200s() keywords must be strings", function_name);
-- goto bad;
--invalid_keyword:
-- PyErr_Format(PyExc_TypeError,
-- #if PY_MAJOR_VERSION < 3
-- "%.200s() got an unexpected keyword argument '%.200s'",
-- function_name, PyString_AsString(key));
-+ Py_INCREF(Py_None);
-+ return Py_None;
-+}
-+static PyObject *
-+__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
-+{
-+ PyObject* result = (op->func_code) ? op->func_code : Py_None;
-+ Py_INCREF(result);
-+ return result;
-+}
-+static int
-+__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
-+ int result = 0;
-+ PyObject *res = op->defaults_getter((PyObject *) op);
-+ if (unlikely(!res))
-+ return -1;
-+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-+ op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
-+ Py_INCREF(op->defaults_tuple);
-+ op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
-+ Py_INCREF(op->defaults_kwdict);
- #else
-- "%s() got an unexpected keyword argument '%U'",
-- function_name, key);
-+ op->defaults_tuple = PySequence_ITEM(res, 0);
-+ if (unlikely(!op->defaults_tuple)) result = -1;
-+ else {
-+ op->defaults_kwdict = PySequence_ITEM(res, 1);
-+ if (unlikely(!op->defaults_kwdict)) result = -1;
-+ }
- #endif
--bad:
-- return -1;
-+ Py_DECREF(res);
-+ return result;
- }
--
--/* PyObjectSetAttrStr */
--#if CYTHON_USE_TYPE_SLOTS
--static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
-- PyTypeObject* tp = Py_TYPE(obj);
-- if (likely(tp->tp_setattro))
-- return tp->tp_setattro(obj, attr_name, value);
--#if PY_MAJOR_VERSION < 3
-- if (likely(tp->tp_setattr))
-- return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
--#endif
-- return PyObject_SetAttr(obj, attr_name, value);
-+static int
-+__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
-+ PyObject* tmp;
-+ if (!value) {
-+ value = Py_None;
-+ } else if (value != Py_None && !PyTuple_Check(value)) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "__defaults__ must be set to a tuple object");
-+ return -1;
-+ }
-+ Py_INCREF(value);
-+ tmp = op->defaults_tuple;
-+ op->defaults_tuple = value;
-+ Py_XDECREF(tmp);
-+ return 0;
- }
--#endif
--
--/* PyIntBinop */
--#if !CYTHON_COMPILING_IN_PYPY
--static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
-- (void)inplace;
-- (void)zerodivision_check;
-- #if PY_MAJOR_VERSION < 3
-- if (likely(PyInt_CheckExact(op1))) {
-- const long b = intval;
-- long x;
-- long a = PyInt_AS_LONG(op1);
-- x = (long)((unsigned long)a + b);
-- if (likely((x^a) >= 0 || (x^b) >= 0))
-- return PyInt_FromLong(x);
-- return PyLong_Type.tp_as_number->nb_add(op1, op2);
-+static PyObject *
-+__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
-+ PyObject* result = op->defaults_tuple;
-+ if (unlikely(!result)) {
-+ if (op->defaults_getter) {
-+ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
-+ result = op->defaults_tuple;
-+ } else {
-+ result = Py_None;
-+ }
- }
-- #endif
-- #if CYTHON_USE_PYLONG_INTERNALS
-- if (likely(PyLong_CheckExact(op1))) {
-- const long b = intval;
-- long a, x;
--#ifdef HAVE_LONG_LONG
-- const PY_LONG_LONG llb = intval;
-- PY_LONG_LONG lla, llx;
--#endif
-- const digit* digits = ((PyLongObject*)op1)->ob_digit;
-- const Py_ssize_t size = Py_SIZE(op1);
-- if (likely(__Pyx_sst_abs(size) <= 1)) {
-- a = likely(size) ? digits[0] : 0;
-- if (size == -1) a = -a;
-+ Py_INCREF(result);
-+ return result;
-+}
-+static int
-+__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
-+ PyObject* tmp;
-+ if (!value) {
-+ value = Py_None;
-+ } else if (value != Py_None && !PyDict_Check(value)) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "__kwdefaults__ must be set to a dict object");
-+ return -1;
-+ }
-+ Py_INCREF(value);
-+ tmp = op->defaults_kwdict;
-+ op->defaults_kwdict = value;
-+ Py_XDECREF(tmp);
-+ return 0;
-+}
-+static PyObject *
-+__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
-+ PyObject* result = op->defaults_kwdict;
-+ if (unlikely(!result)) {
-+ if (op->defaults_getter) {
-+ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
-+ result = op->defaults_kwdict;
- } else {
-- switch (size) {
-- case -2:
-- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
-- a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
-- lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
--#endif
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
-- a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
-- lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
--#endif
-- }
-- CYTHON_FALLTHROUGH;
-- case -3:
-- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
-- a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
-- lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
--#endif
-- }
-- CYTHON_FALLTHROUGH;
-- case 3:
-- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
-- a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
-- lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
--#endif
-- }
-- CYTHON_FALLTHROUGH;
-- case -4:
-- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
-- a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
-- lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
--#endif
-- }
-- CYTHON_FALLTHROUGH;
-- case 4:
-- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
-- a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
-- lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
--#endif
-- }
-- CYTHON_FALLTHROUGH;
-- default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
-- }
-+ result = Py_None;
- }
-- x = a + b;
-- return PyLong_FromLong(x);
--#ifdef HAVE_LONG_LONG
-- long_long:
-- llx = lla + llb;
-- return PyLong_FromLongLong(llx);
--#endif
--
--
- }
-- #endif
-- if (PyFloat_CheckExact(op1)) {
-- const long b = intval;
-- double a = PyFloat_AS_DOUBLE(op1);
-- double result;
-- PyFPE_START_PROTECT("add", return NULL)
-- result = ((double)a) + (double)b;
-- PyFPE_END_PROTECT(result)
-- return PyFloat_FromDouble(result);
-+ Py_INCREF(result);
-+ return result;
-+}
-+static int
-+__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
-+ PyObject* tmp;
-+ if (!value || value == Py_None) {
-+ value = NULL;
-+ } else if (!PyDict_Check(value)) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "__annotations__ must be set to a dict object");
-+ return -1;
- }
-- return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
-+ Py_XINCREF(value);
-+ tmp = op->func_annotations;
-+ op->func_annotations = value;
-+ Py_XDECREF(tmp);
-+ return 0;
- }
--#endif
--
--/* PyIntBinop */
--#if !CYTHON_COMPILING_IN_PYPY
--static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
-- (void)inplace;
-- (void)zerodivision_check;
-- #if PY_MAJOR_VERSION < 3
-- if (likely(PyInt_CheckExact(op1))) {
-- const long b = intval;
-- long x;
-- long a = PyInt_AS_LONG(op1);
-- x = (long)((unsigned long)a - b);
-- if (likely((x^a) >= 0 || (x^~b) >= 0))
-- return PyInt_FromLong(x);
-- return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
-+static PyObject *
-+__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
-+ PyObject* result = op->func_annotations;
-+ if (unlikely(!result)) {
-+ result = PyDict_New();
-+ if (unlikely(!result)) return NULL;
-+ op->func_annotations = result;
- }
-- #endif
-- #if CYTHON_USE_PYLONG_INTERNALS
-- if (likely(PyLong_CheckExact(op1))) {
-- const long b = intval;
-- long a, x;
--#ifdef HAVE_LONG_LONG
-- const PY_LONG_LONG llb = intval;
-- PY_LONG_LONG lla, llx;
--#endif
-- const digit* digits = ((PyLongObject*)op1)->ob_digit;
-- const Py_ssize_t size = Py_SIZE(op1);
-- if (likely(__Pyx_sst_abs(size) <= 1)) {
-- a = likely(size) ? digits[0] : 0;
-- if (size == -1) a = -a;
-- } else {
-- switch (size) {
-- case -2:
-- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
-- a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
-- lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
--#endif
-- }
-- CYTHON_FALLTHROUGH;
-- case 2:
-- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
-- a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
-- lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
--#endif
-- }
-- CYTHON_FALLTHROUGH;
-- case -3:
-- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
-- a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
-- lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
--#endif
-- }
-- CYTHON_FALLTHROUGH;
-- case 3:
-- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
-- a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
-- lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
--#endif
-- }
-- CYTHON_FALLTHROUGH;
-- case -4:
-- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
-- a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
-- lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
--#endif
-- }
-- CYTHON_FALLTHROUGH;
-- case 4:
-- if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
-- a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-- break;
--#ifdef HAVE_LONG_LONG
-- } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
-- lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-- goto long_long;
-+ Py_INCREF(result);
-+ return result;
-+}
-+static PyGetSetDef __pyx_CyFunction_getsets[] = {
-+ {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
-+ {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
-+ {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
-+ {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
-+ {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
-+ {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
-+ {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
-+ {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
-+ {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
-+ {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
-+ {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
-+ {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
-+ {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
-+ {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
-+ {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
-+ {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
-+ {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
-+ {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
-+ {0, 0, 0, 0, 0}
-+};
-+static PyMemberDef __pyx_CyFunction_members[] = {
-+ {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
-+ {0, 0, 0, 0, 0}
-+};
-+static PyObject *
-+__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
-+{
-+#if PY_MAJOR_VERSION >= 3
-+ Py_INCREF(m->func_qualname);
-+ return m->func_qualname;
-+#else
-+ return PyString_FromString(m->func.m_ml->ml_name);
- #endif
-- }
-- CYTHON_FALLTHROUGH;
-- default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
-- }
-- }
-- x = a - b;
-- return PyLong_FromLong(x);
--#ifdef HAVE_LONG_LONG
-- long_long:
-- llx = lla - llb;
-- return PyLong_FromLongLong(llx);
-+}
-+static PyMethodDef __pyx_CyFunction_methods[] = {
-+ {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
-+ {0, 0, 0, 0}
-+};
-+#if PY_VERSION_HEX < 0x030500A0
-+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
-+#else
-+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
- #endif
--
--
-+static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
-+ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
-+ if (unlikely(op == NULL))
-+ return NULL;
-+ op->flags = flags;
-+ __Pyx_CyFunction_weakreflist(op) = NULL;
-+ op->func.m_ml = ml;
-+ op->func.m_self = (PyObject *) op;
-+ Py_XINCREF(closure);
-+ op->func_closure = closure;
-+ Py_XINCREF(module);
-+ op->func.m_module = module;
-+ op->func_dict = NULL;
-+ op->func_name = NULL;
-+ Py_INCREF(qualname);
-+ op->func_qualname = qualname;
-+ op->func_doc = NULL;
-+ op->func_classobj = NULL;
-+ op->func_globals = globals;
-+ Py_INCREF(op->func_globals);
-+ Py_XINCREF(code);
-+ op->func_code = code;
-+ op->defaults_pyobjects = 0;
-+ op->defaults_size = 0;
-+ op->defaults = NULL;
-+ op->defaults_tuple = NULL;
-+ op->defaults_kwdict = NULL;
-+ op->defaults_getter = NULL;
-+ op->func_annotations = NULL;
-+ return (PyObject *) op;
-+}
-+static int
-+__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
-+{
-+ Py_CLEAR(m->func_closure);
-+ Py_CLEAR(m->func.m_module);
-+ Py_CLEAR(m->func_dict);
-+ Py_CLEAR(m->func_name);
-+ Py_CLEAR(m->func_qualname);
-+ Py_CLEAR(m->func_doc);
-+ Py_CLEAR(m->func_globals);
-+ Py_CLEAR(m->func_code);
-+ Py_CLEAR(m->func_classobj);
-+ Py_CLEAR(m->defaults_tuple);
-+ Py_CLEAR(m->defaults_kwdict);
-+ Py_CLEAR(m->func_annotations);
-+ if (m->defaults) {
-+ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
-+ int i;
-+ for (i = 0; i < m->defaults_pyobjects; i++)
-+ Py_XDECREF(pydefaults[i]);
-+ PyObject_Free(m->defaults);
-+ m->defaults = NULL;
- }
-- #endif
-- if (PyFloat_CheckExact(op1)) {
-- const long b = intval;
-- double a = PyFloat_AS_DOUBLE(op1);
-- double result;
-- PyFPE_START_PROTECT("subtract", return NULL)
-- result = ((double)a) - (double)b;
-- PyFPE_END_PROTECT(result)
-- return PyFloat_FromDouble(result);
-+ return 0;
-+}
-+static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
-+{
-+ if (__Pyx_CyFunction_weakreflist(m) != NULL)
-+ PyObject_ClearWeakRefs((PyObject *) m);
-+ __Pyx_CyFunction_clear(m);
-+ PyObject_GC_Del(m);
-+}
-+static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
-+{
-+ PyObject_GC_UnTrack(m);
-+ __Pyx__CyFunction_dealloc(m);
-+}
-+static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
-+{
-+ Py_VISIT(m->func_closure);
-+ Py_VISIT(m->func.m_module);
-+ Py_VISIT(m->func_dict);
-+ Py_VISIT(m->func_name);
-+ Py_VISIT(m->func_qualname);
-+ Py_VISIT(m->func_doc);
-+ Py_VISIT(m->func_globals);
-+ Py_VISIT(m->func_code);
-+ Py_VISIT(m->func_classobj);
-+ Py_VISIT(m->defaults_tuple);
-+ Py_VISIT(m->defaults_kwdict);
-+ if (m->defaults) {
-+ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
-+ int i;
-+ for (i = 0; i < m->defaults_pyobjects; i++)
-+ Py_VISIT(pydefaults[i]);
- }
-- return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
-+ return 0;
- }
-+static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
-+{
-+#if PY_MAJOR_VERSION < 3
-+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-+ if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
-+ Py_INCREF(func);
-+ return func;
-+ }
-+ if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
-+ if (type == NULL)
-+ type = (PyObject *)(Py_TYPE(obj));
-+ return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
-+ }
-+ if (obj == Py_None)
-+ obj = NULL;
- #endif
--
--/* WriteUnraisableException */
--static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
-- CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
-- int full_traceback, CYTHON_UNUSED int nogil) {
-- PyObject *old_exc, *old_val, *old_tb;
-- PyObject *ctx;
-- __Pyx_PyThreadState_declare
--#ifdef WITH_THREAD
-- PyGILState_STATE state;
-- if (nogil)
-- state = PyGILState_Ensure();
--#ifdef _MSC_VER
-- else state = (PyGILState_STATE)-1;
--#endif
-+ return __Pyx_PyMethod_New(func, obj, type);
-+}
-+static PyObject*
-+__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
-+{
-+#if PY_MAJOR_VERSION >= 3
-+ return PyUnicode_FromFormat("<cyfunction %U at %p>",
-+ op->func_qualname, (void *)op);
-+#else
-+ return PyString_FromFormat("<cyfunction %s at %p>",
-+ PyString_AsString(op->func_qualname), (void *)op);
- #endif
-- __Pyx_PyThreadState_assign
-- __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
-- if (full_traceback) {
-- Py_XINCREF(old_exc);
-- Py_XINCREF(old_val);
-- Py_XINCREF(old_tb);
-- __Pyx_ErrRestore(old_exc, old_val, old_tb);
-- PyErr_PrintEx(1);
-- }
-- #if PY_MAJOR_VERSION < 3
-- ctx = PyString_FromString(name);
-- #else
-- ctx = PyUnicode_FromString(name);
-- #endif
-- __Pyx_ErrRestore(old_exc, old_val, old_tb);
-- if (!ctx) {
-- PyErr_WriteUnraisable(Py_None);
-- } else {
-- PyErr_WriteUnraisable(ctx);
-- Py_DECREF(ctx);
-+}
-+static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
-+ PyCFunctionObject* f = (PyCFunctionObject*)func;
-+ PyCFunction meth = f->m_ml->ml_meth;
-+ Py_ssize_t size;
-+ switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
-+ case METH_VARARGS:
-+ if (likely(kw == NULL || PyDict_Size(kw) == 0))
-+ return (*meth)(self, arg);
-+ break;
-+ case METH_VARARGS | METH_KEYWORDS:
-+ return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
-+ case METH_NOARGS:
-+ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
-+ size = PyTuple_GET_SIZE(arg);
-+ if (likely(size == 0))
-+ return (*meth)(self, NULL);
-+ PyErr_Format(PyExc_TypeError,
-+ "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
-+ f->m_ml->ml_name, size);
-+ return NULL;
-+ }
-+ break;
-+ case METH_O:
-+ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
-+ size = PyTuple_GET_SIZE(arg);
-+ if (likely(size == 1)) {
-+ PyObject *result, *arg0;
-+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-+ arg0 = PyTuple_GET_ITEM(arg, 0);
-+ #else
-+ arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
-+ #endif
-+ result = (*meth)(self, arg0);
-+ #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
-+ Py_DECREF(arg0);
-+ #endif
-+ return result;
-+ }
-+ PyErr_Format(PyExc_TypeError,
-+ "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
-+ f->m_ml->ml_name, size);
-+ return NULL;
-+ }
-+ break;
-+ default:
-+ PyErr_SetString(PyExc_SystemError, "Bad call flags in "
-+ "__Pyx_CyFunction_Call. METH_OLDARGS is no "
-+ "longer supported!");
-+ return NULL;
- }
--#ifdef WITH_THREAD
-- if (nogil)
-- PyGILState_Release(state);
--#endif
--}
--
--/* SwapException */
--#if CYTHON_FAST_THREAD_STATE
--static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
-- PyObject *tmp_type, *tmp_value, *tmp_tb;
-- #if CYTHON_USE_EXC_INFO_STACK
-- _PyErr_StackItem *exc_info = tstate->exc_info;
-- tmp_type = exc_info->exc_type;
-- tmp_value = exc_info->exc_value;
-- tmp_tb = exc_info->exc_traceback;
-- exc_info->exc_type = *type;
-- exc_info->exc_value = *value;
-- exc_info->exc_traceback = *tb;
-- #else
-- tmp_type = tstate->exc_type;
-- tmp_value = tstate->exc_value;
-- tmp_tb = tstate->exc_traceback;
-- tstate->exc_type = *type;
-- tstate->exc_value = *value;
-- tstate->exc_traceback = *tb;
-- #endif
-- *type = tmp_type;
-- *value = tmp_value;
-- *tb = tmp_tb;
--}
--#else
--static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
-- PyObject *tmp_type, *tmp_value, *tmp_tb;
-- PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
-- PyErr_SetExcInfo(*type, *value, *tb);
-- *type = tmp_type;
-- *value = tmp_value;
-- *tb = tmp_tb;
-+ PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
-+ f->m_ml->ml_name);
-+ return NULL;
- }
--#endif
--
--/* SetItemInt */
--static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
-- int r;
-- if (!j) return -1;
-- r = PyObject_SetItem(o, j, v);
-- Py_DECREF(j);
-- return r;
-+static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
-+ return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
- }
--static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
-- CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
--#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
-- if (is_list || PyList_CheckExact(o)) {
-- Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
-- if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
-- PyObject* old = PyList_GET_ITEM(o, n);
-- Py_INCREF(v);
-- PyList_SET_ITEM(o, n, v);
-- Py_DECREF(old);
-- return 1;
-+static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
-+ PyObject *result;
-+ __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
-+ if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
-+ Py_ssize_t argc;
-+ PyObject *new_args;
-+ PyObject *self;
-+ argc = PyTuple_GET_SIZE(args);
-+ new_args = PyTuple_GetSlice(args, 1, argc);
-+ if (unlikely(!new_args))
-+ return NULL;
-+ self = PyTuple_GetItem(args, 0);
-+ if (unlikely(!self)) {
-+ Py_DECREF(new_args);
-+ return NULL;
- }
-+ result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
-+ Py_DECREF(new_args);
- } else {
-- PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-- if (likely(m && m->sq_ass_item)) {
-- if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
-- Py_ssize_t l = m->sq_length(o);
-- if (likely(l >= 0)) {
-- i += l;
-- } else {
-- if (!PyErr_ExceptionMatches(PyExc_OverflowError))
-- return -1;
-- PyErr_Clear();
-- }
-- }
-- return m->sq_ass_item(o, i, v);
-- }
-+ result = __Pyx_CyFunction_Call(func, args, kw);
- }
-+ return result;
-+}
-+static PyTypeObject __pyx_CyFunctionType_type = {
-+ PyVarObject_HEAD_INIT(0, 0)
-+ "cython_function_or_method",
-+ sizeof(__pyx_CyFunctionObject),
-+ 0,
-+ (destructor) __Pyx_CyFunction_dealloc,
-+ 0,
-+ 0,
-+ 0,
-+#if PY_MAJOR_VERSION < 3
-+ 0,
- #else
--#if CYTHON_COMPILING_IN_PYPY
-- if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
-+ 0,
-+#endif
-+ (reprfunc) __Pyx_CyFunction_repr,
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ __Pyx_CyFunction_CallAsMethod,
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
-+ 0,
-+ (traverseproc) __Pyx_CyFunction_traverse,
-+ (inquiry) __Pyx_CyFunction_clear,
-+ 0,
-+#if PY_VERSION_HEX < 0x030500A0
-+ offsetof(__pyx_CyFunctionObject, func_weakreflist),
- #else
-- if (is_list || PySequence_Check(o))
-+ offsetof(PyCFunctionObject, m_weakreflist),
- #endif
-- {
-- return PySequence_SetItem(o, i, v);
-- }
-+ 0,
-+ 0,
-+ __pyx_CyFunction_methods,
-+ __pyx_CyFunction_members,
-+ __pyx_CyFunction_getsets,
-+ 0,
-+ 0,
-+ __Pyx_CyFunction_descr_get,
-+ 0,
-+ offsetof(__pyx_CyFunctionObject, func_dict),
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+#if PY_VERSION_HEX >= 0x030400a1
-+ 0,
- #endif
-- return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
--}
--
--/* FastTypeChecks */
--#if CYTHON_COMPILING_IN_CPYTHON
--static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
-- while (a) {
-- a = a->tp_base;
-- if (a == b)
-- return 1;
-+#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
-+ 0,
-+#endif
-+#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
-+ 0,
-+#endif
-+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
-+ 0,
-+#endif
-+};
-+static int __pyx_CyFunction_init(void) {
-+ __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
-+ if (unlikely(__pyx_CyFunctionType == NULL)) {
-+ return -1;
- }
-- return b == &PyBaseObject_Type;
-+ return 0;
- }
--static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
-- PyObject *mro;
-- if (a == b) return 1;
-- mro = a->tp_mro;
-- if (likely(mro)) {
-- Py_ssize_t i, n;
-- n = PyTuple_GET_SIZE(mro);
-- for (i = 0; i < n; i++) {
-- if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
-- return 1;
-- }
-- return 0;
-+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
-+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-+ m->defaults = PyObject_Malloc(size);
-+ if (unlikely(!m->defaults))
-+ return PyErr_NoMemory();
-+ memset(m->defaults, 0, size);
-+ m->defaults_pyobjects = pyobjects;
-+ m->defaults_size = size;
-+ return m->defaults;
-+}
-+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
-+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-+ m->defaults_tuple = tuple;
-+ Py_INCREF(tuple);
-+}
-+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
-+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-+ m->defaults_kwdict = dict;
-+ Py_INCREF(dict);
-+}
-+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
-+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
-+ m->func_annotations = dict;
-+ Py_INCREF(dict);
-+}
-+
-+/* CythonFunction */
-+static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
-+ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
-+ PyObject *op = __Pyx_CyFunction_Init(
-+ PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
-+ ml, flags, qualname, closure, module, globals, code
-+ );
-+ if (likely(op)) {
-+ PyObject_GC_Track(op);
- }
-- return __Pyx_InBases(a, b);
-+ return op;
- }
--#if PY_MAJOR_VERSION == 2
--static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
-- PyObject *exception, *value, *tb;
-- int res;
-- __Pyx_PyThreadState_declare
-- __Pyx_PyThreadState_assign
-- __Pyx_ErrFetch(&exception, &value, &tb);
-- res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
-- if (unlikely(res == -1)) {
-- PyErr_WriteUnraisable(err);
-- res = 0;
-+
-+/* RaiseArgTupleInvalid */
-+static void __Pyx_RaiseArgtupleInvalid(
-+ const char* func_name,
-+ int exact,
-+ Py_ssize_t num_min,
-+ Py_ssize_t num_max,
-+ Py_ssize_t num_found)
-+{
-+ Py_ssize_t num_expected;
-+ const char *more_or_less;
-+ if (num_found < num_min) {
-+ num_expected = num_min;
-+ more_or_less = "at least";
-+ } else {
-+ num_expected = num_max;
-+ more_or_less = "at most";
- }
-- if (!res) {
-- res = PyObject_IsSubclass(err, exc_type2);
-- if (unlikely(res == -1)) {
-- PyErr_WriteUnraisable(err);
-- res = 0;
-- }
-+ if (exact) {
-+ more_or_less = "exactly";
- }
-- __Pyx_ErrRestore(exception, value, tb);
-- return res;
-+ PyErr_Format(PyExc_TypeError,
-+ "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
-+ func_name, more_or_less, num_expected,
-+ (num_expected == 1) ? "" : "s", num_found);
- }
--#else
--static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
-- int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
-- if (!res) {
-- res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
-- }
-- return res;
-+
-+/* RaiseDoubleKeywords */
-+static void __Pyx_RaiseDoubleKeywordsError(
-+ const char* func_name,
-+ PyObject* kw_name)
-+{
-+ PyErr_Format(PyExc_TypeError,
-+ #if PY_MAJOR_VERSION >= 3
-+ "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
-+ #else
-+ "%s() got multiple values for keyword argument '%s'", func_name,
-+ PyString_AsString(kw_name));
-+ #endif
- }
--#endif
--static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
-- Py_ssize_t i, n;
-- assert(PyExceptionClass_Check(exc_type));
-- n = PyTuple_GET_SIZE(tuple);
--#if PY_MAJOR_VERSION >= 3
-- for (i=0; i<n; i++) {
-- if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
-- }
--#endif
-- for (i=0; i<n; i++) {
-- PyObject *t = PyTuple_GET_ITEM(tuple, i);
-+
-+/* ParseKeywords */
-+static int __Pyx_ParseOptionalKeywords(
-+ PyObject *kwds,
-+ PyObject **argnames[],
-+ PyObject *kwds2,
-+ PyObject *values[],
-+ Py_ssize_t num_pos_args,
-+ const char* function_name)
-+{
-+ PyObject *key = 0, *value = 0;
-+ Py_ssize_t pos = 0;
-+ PyObject*** name;
-+ PyObject*** first_kw_arg = argnames + num_pos_args;
-+ while (PyDict_Next(kwds, &pos, &key, &value)) {
-+ name = first_kw_arg;
-+ while (*name && (**name != key)) name++;
-+ if (*name) {
-+ values[name-argnames] = value;
-+ continue;
-+ }
-+ name = first_kw_arg;
- #if PY_MAJOR_VERSION < 3
-- if (likely(exc_type == t)) return 1;
-+ if (likely(PyString_Check(key))) {
-+ while (*name) {
-+ if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
-+ && _PyString_Eq(**name, key)) {
-+ values[name-argnames] = value;
-+ break;
-+ }
-+ name++;
-+ }
-+ if (*name) continue;
-+ else {
-+ PyObject*** argname = argnames;
-+ while (argname != first_kw_arg) {
-+ if ((**argname == key) || (
-+ (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
-+ && _PyString_Eq(**argname, key))) {
-+ goto arg_passed_twice;
-+ }
-+ argname++;
-+ }
-+ }
-+ } else
- #endif
-- if (likely(PyExceptionClass_Check(t))) {
-- if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
-+ if (likely(PyUnicode_Check(key))) {
-+ while (*name) {
-+ int cmp = (**name == key) ? 0 :
-+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
-+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
-+ #endif
-+ PyUnicode_Compare(**name, key);
-+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
-+ if (cmp == 0) {
-+ values[name-argnames] = value;
-+ break;
-+ }
-+ name++;
-+ }
-+ if (*name) continue;
-+ else {
-+ PyObject*** argname = argnames;
-+ while (argname != first_kw_arg) {
-+ int cmp = (**argname == key) ? 0 :
-+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
-+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
-+ #endif
-+ PyUnicode_Compare(**argname, key);
-+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
-+ if (cmp == 0) goto arg_passed_twice;
-+ argname++;
-+ }
-+ }
-+ } else
-+ goto invalid_keyword_type;
-+ if (kwds2) {
-+ if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
- } else {
-+ goto invalid_keyword;
- }
- }
- return 0;
-+arg_passed_twice:
-+ __Pyx_RaiseDoubleKeywordsError(function_name, key);
-+ goto bad;
-+invalid_keyword_type:
-+ PyErr_Format(PyExc_TypeError,
-+ "%.200s() keywords must be strings", function_name);
-+ goto bad;
-+invalid_keyword:
-+ PyErr_Format(PyExc_TypeError,
-+ #if PY_MAJOR_VERSION < 3
-+ "%.200s() got an unexpected keyword argument '%.200s'",
-+ function_name, PyString_AsString(key));
-+ #else
-+ "%s() got an unexpected keyword argument '%U'",
-+ function_name, key);
-+ #endif
-+bad:
-+ return -1;
- }
--static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
-- if (likely(err == exc_type)) return 1;
-- if (likely(PyExceptionClass_Check(err))) {
-- if (likely(PyExceptionClass_Check(exc_type))) {
-- return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
-- } else if (likely(PyTuple_Check(exc_type))) {
-- return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
-- } else {
-- }
-- }
-- return PyErr_GivenExceptionMatches(err, exc_type);
-+
-+/* PyObjectSetAttrStr */
-+#if CYTHON_USE_TYPE_SLOTS
-+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
-+ PyTypeObject* tp = Py_TYPE(obj);
-+ if (likely(tp->tp_setattro))
-+ return tp->tp_setattro(obj, attr_name, value);
-+#if PY_MAJOR_VERSION < 3
-+ if (likely(tp->tp_setattr))
-+ return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
-+#endif
-+ return PyObject_SetAttr(obj, attr_name, value);
- }
--static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
-- assert(PyExceptionClass_Check(exc_type1));
-- assert(PyExceptionClass_Check(exc_type2));
-- if (likely(err == exc_type1 || err == exc_type2)) return 1;
-- if (likely(PyExceptionClass_Check(err))) {
-- return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
-+#endif
-+
-+/* PyIntBinop */
-+#if !CYTHON_COMPILING_IN_PYPY
-+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
-+ (void)inplace;
-+ (void)zerodivision_check;
-+ #if PY_MAJOR_VERSION < 3
-+ if (likely(PyInt_CheckExact(op1))) {
-+ const long b = intval;
-+ long x;
-+ long a = PyInt_AS_LONG(op1);
-+ x = (long)((unsigned long)a + b);
-+ if (likely((x^a) >= 0 || (x^b) >= 0))
-+ return PyInt_FromLong(x);
-+ return PyLong_Type.tp_as_number->nb_add(op1, op2);
- }
-- return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
--}
-+ #endif
-+ #if CYTHON_USE_PYLONG_INTERNALS
-+ if (likely(PyLong_CheckExact(op1))) {
-+ const long b = intval;
-+ long a, x;
-+#ifdef HAVE_LONG_LONG
-+ const PY_LONG_LONG llb = intval;
-+ PY_LONG_LONG lla, llx;
-+#endif
-+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
-+ const Py_ssize_t size = Py_SIZE(op1);
-+ if (likely(__Pyx_sst_abs(size) <= 1)) {
-+ a = likely(size) ? digits[0] : 0;
-+ if (size == -1) a = -a;
-+ } else {
-+ switch (size) {
-+ case -2:
-+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
-+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
-+ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
-+#endif
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 2:
-+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
-+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
-+ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
-+#endif
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case -3:
-+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
-+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
-+ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
-+#endif
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 3:
-+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
-+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
-+ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
-+#endif
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case -4:
-+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
-+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
-+ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
- #endif
--
--/* ExtTypeTest */
--static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
-- if (unlikely(!type)) {
-- PyErr_SetString(PyExc_SystemError, "Missing type object");
-- return 0;
-- }
-- if (likely(__Pyx_TypeCheck(obj, type)))
-- return 1;
-- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
-- Py_TYPE(obj)->tp_name, type->tp_name);
-- return 0;
--}
--
--/* DictGetItem */
--#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
--static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
-- PyObject *value;
-- value = PyDict_GetItemWithError(d, key);
-- if (unlikely(!value)) {
-- if (!PyErr_Occurred()) {
-- if (unlikely(PyTuple_Check(key))) {
-- PyObject* args = PyTuple_Pack(1, key);
-- if (likely(args)) {
-- PyErr_SetObject(PyExc_KeyError, args);
-- Py_DECREF(args);
-- }
-- } else {
-- PyErr_SetObject(PyExc_KeyError, key);
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 4:
-+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
-+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
-+ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
-+#endif
-+ }
-+ CYTHON_FALLTHROUGH;
-+ default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
- }
- }
-- return NULL;
-- }
-- Py_INCREF(value);
-- return value;
--}
-+ x = a + b;
-+ return PyLong_FromLong(x);
-+#ifdef HAVE_LONG_LONG
-+ long_long:
-+ llx = lla + llb;
-+ return PyLong_FromLongLong(llx);
- #endif
--
--/* RaiseTooManyValuesToUnpack */
--static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
-- PyErr_Format(PyExc_ValueError,
-- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
--}
--
--/* RaiseNeedMoreValuesToUnpack */
--static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
-- PyErr_Format(PyExc_ValueError,
-- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
-- index, (index == 1) ? "" : "s");
--}
--
--/* IterFinish */
--static CYTHON_INLINE int __Pyx_IterFinish(void) {
--#if CYTHON_FAST_THREAD_STATE
-- PyThreadState *tstate = __Pyx_PyThreadState_Current;
-- PyObject* exc_type = tstate->curexc_type;
-- if (unlikely(exc_type)) {
-- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
-- PyObject *exc_value, *exc_tb;
-- exc_value = tstate->curexc_value;
-- exc_tb = tstate->curexc_traceback;
-- tstate->curexc_type = 0;
-- tstate->curexc_value = 0;
-- tstate->curexc_traceback = 0;
-- Py_DECREF(exc_type);
-- Py_XDECREF(exc_value);
-- Py_XDECREF(exc_tb);
-- return 0;
-- } else {
-- return -1;
-- }
-- }
-- return 0;
--#else
-- if (unlikely(PyErr_Occurred())) {
-- if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
-- PyErr_Clear();
-- return 0;
-- } else {
-- return -1;
-- }
-+
-+
- }
-- return 0;
--#endif
--}
--
--/* UnpackItemEndCheck */
--static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
-- if (unlikely(retval)) {
-- Py_DECREF(retval);
-- __Pyx_RaiseTooManyValuesError(expected);
-- return -1;
-- } else {
-- return __Pyx_IterFinish();
-+ #endif
-+ if (PyFloat_CheckExact(op1)) {
-+ const long b = intval;
-+ double a = PyFloat_AS_DOUBLE(op1);
-+ double result;
-+ PyFPE_START_PROTECT("add", return NULL)
-+ result = ((double)a) + (double)b;
-+ PyFPE_END_PROTECT(result)
-+ return PyFloat_FromDouble(result);
- }
-- return 0;
-+ return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
- }
-+#endif
-
--/* Import */
--static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
-- PyObject *empty_list = 0;
-- PyObject *module = 0;
-- PyObject *global_dict = 0;
-- PyObject *empty_dict = 0;
-- PyObject *list;
-+/* PyIntBinop */
-+#if !CYTHON_COMPILING_IN_PYPY
-+static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
-+ (void)inplace;
-+ (void)zerodivision_check;
- #if PY_MAJOR_VERSION < 3
-- PyObject *py_import;
-- py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
-- if (!py_import)
-- goto bad;
-- #endif
-- if (from_list)
-- list = from_list;
-- else {
-- empty_list = PyList_New(0);
-- if (!empty_list)
-- goto bad;
-- list = empty_list;
-+ if (likely(PyInt_CheckExact(op1))) {
-+ const long b = intval;
-+ long x;
-+ long a = PyInt_AS_LONG(op1);
-+ x = (long)((unsigned long)a - b);
-+ if (likely((x^a) >= 0 || (x^~b) >= 0))
-+ return PyInt_FromLong(x);
-+ return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
- }
-- global_dict = PyModule_GetDict(__pyx_m);
-- if (!global_dict)
-- goto bad;
-- empty_dict = PyDict_New();
-- if (!empty_dict)
-- goto bad;
-- {
-- #if PY_MAJOR_VERSION >= 3
-- if (level == -1) {
-- if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
-- module = PyImport_ImportModuleLevelObject(
-- name, global_dict, empty_dict, list, 1);
-- if (!module) {
-- if (!PyErr_ExceptionMatches(PyExc_ImportError))
-- goto bad;
-- PyErr_Clear();
-- }
-+ #endif
-+ #if CYTHON_USE_PYLONG_INTERNALS
-+ if (likely(PyLong_CheckExact(op1))) {
-+ const long b = intval;
-+ long a, x;
-+#ifdef HAVE_LONG_LONG
-+ const PY_LONG_LONG llb = intval;
-+ PY_LONG_LONG lla, llx;
-+#endif
-+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
-+ const Py_ssize_t size = Py_SIZE(op1);
-+ if (likely(__Pyx_sst_abs(size) <= 1)) {
-+ a = likely(size) ? digits[0] : 0;
-+ if (size == -1) a = -a;
-+ } else {
-+ switch (size) {
-+ case -2:
-+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
-+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
-+ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
-+#endif
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 2:
-+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
-+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
-+ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
-+#endif
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case -3:
-+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
-+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
-+ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
-+#endif
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 3:
-+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
-+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
-+ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
-+#endif
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case -4:
-+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
-+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
-+ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
-+#endif
-+ }
-+ CYTHON_FALLTHROUGH;
-+ case 4:
-+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
-+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
-+ break;
-+#ifdef HAVE_LONG_LONG
-+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
-+ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
-+ goto long_long;
-+#endif
-+ }
-+ CYTHON_FALLTHROUGH;
-+ default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
- }
-- level = 0;
-- }
-- #endif
-- if (!module) {
-- #if PY_MAJOR_VERSION < 3
-- PyObject *py_level = PyInt_FromLong(level);
-- if (!py_level)
-- goto bad;
-- module = PyObject_CallFunctionObjArgs(py_import,
-- name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
-- Py_DECREF(py_level);
-- #else
-- module = PyImport_ImportModuleLevelObject(
-- name, global_dict, empty_dict, list, level);
-- #endif
- }
-- }
--bad:
-- #if PY_MAJOR_VERSION < 3
-- Py_XDECREF(py_import);
-- #endif
-- Py_XDECREF(empty_list);
-- Py_XDECREF(empty_dict);
-- return module;
--}
--
--/* ImportFrom */
--static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
-- PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
-- if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
-- PyErr_Format(PyExc_ImportError,
-- #if PY_MAJOR_VERSION < 3
-- "cannot import name %.230s", PyString_AS_STRING(name));
-- #else
-- "cannot import name %S", name);
-- #endif
-- }
-- return value;
--}
--
--/* HasAttr */
--static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
-- PyObject *r;
-- if (unlikely(!__Pyx_PyBaseString_Check(n))) {
-- PyErr_SetString(PyExc_TypeError,
-- "hasattr(): attribute name must be string");
-- return -1;
-- }
-- r = __Pyx_GetAttr(o, n);
-- if (unlikely(!r)) {
-- PyErr_Clear();
-- return 0;
-- } else {
-- Py_DECREF(r);
-- return 1;
-- }
--}
--
--/* PyObject_GenericGetAttrNoDict */
--#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
--static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
-- PyErr_Format(PyExc_AttributeError,
--#if PY_MAJOR_VERSION >= 3
-- "'%.50s' object has no attribute '%U'",
-- tp->tp_name, attr_name);
--#else
-- "'%.50s' object has no attribute '%.400s'",
-- tp->tp_name, PyString_AS_STRING(attr_name));
-+ x = a - b;
-+ return PyLong_FromLong(x);
-+#ifdef HAVE_LONG_LONG
-+ long_long:
-+ llx = lla - llb;
-+ return PyLong_FromLongLong(llx);
- #endif
-- return NULL;
--}
--static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
-- PyObject *descr;
-- PyTypeObject *tp = Py_TYPE(obj);
-- if (unlikely(!PyString_Check(attr_name))) {
-- return PyObject_GenericGetAttr(obj, attr_name);
-- }
-- assert(!tp->tp_dictoffset);
-- descr = _PyType_Lookup(tp, attr_name);
-- if (unlikely(!descr)) {
-- return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
-+
-+
- }
-- Py_INCREF(descr);
-- #if PY_MAJOR_VERSION < 3
-- if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
- #endif
-- {
-- descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
-- if (unlikely(f)) {
-- PyObject *res = f(descr, obj, (PyObject *)tp);
-- Py_DECREF(descr);
-- return res;
-- }
-+ if (PyFloat_CheckExact(op1)) {
-+ const long b = intval;
-+ double a = PyFloat_AS_DOUBLE(op1);
-+ double result;
-+ PyFPE_START_PROTECT("subtract", return NULL)
-+ result = ((double)a) - (double)b;
-+ PyFPE_END_PROTECT(result)
-+ return PyFloat_FromDouble(result);
- }
-- return descr;
-+ return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
- }
- #endif
-
--/* PyObject_GenericGetAttr */
--#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
--static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
-- if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
-- return PyObject_GenericGetAttr(obj, attr_name);
-- }
-- return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
--}
-+/* WriteUnraisableException */
-+static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
-+ CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
-+ int full_traceback, CYTHON_UNUSED int nogil) {
-+ PyObject *old_exc, *old_val, *old_tb;
-+ PyObject *ctx;
-+ __Pyx_PyThreadState_declare
-+#ifdef WITH_THREAD
-+ PyGILState_STATE state;
-+ if (nogil)
-+ state = PyGILState_Ensure();
-+#ifdef _MSC_VER
-+ else state = (PyGILState_STATE)-1;
- #endif
--
--/* SetVTable */
--static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
--#if PY_VERSION_HEX >= 0x02070000
-- PyObject *ob = PyCapsule_New(vtable, 0, 0);
--#else
-- PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
- #endif
-- if (!ob)
-- goto bad;
-- if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
-- goto bad;
-- Py_DECREF(ob);
-- return 0;
--bad:
-- Py_XDECREF(ob);
-- return -1;
--}
--
--/* PyObjectGetAttrStrNoError */
--static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
-- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
-- if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
-- __Pyx_PyErr_Clear();
--}
--static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
-- PyObject *result;
--#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
-- PyTypeObject* tp = Py_TYPE(obj);
-- if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
-- return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
-+ __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
-+ if (full_traceback) {
-+ Py_XINCREF(old_exc);
-+ Py_XINCREF(old_val);
-+ Py_XINCREF(old_tb);
-+ __Pyx_ErrRestore(old_exc, old_val, old_tb);
-+ PyErr_PrintEx(1);
- }
--#endif
-- result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
-- if (unlikely(!result)) {
-- __Pyx_PyObject_GetAttrStr_ClearAttributeError();
-+ #if PY_MAJOR_VERSION < 3
-+ ctx = PyString_FromString(name);
-+ #else
-+ ctx = PyUnicode_FromString(name);
-+ #endif
-+ __Pyx_ErrRestore(old_exc, old_val, old_tb);
-+ if (!ctx) {
-+ PyErr_WriteUnraisable(Py_None);
-+ } else {
-+ PyErr_WriteUnraisable(ctx);
-+ Py_DECREF(ctx);
- }
-- return result;
-+#ifdef WITH_THREAD
-+ if (nogil)
-+ PyGILState_Release(state);
-+#endif
- }
-
--/* SetupReduce */
--static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
-- int ret;
-- PyObject *name_attr;
-- name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
-- if (likely(name_attr)) {
-- ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
-- } else {
-- ret = -1;
-- }
-- if (unlikely(ret < 0)) {
-- PyErr_Clear();
-- ret = 0;
-- }
-- Py_XDECREF(name_attr);
-- return ret;
-+/* SwapException */
-+#if CYTHON_FAST_THREAD_STATE
-+static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
-+ PyObject *tmp_type, *tmp_value, *tmp_tb;
-+ #if CYTHON_USE_EXC_INFO_STACK
-+ _PyErr_StackItem *exc_info = tstate->exc_info;
-+ tmp_type = exc_info->exc_type;
-+ tmp_value = exc_info->exc_value;
-+ tmp_tb = exc_info->exc_traceback;
-+ exc_info->exc_type = *type;
-+ exc_info->exc_value = *value;
-+ exc_info->exc_traceback = *tb;
-+ #else
-+ tmp_type = tstate->exc_type;
-+ tmp_value = tstate->exc_value;
-+ tmp_tb = tstate->exc_traceback;
-+ tstate->exc_type = *type;
-+ tstate->exc_value = *value;
-+ tstate->exc_traceback = *tb;
-+ #endif
-+ *type = tmp_type;
-+ *value = tmp_value;
-+ *tb = tmp_tb;
- }
--static int __Pyx_setup_reduce(PyObject* type_obj) {
-- int ret = 0;
-- PyObject *object_reduce = NULL;
-- PyObject *object_reduce_ex = NULL;
-- PyObject *reduce = NULL;
-- PyObject *reduce_ex = NULL;
-- PyObject *reduce_cython = NULL;
-- PyObject *setstate = NULL;
-- PyObject *setstate_cython = NULL;
--#if CYTHON_USE_PYTYPE_LOOKUP
-- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
--#else
-- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
--#endif
--#if CYTHON_USE_PYTYPE_LOOKUP
-- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
--#else
-- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
--#endif
-- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
-- if (reduce_ex == object_reduce_ex) {
--#if CYTHON_USE_PYTYPE_LOOKUP
-- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
- #else
-- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
-+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
-+ PyObject *tmp_type, *tmp_value, *tmp_tb;
-+ PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
-+ PyErr_SetExcInfo(*type, *value, *tb);
-+ *type = tmp_type;
-+ *value = tmp_value;
-+ *tb = tmp_tb;
-+}
- #endif
-- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
-- if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
-- reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
-- if (likely(reduce_cython)) {
-- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
-- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
-- } else if (reduce == object_reduce || PyErr_Occurred()) {
-- goto __PYX_BAD;
-- }
-- setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
-- if (!setstate) PyErr_Clear();
-- if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
-- setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
-- if (likely(setstate_cython)) {
-- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
-- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
-- } else if (!setstate || PyErr_Occurred()) {
-- goto __PYX_BAD;
-+
-+/* SetItemInt */
-+static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
-+ int r;
-+ if (!j) return -1;
-+ r = PyObject_SetItem(o, j, v);
-+ Py_DECREF(j);
-+ return r;
-+}
-+static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
-+ CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
-+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
-+ if (is_list || PyList_CheckExact(o)) {
-+ Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
-+ if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
-+ PyObject* old = PyList_GET_ITEM(o, n);
-+ Py_INCREF(v);
-+ PyList_SET_ITEM(o, n, v);
-+ Py_DECREF(old);
-+ return 1;
-+ }
-+ } else {
-+ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-+ if (likely(m && m->sq_ass_item)) {
-+ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
-+ Py_ssize_t l = m->sq_length(o);
-+ if (likely(l >= 0)) {
-+ i += l;
-+ } else {
-+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
-+ return -1;
-+ PyErr_Clear();
- }
- }
-- PyType_Modified((PyTypeObject*)type_obj);
-+ return m->sq_ass_item(o, i, v);
- }
- }
-- goto __PYX_GOOD;
--__PYX_BAD:
-- if (!PyErr_Occurred())
-- PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
-- ret = -1;
--__PYX_GOOD:
--#if !CYTHON_USE_PYTYPE_LOOKUP
-- Py_XDECREF(object_reduce);
-- Py_XDECREF(object_reduce_ex);
-+#else
-+#if CYTHON_COMPILING_IN_PYPY
-+ if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
-+#else
-+ if (is_list || PySequence_Check(o))
- #endif
-- Py_XDECREF(reduce);
-- Py_XDECREF(reduce_ex);
-- Py_XDECREF(reduce_cython);
-- Py_XDECREF(setstate);
-- Py_XDECREF(setstate_cython);
-- return ret;
-+ {
-+ return PySequence_SetItem(o, i, v);
-+ }
-+#endif
-+ return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
- }
-
--/* CalculateMetaclass */
--static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
-- Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
-- for (i=0; i < nbases; i++) {
-- PyTypeObject *tmptype;
-- PyObject *tmp = PyTuple_GET_ITEM(bases, i);
-- tmptype = Py_TYPE(tmp);
--#if PY_MAJOR_VERSION < 3
-- if (tmptype == &PyClass_Type)
-- continue;
--#endif
-- if (!metaclass) {
-- metaclass = tmptype;
-- continue;
-+/* FastTypeChecks */
-+#if CYTHON_COMPILING_IN_CPYTHON
-+static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
-+ while (a) {
-+ a = a->tp_base;
-+ if (a == b)
-+ return 1;
-+ }
-+ return b == &PyBaseObject_Type;
-+}
-+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
-+ PyObject *mro;
-+ if (a == b) return 1;
-+ mro = a->tp_mro;
-+ if (likely(mro)) {
-+ Py_ssize_t i, n;
-+ n = PyTuple_GET_SIZE(mro);
-+ for (i = 0; i < n; i++) {
-+ if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
-+ return 1;
- }
-- if (PyType_IsSubtype(metaclass, tmptype))
-- continue;
-- if (PyType_IsSubtype(tmptype, metaclass)) {
-- metaclass = tmptype;
-- continue;
-+ return 0;
-+ }
-+ return __Pyx_InBases(a, b);
-+}
-+#if PY_MAJOR_VERSION == 2
-+static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
-+ PyObject *exception, *value, *tb;
-+ int res;
-+ __Pyx_PyThreadState_declare
-+ __Pyx_PyThreadState_assign
-+ __Pyx_ErrFetch(&exception, &value, &tb);
-+ res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
-+ if (unlikely(res == -1)) {
-+ PyErr_WriteUnraisable(err);
-+ res = 0;
-+ }
-+ if (!res) {
-+ res = PyObject_IsSubclass(err, exc_type2);
-+ if (unlikely(res == -1)) {
-+ PyErr_WriteUnraisable(err);
-+ res = 0;
- }
-- PyErr_SetString(PyExc_TypeError,
-- "metaclass conflict: "
-- "the metaclass of a derived class "
-- "must be a (non-strict) subclass "
-- "of the metaclasses of all its bases");
-- return NULL;
- }
-- if (!metaclass) {
--#if PY_MAJOR_VERSION < 3
-- metaclass = &PyClass_Type;
-+ __Pyx_ErrRestore(exception, value, tb);
-+ return res;
-+}
- #else
-- metaclass = &PyType_Type;
--#endif
-+static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
-+ int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
-+ if (!res) {
-+ res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
- }
-- Py_INCREF((PyObject*) metaclass);
-- return (PyObject*) metaclass;
-+ return res;
- }
--
--/* Py3ClassCreate */
--static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
-- PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
-- PyObject *ns;
-- if (metaclass) {
-- PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
-- if (prep) {
-- PyObject *pargs = PyTuple_Pack(2, name, bases);
-- if (unlikely(!pargs)) {
-- Py_DECREF(prep);
-- return NULL;
-- }
-- ns = PyObject_Call(prep, pargs, mkw);
-- Py_DECREF(prep);
-- Py_DECREF(pargs);
-+#endif
-+static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
-+ Py_ssize_t i, n;
-+ assert(PyExceptionClass_Check(exc_type));
-+ n = PyTuple_GET_SIZE(tuple);
-+#if PY_MAJOR_VERSION >= 3
-+ for (i=0; i<n; i++) {
-+ if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
-+ }
-+#endif
-+ for (i=0; i<n; i++) {
-+ PyObject *t = PyTuple_GET_ITEM(tuple, i);
-+ #if PY_MAJOR_VERSION < 3
-+ if (likely(exc_type == t)) return 1;
-+ #endif
-+ if (likely(PyExceptionClass_Check(t))) {
-+ if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
- } else {
-- if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
-- return NULL;
-- PyErr_Clear();
-- ns = PyDict_New();
- }
-- } else {
-- ns = PyDict_New();
- }
-- if (unlikely(!ns))
-- return NULL;
-- if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
-- if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
-- if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
-- return ns;
--bad:
-- Py_DECREF(ns);
-- return NULL;
-+ return 0;
- }
--static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
-- PyObject *dict, PyObject *mkw,
-- int calculate_metaclass, int allow_py2_metaclass) {
-- PyObject *result, *margs;
-- PyObject *owned_metaclass = NULL;
-- if (allow_py2_metaclass) {
-- owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
-- if (owned_metaclass) {
-- metaclass = owned_metaclass;
-- } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
-- PyErr_Clear();
-+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
-+ if (likely(err == exc_type)) return 1;
-+ if (likely(PyExceptionClass_Check(err))) {
-+ if (likely(PyExceptionClass_Check(exc_type))) {
-+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
-+ } else if (likely(PyTuple_Check(exc_type))) {
-+ return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
- } else {
-- return NULL;
- }
- }
-- if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
-- metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
-- Py_XDECREF(owned_metaclass);
-- if (unlikely(!metaclass))
-- return NULL;
-- owned_metaclass = metaclass;
-- }
-- margs = PyTuple_Pack(3, name, bases, dict);
-- if (unlikely(!margs)) {
-- result = NULL;
-- } else {
-- result = PyObject_Call(metaclass, margs, mkw);
-- Py_DECREF(margs);
-+ return PyErr_GivenExceptionMatches(err, exc_type);
-+}
-+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
-+ assert(PyExceptionClass_Check(exc_type1));
-+ assert(PyExceptionClass_Check(exc_type2));
-+ if (likely(err == exc_type1 || err == exc_type2)) return 1;
-+ if (likely(PyExceptionClass_Check(err))) {
-+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
- }
-- Py_XDECREF(owned_metaclass);
-- return result;
-+ return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
- }
-+#endif
-
--/* GetNameInClass */
--static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
-- PyObject *result;
-- __Pyx_PyThreadState_declare
-- __Pyx_PyThreadState_assign
-- if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
-- return NULL;
-- __Pyx_PyErr_Clear();
-- __Pyx_GetModuleGlobalNameUncached(result, name);
-- return result;
--}
--static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
-- PyObject *result;
-- result = __Pyx_PyObject_GetAttrStr(nmspace, name);
-- if (!result) {
-- result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
-+/* ExtTypeTest */
-+static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
-+ if (unlikely(!type)) {
-+ PyErr_SetString(PyExc_SystemError, "Missing type object");
-+ return 0;
- }
-- return result;
-+ if (likely(__Pyx_TypeCheck(obj, type)))
-+ return 1;
-+ PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
-+ Py_TYPE(obj)->tp_name, type->tp_name);
-+ return 0;
- }
-
--/* CLineInTraceback */
--#ifndef CYTHON_CLINE_IN_TRACEBACK
--static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
-- PyObject *use_cline;
-- PyObject *ptype, *pvalue, *ptraceback;
--#if CYTHON_COMPILING_IN_CPYTHON
-- PyObject **cython_runtime_dict;
--#endif
-- if (unlikely(!__pyx_cython_runtime)) {
-- return c_line;
-- }
-- __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
--#if CYTHON_COMPILING_IN_CPYTHON
-- cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
-- if (likely(cython_runtime_dict)) {
-- __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
-- use_cline, *cython_runtime_dict,
-- __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
-- } else
--#endif
-- {
-- PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
-- if (use_cline_obj) {
-- use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
-- Py_DECREF(use_cline_obj);
-- } else {
-- PyErr_Clear();
-- use_cline = NULL;
-- }
-- }
-- if (!use_cline) {
-- c_line = 0;
-- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
-- }
-- else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
-- c_line = 0;
-+/* DictGetItem */
-+#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
-+static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
-+ PyObject *value;
-+ value = PyDict_GetItemWithError(d, key);
-+ if (unlikely(!value)) {
-+ if (!PyErr_Occurred()) {
-+ if (unlikely(PyTuple_Check(key))) {
-+ PyObject* args = PyTuple_Pack(1, key);
-+ if (likely(args)) {
-+ PyErr_SetObject(PyExc_KeyError, args);
-+ Py_DECREF(args);
-+ }
-+ } else {
-+ PyErr_SetObject(PyExc_KeyError, key);
-+ }
-+ }
-+ return NULL;
- }
-- __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
-- return c_line;
-+ Py_INCREF(value);
-+ return value;
- }
- #endif
-
--/* CodeObjectCache */
--static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
-- int start = 0, mid = 0, end = count - 1;
-- if (end >= 0 && code_line > entries[end].code_line) {
-- return count;
-- }
-- while (start < end) {
-- mid = start + (end - start) / 2;
-- if (code_line < entries[mid].code_line) {
-- end = mid;
-- } else if (code_line > entries[mid].code_line) {
-- start = mid + 1;
-+/* RaiseTooManyValuesToUnpack */
-+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
-+ PyErr_Format(PyExc_ValueError,
-+ "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
-+}
-+
-+/* RaiseNeedMoreValuesToUnpack */
-+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
-+ PyErr_Format(PyExc_ValueError,
-+ "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
-+ index, (index == 1) ? "" : "s");
-+}
-+
-+/* IterFinish */
-+static CYTHON_INLINE int __Pyx_IterFinish(void) {
-+#if CYTHON_FAST_THREAD_STATE
-+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
-+ PyObject* exc_type = tstate->curexc_type;
-+ if (unlikely(exc_type)) {
-+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
-+ PyObject *exc_value, *exc_tb;
-+ exc_value = tstate->curexc_value;
-+ exc_tb = tstate->curexc_traceback;
-+ tstate->curexc_type = 0;
-+ tstate->curexc_value = 0;
-+ tstate->curexc_traceback = 0;
-+ Py_DECREF(exc_type);
-+ Py_XDECREF(exc_value);
-+ Py_XDECREF(exc_tb);
-+ return 0;
- } else {
-- return mid;
-+ return -1;
- }
- }
-- if (code_line <= entries[mid].code_line) {
-- return mid;
-- } else {
-- return mid + 1;
-+ return 0;
-+#else
-+ if (unlikely(PyErr_Occurred())) {
-+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
-+ PyErr_Clear();
-+ return 0;
-+ } else {
-+ return -1;
-+ }
- }
-+ return 0;
-+#endif
- }
--static PyCodeObject *__pyx_find_code_object(int code_line) {
-- PyCodeObject* code_object;
-- int pos;
-- if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
-- return NULL;
-- }
-- pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
-- if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
-- return NULL;
-+
-+/* UnpackItemEndCheck */
-+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
-+ if (unlikely(retval)) {
-+ Py_DECREF(retval);
-+ __Pyx_RaiseTooManyValuesError(expected);
-+ return -1;
-+ } else {
-+ return __Pyx_IterFinish();
- }
-- code_object = __pyx_code_cache.entries[pos].code_object;
-- Py_INCREF(code_object);
-- return code_object;
-+ return 0;
- }
--static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
-- int pos, i;
-- __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
-- if (unlikely(!code_line)) {
-- return;
-+
-+/* Import */
-+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
-+ PyObject *empty_list = 0;
-+ PyObject *module = 0;
-+ PyObject *global_dict = 0;
-+ PyObject *empty_dict = 0;
-+ PyObject *list;
-+ #if PY_MAJOR_VERSION < 3
-+ PyObject *py_import;
-+ py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
-+ if (!py_import)
-+ goto bad;
-+ #endif
-+ if (from_list)
-+ list = from_list;
-+ else {
-+ empty_list = PyList_New(0);
-+ if (!empty_list)
-+ goto bad;
-+ list = empty_list;
- }
-- if (unlikely(!entries)) {
-- entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
-- if (likely(entries)) {
-- __pyx_code_cache.entries = entries;
-- __pyx_code_cache.max_count = 64;
-- __pyx_code_cache.count = 1;
-- entries[0].code_line = code_line;
-- entries[0].code_object = code_object;
-- Py_INCREF(code_object);
-+ global_dict = PyModule_GetDict(__pyx_m);
-+ if (!global_dict)
-+ goto bad;
-+ empty_dict = PyDict_New();
-+ if (!empty_dict)
-+ goto bad;
-+ {
-+ #if PY_MAJOR_VERSION >= 3
-+ if (level == -1) {
-+ if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
-+ module = PyImport_ImportModuleLevelObject(
-+ name, global_dict, empty_dict, list, 1);
-+ if (!module) {
-+ if (!PyErr_ExceptionMatches(PyExc_ImportError))
-+ goto bad;
-+ PyErr_Clear();
-+ }
-+ }
-+ level = 0;
- }
-- return;
-- }
-- pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
-- if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
-- PyCodeObject* tmp = entries[pos].code_object;
-- entries[pos].code_object = code_object;
-- Py_DECREF(tmp);
-- return;
-- }
-- if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
-- int new_max = __pyx_code_cache.max_count + 64;
-- entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
-- __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
-- if (unlikely(!entries)) {
-- return;
-+ #endif
-+ if (!module) {
-+ #if PY_MAJOR_VERSION < 3
-+ PyObject *py_level = PyInt_FromLong(level);
-+ if (!py_level)
-+ goto bad;
-+ module = PyObject_CallFunctionObjArgs(py_import,
-+ name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
-+ Py_DECREF(py_level);
-+ #else
-+ module = PyImport_ImportModuleLevelObject(
-+ name, global_dict, empty_dict, list, level);
-+ #endif
- }
-- __pyx_code_cache.entries = entries;
-- __pyx_code_cache.max_count = new_max;
-- }
-- for (i=__pyx_code_cache.count; i>pos; i--) {
-- entries[i] = entries[i-1];
- }
-- entries[pos].code_line = code_line;
-- entries[pos].code_object = code_object;
-- __pyx_code_cache.count++;
-- Py_INCREF(code_object);
--}
--
--/* AddTraceback */
--#include "compile.h"
--#include "frameobject.h"
--#include "traceback.h"
--static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
-- const char *funcname, int c_line,
-- int py_line, const char *filename) {
-- PyCodeObject *py_code = 0;
-- PyObject *py_srcfile = 0;
-- PyObject *py_funcname = 0;
-+bad:
- #if PY_MAJOR_VERSION < 3
-- py_srcfile = PyString_FromString(filename);
-- #else
-- py_srcfile = PyUnicode_FromString(filename);
-+ Py_XDECREF(py_import);
- #endif
-- if (!py_srcfile) goto bad;
-- if (c_line) {
-- #if PY_MAJOR_VERSION < 3
-- py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
-- #else
-- py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
-- #endif
-- }
-- else {
-+ Py_XDECREF(empty_list);
-+ Py_XDECREF(empty_dict);
-+ return module;
-+}
-+
-+/* ImportFrom */
-+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
-+ PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
-+ if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
-+ PyErr_Format(PyExc_ImportError,
- #if PY_MAJOR_VERSION < 3
-- py_funcname = PyString_FromString(funcname);
-+ "cannot import name %.230s", PyString_AS_STRING(name));
- #else
-- py_funcname = PyUnicode_FromString(funcname);
-+ "cannot import name %S", name);
- #endif
- }
-- if (!py_funcname) goto bad;
-- py_code = __Pyx_PyCode_New(
-- 0,
-- 0,
-- 0,
-- 0,
-- 0,
-- __pyx_empty_bytes, /*PyObject *code,*/
-- __pyx_empty_tuple, /*PyObject *consts,*/
-- __pyx_empty_tuple, /*PyObject *names,*/
-- __pyx_empty_tuple, /*PyObject *varnames,*/
-- __pyx_empty_tuple, /*PyObject *freevars,*/
-- __pyx_empty_tuple, /*PyObject *cellvars,*/
-- py_srcfile, /*PyObject *filename,*/
-- py_funcname, /*PyObject *name,*/
-- py_line,
-- __pyx_empty_bytes /*PyObject *lnotab*/
-- );
-- Py_DECREF(py_srcfile);
-- Py_DECREF(py_funcname);
-- return py_code;
--bad:
-- Py_XDECREF(py_srcfile);
-- Py_XDECREF(py_funcname);
-- return NULL;
-+ return value;
- }
--static void __Pyx_AddTraceback(const char *funcname, int c_line,
-- int py_line, const char *filename) {
-- PyCodeObject *py_code = 0;
-- PyFrameObject *py_frame = 0;
-- PyThreadState *tstate = __Pyx_PyThreadState_Current;
-- if (c_line) {
-- c_line = __Pyx_CLineForTraceback(tstate, c_line);
-+
-+/* HasAttr */
-+static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
-+ PyObject *r;
-+ if (unlikely(!__Pyx_PyBaseString_Check(n))) {
-+ PyErr_SetString(PyExc_TypeError,
-+ "hasattr(): attribute name must be string");
-+ return -1;
- }
-- py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
-- if (!py_code) {
-- py_code = __Pyx_CreateCodeObjectForTraceback(
-- funcname, c_line, py_line, filename);
-- if (!py_code) goto bad;
-- __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
-+ r = __Pyx_GetAttr(o, n);
-+ if (unlikely(!r)) {
-+ PyErr_Clear();
-+ return 0;
-+ } else {
-+ Py_DECREF(r);
-+ return 1;
- }
-- py_frame = PyFrame_New(
-- tstate, /*PyThreadState *tstate,*/
-- py_code, /*PyCodeObject *code,*/
-- __pyx_d, /*PyObject *globals,*/
-- 0 /*PyObject *locals*/
-- );
-- if (!py_frame) goto bad;
-- __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
-- PyTraceBack_Here(py_frame);
--bad:
-- Py_XDECREF(py_code);
-- Py_XDECREF(py_frame);
- }
-
--/* CIntToPy */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
-- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
-- const int is_unsigned = neg_one > const_zero;
-- if (is_unsigned) {
-- if (sizeof(int) < sizeof(long)) {
-- return PyInt_FromLong((long) value);
-- } else if (sizeof(int) <= sizeof(unsigned long)) {
-- return PyLong_FromUnsignedLong((unsigned long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
-- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
--#endif
-- }
-- } else {
-- if (sizeof(int) <= sizeof(long)) {
-- return PyInt_FromLong((long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
-- return PyLong_FromLongLong((PY_LONG_LONG) value);
-+/* PyObject_GenericGetAttrNoDict */
-+#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
-+static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
-+ PyErr_Format(PyExc_AttributeError,
-+#if PY_MAJOR_VERSION >= 3
-+ "'%.50s' object has no attribute '%U'",
-+ tp->tp_name, attr_name);
-+#else
-+ "'%.50s' object has no attribute '%.400s'",
-+ tp->tp_name, PyString_AS_STRING(attr_name));
- #endif
-- }
-+ return NULL;
-+}
-+static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
-+ PyObject *descr;
-+ PyTypeObject *tp = Py_TYPE(obj);
-+ if (unlikely(!PyString_Check(attr_name))) {
-+ return PyObject_GenericGetAttr(obj, attr_name);
-+ }
-+ assert(!tp->tp_dictoffset);
-+ descr = _PyType_Lookup(tp, attr_name);
-+ if (unlikely(!descr)) {
-+ return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
- }
-+ Py_INCREF(descr);
-+ #if PY_MAJOR_VERSION < 3
-+ if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
-+ #endif
- {
-- int one = 1; int little = (int)*(unsigned char *)&one;
-- unsigned char *bytes = (unsigned char *)&value;
-- return _PyLong_FromByteArray(bytes, sizeof(int),
-- little, !is_unsigned);
-+ descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
-+ if (unlikely(f)) {
-+ PyObject *res = f(descr, obj, (PyObject *)tp);
-+ Py_DECREF(descr);
-+ return res;
-+ }
- }
-+ return descr;
- }
-+#endif
-
--/* CIntFromPyVerify */
--#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
-- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
--#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
-- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
--#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
-- {\
-- func_type value = func_value;\
-- if (sizeof(target_type) < sizeof(func_type)) {\
-- if (unlikely(value != (func_type) (target_type) value)) {\
-- func_type zero = 0;\
-- if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
-- return (target_type) -1;\
-- if (is_unsigned && unlikely(value < zero))\
-- goto raise_neg_overflow;\
-- else\
-- goto raise_overflow;\
-- }\
-- }\
-- return (target_type) value;\
-+/* PyObject_GenericGetAttr */
-+#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
-+static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
-+ if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
-+ return PyObject_GenericGetAttr(obj, attr_name);
- }
-+ return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
-+}
-+#endif
-
--/* CIntToPy */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_event_id(enum mpv_event_id value) {
-- const enum mpv_event_id neg_one = (enum mpv_event_id) ((enum mpv_event_id) 0 - (enum mpv_event_id) 1), const_zero = (enum mpv_event_id) 0;
-- const int is_unsigned = neg_one > const_zero;
-- if (is_unsigned) {
-- if (sizeof(enum mpv_event_id) < sizeof(long)) {
-- return PyInt_FromLong((long) value);
-- } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned long)) {
-- return PyLong_FromUnsignedLong((unsigned long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned PY_LONG_LONG)) {
-- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
-+/* SetVTable */
-+static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
-+#if PY_VERSION_HEX >= 0x02070000
-+ PyObject *ob = PyCapsule_New(vtable, 0, 0);
-+#else
-+ PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
-+#endif
-+ if (!ob)
-+ goto bad;
-+ if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
-+ goto bad;
-+ Py_DECREF(ob);
-+ return 0;
-+bad:
-+ Py_XDECREF(ob);
-+ return -1;
-+}
-+
-+/* PyObjectGetAttrStrNoError */
-+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
-+ __Pyx_PyThreadState_declare
-+ __Pyx_PyThreadState_assign
-+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
-+ __Pyx_PyErr_Clear();
-+}
-+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
-+ PyObject *result;
-+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
-+ PyTypeObject* tp = Py_TYPE(obj);
-+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
-+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
-+ }
-+#endif
-+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
-+ if (unlikely(!result)) {
-+ __Pyx_PyObject_GetAttrStr_ClearAttributeError();
-+ }
-+ return result;
-+}
-+
-+/* SetupReduce */
-+static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
-+ int ret;
-+ PyObject *name_attr;
-+ name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
-+ if (likely(name_attr)) {
-+ ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
-+ } else {
-+ ret = -1;
-+ }
-+ if (unlikely(ret < 0)) {
-+ PyErr_Clear();
-+ ret = 0;
-+ }
-+ Py_XDECREF(name_attr);
-+ return ret;
-+}
-+static int __Pyx_setup_reduce(PyObject* type_obj) {
-+ int ret = 0;
-+ PyObject *object_reduce = NULL;
-+ PyObject *object_reduce_ex = NULL;
-+ PyObject *reduce = NULL;
-+ PyObject *reduce_ex = NULL;
-+ PyObject *reduce_cython = NULL;
-+ PyObject *setstate = NULL;
-+ PyObject *setstate_cython = NULL;
-+#if CYTHON_USE_PYTYPE_LOOKUP
-+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
-+#else
-+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
- #endif
-- }
-- } else {
-- if (sizeof(enum mpv_event_id) <= sizeof(long)) {
-- return PyInt_FromLong((long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
-- return PyLong_FromLongLong((PY_LONG_LONG) value);
-+#if CYTHON_USE_PYTYPE_LOOKUP
-+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
-+#else
-+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
-+#endif
-+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
-+ if (reduce_ex == object_reduce_ex) {
-+#if CYTHON_USE_PYTYPE_LOOKUP
-+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
-+#else
-+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
- #endif
-+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
-+ if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
-+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
-+ if (likely(reduce_cython)) {
-+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
-+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
-+ } else if (reduce == object_reduce || PyErr_Occurred()) {
-+ goto __PYX_BAD;
-+ }
-+ setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
-+ if (!setstate) PyErr_Clear();
-+ if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
-+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
-+ if (likely(setstate_cython)) {
-+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
-+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
-+ } else if (!setstate || PyErr_Occurred()) {
-+ goto __PYX_BAD;
-+ }
-+ }
-+ PyType_Modified((PyTypeObject*)type_obj);
- }
- }
-- {
-- int one = 1; int little = (int)*(unsigned char *)&one;
-- unsigned char *bytes = (unsigned char *)&value;
-- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_event_id),
-- little, !is_unsigned);
-- }
-+ goto __PYX_GOOD;
-+__PYX_BAD:
-+ if (!PyErr_Occurred())
-+ PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
-+ ret = -1;
-+__PYX_GOOD:
-+#if !CYTHON_USE_PYTYPE_LOOKUP
-+ Py_XDECREF(object_reduce);
-+ Py_XDECREF(object_reduce_ex);
-+#endif
-+ Py_XDECREF(reduce);
-+ Py_XDECREF(reduce_ex);
-+ Py_XDECREF(reduce_cython);
-+ Py_XDECREF(setstate);
-+ Py_XDECREF(setstate_cython);
-+ return ret;
- }
-
--/* CIntToPy */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
-- const unsigned long neg_one = (unsigned long) ((unsigned long) 0 - (unsigned long) 1), const_zero = (unsigned long) 0;
-- const int is_unsigned = neg_one > const_zero;
-- if (is_unsigned) {
-- if (sizeof(unsigned long) < sizeof(long)) {
-- return PyInt_FromLong((long) value);
-- } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
-- return PyLong_FromUnsignedLong((unsigned long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
-- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
-+/* CalculateMetaclass */
-+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
-+ Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
-+ for (i=0; i < nbases; i++) {
-+ PyTypeObject *tmptype;
-+ PyObject *tmp = PyTuple_GET_ITEM(bases, i);
-+ tmptype = Py_TYPE(tmp);
-+#if PY_MAJOR_VERSION < 3
-+ if (tmptype == &PyClass_Type)
-+ continue;
- #endif
-+ if (!metaclass) {
-+ metaclass = tmptype;
-+ continue;
- }
-- } else {
-- if (sizeof(unsigned long) <= sizeof(long)) {
-- return PyInt_FromLong((long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
-- return PyLong_FromLongLong((PY_LONG_LONG) value);
--#endif
-+ if (PyType_IsSubtype(metaclass, tmptype))
-+ continue;
-+ if (PyType_IsSubtype(tmptype, metaclass)) {
-+ metaclass = tmptype;
-+ continue;
- }
-+ PyErr_SetString(PyExc_TypeError,
-+ "metaclass conflict: "
-+ "the metaclass of a derived class "
-+ "must be a (non-strict) subclass "
-+ "of the metaclasses of all its bases");
-+ return NULL;
- }
-- {
-- int one = 1; int little = (int)*(unsigned char *)&one;
-- unsigned char *bytes = (unsigned char *)&value;
-- return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
-- little, !is_unsigned);
-+ if (!metaclass) {
-+#if PY_MAJOR_VERSION < 3
-+ metaclass = &PyClass_Type;
-+#else
-+ metaclass = &PyType_Type;
-+#endif
- }
-+ Py_INCREF((PyObject*) metaclass);
-+ return (PyObject*) metaclass;
- }
-
--/* CIntToPy */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_error(enum mpv_error value) {
-- const enum mpv_error neg_one = (enum mpv_error) ((enum mpv_error) 0 - (enum mpv_error) 1), const_zero = (enum mpv_error) 0;
-- const int is_unsigned = neg_one > const_zero;
-- if (is_unsigned) {
-- if (sizeof(enum mpv_error) < sizeof(long)) {
-- return PyInt_FromLong((long) value);
-- } else if (sizeof(enum mpv_error) <= sizeof(unsigned long)) {
-- return PyLong_FromUnsignedLong((unsigned long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_error) <= sizeof(unsigned PY_LONG_LONG)) {
-- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
--#endif
-+/* Py3ClassCreate */
-+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
-+ PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
-+ PyObject *ns;
-+ if (metaclass) {
-+ PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
-+ if (prep) {
-+ PyObject *pargs = PyTuple_Pack(2, name, bases);
-+ if (unlikely(!pargs)) {
-+ Py_DECREF(prep);
-+ return NULL;
-+ }
-+ ns = PyObject_Call(prep, pargs, mkw);
-+ Py_DECREF(prep);
-+ Py_DECREF(pargs);
-+ } else {
-+ if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
-+ return NULL;
-+ PyErr_Clear();
-+ ns = PyDict_New();
- }
- } else {
-- if (sizeof(enum mpv_error) <= sizeof(long)) {
-- return PyInt_FromLong((long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_error) <= sizeof(PY_LONG_LONG)) {
-- return PyLong_FromLongLong((PY_LONG_LONG) value);
--#endif
-- }
-- }
-- {
-- int one = 1; int little = (int)*(unsigned char *)&one;
-- unsigned char *bytes = (unsigned char *)&value;
-- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_error),
-- little, !is_unsigned);
-+ ns = PyDict_New();
- }
-+ if (unlikely(!ns))
-+ return NULL;
-+ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
-+ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
-+ if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
-+ return ns;
-+bad:
-+ Py_DECREF(ns);
-+ return NULL;
- }
--
--/* CIntToPy */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_log_level(enum mpv_log_level value) {
-- const enum mpv_log_level neg_one = (enum mpv_log_level) ((enum mpv_log_level) 0 - (enum mpv_log_level) 1), const_zero = (enum mpv_log_level) 0;
-- const int is_unsigned = neg_one > const_zero;
-- if (is_unsigned) {
-- if (sizeof(enum mpv_log_level) < sizeof(long)) {
-- return PyInt_FromLong((long) value);
-- } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned long)) {
-- return PyLong_FromUnsignedLong((unsigned long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned PY_LONG_LONG)) {
-- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
--#endif
-+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
-+ PyObject *dict, PyObject *mkw,
-+ int calculate_metaclass, int allow_py2_metaclass) {
-+ PyObject *result, *margs;
-+ PyObject *owned_metaclass = NULL;
-+ if (allow_py2_metaclass) {
-+ owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
-+ if (owned_metaclass) {
-+ metaclass = owned_metaclass;
-+ } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
-+ PyErr_Clear();
-+ } else {
-+ return NULL;
- }
-+ }
-+ if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
-+ metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
-+ Py_XDECREF(owned_metaclass);
-+ if (unlikely(!metaclass))
-+ return NULL;
-+ owned_metaclass = metaclass;
-+ }
-+ margs = PyTuple_Pack(3, name, bases, dict);
-+ if (unlikely(!margs)) {
-+ result = NULL;
- } else {
-- if (sizeof(enum mpv_log_level) <= sizeof(long)) {
-- return PyInt_FromLong((long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_log_level) <= sizeof(PY_LONG_LONG)) {
-- return PyLong_FromLongLong((PY_LONG_LONG) value);
--#endif
-- }
-+ result = PyObject_Call(metaclass, margs, mkw);
-+ Py_DECREF(margs);
- }
-- {
-- int one = 1; int little = (int)*(unsigned char *)&one;
-- unsigned char *bytes = (unsigned char *)&value;
-- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_log_level),
-- little, !is_unsigned);
-+ Py_XDECREF(owned_metaclass);
-+ return result;
-+}
-+
-+/* GetNameInClass */
-+static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
-+ PyObject *result;
-+ __Pyx_PyThreadState_declare
-+ __Pyx_PyThreadState_assign
-+ if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
-+ return NULL;
-+ __Pyx_PyErr_Clear();
-+ __Pyx_GetModuleGlobalNameUncached(result, name);
-+ return result;
-+}
-+static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
-+ PyObject *result;
-+ result = __Pyx_PyObject_GetAttrStr(nmspace, name);
-+ if (!result) {
-+ result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
- }
-+ return result;
- }
-
--/* CIntToPy */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_end_file_reason(enum mpv_end_file_reason value) {
-- const enum mpv_end_file_reason neg_one = (enum mpv_end_file_reason) ((enum mpv_end_file_reason) 0 - (enum mpv_end_file_reason) 1), const_zero = (enum mpv_end_file_reason) 0;
-- const int is_unsigned = neg_one > const_zero;
-- if (is_unsigned) {
-- if (sizeof(enum mpv_end_file_reason) < sizeof(long)) {
-- return PyInt_FromLong((long) value);
-- } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned long)) {
-- return PyLong_FromUnsignedLong((unsigned long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned PY_LONG_LONG)) {
-- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
--#endif
-- }
-- } else {
-- if (sizeof(enum mpv_end_file_reason) <= sizeof(long)) {
-- return PyInt_FromLong((long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_end_file_reason) <= sizeof(PY_LONG_LONG)) {
-- return PyLong_FromLongLong((PY_LONG_LONG) value);
-+/* CLineInTraceback */
-+#ifndef CYTHON_CLINE_IN_TRACEBACK
-+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
-+ PyObject *use_cline;
-+ PyObject *ptype, *pvalue, *ptraceback;
-+#if CYTHON_COMPILING_IN_CPYTHON
-+ PyObject **cython_runtime_dict;
- #endif
-- }
-+ if (unlikely(!__pyx_cython_runtime)) {
-+ return c_line;
- }
-+ __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
-+#if CYTHON_COMPILING_IN_CPYTHON
-+ cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
-+ if (likely(cython_runtime_dict)) {
-+ __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
-+ use_cline, *cython_runtime_dict,
-+ __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
-+ } else
-+#endif
- {
-- int one = 1; int little = (int)*(unsigned char *)&one;
-- unsigned char *bytes = (unsigned char *)&value;
-- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_end_file_reason),
-- little, !is_unsigned);
-+ PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
-+ if (use_cline_obj) {
-+ use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
-+ Py_DECREF(use_cline_obj);
-+ } else {
-+ PyErr_Clear();
-+ use_cline = NULL;
-+ }
-+ }
-+ if (!use_cline) {
-+ c_line = 0;
-+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
-+ }
-+ else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
-+ c_line = 0;
- }
-+ __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
-+ return c_line;
- }
--
--/* CIntToPy */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_render_update_flag(enum mpv_render_update_flag value) {
-- const enum mpv_render_update_flag neg_one = (enum mpv_render_update_flag) ((enum mpv_render_update_flag) 0 - (enum mpv_render_update_flag) 1), const_zero = (enum mpv_render_update_flag) 0;
-- const int is_unsigned = neg_one > const_zero;
-- if (is_unsigned) {
-- if (sizeof(enum mpv_render_update_flag) < sizeof(long)) {
-- return PyInt_FromLong((long) value);
-- } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned long)) {
-- return PyLong_FromUnsignedLong((unsigned long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned PY_LONG_LONG)) {
-- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
- #endif
-+
-+/* CodeObjectCache */
-+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
-+ int start = 0, mid = 0, end = count - 1;
-+ if (end >= 0 && code_line > entries[end].code_line) {
-+ return count;
-+ }
-+ while (start < end) {
-+ mid = start + (end - start) / 2;
-+ if (code_line < entries[mid].code_line) {
-+ end = mid;
-+ } else if (code_line > entries[mid].code_line) {
-+ start = mid + 1;
-+ } else {
-+ return mid;
- }
-+ }
-+ if (code_line <= entries[mid].code_line) {
-+ return mid;
- } else {
-- if (sizeof(enum mpv_render_update_flag) <= sizeof(long)) {
-- return PyInt_FromLong((long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_render_update_flag) <= sizeof(PY_LONG_LONG)) {
-- return PyLong_FromLongLong((PY_LONG_LONG) value);
--#endif
-- }
-+ return mid + 1;
- }
-- {
-- int one = 1; int little = (int)*(unsigned char *)&one;
-- unsigned char *bytes = (unsigned char *)&value;
-- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_render_update_flag),
-- little, !is_unsigned);
-+}
-+static PyCodeObject *__pyx_find_code_object(int code_line) {
-+ PyCodeObject* code_object;
-+ int pos;
-+ if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
-+ return NULL;
-+ }
-+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
-+ if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
-+ return NULL;
- }
-+ code_object = __pyx_code_cache.entries[pos].code_object;
-+ Py_INCREF(code_object);
-+ return code_object;
- }
--
--/* CIntToPy */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
-- const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
-- const int is_unsigned = neg_one > const_zero;
-- if (is_unsigned) {
-- if (sizeof(int64_t) < sizeof(long)) {
-- return PyInt_FromLong((long) value);
-- } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
-- return PyLong_FromUnsignedLong((unsigned long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
-- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
--#endif
-+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
-+ int pos, i;
-+ __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
-+ if (unlikely(!code_line)) {
-+ return;
-+ }
-+ if (unlikely(!entries)) {
-+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
-+ if (likely(entries)) {
-+ __pyx_code_cache.entries = entries;
-+ __pyx_code_cache.max_count = 64;
-+ __pyx_code_cache.count = 1;
-+ entries[0].code_line = code_line;
-+ entries[0].code_object = code_object;
-+ Py_INCREF(code_object);
- }
-- } else {
-- if (sizeof(int64_t) <= sizeof(long)) {
-- return PyInt_FromLong((long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
-- return PyLong_FromLongLong((PY_LONG_LONG) value);
--#endif
-+ return;
-+ }
-+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
-+ if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
-+ PyCodeObject* tmp = entries[pos].code_object;
-+ entries[pos].code_object = code_object;
-+ Py_DECREF(tmp);
-+ return;
-+ }
-+ if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
-+ int new_max = __pyx_code_cache.max_count + 64;
-+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
-+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
-+ if (unlikely(!entries)) {
-+ return;
- }
-+ __pyx_code_cache.entries = entries;
-+ __pyx_code_cache.max_count = new_max;
- }
-- {
-- int one = 1; int little = (int)*(unsigned char *)&one;
-- unsigned char *bytes = (unsigned char *)&value;
-- return _PyLong_FromByteArray(bytes, sizeof(int64_t),
-- little, !is_unsigned);
-+ for (i=__pyx_code_cache.count; i>pos; i--) {
-+ entries[i] = entries[i-1];
- }
-+ entries[pos].code_line = code_line;
-+ entries[pos].code_object = code_object;
-+ __pyx_code_cache.count++;
-+ Py_INCREF(code_object);
- }
-
--/* CIntToPy */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
-- const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
-- const int is_unsigned = neg_one > const_zero;
-- if (is_unsigned) {
-- if (sizeof(uint64_t) < sizeof(long)) {
-- return PyInt_FromLong((long) value);
-- } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
-- return PyLong_FromUnsignedLong((unsigned long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
-- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
--#endif
-- }
-- } else {
-- if (sizeof(uint64_t) <= sizeof(long)) {
-- return PyInt_FromLong((long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
-- return PyLong_FromLongLong((PY_LONG_LONG) value);
--#endif
-- }
-+/* AddTraceback */
-+#include "compile.h"
-+#include "frameobject.h"
-+#include "traceback.h"
-+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
-+ const char *funcname, int c_line,
-+ int py_line, const char *filename) {
-+ PyCodeObject *py_code = NULL;
-+ PyObject *py_funcname = NULL;
-+ #if PY_MAJOR_VERSION < 3
-+ PyObject *py_srcfile = NULL;
-+ py_srcfile = PyString_FromString(filename);
-+ if (!py_srcfile) goto bad;
-+ #endif
-+ if (c_line) {
-+ #if PY_MAJOR_VERSION < 3
-+ py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
-+ if (!py_funcname) goto bad;
-+ #else
-+ py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
-+ if (!py_funcname) goto bad;
-+ funcname = PyUnicode_AsUTF8(py_funcname);
-+ if (!funcname) goto bad;
-+ #endif
-+ }
-+ else {
-+ #if PY_MAJOR_VERSION < 3
-+ py_funcname = PyString_FromString(funcname);
-+ if (!py_funcname) goto bad;
-+ #endif
-+ }
-+ #if PY_MAJOR_VERSION < 3
-+ py_code = __Pyx_PyCode_New(
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ 0,
-+ __pyx_empty_bytes, /*PyObject *code,*/
-+ __pyx_empty_tuple, /*PyObject *consts,*/
-+ __pyx_empty_tuple, /*PyObject *names,*/
-+ __pyx_empty_tuple, /*PyObject *varnames,*/
-+ __pyx_empty_tuple, /*PyObject *freevars,*/
-+ __pyx_empty_tuple, /*PyObject *cellvars,*/
-+ py_srcfile, /*PyObject *filename,*/
-+ py_funcname, /*PyObject *name,*/
-+ py_line,
-+ __pyx_empty_bytes /*PyObject *lnotab*/
-+ );
-+ Py_DECREF(py_srcfile);
-+ #else
-+ py_code = PyCode_NewEmpty(filename, funcname, py_line);
-+ #endif
-+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
-+ return py_code;
-+bad:
-+ Py_XDECREF(py_funcname);
-+ #if PY_MAJOR_VERSION < 3
-+ Py_XDECREF(py_srcfile);
-+ #endif
-+ return NULL;
-+}
-+static void __Pyx_AddTraceback(const char *funcname, int c_line,
-+ int py_line, const char *filename) {
-+ PyCodeObject *py_code = 0;
-+ PyFrameObject *py_frame = 0;
-+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
-+ if (c_line) {
-+ c_line = __Pyx_CLineForTraceback(tstate, c_line);
- }
-- {
-- int one = 1; int little = (int)*(unsigned char *)&one;
-- unsigned char *bytes = (unsigned char *)&value;
-- return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
-- little, !is_unsigned);
-+ py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
-+ if (!py_code) {
-+ py_code = __Pyx_CreateCodeObjectForTraceback(
-+ funcname, c_line, py_line, filename);
-+ if (!py_code) goto bad;
-+ __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
- }
-+ py_frame = PyFrame_New(
-+ tstate, /*PyThreadState *tstate,*/
-+ py_code, /*PyCodeObject *code,*/
-+ __pyx_d, /*PyObject *globals,*/
-+ 0 /*PyObject *locals*/
-+ );
-+ if (!py_frame) goto bad;
-+ __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
-+ PyTraceBack_Here(py_frame);
-+bad:
-+ Py_XDECREF(py_code);
-+ Py_XDECREF(py_frame);
- }
-
--/* CIntToPy */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value) {
-- const enum mpv_format neg_one = (enum mpv_format) ((enum mpv_format) 0 - (enum mpv_format) 1), const_zero = (enum mpv_format) 0;
-- const int is_unsigned = neg_one > const_zero;
-- if (is_unsigned) {
-- if (sizeof(enum mpv_format) < sizeof(long)) {
-- return PyInt_FromLong((long) value);
-- } else if (sizeof(enum mpv_format) <= sizeof(unsigned long)) {
-- return PyLong_FromUnsignedLong((unsigned long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_format) <= sizeof(unsigned PY_LONG_LONG)) {
-- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
--#endif
-- }
-- } else {
-- if (sizeof(enum mpv_format) <= sizeof(long)) {
-- return PyInt_FromLong((long) value);
--#ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_format) <= sizeof(PY_LONG_LONG)) {
-- return PyLong_FromLongLong((PY_LONG_LONG) value);
--#endif
-- }
-- }
-- {
-- int one = 1; int little = (int)*(unsigned char *)&one;
-- unsigned char *bytes = (unsigned char *)&value;
-- return _PyLong_FromByteArray(bytes, sizeof(enum mpv_format),
-- little, !is_unsigned);
-+/* CIntFromPyVerify */
-+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
-+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
-+#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
-+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
-+#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
-+ {\
-+ func_type value = func_value;\
-+ if (sizeof(target_type) < sizeof(func_type)) {\
-+ if (unlikely(value != (func_type) (target_type) value)) {\
-+ func_type zero = 0;\
-+ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
-+ return (target_type) -1;\
-+ if (is_unsigned && unlikely(value < zero))\
-+ goto raise_neg_overflow;\
-+ else\
-+ goto raise_overflow;\
-+ }\
-+ }\
-+ return (target_type) value;\
- }
--}
-
- /* CIntToPy */
--static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
-- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const int neg_one = (int) -1, const_zero = (int) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
- const int is_unsigned = neg_one > const_zero;
- if (is_unsigned) {
-- if (sizeof(long) < sizeof(long)) {
-+ if (sizeof(int) < sizeof(long)) {
- return PyInt_FromLong((long) value);
-- } else if (sizeof(long) <= sizeof(unsigned long)) {
-+ } else if (sizeof(int) <= sizeof(unsigned long)) {
- return PyLong_FromUnsignedLong((unsigned long) value);
- #ifdef HAVE_LONG_LONG
-- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
-+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
- #endif
- }
- } else {
-- if (sizeof(long) <= sizeof(long)) {
-+ if (sizeof(int) <= sizeof(long)) {
- return PyInt_FromLong((long) value);
- #ifdef HAVE_LONG_LONG
-- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
-+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
- return PyLong_FromLongLong((PY_LONG_LONG) value);
- #endif
- }
-@@ -33617,14 +30212,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
- {
- int one = 1; int little = (int)*(unsigned char *)&one;
- unsigned char *bytes = (unsigned char *)&value;
-- return _PyLong_FromByteArray(bytes, sizeof(long),
-+ return _PyLong_FromByteArray(bytes, sizeof(int),
- little, !is_unsigned);
- }
- }
-
- /* CIntFromPy */
- static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
-- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const int neg_one = (int) -1, const_zero = (int) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
- const int is_unsigned = neg_one > const_zero;
- #if PY_MAJOR_VERSION < 3
- if (likely(PyInt_Check(x))) {
-@@ -33811,9 +30413,54 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
- return (int) -1;
- }
-
-+/* CIntToPy */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_event_id(enum mpv_event_id value) {
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const enum mpv_event_id neg_one = (enum mpv_event_id) -1, const_zero = (enum mpv_event_id) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
-+ const int is_unsigned = neg_one > const_zero;
-+ if (is_unsigned) {
-+ if (sizeof(enum mpv_event_id) < sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+ } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned long)) {
-+ return PyLong_FromUnsignedLong((unsigned long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_event_id) <= sizeof(unsigned PY_LONG_LONG)) {
-+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
-+#endif
-+ }
-+ } else {
-+ if (sizeof(enum mpv_event_id) <= sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
-+ return PyLong_FromLongLong((PY_LONG_LONG) value);
-+#endif
-+ }
-+ }
-+ {
-+ int one = 1; int little = (int)*(unsigned char *)&one;
-+ unsigned char *bytes = (unsigned char *)&value;
-+ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_event_id),
-+ little, !is_unsigned);
-+ }
-+}
-+
- /* CIntFromPy */
- static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObject *x) {
-- const enum mpv_event_id neg_one = (enum mpv_event_id) ((enum mpv_event_id) 0 - (enum mpv_event_id) 1), const_zero = (enum mpv_event_id) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const enum mpv_event_id neg_one = (enum mpv_event_id) -1, const_zero = (enum mpv_event_id) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
- const int is_unsigned = neg_one > const_zero;
- #if PY_MAJOR_VERSION < 3
- if (likely(PyInt_Check(x))) {
-@@ -33947,62 +30594,259 @@ static CYTHON_INLINE enum mpv_event_id __Pyx_PyInt_As_enum__mpv_event_id(PyObjec
- break;
- }
- #endif
-- if (sizeof(enum mpv_event_id) <= sizeof(long)) {
-- __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, long, PyLong_AsLong(x))
-+ if (sizeof(enum mpv_event_id) <= sizeof(long)) {
-+ __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, long, PyLong_AsLong(x))
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
-+ __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, PY_LONG_LONG, PyLong_AsLongLong(x))
-+#endif
-+ }
-+ }
-+ {
-+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
-+ PyErr_SetString(PyExc_RuntimeError,
-+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
-+#else
-+ enum mpv_event_id val;
-+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
-+ #if PY_MAJOR_VERSION < 3
-+ if (likely(v) && !PyLong_Check(v)) {
-+ PyObject *tmp = v;
-+ v = PyNumber_Long(tmp);
-+ Py_DECREF(tmp);
-+ }
-+ #endif
-+ if (likely(v)) {
-+ int one = 1; int is_little = (int)*(unsigned char *)&one;
-+ unsigned char *bytes = (unsigned char *)&val;
-+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
-+ bytes, sizeof(val),
-+ is_little, !is_unsigned);
-+ Py_DECREF(v);
-+ if (likely(!ret))
-+ return val;
-+ }
-+#endif
-+ return (enum mpv_event_id) -1;
-+ }
-+ } else {
-+ enum mpv_event_id val;
-+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
-+ if (!tmp) return (enum mpv_event_id) -1;
-+ val = __Pyx_PyInt_As_enum__mpv_event_id(tmp);
-+ Py_DECREF(tmp);
-+ return val;
-+ }
-+raise_overflow:
-+ PyErr_SetString(PyExc_OverflowError,
-+ "value too large to convert to enum mpv_event_id");
-+ return (enum mpv_event_id) -1;
-+raise_neg_overflow:
-+ PyErr_SetString(PyExc_OverflowError,
-+ "can't convert negative value to enum mpv_event_id");
-+ return (enum mpv_event_id) -1;
-+}
-+
-+/* CIntToPy */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value) {
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
-+ const int is_unsigned = neg_one > const_zero;
-+ if (is_unsigned) {
-+ if (sizeof(unsigned long) < sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+ } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
-+ return PyLong_FromUnsignedLong((unsigned long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
-+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
-+#endif
-+ }
-+ } else {
-+ if (sizeof(unsigned long) <= sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
-+ return PyLong_FromLongLong((PY_LONG_LONG) value);
-+#endif
-+ }
-+ }
-+ {
-+ int one = 1; int little = (int)*(unsigned char *)&one;
-+ unsigned char *bytes = (unsigned char *)&value;
-+ return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
-+ little, !is_unsigned);
-+ }
-+}
-+
-+/* CIntToPy */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_error(enum mpv_error value) {
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const enum mpv_error neg_one = (enum mpv_error) -1, const_zero = (enum mpv_error) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
-+ const int is_unsigned = neg_one > const_zero;
-+ if (is_unsigned) {
-+ if (sizeof(enum mpv_error) < sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+ } else if (sizeof(enum mpv_error) <= sizeof(unsigned long)) {
-+ return PyLong_FromUnsignedLong((unsigned long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_error) <= sizeof(unsigned PY_LONG_LONG)) {
-+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
-+#endif
-+ }
-+ } else {
-+ if (sizeof(enum mpv_error) <= sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_error) <= sizeof(PY_LONG_LONG)) {
-+ return PyLong_FromLongLong((PY_LONG_LONG) value);
-+#endif
-+ }
-+ }
-+ {
-+ int one = 1; int little = (int)*(unsigned char *)&one;
-+ unsigned char *bytes = (unsigned char *)&value;
-+ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_error),
-+ little, !is_unsigned);
-+ }
-+}
-+
-+/* CIntToPy */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_log_level(enum mpv_log_level value) {
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const enum mpv_log_level neg_one = (enum mpv_log_level) -1, const_zero = (enum mpv_log_level) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
-+ const int is_unsigned = neg_one > const_zero;
-+ if (is_unsigned) {
-+ if (sizeof(enum mpv_log_level) < sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+ } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned long)) {
-+ return PyLong_FromUnsignedLong((unsigned long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_log_level) <= sizeof(unsigned PY_LONG_LONG)) {
-+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
-+#endif
-+ }
-+ } else {
-+ if (sizeof(enum mpv_log_level) <= sizeof(long)) {
-+ return PyInt_FromLong((long) value);
- #ifdef HAVE_LONG_LONG
-- } else if (sizeof(enum mpv_event_id) <= sizeof(PY_LONG_LONG)) {
-- __PYX_VERIFY_RETURN_INT_EXC(enum mpv_event_id, PY_LONG_LONG, PyLong_AsLongLong(x))
-+ } else if (sizeof(enum mpv_log_level) <= sizeof(PY_LONG_LONG)) {
-+ return PyLong_FromLongLong((PY_LONG_LONG) value);
- #endif
-- }
- }
-- {
--#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
-- PyErr_SetString(PyExc_RuntimeError,
-- "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
--#else
-- enum mpv_event_id val;
-- PyObject *v = __Pyx_PyNumber_IntOrLong(x);
-- #if PY_MAJOR_VERSION < 3
-- if (likely(v) && !PyLong_Check(v)) {
-- PyObject *tmp = v;
-- v = PyNumber_Long(tmp);
-- Py_DECREF(tmp);
-- }
-- #endif
-- if (likely(v)) {
-- int one = 1; int is_little = (int)*(unsigned char *)&one;
-- unsigned char *bytes = (unsigned char *)&val;
-- int ret = _PyLong_AsByteArray((PyLongObject *)v,
-- bytes, sizeof(val),
-- is_little, !is_unsigned);
-- Py_DECREF(v);
-- if (likely(!ret))
-- return val;
-- }
-+ }
-+ {
-+ int one = 1; int little = (int)*(unsigned char *)&one;
-+ unsigned char *bytes = (unsigned char *)&value;
-+ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_log_level),
-+ little, !is_unsigned);
-+ }
-+}
-+
-+/* CIntToPy */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_end_file_reason(enum mpv_end_file_reason value) {
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const enum mpv_end_file_reason neg_one = (enum mpv_end_file_reason) -1, const_zero = (enum mpv_end_file_reason) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
-+ const int is_unsigned = neg_one > const_zero;
-+ if (is_unsigned) {
-+ if (sizeof(enum mpv_end_file_reason) < sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+ } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned long)) {
-+ return PyLong_FromUnsignedLong((unsigned long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_end_file_reason) <= sizeof(unsigned PY_LONG_LONG)) {
-+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
- #endif
-- return (enum mpv_event_id) -1;
- }
- } else {
-- enum mpv_event_id val;
-- PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
-- if (!tmp) return (enum mpv_event_id) -1;
-- val = __Pyx_PyInt_As_enum__mpv_event_id(tmp);
-- Py_DECREF(tmp);
-- return val;
-+ if (sizeof(enum mpv_end_file_reason) <= sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_end_file_reason) <= sizeof(PY_LONG_LONG)) {
-+ return PyLong_FromLongLong((PY_LONG_LONG) value);
-+#endif
-+ }
-+ }
-+ {
-+ int one = 1; int little = (int)*(unsigned char *)&one;
-+ unsigned char *bytes = (unsigned char *)&value;
-+ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_end_file_reason),
-+ little, !is_unsigned);
-+ }
-+}
-+
-+/* CIntToPy */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_render_update_flag(enum mpv_render_update_flag value) {
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const enum mpv_render_update_flag neg_one = (enum mpv_render_update_flag) -1, const_zero = (enum mpv_render_update_flag) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
-+ const int is_unsigned = neg_one > const_zero;
-+ if (is_unsigned) {
-+ if (sizeof(enum mpv_render_update_flag) < sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+ } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned long)) {
-+ return PyLong_FromUnsignedLong((unsigned long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_render_update_flag) <= sizeof(unsigned PY_LONG_LONG)) {
-+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
-+#endif
-+ }
-+ } else {
-+ if (sizeof(enum mpv_render_update_flag) <= sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_render_update_flag) <= sizeof(PY_LONG_LONG)) {
-+ return PyLong_FromLongLong((PY_LONG_LONG) value);
-+#endif
-+ }
-+ }
-+ {
-+ int one = 1; int little = (int)*(unsigned char *)&one;
-+ unsigned char *bytes = (unsigned char *)&value;
-+ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_render_update_flag),
-+ little, !is_unsigned);
- }
--raise_overflow:
-- PyErr_SetString(PyExc_OverflowError,
-- "value too large to convert to enum mpv_event_id");
-- return (enum mpv_event_id) -1;
--raise_neg_overflow:
-- PyErr_SetString(PyExc_OverflowError,
-- "can't convert negative value to enum mpv_event_id");
-- return (enum mpv_event_id) -1;
- }
-
- /* CIntFromPy */
- static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
-- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const long neg_one = (long) -1, const_zero = (long) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
- const int is_unsigned = neg_one > const_zero;
- #if PY_MAJOR_VERSION < 3
- if (likely(PyInt_Check(x))) {
-@@ -34189,9 +31033,92 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
- return (long) -1;
- }
-
-+/* CIntToPy */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
-+ const int is_unsigned = neg_one > const_zero;
-+ if (is_unsigned) {
-+ if (sizeof(int64_t) < sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+ } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
-+ return PyLong_FromUnsignedLong((unsigned long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
-+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
-+#endif
-+ }
-+ } else {
-+ if (sizeof(int64_t) <= sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
-+ return PyLong_FromLongLong((PY_LONG_LONG) value);
-+#endif
-+ }
-+ }
-+ {
-+ int one = 1; int little = (int)*(unsigned char *)&one;
-+ unsigned char *bytes = (unsigned char *)&value;
-+ return _PyLong_FromByteArray(bytes, sizeof(int64_t),
-+ little, !is_unsigned);
-+ }
-+}
-+
-+/* CIntToPy */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
-+ const int is_unsigned = neg_one > const_zero;
-+ if (is_unsigned) {
-+ if (sizeof(uint64_t) < sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+ } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
-+ return PyLong_FromUnsignedLong((unsigned long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
-+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
-+#endif
-+ }
-+ } else {
-+ if (sizeof(uint64_t) <= sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
-+ return PyLong_FromLongLong((PY_LONG_LONG) value);
-+#endif
-+ }
-+ }
-+ {
-+ int one = 1; int little = (int)*(unsigned char *)&one;
-+ unsigned char *bytes = (unsigned char *)&value;
-+ return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
-+ little, !is_unsigned);
-+ }
-+}
-+
- /* CIntFromPy */
- static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
-- const uint64_t neg_one = (uint64_t) ((uint64_t) 0 - (uint64_t) 1), const_zero = (uint64_t) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
- const int is_unsigned = neg_one > const_zero;
- #if PY_MAJOR_VERSION < 3
- if (likely(PyInt_Check(x))) {
-@@ -34378,9 +31305,54 @@ static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
- return (uint64_t) -1;
- }
-
-+/* CIntToPy */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__mpv_format(enum mpv_format value) {
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const enum mpv_format neg_one = (enum mpv_format) -1, const_zero = (enum mpv_format) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
-+ const int is_unsigned = neg_one > const_zero;
-+ if (is_unsigned) {
-+ if (sizeof(enum mpv_format) < sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+ } else if (sizeof(enum mpv_format) <= sizeof(unsigned long)) {
-+ return PyLong_FromUnsignedLong((unsigned long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_format) <= sizeof(unsigned PY_LONG_LONG)) {
-+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
-+#endif
-+ }
-+ } else {
-+ if (sizeof(enum mpv_format) <= sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(enum mpv_format) <= sizeof(PY_LONG_LONG)) {
-+ return PyLong_FromLongLong((PY_LONG_LONG) value);
-+#endif
-+ }
-+ }
-+ {
-+ int one = 1; int little = (int)*(unsigned char *)&one;
-+ unsigned char *bytes = (unsigned char *)&value;
-+ return _PyLong_FromByteArray(bytes, sizeof(enum mpv_format),
-+ little, !is_unsigned);
-+ }
-+}
-+
- /* CIntFromPy */
- static CYTHON_INLINE enum mpv_format __Pyx_PyInt_As_enum__mpv_format(PyObject *x) {
-- const enum mpv_format neg_one = (enum mpv_format) ((enum mpv_format) 0 - (enum mpv_format) 1), const_zero = (enum mpv_format) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const enum mpv_format neg_one = (enum mpv_format) -1, const_zero = (enum mpv_format) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
- const int is_unsigned = neg_one > const_zero;
- #if PY_MAJOR_VERSION < 3
- if (likely(PyInt_Check(x))) {
-@@ -34569,7 +31541,14 @@ static CYTHON_INLINE enum mpv_format __Pyx_PyInt_As_enum__mpv_format(PyObject *x
-
- /* CIntFromPy */
- static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
-- const int64_t neg_one = (int64_t) ((int64_t) 0 - (int64_t) 1), const_zero = (int64_t) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
- const int is_unsigned = neg_one > const_zero;
- #if PY_MAJOR_VERSION < 3
- if (likely(PyInt_Check(x))) {
-@@ -34758,7 +31737,14 @@ static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
-
- /* CIntFromPy */
- static CYTHON_INLINE intptr_t __Pyx_PyInt_As_intptr_t(PyObject *x) {
-- const intptr_t neg_one = (intptr_t) ((intptr_t) 0 - (intptr_t) 1), const_zero = (intptr_t) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const intptr_t neg_one = (intptr_t) -1, const_zero = (intptr_t) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
- const int is_unsigned = neg_one > const_zero;
- #if PY_MAJOR_VERSION < 3
- if (likely(PyInt_Check(x))) {
-@@ -34945,6 +31931,44 @@ static CYTHON_INLINE intptr_t __Pyx_PyInt_As_intptr_t(PyObject *x) {
- return (intptr_t) -1;
- }
-
-+/* CIntToPy */
-+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wconversion"
-+#endif
-+ const long neg_one = (long) -1, const_zero = (long) 0;
-+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
-+#pragma GCC diagnostic pop
-+#endif
-+ const int is_unsigned = neg_one > const_zero;
-+ if (is_unsigned) {
-+ if (sizeof(long) < sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+ } else if (sizeof(long) <= sizeof(unsigned long)) {
-+ return PyLong_FromUnsignedLong((unsigned long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
-+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
-+#endif
-+ }
-+ } else {
-+ if (sizeof(long) <= sizeof(long)) {
-+ return PyInt_FromLong((long) value);
-+#ifdef HAVE_LONG_LONG
-+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
-+ return PyLong_FromLongLong((PY_LONG_LONG) value);
-+#endif
-+ }
-+ }
-+ {
-+ int one = 1; int little = (int)*(unsigned char *)&one;
-+ unsigned char *bytes = (unsigned char *)&value;
-+ return _PyLong_FromByteArray(bytes, sizeof(long),
-+ little, !is_unsigned);
-+ }
-+}
-+
- /* CheckBinaryVersion */
- static int __Pyx_check_binary_version(void) {
- char ctversion[4], rtversion[4];
-@@ -35211,7 +32235,7 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
- }
- static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
- if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
-- return __Pyx_PyIndex_AsSsize_t(o);
-+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
- #if PY_MAJOR_VERSION < 3
- } else if (likely(PyInt_CheckExact(o))) {
- return PyInt_AS_LONG(o);
diff --git a/vidcutter/libs/pympv/mpv.pyx b/vidcutter/libs/pympv/mpv.pyx
index 540ea649..8af2dcc7 100644
--- a/vidcutter/libs/pympv/mpv.pyx
diff --git a/srcpkgs/vidcutter/patches/mpv-0.35-3.patch b/srcpkgs/vidcutter/patches/mpv-0.35-3.patch
index 7a1b2909b4c4..d1f5f1364c62 100644
--- a/srcpkgs/vidcutter/patches/mpv-0.35-3.patch
+++ b/srcpkgs/vidcutter/patches/mpv-0.35-3.patch
@@ -10,13266 +10,6 @@ Subject: [PATCH] pympv updates
vidcutter/libs/pympv/mpv.pyx | 6 +-
2 files changed, 1900 insertions(+), 1898 deletions(-)
-diff --git a/vidcutter/libs/pympv/mpv.c b/vidcutter/libs/pympv/mpv.c
-index a3522ef5..26838a03 100644
---- a/vidcutter/libs/pympv/mpv.c
-+++ b/vidcutter/libs/pympv/mpv.c
-@@ -944,7 +944,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext;
- struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors;
- struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
-
--/* "vidcutter/libs/pympv/mpv.pyx":890
-+/* "vidcutter/libs/pympv/mpv.pyx":892
- * self.params[0].type = MPV_RENDER_PARAM_INVALID
- *
- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
-@@ -956,7 +956,7 @@ struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp {
- int owned;
- };
-
--/* "vidcutter/libs/pympv/mpv.pyx":156
-+/* "vidcutter/libs/pympv/mpv.pyx":158
- *
- *
- * cdef class EndOfFileReached(object): # <<<<<<<<<<<<<<
-@@ -971,7 +971,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached {
- };
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":182
-+/* "vidcutter/libs/pympv/mpv.pyx":184
- *
- *
- * cdef class LogMessage(object): # <<<<<<<<<<<<<<
-@@ -988,7 +988,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage {
- };
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":243
-+/* "vidcutter/libs/pympv/mpv.pyx":245
- *
- *
- * cdef class Property(object): # <<<<<<<<<<<<<<
-@@ -1003,7 +1003,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Property {
- };
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":256
-+/* "vidcutter/libs/pympv/mpv.pyx":258
- *
- *
- * cdef class Event(object): # <<<<<<<<<<<<<<
-@@ -1020,7 +1020,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Event {
- };
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":359
-+/* "vidcutter/libs/pympv/mpv.pyx":361
- *
- *
- * cdef class Context(object): # <<<<<<<<<<<<<<
-@@ -1037,7 +1037,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_Context {
- };
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":881
-+/* "vidcutter/libs/pympv/mpv.pyx":883
- * DEF MAX_RENDER_PARAMS = 32
- *
- * cdef class _RenderParams(object): # <<<<<<<<<<<<<<
-@@ -1052,7 +1052,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams {
- };
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":928
-+/* "vidcutter/libs/pympv/mpv.pyx":930
- *
- * @cython.internal
- * cdef class RenderFrameInfo(object): # <<<<<<<<<<<<<<
-@@ -1065,7 +1065,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo {
- };
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":937
-+/* "vidcutter/libs/pympv/mpv.pyx":939
- * return self
- *
- * cdef class RenderContext(object): # <<<<<<<<<<<<<<
-@@ -1084,7 +1084,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext {
- };
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":1122
-+/* "vidcutter/libs/pympv/mpv.pyx":1124
- * self.close()
- *
- * cdef class OpenGLRenderContext(RenderContext): # <<<<<<<<<<<<<<
-@@ -1096,7 +1096,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv_OpenGLRenderContext {
- };
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":318
-+/* "vidcutter/libs/pympv/mpv.pyx":320
- *
- *
- * def _errors(fn): # <<<<<<<<<<<<<<
-@@ -1110,7 +1110,7 @@ struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors {
-
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":156
-+/* "vidcutter/libs/pympv/mpv.pyx":158
- *
- *
- * cdef class EndOfFileReached(object): # <<<<<<<<<<<<<<
-@@ -1124,7 +1124,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached {
- static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *__pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached;
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":182
-+/* "vidcutter/libs/pympv/mpv.pyx":184
- *
- *
- * cdef class LogMessage(object): # <<<<<<<<<<<<<<
-@@ -1138,7 +1138,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage {
- static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *__pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage;
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":243
-+/* "vidcutter/libs/pympv/mpv.pyx":245
- *
- *
- * cdef class Property(object): # <<<<<<<<<<<<<<
-@@ -1152,7 +1152,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property {
- static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *__pyx_vtabptr_9vidcutter_4libs_3mpv_Property;
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":256
-+/* "vidcutter/libs/pympv/mpv.pyx":258
- *
- *
- * cdef class Event(object): # <<<<<<<<<<<<<<
-@@ -1167,7 +1167,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event {
- static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *__pyx_vtabptr_9vidcutter_4libs_3mpv_Event;
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":359
-+/* "vidcutter/libs/pympv/mpv.pyx":361
- *
- *
- * cdef class Context(object): # <<<<<<<<<<<<<<
-@@ -1184,7 +1184,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context {
- static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *__pyx_vtabptr_9vidcutter_4libs_3mpv_Context;
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":881
-+/* "vidcutter/libs/pympv/mpv.pyx":883
- * DEF MAX_RENDER_PARAMS = 32
- *
- * cdef class _RenderParams(object): # <<<<<<<<<<<<<<
-@@ -1200,7 +1200,7 @@ struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams {
- static struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *__pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams;
-
-
--/* "vidcutter/libs/pympv/mpv.pyx":928
-+/* "vidcutter/libs/pympv/mpv.pyx":930
- *
- * @cython.internal
- * cdef class RenderFrameInfo(object): # <<<<<<<<<<<<<<
-@@ -2522,9 +2522,9 @@ static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv_OpenGLRenderContext(PyTypeOb
- static PyObject *__pyx_tp_new_9vidcutter_4libs_3mpv___pyx_scope_struct___errors(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
- static PyObject *__pyx_int_0;
- static PyObject *__pyx_int_1;
--static PyObject *__pyx_int_2;
- static PyObject *__pyx_int_3;
- static PyObject *__pyx_int_32;
-+static PyObject *__pyx_int_109;
- static PyObject *__pyx_int_5713169;
- static PyObject *__pyx_int_90958262;
- static PyObject *__pyx_int_142036910;
-@@ -2588,7 +2588,7 @@ static PyObject *__pyx_codeobj__53;
- static PyObject *__pyx_codeobj__55;
- /* Late includes */
-
--/* "vidcutter/libs/pympv/mpv.pyx":55
-+/* "vidcutter/libs/pympv/mpv.pyx":57
- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
- * # mpv -> Python
- * def _strdec(s): # <<<<<<<<<<<<<<
-@@ -2627,7 +2627,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_strdec", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":56
-+ /* "vidcutter/libs/pympv/mpv.pyx":58
- * # mpv -> Python
- * def _strdec(s):
- * try: # <<<<<<<<<<<<<<
-@@ -2643,7 +2643,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- __Pyx_XGOTREF(__pyx_t_3);
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":57
-+ /* "vidcutter/libs/pympv/mpv.pyx":59
- * def _strdec(s):
- * try:
- * return s.decode("utf-8", _strdec_err) # <<<<<<<<<<<<<<
-@@ -2651,9 +2651,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- * # In python2, bail to bytes on failure
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L3_error)
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 57, __pyx_L3_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 59, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = NULL;
- __pyx_t_8 = 0;
-@@ -2670,7 +2670,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
-- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L3_error)
-+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L3_error)
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-@@ -2679,14 +2679,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
-- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L3_error)
-+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L3_error)
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- } else
- #endif
- {
-- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 57, __pyx_L3_error)
-+ __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 59, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_9);
- if (__pyx_t_7) {
- __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
-@@ -2697,7 +2697,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
- __pyx_t_6 = 0;
-- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L3_error)
-+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- }
-@@ -2706,7 +2706,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- __pyx_t_4 = 0;
- goto __pyx_L7_try_return;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":56
-+ /* "vidcutter/libs/pympv/mpv.pyx":58
- * # mpv -> Python
- * def _strdec(s):
- * try: # <<<<<<<<<<<<<<
-@@ -2721,7 +2721,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":58
-+ /* "vidcutter/libs/pympv/mpv.pyx":60
- * try:
- * return s.decode("utf-8", _strdec_err)
- * except UnicodeDecodeError: # <<<<<<<<<<<<<<
-@@ -2731,12 +2731,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
- if (__pyx_t_8) {
- __Pyx_AddTraceback("vidcutter.libs.mpv._strdec", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 58, __pyx_L5_except_error)
-+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 60, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GOTREF(__pyx_t_9);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":60
-+ /* "vidcutter/libs/pympv/mpv.pyx":62
- * except UnicodeDecodeError:
- * # In python2, bail to bytes on failure
- * return bytes(s) # <<<<<<<<<<<<<<
-@@ -2744,7 +2744,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- * # Python -> mpv
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_s); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __pyx_L5_except_error)
-+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_s); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_r = __pyx_t_6;
- __pyx_t_6 = 0;
-@@ -2756,7 +2756,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- goto __pyx_L5_except_error;
- __pyx_L5_except_error:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":56
-+ /* "vidcutter/libs/pympv/mpv.pyx":58
- * # mpv -> Python
- * def _strdec(s):
- * try: # <<<<<<<<<<<<<<
-@@ -2782,7 +2782,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- goto __pyx_L0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":55
-+ /* "vidcutter/libs/pympv/mpv.pyx":57
- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
- * # mpv -> Python
- * def _strdec(s): # <<<<<<<<<<<<<<
-@@ -2805,7 +2805,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv__strdec(CYTHON_UNUSED PyObject *
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":63
-+/* "vidcutter/libs/pympv/mpv.pyx":65
- *
- * # Python -> mpv
- * def _strenc(s): # <<<<<<<<<<<<<<
-@@ -2844,7 +2844,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_strenc", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":64
-+ /* "vidcutter/libs/pympv/mpv.pyx":66
- * # Python -> mpv
- * def _strenc(s):
- * try: # <<<<<<<<<<<<<<
-@@ -2860,7 +2860,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- __Pyx_XGOTREF(__pyx_t_3);
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":65
-+ /* "vidcutter/libs/pympv/mpv.pyx":67
- * def _strenc(s):
- * try:
- * return s.encode("utf-8", _strdec_err) # <<<<<<<<<<<<<<
-@@ -2868,9 +2868,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- * # In python2, assume bytes and walk right through
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L3_error)
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 67, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_5);
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 65, __pyx_L3_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 67, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = NULL;
- __pyx_t_8 = 0;
-@@ -2887,7 +2887,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
-- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L3_error)
-+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L3_error)
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-@@ -2896,14 +2896,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_utf_8, __pyx_t_6};
-- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L3_error)
-+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L3_error)
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- } else
- #endif
- {
-- __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 65, __pyx_L3_error)
-+ __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 67, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_9);
- if (__pyx_t_7) {
- __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
-@@ -2914,7 +2914,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
- __pyx_t_6 = 0;
-- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L3_error)
-+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- }
-@@ -2923,7 +2923,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- __pyx_t_4 = 0;
- goto __pyx_L7_try_return;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":64
-+ /* "vidcutter/libs/pympv/mpv.pyx":66
- * # Python -> mpv
- * def _strenc(s):
- * try: # <<<<<<<<<<<<<<
-@@ -2938,7 +2938,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":66
-+ /* "vidcutter/libs/pympv/mpv.pyx":68
- * try:
- * return s.encode("utf-8", _strdec_err)
- * except UnicodeEncodeError: # <<<<<<<<<<<<<<
-@@ -2948,12 +2948,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeEncodeError);
- if (__pyx_t_8) {
- __Pyx_AddTraceback("vidcutter.libs.mpv._strenc", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 66, __pyx_L5_except_error)
-+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 68, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GOTREF(__pyx_t_9);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":68
-+ /* "vidcutter/libs/pympv/mpv.pyx":70
- * except UnicodeEncodeError:
- * # In python2, assume bytes and walk right through
- * return s # <<<<<<<<<<<<<<
-@@ -2971,7 +2971,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- goto __pyx_L5_except_error;
- __pyx_L5_except_error:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":64
-+ /* "vidcutter/libs/pympv/mpv.pyx":66
- * # Python -> mpv
- * def _strenc(s):
- * try: # <<<<<<<<<<<<<<
-@@ -2997,7 +2997,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- goto __pyx_L0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":63
-+ /* "vidcutter/libs/pympv/mpv.pyx":65
- *
- * # Python -> mpv
- * def _strenc(s): # <<<<<<<<<<<<<<
-@@ -3020,7 +3020,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_2_strenc(CYTHON_UNUSED PyObject
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":163
-+/* "vidcutter/libs/pympv/mpv.pyx":165
- * cdef public object reason, error
- *
- * cdef _init(self, mpv_event_end_file* eof): # <<<<<<<<<<<<<<
-@@ -3037,14 +3037,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_init", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":164
-+ /* "vidcutter/libs/pympv/mpv.pyx":166
- *
- * cdef _init(self, mpv_event_end_file* eof):
- * self.reason = eof.reason # <<<<<<<<<<<<<<
- * self.error = eof.error
- * return self
- */
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->reason); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->reason); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_v_self->reason);
-@@ -3052,14 +3052,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
- __pyx_v_self->reason = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":165
-+ /* "vidcutter/libs/pympv/mpv.pyx":167
- * cdef _init(self, mpv_event_end_file* eof):
- * self.reason = eof.reason
- * self.error = eof.error # <<<<<<<<<<<<<<
- * return self
- *
- */
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_eof->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_v_self->error);
-@@ -3067,7 +3067,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
- __pyx_v_self->error = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":166
-+ /* "vidcutter/libs/pympv/mpv.pyx":168
- * self.reason = eof.reason
- * self.error = eof.error
- * return self # <<<<<<<<<<<<<<
-@@ -3079,7 +3079,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
- __pyx_r = ((PyObject *)__pyx_v_self);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":163
-+ /* "vidcutter/libs/pympv/mpv.pyx":165
- * cdef public object reason, error
- *
- * cdef _init(self, mpv_event_end_file* eof): # <<<<<<<<<<<<<<
-@@ -3098,7 +3098,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init(struct _
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":161
-+/* "vidcutter/libs/pympv/mpv.pyx":163
- * Wraps: mpv_event_end_file
- * """
- * cdef public object reason, error # <<<<<<<<<<<<<<
-@@ -3587,7 +3587,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_16EndOfFileReached_2__setstate_c
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":189
-+/* "vidcutter/libs/pympv/mpv.pyx":191
- * cdef public object prefix, level, text, log_level
- *
- * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
-@@ -3607,16 +3607,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_init", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":190
-+ /* "vidcutter/libs/pympv/mpv.pyx":192
- *
- * cdef _init(self, mpv_event_log_message* msg):
- * self.level = _strdec(msg.level) # <<<<<<<<<<<<<<
- * self.prefix = _strdec(msg.prefix)
- * self.text = _strdec(msg.text)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -3631,7 +3631,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_GIVEREF(__pyx_t_1);
-@@ -3640,16 +3640,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
- __pyx_v_self->level = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":191
-+ /* "vidcutter/libs/pympv/mpv.pyx":193
- * cdef _init(self, mpv_event_log_message* msg):
- * self.level = _strdec(msg.level)
- * self.prefix = _strdec(msg.prefix) # <<<<<<<<<<<<<<
- * self.text = _strdec(msg.text)
- * self.log_level = msg.log_level
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->prefix); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -3664,7 +3664,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_GIVEREF(__pyx_t_1);
-@@ -3673,16 +3673,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
- __pyx_v_self->prefix = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":192
-+ /* "vidcutter/libs/pympv/mpv.pyx":194
- * self.level = _strdec(msg.level)
- * self.prefix = _strdec(msg.prefix)
- * self.text = _strdec(msg.text) # <<<<<<<<<<<<<<
- * self.log_level = msg.log_level
- * return self
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_msg->text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -3697,7 +3697,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_GIVEREF(__pyx_t_1);
-@@ -3706,14 +3706,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
- __pyx_v_self->text = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":193
-+ /* "vidcutter/libs/pympv/mpv.pyx":195
- * self.prefix = _strdec(msg.prefix)
- * self.text = _strdec(msg.text)
- * self.log_level = msg.log_level # <<<<<<<<<<<<<<
- * return self
- *
- */
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_msg->log_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_v_self->log_level);
-@@ -3721,7 +3721,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
- __pyx_v_self->log_level = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":194
-+ /* "vidcutter/libs/pympv/mpv.pyx":196
- * self.text = _strdec(msg.text)
- * self.log_level = msg.log_level
- * return self # <<<<<<<<<<<<<<
-@@ -3733,7 +3733,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
- __pyx_r = ((PyObject *)__pyx_v_self);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":189
-+ /* "vidcutter/libs/pympv/mpv.pyx":191
- * cdef public object prefix, level, text, log_level
- *
- * cdef _init(self, mpv_event_log_message* msg): # <<<<<<<<<<<<<<
-@@ -3755,7 +3755,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init(struct __pyx_o
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":187
-+/* "vidcutter/libs/pympv/mpv.pyx":189
- * Wraps: mpv_event_log_message
- * """
- * cdef public object prefix, level, text, log_level # <<<<<<<<<<<<<<
-@@ -4438,7 +4438,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_10LogMessage_2__setstate_cython_
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":197
-+/* "vidcutter/libs/pympv/mpv.pyx":199
- *
- *
- * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
-@@ -4459,7 +4459,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_convert_node_value", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":198
-+ /* "vidcutter/libs/pympv/mpv.pyx":200
- *
- * cdef _convert_node_value(mpv_node node):
- * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-@@ -4469,7 +4469,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- switch (__pyx_v_node.format) {
- case MPV_FORMAT_STRING:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":199
-+ /* "vidcutter/libs/pympv/mpv.pyx":201
- * cdef _convert_node_value(mpv_node node):
- * if node.format == MPV_FORMAT_STRING:
- * return _strdec(node.u.string) # <<<<<<<<<<<<<<
-@@ -4477,9 +4477,9 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- * return not not int(node.u.flag)
- */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_node.u.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -4494,14 +4494,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":198
-+ /* "vidcutter/libs/pympv/mpv.pyx":200
- *
- * cdef _convert_node_value(mpv_node node):
- * if node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-@@ -4511,7 +4511,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- break;
- case MPV_FORMAT_FLAG:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":201
-+ /* "vidcutter/libs/pympv/mpv.pyx":203
- * return _strdec(node.u.string)
- * elif node.format == MPV_FORMAT_FLAG:
- * return not not int(node.u.flag) # <<<<<<<<<<<<<<
-@@ -4519,20 +4519,20 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- * return int(node.u.int64)
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_node.u.flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 203, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyBool_FromLong((!((!__pyx_t_5) != 0))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":200
-+ /* "vidcutter/libs/pympv/mpv.pyx":202
- * if node.format == MPV_FORMAT_STRING:
- * return _strdec(node.u.string)
- * elif node.format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
-@@ -4542,7 +4542,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- break;
- case MPV_FORMAT_INT64:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":203
-+ /* "vidcutter/libs/pympv/mpv.pyx":205
- * return not not int(node.u.flag)
- * elif node.format == MPV_FORMAT_INT64:
- * return int(node.u.int64) # <<<<<<<<<<<<<<
-@@ -4550,16 +4550,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- * return float(node.u.double_)
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_From_int64_t(__pyx_v_node.u.int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":202
-+ /* "vidcutter/libs/pympv/mpv.pyx":204
- * elif node.format == MPV_FORMAT_FLAG:
- * return not not int(node.u.flag)
- * elif node.format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
-@@ -4569,7 +4569,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- break;
- case MPV_FORMAT_DOUBLE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":205
-+ /* "vidcutter/libs/pympv/mpv.pyx":207
- * return int(node.u.int64)
- * elif node.format == MPV_FORMAT_DOUBLE:
- * return float(node.u.double_) # <<<<<<<<<<<<<<
-@@ -4577,13 +4577,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- * return _convert_value(node.u.list, node.format)
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
-+ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node.u.double_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":204
-+ /* "vidcutter/libs/pympv/mpv.pyx":206
- * elif node.format == MPV_FORMAT_INT64:
- * return int(node.u.int64)
- * elif node.format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
-@@ -4593,7 +4593,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- break;
- case MPV_FORMAT_NODE_MAP:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":207
-+ /* "vidcutter/libs/pympv/mpv.pyx":209
- * return float(node.u.double_)
- * elif node.format == MPV_FORMAT_NODE_MAP:
- * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
-@@ -4601,13 +4601,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- * return _convert_value(node.u.list, node.format)
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":206
-+ /* "vidcutter/libs/pympv/mpv.pyx":208
- * elif node.format == MPV_FORMAT_DOUBLE:
- * return float(node.u.double_)
- * elif node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-@@ -4617,7 +4617,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- break;
- case MPV_FORMAT_NODE_ARRAY:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":209
-+ /* "vidcutter/libs/pympv/mpv.pyx":211
- * return _convert_value(node.u.list, node.format)
- * elif node.format == MPV_FORMAT_NODE_ARRAY:
- * return _convert_value(node.u.list, node.format) # <<<<<<<<<<<<<<
-@@ -4625,13 +4625,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- *
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_node.u.list, __pyx_v_node.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":208
-+ /* "vidcutter/libs/pympv/mpv.pyx":210
- * elif node.format == MPV_FORMAT_NODE_MAP:
- * return _convert_value(node.u.list, node.format)
- * elif node.format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
-@@ -4642,7 +4642,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- default: break;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":210
-+ /* "vidcutter/libs/pympv/mpv.pyx":212
- * elif node.format == MPV_FORMAT_NODE_ARRAY:
- * return _convert_value(node.u.list, node.format)
- * return None # <<<<<<<<<<<<<<
-@@ -4653,7 +4653,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":197
-+ /* "vidcutter/libs/pympv/mpv.pyx":199
- *
- *
- * cdef _convert_node_value(mpv_node node): # <<<<<<<<<<<<<<
-@@ -4675,7 +4675,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_node_value(struct mpv_no
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":213
-+/* "vidcutter/libs/pympv/mpv.pyx":215
- *
- *
- * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
-@@ -4704,7 +4704,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_convert_value", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":216
-+ /* "vidcutter/libs/pympv/mpv.pyx":218
- * cdef mpv_node node
- * cdef mpv_node_list nodelist
- * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
-@@ -4714,7 +4714,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- switch (__pyx_v_format) {
- case MPV_FORMAT_NODE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":217
-+ /* "vidcutter/libs/pympv/mpv.pyx":219
- * cdef mpv_node_list nodelist
- * if format == MPV_FORMAT_NODE:
- * node = (<mpv_node*>data)[0] # <<<<<<<<<<<<<<
-@@ -4723,7 +4723,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- */
- __pyx_v_node = (((struct mpv_node *)__pyx_v_data)[0]);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":218
-+ /* "vidcutter/libs/pympv/mpv.pyx":220
- * if format == MPV_FORMAT_NODE:
- * node = (<mpv_node*>data)[0]
- * return _convert_node_value(node) # <<<<<<<<<<<<<<
-@@ -4731,13 +4731,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- * nodelist = (<mpv_node_list*>data)[0]
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":216
-+ /* "vidcutter/libs/pympv/mpv.pyx":218
- * cdef mpv_node node
- * cdef mpv_node_list nodelist
- * if format == MPV_FORMAT_NODE: # <<<<<<<<<<<<<<
-@@ -4747,7 +4747,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- break;
- case MPV_FORMAT_NODE_ARRAY:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":220
-+ /* "vidcutter/libs/pympv/mpv.pyx":222
- * return _convert_node_value(node)
- * elif format == MPV_FORMAT_NODE_ARRAY:
- * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
-@@ -4756,19 +4756,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- */
- __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":221
-+ /* "vidcutter/libs/pympv/mpv.pyx":223
- * elif format == MPV_FORMAT_NODE_ARRAY:
- * nodelist = (<mpv_node_list*>data)[0]
- * values = [] # <<<<<<<<<<<<<<
- * for i in range(nodelist.num):
- * values.append(_convert_node_value(nodelist.values[i]))
- */
-- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
-+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_values = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":222
-+ /* "vidcutter/libs/pympv/mpv.pyx":224
- * nodelist = (<mpv_node_list*>data)[0]
- * values = []
- * for i in range(nodelist.num): # <<<<<<<<<<<<<<
-@@ -4780,20 +4780,20 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
- __pyx_v_i = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":223
-+ /* "vidcutter/libs/pympv/mpv.pyx":225
- * values = []
- * for i in range(nodelist.num):
- * values.append(_convert_node_value(nodelist.values[i])) # <<<<<<<<<<<<<<
- * return values
- * elif format == MPV_FORMAT_NODE_MAP:
- */
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 225, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":224
-+ /* "vidcutter/libs/pympv/mpv.pyx":226
- * for i in range(nodelist.num):
- * values.append(_convert_node_value(nodelist.values[i]))
- * return values # <<<<<<<<<<<<<<
-@@ -4805,7 +4805,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- __pyx_r = __pyx_v_values;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":219
-+ /* "vidcutter/libs/pympv/mpv.pyx":221
- * node = (<mpv_node*>data)[0]
- * return _convert_node_value(node)
- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
-@@ -4815,7 +4815,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- break;
- case MPV_FORMAT_NODE_MAP:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":226
-+ /* "vidcutter/libs/pympv/mpv.pyx":228
- * return values
- * elif format == MPV_FORMAT_NODE_MAP:
- * nodelist = (<mpv_node_list*>data)[0] # <<<<<<<<<<<<<<
-@@ -4824,19 +4824,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- */
- __pyx_v_nodelist = (((struct mpv_node_list *)__pyx_v_data)[0]);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":227
-+ /* "vidcutter/libs/pympv/mpv.pyx":229
- * elif format == MPV_FORMAT_NODE_MAP:
- * nodelist = (<mpv_node_list*>data)[0]
- * values = {} # <<<<<<<<<<<<<<
- * for i in range(nodelist.num):
- * value = _convert_node_value(nodelist.values[i])
- */
-- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_values = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":228
-+ /* "vidcutter/libs/pympv/mpv.pyx":230
- * nodelist = (<mpv_node_list*>data)[0]
- * values = {}
- * for i in range(nodelist.num): # <<<<<<<<<<<<<<
-@@ -4848,28 +4848,28 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
- __pyx_v_i = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":229
-+ /* "vidcutter/libs/pympv/mpv.pyx":231
- * values = {}
- * for i in range(nodelist.num):
- * value = _convert_node_value(nodelist.values[i]) # <<<<<<<<<<<<<<
- * values[_strdec(nodelist.keys[i])] = value
- * return values
- */
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value((__pyx_v_nodelist.values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":230
-+ /* "vidcutter/libs/pympv/mpv.pyx":232
- * for i in range(nodelist.num):
- * value = _convert_node_value(nodelist.values[i])
- * values[_strdec(nodelist.keys[i])] = value # <<<<<<<<<<<<<<
- * return values
- * elif format == MPV_FORMAT_STRING:
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyBytes_FromString((__pyx_v_nodelist.keys[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -4884,14 +4884,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 230, __pyx_L1_error)
-+ if (unlikely(PyObject_SetItem(__pyx_v_values, __pyx_t_1, __pyx_v_value) < 0)) __PYX_ERR(0, 232, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":231
-+ /* "vidcutter/libs/pympv/mpv.pyx":233
- * value = _convert_node_value(nodelist.values[i])
- * values[_strdec(nodelist.keys[i])] = value
- * return values # <<<<<<<<<<<<<<
-@@ -4903,7 +4903,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- __pyx_r = __pyx_v_values;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":225
-+ /* "vidcutter/libs/pympv/mpv.pyx":227
- * values.append(_convert_node_value(nodelist.values[i]))
- * return values
- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-@@ -4913,7 +4913,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- break;
- case MPV_FORMAT_STRING:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":233
-+ /* "vidcutter/libs/pympv/mpv.pyx":235
- * return values
- * elif format == MPV_FORMAT_STRING:
- * return _strdec(((<char**>data)[0])) # <<<<<<<<<<<<<<
-@@ -4921,9 +4921,9 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- * return not not (<uint64_t*>data)[0]
- */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_strdec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyBytes_FromString((((char **)__pyx_v_data)[0])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -4938,14 +4938,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":232
-+ /* "vidcutter/libs/pympv/mpv.pyx":234
- * values[_strdec(nodelist.keys[i])] = value
- * return values
- * elif format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-@@ -4955,7 +4955,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- break;
- case MPV_FORMAT_FLAG:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":235
-+ /* "vidcutter/libs/pympv/mpv.pyx":237
- * return _strdec(((<char**>data)[0]))
- * elif format == MPV_FORMAT_FLAG:
- * return not not (<uint64_t*>data)[0] # <<<<<<<<<<<<<<
-@@ -4963,13 +4963,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- * return int((<uint64_t*>data)[0])
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyBool_FromLong((!((!((((uint64_t *)__pyx_v_data)[0]) != 0)) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":234
-+ /* "vidcutter/libs/pympv/mpv.pyx":236
- * elif format == MPV_FORMAT_STRING:
- * return _strdec(((<char**>data)[0]))
- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
-@@ -4979,7 +4979,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- break;
- case MPV_FORMAT_INT64:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":237
-+ /* "vidcutter/libs/pympv/mpv.pyx":239
- * return not not (<uint64_t*>data)[0]
- * elif format == MPV_FORMAT_INT64:
- * return int((<uint64_t*>data)[0]) # <<<<<<<<<<<<<<
-@@ -4987,16 +4987,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- * return float((<double*>data)[0])
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t((((uint64_t *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_r = __pyx_t_6;
- __pyx_t_6 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":236
-+ /* "vidcutter/libs/pympv/mpv.pyx":238
- * elif format == MPV_FORMAT_FLAG:
- * return not not (<uint64_t*>data)[0]
- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
-@@ -5006,7 +5006,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- break;
- case MPV_FORMAT_DOUBLE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":239
-+ /* "vidcutter/libs/pympv/mpv.pyx":241
- * return int((<uint64_t*>data)[0])
- * elif format == MPV_FORMAT_DOUBLE:
- * return float((<double*>data)[0]) # <<<<<<<<<<<<<<
-@@ -5014,13 +5014,13 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- *
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error)
-+ __pyx_t_6 = PyFloat_FromDouble((((double *)__pyx_v_data)[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 241, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_r = __pyx_t_6;
- __pyx_t_6 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":238
-+ /* "vidcutter/libs/pympv/mpv.pyx":240
- * elif format == MPV_FORMAT_INT64:
- * return int((<uint64_t*>data)[0])
- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
-@@ -5031,7 +5031,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- default: break;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":240
-+ /* "vidcutter/libs/pympv/mpv.pyx":242
- * elif format == MPV_FORMAT_DOUBLE:
- * return float((<double*>data)[0])
- * return None # <<<<<<<<<<<<<<
-@@ -5042,7 +5042,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":213
-+ /* "vidcutter/libs/pympv/mpv.pyx":215
- *
- *
- * cdef _convert_value(void* data, mpv_format format): # <<<<<<<<<<<<<<
-@@ -5066,7 +5066,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv__convert_value(void *__pyx_v_data
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":250
-+/* "vidcutter/libs/pympv/mpv.pyx":252
- * cdef public object name, data
- *
- * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
-@@ -5086,16 +5086,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_init", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":251
-+ /* "vidcutter/libs/pympv/mpv.pyx":253
- *
- * cdef _init(self, mpv_event_property* prop):
- * self.name = _strdec(prop.name) # <<<<<<<<<<<<<<
- * self.data = _convert_value(prop.data, prop.format)
- * return self
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_prop->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -5110,7 +5110,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_GIVEREF(__pyx_t_1);
-@@ -5119,14 +5119,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
- __pyx_v_self->name = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":252
-+ /* "vidcutter/libs/pympv/mpv.pyx":254
- * cdef _init(self, mpv_event_property* prop):
- * self.name = _strdec(prop.name)
- * self.data = _convert_value(prop.data, prop.format) # <<<<<<<<<<<<<<
- * return self
- *
- */
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_value(__pyx_v_prop->data, __pyx_v_prop->format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_v_self->data);
-@@ -5134,7 +5134,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
- __pyx_v_self->data = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":253
-+ /* "vidcutter/libs/pympv/mpv.pyx":255
- * self.name = _strdec(prop.name)
- * self.data = _convert_value(prop.data, prop.format)
- * return self # <<<<<<<<<<<<<<
-@@ -5146,7 +5146,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
- __pyx_r = ((PyObject *)__pyx_v_self);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":250
-+ /* "vidcutter/libs/pympv/mpv.pyx":252
- * cdef public object name, data
- *
- * cdef _init(self, mpv_event_property* prop): # <<<<<<<<<<<<<<
-@@ -5168,7 +5168,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_8Property__init(struct __pyx_obj_
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":248
-+/* "vidcutter/libs/pympv/mpv.pyx":250
- * Wraps: mpv_event_property
- * """
- * cdef public object name, data # <<<<<<<<<<<<<<
-@@ -5657,7 +5657,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8Property_2__setstate_cython__(s
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":263
-+/* "vidcutter/libs/pympv/mpv.pyx":265
- *
- * @property
- * def error_str(self): # <<<<<<<<<<<<<<
-@@ -5691,7 +5691,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":266
-+ /* "vidcutter/libs/pympv/mpv.pyx":268
- * """mpv_error_string of the error proeprty"""
- * cdef const char* err_c
- * with nogil: # <<<<<<<<<<<<<<
-@@ -5706,7 +5706,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":267
-+ /* "vidcutter/libs/pympv/mpv.pyx":269
- * cdef const char* err_c
- * with nogil:
- * err_c = mpv_error_string(self.error) # <<<<<<<<<<<<<<
-@@ -5716,7 +5716,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
- __pyx_v_err_c = mpv_error_string(__pyx_v_self->error);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":266
-+ /* "vidcutter/libs/pympv/mpv.pyx":268
- * """mpv_error_string of the error proeprty"""
- * cdef const char* err_c
- * with nogil: # <<<<<<<<<<<<<<
-@@ -5735,7 +5735,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":268
-+ /* "vidcutter/libs/pympv/mpv.pyx":270
- * with nogil:
- * err_c = mpv_error_string(self.error)
- * return _strdec(err_c) # <<<<<<<<<<<<<<
-@@ -5743,9 +5743,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
- * cdef _data(self, mpv_event* event):
- */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -5760,14 +5760,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":263
-+ /* "vidcutter/libs/pympv/mpv.pyx":265
- *
- * @property
- * def error_str(self): # <<<<<<<<<<<<<<
-@@ -5789,7 +5789,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_9error_str___get__(struct
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":270
-+/* "vidcutter/libs/pympv/mpv.pyx":272
- * return _strdec(err_c)
- *
- * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
-@@ -5819,7 +5819,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_data", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":271
-+ /* "vidcutter/libs/pympv/mpv.pyx":273
- *
- * cdef _data(self, mpv_event* event):
- * cdef void* data = event.data # <<<<<<<<<<<<<<
-@@ -5829,7 +5829,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- __pyx_t_1 = __pyx_v_event->data;
- __pyx_v_data = __pyx_t_1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":273
-+ /* "vidcutter/libs/pympv/mpv.pyx":275
- * cdef void* data = event.data
- * cdef mpv_event_client_message* climsg
- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
-@@ -5839,7 +5839,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- switch (__pyx_v_self->id) {
- case MPV_EVENT_GET_PROPERTY_REPLY:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":274
-+ /* "vidcutter/libs/pympv/mpv.pyx":276
- * cdef mpv_event_client_message* climsg
- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
- * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
-@@ -5847,16 +5847,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- * return Property()._init(<mpv_event_property*>data)
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error)
-+ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_2), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":273
-+ /* "vidcutter/libs/pympv/mpv.pyx":275
- * cdef void* data = event.data
- * cdef mpv_event_client_message* climsg
- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY: # <<<<<<<<<<<<<<
-@@ -5866,7 +5866,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- break;
- case MPV_EVENT_PROPERTY_CHANGE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":276
-+ /* "vidcutter/libs/pympv/mpv.pyx":278
- * return Property()._init(<mpv_event_property*>data)
- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
- * return Property()._init(<mpv_event_property*>data) # <<<<<<<<<<<<<<
-@@ -5874,16 +5874,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- * return LogMessage()._init(<mpv_event_log_message*>data)
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Property)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Property *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Property *)__pyx_t_3), ((struct mpv_event_property *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":275
-+ /* "vidcutter/libs/pympv/mpv.pyx":277
- * if self.id == MPV_EVENT_GET_PROPERTY_REPLY:
- * return Property()._init(<mpv_event_property*>data)
- * elif self.id == MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
-@@ -5893,7 +5893,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- break;
- case MPV_EVENT_LOG_MESSAGE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":278
-+ /* "vidcutter/libs/pympv/mpv.pyx":280
- * return Property()._init(<mpv_event_property*>data)
- * elif self.id == MPV_EVENT_LOG_MESSAGE:
- * return LogMessage()._init(<mpv_event_log_message*>data) # <<<<<<<<<<<<<<
-@@ -5901,16 +5901,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_LogMessage)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
-+ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_LogMessage *)((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *)__pyx_t_2), ((struct mpv_event_log_message *)__pyx_v_data)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":277
-+ /* "vidcutter/libs/pympv/mpv.pyx":279
- * elif self.id == MPV_EVENT_PROPERTY_CHANGE:
- * return Property()._init(<mpv_event_property*>data)
- * elif self.id == MPV_EVENT_LOG_MESSAGE: # <<<<<<<<<<<<<<
-@@ -5920,7 +5920,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- break;
- case MPV_EVENT_CLIENT_MESSAGE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":282
-+ /* "vidcutter/libs/pympv/mpv.pyx":284
- * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
- * climsg = <mpv_event_client_message*>data # <<<<<<<<<<<<<<
-@@ -5929,19 +5929,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- */
- __pyx_v_climsg = ((struct mpv_event_client_message *)__pyx_v_data);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":283
-+ /* "vidcutter/libs/pympv/mpv.pyx":285
- * elif self.id == MPV_EVENT_CLIENT_MESSAGE:
- * climsg = <mpv_event_client_message*>data
- * args = [] # <<<<<<<<<<<<<<
- * num_args = climsg.num_args
- * for i in range(num_args):
- */
-- __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error)
-+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_v_args = ((PyObject*)__pyx_t_3);
- __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":284
-+ /* "vidcutter/libs/pympv/mpv.pyx":286
- * climsg = <mpv_event_client_message*>data
- * args = []
- * num_args = climsg.num_args # <<<<<<<<<<<<<<
-@@ -5951,7 +5951,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- __pyx_t_4 = __pyx_v_climsg->num_args;
- __pyx_v_num_args = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":285
-+ /* "vidcutter/libs/pympv/mpv.pyx":287
- * args = []
- * num_args = climsg.num_args
- * for i in range(num_args): # <<<<<<<<<<<<<<
-@@ -5963,26 +5963,26 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
- __pyx_v_i = __pyx_t_6;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":286
-+ /* "vidcutter/libs/pympv/mpv.pyx":288
- * num_args = climsg.num_args
- * for i in range(num_args):
- * arg = <char*>climsg.args[i] # <<<<<<<<<<<<<<
- * arg = _strdec(arg)
- * args.append(arg)
- */
-- __pyx_t_3 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(((char *)(__pyx_v_climsg->args[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_3);
- __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":287
-+ /* "vidcutter/libs/pympv/mpv.pyx":289
- * for i in range(num_args):
- * arg = <char*>climsg.args[i]
- * arg = _strdec(arg) # <<<<<<<<<<<<<<
- * args.append(arg)
- * return args
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -5996,23 +5996,23 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- }
- __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_arg) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_arg);
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_3);
- __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":288
-+ /* "vidcutter/libs/pympv/mpv.pyx":290
- * arg = <char*>climsg.args[i]
- * arg = _strdec(arg)
- * args.append(arg) # <<<<<<<<<<<<<<
- * return args
- * elif self.id == MPV_EVENT_END_FILE:
- */
-- __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
-+ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_args, __pyx_v_arg); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 290, __pyx_L1_error)
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":289
-+ /* "vidcutter/libs/pympv/mpv.pyx":291
- * arg = _strdec(arg)
- * args.append(arg)
- * return args # <<<<<<<<<<<<<<
-@@ -6024,7 +6024,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- __pyx_r = __pyx_v_args;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":281
-+ /* "vidcutter/libs/pympv/mpv.pyx":283
- * # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
- * # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
- * elif self.id == MPV_EVENT_CLIENT_MESSAGE: # <<<<<<<<<<<<<<
-@@ -6034,7 +6034,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- break;
- case MPV_EVENT_END_FILE:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":291
-+ /* "vidcutter/libs/pympv/mpv.pyx":293
- * return args
- * elif self.id == MPV_EVENT_END_FILE:
- * return EndOfFileReached()._init(<mpv_event_end_file*>data) # <<<<<<<<<<<<<<
-@@ -6042,16 +6042,16 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- *
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_EndOfFileReached *)((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *)__pyx_t_3), ((struct mpv_event_end_file *)__pyx_v_data)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":290
-+ /* "vidcutter/libs/pympv/mpv.pyx":292
- * args.append(arg)
- * return args
- * elif self.id == MPV_EVENT_END_FILE: # <<<<<<<<<<<<<<
-@@ -6062,7 +6062,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- default: break;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":292
-+ /* "vidcutter/libs/pympv/mpv.pyx":294
- * elif self.id == MPV_EVENT_END_FILE:
- * return EndOfFileReached()._init(<mpv_event_end_file*>data)
- * return None # <<<<<<<<<<<<<<
-@@ -6073,7 +6073,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":270
-+ /* "vidcutter/libs/pympv/mpv.pyx":272
- * return _strdec(err_c)
- *
- * cdef _data(self, mpv_event* event): # <<<<<<<<<<<<<<
-@@ -6096,7 +6096,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__data(struct __pyx_obj_9vi
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":295
-+/* "vidcutter/libs/pympv/mpv.pyx":297
- *
- * @property
- * def name(self): # <<<<<<<<<<<<<<
-@@ -6130,7 +6130,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":298
-+ /* "vidcutter/libs/pympv/mpv.pyx":300
- * """mpv_event_name of the event id"""
- * cdef const char* name_c
- * with nogil: # <<<<<<<<<<<<<<
-@@ -6145,7 +6145,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":299
-+ /* "vidcutter/libs/pympv/mpv.pyx":301
- * cdef const char* name_c
- * with nogil:
- * name_c = mpv_event_name(self.id) # <<<<<<<<<<<<<<
-@@ -6155,7 +6155,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
- __pyx_v_name_c = mpv_event_name(__pyx_v_self->id);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":298
-+ /* "vidcutter/libs/pympv/mpv.pyx":300
- * """mpv_event_name of the event id"""
- * cdef const char* name_c
- * with nogil: # <<<<<<<<<<<<<<
-@@ -6174,7 +6174,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":300
-+ /* "vidcutter/libs/pympv/mpv.pyx":302
- * with nogil:
- * name_c = mpv_event_name(self.id)
- * return _strdec(name_c) # <<<<<<<<<<<<<<
-@@ -6182,9 +6182,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
- * cdef _init(self, mpv_event* event, ctx):
- */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -6199,14 +6199,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":295
-+ /* "vidcutter/libs/pympv/mpv.pyx":297
- *
- * @property
- * def name(self): # <<<<<<<<<<<<<<
-@@ -6228,7 +6228,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_4name___get__(struct __py
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":302
-+/* "vidcutter/libs/pympv/mpv.pyx":304
- * return _strdec(name_c)
- *
- * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
-@@ -6257,20 +6257,20 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_init", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":303
-+ /* "vidcutter/libs/pympv/mpv.pyx":305
- *
- * cdef _init(self, mpv_event* event, ctx):
- * cdef uint64_t ctxid = <uint64_t>id(ctx) # <<<<<<<<<<<<<<
- * self.id = event.event_id
- * self.data = self._data(event)
- */
-- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_ctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 305, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":304
-+ /* "vidcutter/libs/pympv/mpv.pyx":306
- * cdef _init(self, mpv_event* event, ctx):
- * cdef uint64_t ctxid = <uint64_t>id(ctx)
- * self.id = event.event_id # <<<<<<<<<<<<<<
-@@ -6280,14 +6280,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- __pyx_t_3 = __pyx_v_event->event_id;
- __pyx_v_self->id = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":305
-+ /* "vidcutter/libs/pympv/mpv.pyx":307
- * cdef uint64_t ctxid = <uint64_t>id(ctx)
- * self.id = event.event_id
- * self.data = self._data(event) # <<<<<<<<<<<<<<
- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)__pyx_v_self->__pyx_vtab)->_data(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_v_self->data);
-@@ -6295,19 +6295,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- __pyx_v_self->data = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":306
-+ /* "vidcutter/libs/pympv/mpv.pyx":308
- * self.id = event.event_id
- * self.data = self._data(event)
- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None) # <<<<<<<<<<<<<<
- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
- * userdata.remove()
- */
-- __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_event->reply_userdata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = NULL;
- __pyx_t_7 = 0;
-@@ -6324,7 +6324,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
-- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-@@ -6333,14 +6333,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None};
-- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- } else
- #endif
- {
-- __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 308, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- if (__pyx_t_6) {
- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
-@@ -6351,7 +6351,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- __Pyx_GIVEREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_None);
- __pyx_t_4 = 0;
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- }
-@@ -6359,7 +6359,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- __pyx_v_userdata = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":307
-+ /* "vidcutter/libs/pympv/mpv.pyx":309
- * self.data = self._data(event)
- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
-@@ -6378,14 +6378,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- __pyx_L4_bool_binop_done:;
- if (__pyx_t_9) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":308
-+ /* "vidcutter/libs/pympv/mpv.pyx":310
- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
- * userdata.remove() # <<<<<<<<<<<<<<
- * if not userdata.observed and userdata.counter <= 0:
- * del _reply_userdatas[ctxid][event.reply_userdata]
- */
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_8 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-@@ -6399,21 +6399,21 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- }
- __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":309
-+ /* "vidcutter/libs/pympv/mpv.pyx":311
- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
- * userdata.remove()
- * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
- * del _reply_userdatas[ctxid][event.reply_userdata]
- * if userdata is not None:
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_observed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
-+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 311, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_10 = ((!__pyx_t_11) != 0);
- if (__pyx_t_10) {
-@@ -6421,29 +6421,29 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- __pyx_t_9 = __pyx_t_10;
- goto __pyx_L7_bool_binop_done;
- }
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
-+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 309, __pyx_L1_error)
-+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 311, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_9 = __pyx_t_10;
- __pyx_L7_bool_binop_done:;
- if (__pyx_t_9) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":310
-+ /* "vidcutter/libs/pympv/mpv.pyx":312
- * userdata.remove()
- * if not userdata.observed and userdata.counter <= 0:
- * del _reply_userdatas[ctxid][event.reply_userdata] # <<<<<<<<<<<<<<
- * if userdata is not None:
- * userdata = userdata.data
- */
-- __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
-- if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 310, __pyx_L1_error)
-+ if (unlikely(__Pyx_DelItemInt(__pyx_t_5, __pyx_v_event->reply_userdata, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 312, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":309
-+ /* "vidcutter/libs/pympv/mpv.pyx":311
- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE:
- * userdata.remove()
- * if not userdata.observed and userdata.counter <= 0: # <<<<<<<<<<<<<<
-@@ -6452,7 +6452,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":307
-+ /* "vidcutter/libs/pympv/mpv.pyx":309
- * self.data = self._data(event)
- * userdata = _reply_userdatas[ctxid].get(event.reply_userdata, None)
- * if userdata is not None and self.id != MPV_EVENT_PROPERTY_CHANGE: # <<<<<<<<<<<<<<
-@@ -6461,7 +6461,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":311
-+ /* "vidcutter/libs/pympv/mpv.pyx":313
- * if not userdata.observed and userdata.counter <= 0:
- * del _reply_userdatas[ctxid][event.reply_userdata]
- * if userdata is not None: # <<<<<<<<<<<<<<
-@@ -6472,19 +6472,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- __pyx_t_10 = (__pyx_t_9 != 0);
- if (__pyx_t_10) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":312
-+ /* "vidcutter/libs/pympv/mpv.pyx":314
- * del _reply_userdatas[ctxid][event.reply_userdata]
- * if userdata is not None:
- * userdata = userdata.data # <<<<<<<<<<<<<<
- * self.reply_userdata = userdata
- * self.error = event.error
- */
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdata, __pyx_n_s_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 314, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF_SET(__pyx_v_userdata, __pyx_t_5);
- __pyx_t_5 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":311
-+ /* "vidcutter/libs/pympv/mpv.pyx":313
- * if not userdata.observed and userdata.counter <= 0:
- * del _reply_userdatas[ctxid][event.reply_userdata]
- * if userdata is not None: # <<<<<<<<<<<<<<
-@@ -6493,7 +6493,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":313
-+ /* "vidcutter/libs/pympv/mpv.pyx":315
- * if userdata is not None:
- * userdata = userdata.data
- * self.reply_userdata = userdata # <<<<<<<<<<<<<<
-@@ -6506,7 +6506,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- __Pyx_DECREF(__pyx_v_self->reply_userdata);
- __pyx_v_self->reply_userdata = __pyx_v_userdata;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":314
-+ /* "vidcutter/libs/pympv/mpv.pyx":316
- * userdata = userdata.data
- * self.reply_userdata = userdata
- * self.error = event.error # <<<<<<<<<<<<<<
-@@ -6516,7 +6516,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- __pyx_t_7 = __pyx_v_event->error;
- __pyx_v_self->error = __pyx_t_7;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":315
-+ /* "vidcutter/libs/pympv/mpv.pyx":317
- * self.reply_userdata = userdata
- * self.error = event.error
- * return self # <<<<<<<<<<<<<<
-@@ -6528,7 +6528,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- __pyx_r = ((PyObject *)__pyx_v_self);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":302
-+ /* "vidcutter/libs/pympv/mpv.pyx":304
- * return _strdec(name_c)
- *
- * cdef _init(self, mpv_event* event, ctx): # <<<<<<<<<<<<<<
-@@ -6552,7 +6552,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_5Event__init(struct __pyx_obj_9vi
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":258
-+/* "vidcutter/libs/pympv/mpv.pyx":260
- * cdef class Event(object):
- * """Wraps: mpv_event"""
- * cdef public mpv_event_id id # <<<<<<<<<<<<<<
-@@ -6582,7 +6582,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2id___get__(struct __pyx_
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_event_id(__pyx_v_self->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
-@@ -6620,7 +6620,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__set__", 0);
-- __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error)
-+ __pyx_t_1 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_value)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L1_error)
- __pyx_v_self->id = __pyx_t_1;
-
- /* function exit code */
-@@ -6634,7 +6634,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_2id_2__set__(struct __pyx_obj_9
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":259
-+/* "vidcutter/libs/pympv/mpv.pyx":261
- * """Wraps: mpv_event"""
- * cdef public mpv_event_id id
- * cdef public int error # <<<<<<<<<<<<<<
-@@ -6664,7 +6664,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_5error___get__(struct __p
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
-@@ -6702,7 +6702,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_ob
- const char *__pyx_filename = NULL;
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__set__", 0);
-- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 261, __pyx_L1_error)
- __pyx_v_self->error = __pyx_t_1;
-
- /* function exit code */
-@@ -6716,7 +6716,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_5Event_5error_2__set__(struct __pyx_ob
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":260
-+/* "vidcutter/libs/pympv/mpv.pyx":262
- * cdef public mpv_event_id id
- * cdef public int error
- * cdef public object data, reply_userdata # <<<<<<<<<<<<<<
-@@ -7215,7 +7215,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_5Event_2__setstate_cython__(stru
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":318
-+/* "vidcutter/libs/pympv/mpv.pyx":320
- *
- *
- * def _errors(fn): # <<<<<<<<<<<<<<
-@@ -7237,7 +7237,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_5_errors(PyObject *__pyx_self, P
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":319
-+/* "vidcutter/libs/pympv/mpv.pyx":321
- *
- * def _errors(fn):
- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
-@@ -7285,42 +7285,42 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
- __pyx_outer_scope = (struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *) __Pyx_CyFunction_GetClosure(__pyx_self);
- __pyx_cur_scope = __pyx_outer_scope;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":320
-+ /* "vidcutter/libs/pympv/mpv.pyx":322
- * def _errors(fn):
- * def wrapped(*k, **kw):
- * v = fn(*k, **kw) # <<<<<<<<<<<<<<
- * if v < 0:
- * raise MPVError(v)
- */
-- if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 320, __pyx_L1_error) }
-- __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
-+ if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); __PYX_ERR(0, 322, __pyx_L1_error) }
-+ __pyx_t_1 = PyDict_Copy(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_v_k, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_v = __pyx_t_2;
- __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":321
-+ /* "vidcutter/libs/pympv/mpv.pyx":323
- * def wrapped(*k, **kw):
- * v = fn(*k, **kw)
- * if v < 0: # <<<<<<<<<<<<<<
- * raise MPVError(v)
- * return wrapped
- */
-- __pyx_t_2 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error)
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 321, __pyx_L1_error)
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_v, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 323, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (unlikely(__pyx_t_3)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":322
-+ /* "vidcutter/libs/pympv/mpv.pyx":324
- * v = fn(*k, **kw)
- * if v < 0:
- * raise MPVError(v) # <<<<<<<<<<<<<<
- * return wrapped
- *
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
-@@ -7334,14 +7334,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
- }
- __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_v);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __PYX_ERR(0, 322, __pyx_L1_error)
-+ __PYX_ERR(0, 324, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":321
-+ /* "vidcutter/libs/pympv/mpv.pyx":323
- * def wrapped(*k, **kw):
- * v = fn(*k, **kw)
- * if v < 0: # <<<<<<<<<<<<<<
-@@ -7350,7 +7350,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":319
-+ /* "vidcutter/libs/pympv/mpv.pyx":321
- *
- * def _errors(fn):
- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
-@@ -7374,7 +7374,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7_errors_wrapped(PyObject *__pyx
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":318
-+/* "vidcutter/libs/pympv/mpv.pyx":320
- *
- *
- * def _errors(fn): # <<<<<<<<<<<<<<
-@@ -7396,7 +7396,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
- if (unlikely(!__pyx_cur_scope)) {
- __pyx_cur_scope = ((struct __pyx_obj_9vidcutter_4libs_3mpv___pyx_scope_struct___errors *)Py_None);
- __Pyx_INCREF(Py_None);
-- __PYX_ERR(0, 318, __pyx_L1_error)
-+ __PYX_ERR(0, 320, __pyx_L1_error)
- } else {
- __Pyx_GOTREF(__pyx_cur_scope);
- }
-@@ -7404,19 +7404,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
- __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn);
- __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":319
-+ /* "vidcutter/libs/pympv/mpv.pyx":321
- *
- * def _errors(fn):
- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
- * v = fn(*k, **kw)
- * if v < 0:
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_7_errors_1wrapped, 0, __pyx_n_s_errors_locals_wrapped, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_wrapped = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":323
-+ /* "vidcutter/libs/pympv/mpv.pyx":325
- * if v < 0:
- * raise MPVError(v)
- * return wrapped # <<<<<<<<<<<<<<
-@@ -7428,7 +7428,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
- __pyx_r = __pyx_v_wrapped;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":318
-+ /* "vidcutter/libs/pympv/mpv.pyx":320
- *
- *
- * def _errors(fn): # <<<<<<<<<<<<<<
-@@ -7449,7 +7449,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_4_errors(CYTHON_UNUSED PyObject
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":329
-+/* "vidcutter/libs/pympv/mpv.pyx":331
- * code = None
- *
- * def __init__(self, e): # <<<<<<<<<<<<<<
-@@ -7492,11 +7492,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__
- case 1:
- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--;
- else {
-- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 329, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 331, __pyx_L3_error)
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 329, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 331, __pyx_L3_error)
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
- goto __pyx_L5_argtuple_error;
-@@ -7509,7 +7509,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_8MPVError_1__init__(PyObject *__
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 331, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.MPVError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -7540,16 +7540,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
- __Pyx_RefNannySetupContext("__init__", 0);
- __Pyx_INCREF(__pyx_v_e);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":330
-+ /* "vidcutter/libs/pympv/mpv.pyx":332
- *
- * def __init__(self, e):
- * self.code = e # <<<<<<<<<<<<<<
- * cdef const char* err_c
- * cdef int e_i
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code, __pyx_v_e) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":333
-+ /* "vidcutter/libs/pympv/mpv.pyx":335
- * cdef const char* err_c
- * cdef int e_i
- * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
-@@ -7560,17 +7560,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
- __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
- if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":334
-+ /* "vidcutter/libs/pympv/mpv.pyx":336
- * cdef int e_i
- * if not isinstance(e, basestring):
- * e_i = e # <<<<<<<<<<<<<<
- * with nogil:
- * err_c = mpv_error_string(e_i)
- */
-- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_e); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 336, __pyx_L1_error)
- __pyx_v_e_i = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":335
-+ /* "vidcutter/libs/pympv/mpv.pyx":337
- * if not isinstance(e, basestring):
- * e_i = e
- * with nogil: # <<<<<<<<<<<<<<
-@@ -7585,7 +7585,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":336
-+ /* "vidcutter/libs/pympv/mpv.pyx":338
- * e_i = e
- * with nogil:
- * err_c = mpv_error_string(e_i) # <<<<<<<<<<<<<<
-@@ -7595,7 +7595,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
- __pyx_v_err_c = mpv_error_string(__pyx_v_e_i);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":335
-+ /* "vidcutter/libs/pympv/mpv.pyx":337
- * if not isinstance(e, basestring):
- * e_i = e
- * with nogil: # <<<<<<<<<<<<<<
-@@ -7614,16 +7614,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":337
-+ /* "vidcutter/libs/pympv/mpv.pyx":339
- * with nogil:
- * err_c = mpv_error_string(e_i)
- * e = _strdec(err_c) # <<<<<<<<<<<<<<
- * Exception.__init__(self, e)
- *
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_strdec); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
-- __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_err_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
-@@ -7638,13 +7638,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
- __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_4);
- __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":333
-+ /* "vidcutter/libs/pympv/mpv.pyx":335
- * cdef const char* err_c
- * cdef int e_i
- * if not isinstance(e, basestring): # <<<<<<<<<<<<<<
-@@ -7653,14 +7653,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":338
-+ /* "vidcutter/libs/pympv/mpv.pyx":340
- * err_c = mpv_error_string(e_i)
- * e = _strdec(err_c)
- * Exception.__init__(self, e) # <<<<<<<<<<<<<<
- *
- * class PyMPVError(Exception):
- */
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = NULL;
- __pyx_t_3 = 0;
-@@ -7677,7 +7677,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
-- __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_GOTREF(__pyx_t_4);
- } else
-@@ -7685,13 +7685,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
- PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_e};
-- __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_GOTREF(__pyx_t_4);
- } else
- #endif
- {
-- __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error)
-+ __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (__pyx_t_6) {
- __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
-@@ -7702,14 +7702,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
- __Pyx_INCREF(__pyx_v_e);
- __Pyx_GIVEREF(__pyx_v_e);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_3, __pyx_v_e);
-- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- }
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":329
-+ /* "vidcutter/libs/pympv/mpv.pyx":331
- * code = None
- *
- * def __init__(self, e): # <<<<<<<<<<<<<<
-@@ -7734,7 +7734,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_8MPVError___init__(CYTHON_UNUSED
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":347
-+/* "vidcutter/libs/pympv/mpv.pyx":349
- *
- * class _ReplyUserData(object):
- * def __init__(self, data): # <<<<<<<<<<<<<<
-@@ -7777,11 +7777,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObj
- case 1:
- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
- else {
-- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 347, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 349, __pyx_L3_error)
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 347, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 349, __pyx_L3_error)
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
- goto __pyx_L5_argtuple_error;
-@@ -7794,7 +7794,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__(PyObj
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 347, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 349, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv._ReplyUserData.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -7815,34 +7815,34 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__init__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":348
-+ /* "vidcutter/libs/pympv/mpv.pyx":350
- * class _ReplyUserData(object):
- * def __init__(self, data):
- * self.counter = 0 # <<<<<<<<<<<<<<
- * self.data = data
- * self.observed = False
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":349
-+ /* "vidcutter/libs/pympv/mpv.pyx":351
- * def __init__(self, data):
- * self.counter = 0
- * self.data = data # <<<<<<<<<<<<<<
- * self.observed = False
- *
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":350
-+ /* "vidcutter/libs/pympv/mpv.pyx":352
- * self.counter = 0
- * self.data = data
- * self.observed = False # <<<<<<<<<<<<<<
- *
- * def add(self):
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":347
-+ /* "vidcutter/libs/pympv/mpv.pyx":349
- *
- * class _ReplyUserData(object):
- * def __init__(self, data): # <<<<<<<<<<<<<<
-@@ -7862,7 +7862,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData___init__(CYTHON
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":352
-+/* "vidcutter/libs/pympv/mpv.pyx":354
- * self.observed = False
- *
- * def add(self): # <<<<<<<<<<<<<<
-@@ -7894,22 +7894,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNU
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("add", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":353
-+ /* "vidcutter/libs/pympv/mpv.pyx":355
- *
- * def add(self):
- * self.counter += 1 # <<<<<<<<<<<<<<
- *
- * def remove(self):
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":352
-+ /* "vidcutter/libs/pympv/mpv.pyx":354
- * self.observed = False
- *
- * def add(self): # <<<<<<<<<<<<<<
-@@ -7931,7 +7931,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_2add(CYTHON_UNU
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":355
-+/* "vidcutter/libs/pympv/mpv.pyx":357
- * self.counter += 1
- *
- * def remove(self): # <<<<<<<<<<<<<<
-@@ -7963,22 +7963,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("remove", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":356
-+ /* "vidcutter/libs/pympv/mpv.pyx":358
- *
- * def remove(self):
- * self.counter -= 1 # <<<<<<<<<<<<<<
- *
- *
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":355
-+ /* "vidcutter/libs/pympv/mpv.pyx":357
- * self.counter += 1
- *
- * def remove(self): # <<<<<<<<<<<<<<
-@@ -8000,7 +8000,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14_ReplyUserData_4remove(CYTHON_
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":370
-+/* "vidcutter/libs/pympv/mpv.pyx":372
- *
- * @property
- * def api_version(self): # <<<<<<<<<<<<<<
-@@ -8033,7 +8033,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":371
-+ /* "vidcutter/libs/pympv/mpv.pyx":373
- * @property
- * def api_version(self):
- * return _CAPI_MINOR, _CAPI_MAJOR, _CAPI_VERSION # <<<<<<<<<<<<<<
-@@ -8041,13 +8041,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
- * @property
- */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_unsigned_long(__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error)
-+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 373, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
-@@ -8062,7 +8062,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
- __pyx_t_4 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":370
-+ /* "vidcutter/libs/pympv/mpv.pyx":372
- *
- * @property
- * def api_version(self): # <<<<<<<<<<<<<<
-@@ -8084,7 +8084,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_11api_version___get__(C
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":374
-+/* "vidcutter/libs/pympv/mpv.pyx":376
- *
- * @property
- * def name(self): # <<<<<<<<<<<<<<
-@@ -8118,7 +8118,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":380
-+ /* "vidcutter/libs/pympv/mpv.pyx":382
- * """
- * cdef const char* name
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -8129,12 +8129,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 380, __pyx_L1_error)
-+ __PYX_ERR(0, 382, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":381
-+ /* "vidcutter/libs/pympv/mpv.pyx":383
- * cdef const char* name
- * assert self._ctx
- * with nogil: # <<<<<<<<<<<<<<
-@@ -8149,7 +8149,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":382
-+ /* "vidcutter/libs/pympv/mpv.pyx":384
- * assert self._ctx
- * with nogil:
- * name = mpv_client_name(self._ctx) # <<<<<<<<<<<<<<
-@@ -8159,7 +8159,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
- __pyx_v_name = mpv_client_name(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":381
-+ /* "vidcutter/libs/pympv/mpv.pyx":383
- * cdef const char* name
- * assert self._ctx
- * with nogil: # <<<<<<<<<<<<<<
-@@ -8178,7 +8178,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":383
-+ /* "vidcutter/libs/pympv/mpv.pyx":385
- * with nogil:
- * name = mpv_client_name(self._ctx)
- * return _strdec(name) # <<<<<<<<<<<<<<
-@@ -8186,9 +8186,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
- * @property
- */
- __Pyx_XDECREF(__pyx_r);
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strdec); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -8203,14 +8203,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":374
-+ /* "vidcutter/libs/pympv/mpv.pyx":376
- *
- * @property
- * def name(self): # <<<<<<<<<<<<<<
-@@ -8232,7 +8232,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4name___get__(struct __
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":386
-+/* "vidcutter/libs/pympv/mpv.pyx":388
- *
- * @property
- * def time(self): # <<<<<<<<<<<<<<
-@@ -8263,7 +8263,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__get__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":394
-+ /* "vidcutter/libs/pympv/mpv.pyx":396
- * """
- * cdef int64_t time
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -8274,12 +8274,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 394, __pyx_L1_error)
-+ __PYX_ERR(0, 396, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":395
-+ /* "vidcutter/libs/pympv/mpv.pyx":397
- * cdef int64_t time
- * assert self._ctx
- * with nogil: # <<<<<<<<<<<<<<
-@@ -8294,7 +8294,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":396
-+ /* "vidcutter/libs/pympv/mpv.pyx":398
- * assert self._ctx
- * with nogil:
- * time = mpv_get_time_us(self._ctx) # <<<<<<<<<<<<<<
-@@ -8304,7 +8304,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
- __pyx_v_time = mpv_get_time_us(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":395
-+ /* "vidcutter/libs/pympv/mpv.pyx":397
- * cdef int64_t time
- * assert self._ctx
- * with nogil: # <<<<<<<<<<<<<<
-@@ -8323,7 +8323,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":397
-+ /* "vidcutter/libs/pympv/mpv.pyx":399
- * with nogil:
- * time = mpv_get_time_us(self._ctx)
- * return time # <<<<<<<<<<<<<<
-@@ -8331,13 +8331,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
- * # def suspend(self):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":386
-+ /* "vidcutter/libs/pympv/mpv.pyx":388
- *
- * @property
- * def time(self): # <<<<<<<<<<<<<<
-@@ -8356,7 +8356,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4time___get__(struct __
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":412
-+/* "vidcutter/libs/pympv/mpv.pyx":414
- *
- * @_errors
- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
-@@ -8399,11 +8399,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject
- case 1:
- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enable)) != 0)) kw_args--;
- else {
-- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 412, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, 1); __PYX_ERR(0, 414, __pyx_L3_error)
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_event") < 0)) __PYX_ERR(0, 414, __pyx_L3_error)
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
- goto __pyx_L5_argtuple_error;
-@@ -8416,7 +8416,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_1request_event(PyObject
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("request_event", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 414, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.request_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -8444,7 +8444,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("request_event", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":421
-+ /* "vidcutter/libs/pympv/mpv.pyx":423
- * Wraps: mpv_request_event
- * """
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -8455,19 +8455,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 421, __pyx_L1_error)
-+ __PYX_ERR(0, 423, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":422
-+ /* "vidcutter/libs/pympv/mpv.pyx":424
- * """
- * assert self._ctx
- * cdef int enable_i = 1 if enable else 0 # <<<<<<<<<<<<<<
- * cdef int err
- * cdef mpv_event_id event_id = event
- */
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 422, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_enable); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 424, __pyx_L1_error)
- if (__pyx_t_2) {
- __pyx_t_1 = 1;
- } else {
-@@ -8475,17 +8475,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
- }
- __pyx_v_enable_i = __pyx_t_1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":424
-+ /* "vidcutter/libs/pympv/mpv.pyx":426
- * cdef int enable_i = 1 if enable else 0
- * cdef int err
- * cdef mpv_event_id event_id = event # <<<<<<<<<<<<<<
- * with nogil:
- * err = mpv_request_event(self._ctx, event_id, enable_i)
- */
-- __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
-+ __pyx_t_3 = ((enum mpv_event_id)__Pyx_PyInt_As_enum__mpv_event_id(__pyx_v_event)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 426, __pyx_L1_error)
- __pyx_v_event_id = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":425
-+ /* "vidcutter/libs/pympv/mpv.pyx":427
- * cdef int err
- * cdef mpv_event_id event_id = event
- * with nogil: # <<<<<<<<<<<<<<
-@@ -8500,7 +8500,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":426
-+ /* "vidcutter/libs/pympv/mpv.pyx":428
- * cdef mpv_event_id event_id = event
- * with nogil:
- * err = mpv_request_event(self._ctx, event_id, enable_i) # <<<<<<<<<<<<<<
-@@ -8510,7 +8510,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
- __pyx_v_err = mpv_request_event(__pyx_v_self->_ctx, __pyx_v_event_id, __pyx_v_enable_i);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":425
-+ /* "vidcutter/libs/pympv/mpv.pyx":427
- * cdef int err
- * cdef mpv_event_id event_id = event
- * with nogil: # <<<<<<<<<<<<<<
-@@ -8529,7 +8529,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":427
-+ /* "vidcutter/libs/pympv/mpv.pyx":429
- * with nogil:
- * err = mpv_request_event(self._ctx, event_id, enable_i)
- * return err # <<<<<<<<<<<<<<
-@@ -8537,13 +8537,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
- * @_errors
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_r = __pyx_t_4;
- __pyx_t_4 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":412
-+ /* "vidcutter/libs/pympv/mpv.pyx":414
- *
- * @_errors
- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
-@@ -8562,7 +8562,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_request_event(struct __
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":430
-+/* "vidcutter/libs/pympv/mpv.pyx":432
- *
- * @_errors
- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
-@@ -8599,7 +8599,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
- __Pyx_RefNannySetupContext("set_log_level", 0);
- __Pyx_INCREF(__pyx_v_loglevel);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":432
-+ /* "vidcutter/libs/pympv/mpv.pyx":434
- * def set_log_level(self, loglevel):
- * """Wraps: mpv_request_log_messages"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -8610,19 +8610,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 432, __pyx_L1_error)
-+ __PYX_ERR(0, 434, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":433
-+ /* "vidcutter/libs/pympv/mpv.pyx":435
- * """Wraps: mpv_request_log_messages"""
- * assert self._ctx
- * loglevel = _strenc(loglevel) # <<<<<<<<<<<<<<
- * cdef const char* loglevel_c = loglevel
- * cdef int err
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -8636,23 +8636,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_loglevel) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_loglevel);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF_SET(__pyx_v_loglevel, __pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":434
-+ /* "vidcutter/libs/pympv/mpv.pyx":436
- * assert self._ctx
- * loglevel = _strenc(loglevel)
- * cdef const char* loglevel_c = loglevel # <<<<<<<<<<<<<<
- * cdef int err
- * with nogil:
- */
-- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_loglevel); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
- __pyx_v_loglevel_c = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":436
-+ /* "vidcutter/libs/pympv/mpv.pyx":438
- * cdef const char* loglevel_c = loglevel
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -8667,7 +8667,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":437
-+ /* "vidcutter/libs/pympv/mpv.pyx":439
- * cdef int err
- * with nogil:
- * err = mpv_request_log_messages(self._ctx, loglevel_c) # <<<<<<<<<<<<<<
-@@ -8677,7 +8677,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
- __pyx_v_err = mpv_request_log_messages(__pyx_v_self->_ctx, __pyx_v_loglevel_c);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":436
-+ /* "vidcutter/libs/pympv/mpv.pyx":438
- * cdef const char* loglevel_c = loglevel
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -8696,7 +8696,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":438
-+ /* "vidcutter/libs/pympv/mpv.pyx":440
- * with nogil:
- * err = mpv_request_log_messages(self._ctx, loglevel_c)
- * return err # <<<<<<<<<<<<<<
-@@ -8704,13 +8704,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
- * @_errors
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":430
-+ /* "vidcutter/libs/pympv/mpv.pyx":432
- *
- * @_errors
- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
-@@ -8732,7 +8732,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_2set_log_level(struct _
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":441
-+/* "vidcutter/libs/pympv/mpv.pyx":443
- *
- * @_errors
- * def load_config(self, filename): # <<<<<<<<<<<<<<
-@@ -8769,7 +8769,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
- __Pyx_RefNannySetupContext("load_config", 0);
- __Pyx_INCREF(__pyx_v_filename);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":443
-+ /* "vidcutter/libs/pympv/mpv.pyx":445
- * def load_config(self, filename):
- * """Wraps: mpv_load_config_file"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -8780,19 +8780,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 443, __pyx_L1_error)
-+ __PYX_ERR(0, 445, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":444
-+ /* "vidcutter/libs/pympv/mpv.pyx":446
- * """Wraps: mpv_load_config_file"""
- * assert self._ctx
- * filename = _strenc(filename) # <<<<<<<<<<<<<<
- * cdef const char* _filename = filename
- * cdef int err
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -8806,23 +8806,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":445
-+ /* "vidcutter/libs/pympv/mpv.pyx":447
- * assert self._ctx
- * filename = _strenc(filename)
- * cdef const char* _filename = filename # <<<<<<<<<<<<<<
- * cdef int err
- * with nogil:
- */
-- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 447, __pyx_L1_error)
- __pyx_v__filename = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":447
-+ /* "vidcutter/libs/pympv/mpv.pyx":449
- * cdef const char* _filename = filename
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -8837,7 +8837,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":448
-+ /* "vidcutter/libs/pympv/mpv.pyx":450
- * cdef int err
- * with nogil:
- * err = mpv_load_config_file(self._ctx, _filename) # <<<<<<<<<<<<<<
-@@ -8847,7 +8847,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
- __pyx_v_err = mpv_load_config_file(__pyx_v_self->_ctx, __pyx_v__filename);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":447
-+ /* "vidcutter/libs/pympv/mpv.pyx":449
- * cdef const char* _filename = filename
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -8866,7 +8866,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":449
-+ /* "vidcutter/libs/pympv/mpv.pyx":451
- * with nogil:
- * err = mpv_load_config_file(self._ctx, _filename)
- * return err # <<<<<<<<<<<<<<
-@@ -8874,13 +8874,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
- * def _format_for(self, value):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":441
-+ /* "vidcutter/libs/pympv/mpv.pyx":443
- *
- * @_errors
- * def load_config(self, filename): # <<<<<<<<<<<<<<
-@@ -8902,7 +8902,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_4load_config(struct __p
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":451
-+/* "vidcutter/libs/pympv/mpv.pyx":453
- * return err
- *
- * def _format_for(self, value): # <<<<<<<<<<<<<<
-@@ -8935,7 +8935,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_format_for", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":452
-+ /* "vidcutter/libs/pympv/mpv.pyx":454
- *
- * def _format_for(self, value):
- * if isinstance(value, basestring): # <<<<<<<<<<<<<<
-@@ -8946,7 +8946,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- __pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":453
-+ /* "vidcutter/libs/pympv/mpv.pyx":455
- * def _format_for(self, value):
- * if isinstance(value, basestring):
- * return MPV_FORMAT_STRING # <<<<<<<<<<<<<<
-@@ -8954,13 +8954,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- * return MPV_FORMAT_FLAG
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":452
-+ /* "vidcutter/libs/pympv/mpv.pyx":454
- *
- * def _format_for(self, value):
- * if isinstance(value, basestring): # <<<<<<<<<<<<<<
-@@ -8969,7 +8969,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":454
-+ /* "vidcutter/libs/pympv/mpv.pyx":456
- * if isinstance(value, basestring):
- * return MPV_FORMAT_STRING
- * elif isinstance(value, bool): # <<<<<<<<<<<<<<
-@@ -8978,12 +8978,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- */
- __pyx_t_3 = ((PyObject*)&PyBool_Type);
- __Pyx_INCREF(__pyx_t_3);
-- __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 454, __pyx_L1_error)
-+ __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 456, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_1 = (__pyx_t_2 != 0);
- if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":455
-+ /* "vidcutter/libs/pympv/mpv.pyx":457
- * return MPV_FORMAT_STRING
- * elif isinstance(value, bool):
- * return MPV_FORMAT_FLAG # <<<<<<<<<<<<<<
-@@ -8991,13 +8991,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- * return MPV_FORMAT_INT64
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":454
-+ /* "vidcutter/libs/pympv/mpv.pyx":456
- * if isinstance(value, basestring):
- * return MPV_FORMAT_STRING
- * elif isinstance(value, bool): # <<<<<<<<<<<<<<
-@@ -9006,7 +9006,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":456
-+ /* "vidcutter/libs/pympv/mpv.pyx":458
- * elif isinstance(value, bool):
- * return MPV_FORMAT_FLAG
- * elif isinstance(value, int): # <<<<<<<<<<<<<<
-@@ -9017,7 +9017,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- __pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":457
-+ /* "vidcutter/libs/pympv/mpv.pyx":459
- * return MPV_FORMAT_FLAG
- * elif isinstance(value, int):
- * return MPV_FORMAT_INT64 # <<<<<<<<<<<<<<
-@@ -9025,13 +9025,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- * return MPV_FORMAT_DOUBLE
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":456
-+ /* "vidcutter/libs/pympv/mpv.pyx":458
- * elif isinstance(value, bool):
- * return MPV_FORMAT_FLAG
- * elif isinstance(value, int): # <<<<<<<<<<<<<<
-@@ -9040,7 +9040,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":458
-+ /* "vidcutter/libs/pympv/mpv.pyx":460
- * elif isinstance(value, int):
- * return MPV_FORMAT_INT64
- * elif isinstance(value, float): # <<<<<<<<<<<<<<
-@@ -9051,7 +9051,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- __pyx_t_1 = (__pyx_t_2 != 0);
- if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":459
-+ /* "vidcutter/libs/pympv/mpv.pyx":461
- * return MPV_FORMAT_INT64
- * elif isinstance(value, float):
- * return MPV_FORMAT_DOUBLE # <<<<<<<<<<<<<<
-@@ -9059,13 +9059,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- * return MPV_FORMAT_NODE_ARRAY
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":458
-+ /* "vidcutter/libs/pympv/mpv.pyx":460
- * elif isinstance(value, int):
- * return MPV_FORMAT_INT64
- * elif isinstance(value, float): # <<<<<<<<<<<<<<
-@@ -9074,7 +9074,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":460
-+ /* "vidcutter/libs/pympv/mpv.pyx":462
- * elif isinstance(value, float):
- * return MPV_FORMAT_DOUBLE
- * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
-@@ -9095,7 +9095,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- __pyx_t_2 = (__pyx_t_1 != 0);
- if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":461
-+ /* "vidcutter/libs/pympv/mpv.pyx":463
- * return MPV_FORMAT_DOUBLE
- * elif isinstance(value, (tuple, list)):
- * return MPV_FORMAT_NODE_ARRAY # <<<<<<<<<<<<<<
-@@ -9103,13 +9103,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- * return MPV_FORMAT_NODE_MAP
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":460
-+ /* "vidcutter/libs/pympv/mpv.pyx":462
- * elif isinstance(value, float):
- * return MPV_FORMAT_DOUBLE
- * elif isinstance(value, (tuple, list)): # <<<<<<<<<<<<<<
-@@ -9118,7 +9118,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":462
-+ /* "vidcutter/libs/pympv/mpv.pyx":464
- * elif isinstance(value, (tuple, list)):
- * return MPV_FORMAT_NODE_ARRAY
- * elif isinstance(value, dict): # <<<<<<<<<<<<<<
-@@ -9129,7 +9129,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- __pyx_t_1 = (__pyx_t_2 != 0);
- if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":463
-+ /* "vidcutter/libs/pympv/mpv.pyx":465
- * return MPV_FORMAT_NODE_ARRAY
- * elif isinstance(value, dict):
- * return MPV_FORMAT_NODE_MAP # <<<<<<<<<<<<<<
-@@ -9137,13 +9137,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- *
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":462
-+ /* "vidcutter/libs/pympv/mpv.pyx":464
- * elif isinstance(value, (tuple, list)):
- * return MPV_FORMAT_NODE_ARRAY
- * elif isinstance(value, dict): # <<<<<<<<<<<<<<
-@@ -9152,7 +9152,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":464
-+ /* "vidcutter/libs/pympv/mpv.pyx":466
- * elif isinstance(value, dict):
- * return MPV_FORMAT_NODE_MAP
- * return MPV_FORMAT_NONE # <<<<<<<<<<<<<<
-@@ -9160,13 +9160,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- * cdef mpv_node_list* _prep_node_list(self, values):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":451
-+ /* "vidcutter/libs/pympv/mpv.pyx":453
- * return err
- *
- * def _format_for(self, value): # <<<<<<<<<<<<<<
-@@ -9185,7 +9185,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_6_format_for(CYTHON_UNU
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":466
-+/* "vidcutter/libs/pympv/mpv.pyx":468
- * return MPV_FORMAT_NONE
- *
- * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
-@@ -9216,7 +9216,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_prep_node_list", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":469
-+ /* "vidcutter/libs/pympv/mpv.pyx":471
- * cdef mpv_node node
- * cdef mpv_format format
- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list)) # <<<<<<<<<<<<<<
-@@ -9225,17 +9225,17 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- */
- __pyx_v_node_list = ((struct mpv_node_list *)malloc((sizeof(struct mpv_node_list))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":470
-+ /* "vidcutter/libs/pympv/mpv.pyx":472
- * cdef mpv_format format
- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
- * node_list.num = len(values) # <<<<<<<<<<<<<<
- * node_list.values = NULL
- * node_list.keys = NULL
- */
-- __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 470, __pyx_L1_error)
-+ __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 472, __pyx_L1_error)
- __pyx_v_node_list->num = __pyx_t_1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":471
-+ /* "vidcutter/libs/pympv/mpv.pyx":473
- * cdef mpv_node_list* node_list = <mpv_node_list*>malloc(sizeof(mpv_node_list))
- * node_list.num = len(values)
- * node_list.values = NULL # <<<<<<<<<<<<<<
-@@ -9244,7 +9244,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- */
- __pyx_v_node_list->values = NULL;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":472
-+ /* "vidcutter/libs/pympv/mpv.pyx":474
- * node_list.num = len(values)
- * node_list.values = NULL
- * node_list.keys = NULL # <<<<<<<<<<<<<<
-@@ -9253,7 +9253,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- */
- __pyx_v_node_list->keys = NULL;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":473
-+ /* "vidcutter/libs/pympv/mpv.pyx":475
- * node_list.values = NULL
- * node_list.keys = NULL
- * if node_list.num: # <<<<<<<<<<<<<<
-@@ -9263,7 +9263,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- __pyx_t_2 = (__pyx_v_node_list->num != 0);
- if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":474
-+ /* "vidcutter/libs/pympv/mpv.pyx":476
- * node_list.keys = NULL
- * if node_list.num:
- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node)) # <<<<<<<<<<<<<<
-@@ -9272,7 +9272,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- */
- __pyx_v_node_list->values = ((struct mpv_node *)malloc((__pyx_v_node_list->num * (sizeof(struct mpv_node)))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":473
-+ /* "vidcutter/libs/pympv/mpv.pyx":475
- * node_list.values = NULL
- * node_list.keys = NULL
- * if node_list.num: # <<<<<<<<<<<<<<
-@@ -9281,7 +9281,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":475
-+ /* "vidcutter/libs/pympv/mpv.pyx":477
- * if node_list.num:
- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
- * for i, value in enumerate(values): # <<<<<<<<<<<<<<
-@@ -9294,26 +9294,26 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- __pyx_t_4 = __pyx_v_values; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
- __pyx_t_5 = NULL;
- } else {
-- __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error)
- }
- for (;;) {
- if (likely(!__pyx_t_5)) {
- if (likely(PyList_CheckExact(__pyx_t_4))) {
- if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 477, __pyx_L1_error)
- #else
-- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- #endif
- } else {
- if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 477, __pyx_L1_error)
- #else
-- __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- #endif
- }
-@@ -9323,7 +9323,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- PyObject* exc_type = PyErr_Occurred();
- if (exc_type) {
- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
-- else __PYX_ERR(0, 475, __pyx_L1_error)
-+ else __PYX_ERR(0, 477, __pyx_L1_error)
- }
- break;
- }
-@@ -9333,20 +9333,20 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- __pyx_t_6 = 0;
- __Pyx_INCREF(__pyx_t_3);
- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
-- __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_3);
- __pyx_t_3 = __pyx_t_6;
- __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":476
-+ /* "vidcutter/libs/pympv/mpv.pyx":478
- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
- * for i, value in enumerate(values):
- * format = self._format_for(value) # <<<<<<<<<<<<<<
- * node = self._prep_native_value(value, format)
- * node_list.values[i] = node
- */
-- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 476, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 478, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
-@@ -9360,36 +9360,36 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- }
- __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 478, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L1_error)
-+ __pyx_t_9 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_6)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_v_format = __pyx_t_9;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":477
-+ /* "vidcutter/libs/pympv/mpv.pyx":479
- * for i, value in enumerate(values):
- * format = self._format_for(value)
- * node = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
- * node_list.values[i] = node
- * return node_list
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_6);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":478
-+ /* "vidcutter/libs/pympv/mpv.pyx":480
- * format = self._format_for(value)
- * node = self._prep_native_value(value, format)
- * node_list.values[i] = node # <<<<<<<<<<<<<<
- * return node_list
- *
- */
-- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 478, __pyx_L1_error)
-+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 480, __pyx_L1_error)
- (__pyx_v_node_list->values[__pyx_t_10]) = __pyx_v_node;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":475
-+ /* "vidcutter/libs/pympv/mpv.pyx":477
- * if node_list.num:
- * node_list.values = <mpv_node*>malloc(node_list.num * sizeof(mpv_node))
- * for i, value in enumerate(values): # <<<<<<<<<<<<<<
-@@ -9400,7 +9400,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":479
-+ /* "vidcutter/libs/pympv/mpv.pyx":481
- * node = self._prep_native_value(value, format)
- * node_list.values[i] = node
- * return node_list # <<<<<<<<<<<<<<
-@@ -9410,7 +9410,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- __pyx_r = __pyx_v_node_list;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":466
-+ /* "vidcutter/libs/pympv/mpv.pyx":468
- * return MPV_FORMAT_NONE
- *
- * cdef mpv_node_list* _prep_node_list(self, values): # <<<<<<<<<<<<<<
-@@ -9434,7 +9434,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_l
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":481
-+/* "vidcutter/libs/pympv/mpv.pyx":483
- * return node_list
- *
- * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
-@@ -9466,14 +9466,14 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_prep_node_map", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":484
-+ /* "vidcutter/libs/pympv/mpv.pyx":486
- * cdef char* ckey
- * cdef mpv_node_list* list
- * list = self._prep_node_list(map.values()) # <<<<<<<<<<<<<<
- * keys = map.keys()
- * if not len(keys):
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -9487,20 +9487,20 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":485
-+ /* "vidcutter/libs/pympv/mpv.pyx":487
- * cdef mpv_node_list* list
- * list = self._prep_node_list(map.values())
- * keys = map.keys() # <<<<<<<<<<<<<<
- * if not len(keys):
- * return list
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_map, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -9514,24 +9514,24 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_keys = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":486
-+ /* "vidcutter/libs/pympv/mpv.pyx":488
- * list = self._prep_node_list(map.values())
- * keys = map.keys()
- * if not len(keys): # <<<<<<<<<<<<<<
- * return list
- * list.keys = <char**>malloc(list.num)
- */
-- __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 486, __pyx_L1_error)
-+ __pyx_t_4 = PyObject_Length(__pyx_v_keys); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 488, __pyx_L1_error)
- __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
- if (__pyx_t_5) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":487
-+ /* "vidcutter/libs/pympv/mpv.pyx":489
- * keys = map.keys()
- * if not len(keys):
- * return list # <<<<<<<<<<<<<<
-@@ -9541,7 +9541,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- __pyx_r = __pyx_v_list;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":486
-+ /* "vidcutter/libs/pympv/mpv.pyx":488
- * list = self._prep_node_list(map.values())
- * keys = map.keys()
- * if not len(keys): # <<<<<<<<<<<<<<
-@@ -9550,7 +9550,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":488
-+ /* "vidcutter/libs/pympv/mpv.pyx":490
- * if not len(keys):
- * return list
- * list.keys = <char**>malloc(list.num) # <<<<<<<<<<<<<<
-@@ -9559,7 +9559,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- */
- __pyx_v_list->keys = ((char **)malloc(__pyx_v_list->num));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":489
-+ /* "vidcutter/libs/pympv/mpv.pyx":491
- * return list
- * list.keys = <char**>malloc(list.num)
- * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
-@@ -9572,26 +9572,26 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- __pyx_t_2 = __pyx_v_keys; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
- __pyx_t_6 = NULL;
- } else {
-- __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L1_error)
- }
- for (;;) {
- if (likely(!__pyx_t_6)) {
- if (likely(PyList_CheckExact(__pyx_t_2))) {
- if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 491, __pyx_L1_error)
- #else
-- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- #endif
- } else {
- if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 491, __pyx_L1_error)
- #else
-- __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- #endif
- }
-@@ -9601,7 +9601,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- PyObject* exc_type = PyErr_Occurred();
- if (exc_type) {
- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
-- else __PYX_ERR(0, 489, __pyx_L1_error)
-+ else __PYX_ERR(0, 491, __pyx_L1_error)
- }
- break;
- }
-@@ -9611,20 +9611,20 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- __pyx_t_3 = 0;
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
-- __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_1);
- __pyx_t_1 = __pyx_t_3;
- __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":490
-+ /* "vidcutter/libs/pympv/mpv.pyx":492
- * list.keys = <char**>malloc(list.num)
- * for i, key in enumerate(keys):
- * key = _strenc(key) # <<<<<<<<<<<<<<
- * ckey = key
- * list.keys[i] = <char*>malloc(len(key) + 1)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_strenc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 492, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
-@@ -9638,44 +9638,44 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- }
- __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_key);
- __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3);
- __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":491
-+ /* "vidcutter/libs/pympv/mpv.pyx":493
- * for i, key in enumerate(keys):
- * key = _strenc(key)
- * ckey = key # <<<<<<<<<<<<<<
- * list.keys[i] = <char*>malloc(len(key) + 1)
- * strcpy(list.keys[i], ckey)
- */
-- __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L1_error)
-+ __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_key); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
- __pyx_v_ckey = __pyx_t_9;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":492
-+ /* "vidcutter/libs/pympv/mpv.pyx":494
- * key = _strenc(key)
- * ckey = key
- * list.keys[i] = <char*>malloc(len(key) + 1) # <<<<<<<<<<<<<<
- * strcpy(list.keys[i], ckey)
- * return list
- */
-- __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 492, __pyx_L1_error)
-- __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L1_error)
-+ __pyx_t_10 = PyObject_Length(__pyx_v_key); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 494, __pyx_L1_error)
-+ __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 494, __pyx_L1_error)
- (__pyx_v_list->keys[__pyx_t_11]) = ((char *)malloc((__pyx_t_10 + 1)));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":493
-+ /* "vidcutter/libs/pympv/mpv.pyx":495
- * ckey = key
- * list.keys[i] = <char*>malloc(len(key) + 1)
- * strcpy(list.keys[i], ckey) # <<<<<<<<<<<<<<
- * return list
- *
- */
-- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L1_error)
-+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 495, __pyx_L1_error)
- (void)(strcpy((__pyx_v_list->keys[__pyx_t_10]), __pyx_v_ckey));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":489
-+ /* "vidcutter/libs/pympv/mpv.pyx":491
- * return list
- * list.keys = <char**>malloc(list.num)
- * for i, key in enumerate(keys): # <<<<<<<<<<<<<<
-@@ -9686,7 +9686,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":494
-+ /* "vidcutter/libs/pympv/mpv.pyx":496
- * list.keys[i] = <char*>malloc(len(key) + 1)
- * strcpy(list.keys[i], ckey)
- * return list # <<<<<<<<<<<<<<
-@@ -9696,7 +9696,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- __pyx_r = __pyx_v_list;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":481
-+ /* "vidcutter/libs/pympv/mpv.pyx":483
- * return node_list
- *
- * cdef mpv_node_list* _prep_node_map(self, map): # <<<<<<<<<<<<<<
-@@ -9721,7 +9721,7 @@ static struct mpv_node_list *__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_m
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":496
-+/* "vidcutter/libs/pympv/mpv.pyx":498
- * return list
- *
- * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
-@@ -9749,39 +9749,39 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- __Pyx_RefNannySetupContext("_prep_native_value", 0);
- __Pyx_INCREF(__pyx_v_value);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":498
-+ /* "vidcutter/libs/pympv/mpv.pyx":500
- * cdef mpv_node _prep_native_value(self, value, format):
- * cdef mpv_node node
- * node.format = format # <<<<<<<<<<<<<<
- * if format == MPV_FORMAT_STRING:
- * value = _strenc(value)
- */
-- __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L1_error)
-+ __pyx_t_1 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_v_format)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 500, __pyx_L1_error)
- __pyx_v_node.format = __pyx_t_1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":499
-+ /* "vidcutter/libs/pympv/mpv.pyx":501
- * cdef mpv_node node
- * node.format = format
- * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
- * value = _strenc(value)
- * node.u.string = <char*>malloc(len(value) + 1)
- */
-- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_STRING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
-+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 501, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_4) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":500
-+ /* "vidcutter/libs/pympv/mpv.pyx":502
- * node.format = format
- * if format == MPV_FORMAT_STRING:
- * value = _strenc(value) # <<<<<<<<<<<<<<
- * node.u.string = <char*>malloc(len(value) + 1)
- * strcpy(node.u.string, value)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -9795,33 +9795,33 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- }
- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
- __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":501
-+ /* "vidcutter/libs/pympv/mpv.pyx":503
- * if format == MPV_FORMAT_STRING:
- * value = _strenc(value)
- * node.u.string = <char*>malloc(len(value) + 1) # <<<<<<<<<<<<<<
- * strcpy(node.u.string, value)
- * elif format == MPV_FORMAT_FLAG:
- */
-- __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 501, __pyx_L1_error)
-+ __pyx_t_6 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 503, __pyx_L1_error)
- __pyx_v_node.u.string = ((char *)malloc((__pyx_t_6 + 1)));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":502
-+ /* "vidcutter/libs/pympv/mpv.pyx":504
- * value = _strenc(value)
- * node.u.string = <char*>malloc(len(value) + 1)
- * strcpy(node.u.string, value) # <<<<<<<<<<<<<<
- * elif format == MPV_FORMAT_FLAG:
- * node.u.flag = 1 if value else 0
- */
-- __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L1_error)
- (void)(strcpy(__pyx_v_node.u.string, __pyx_t_7));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":499
-+ /* "vidcutter/libs/pympv/mpv.pyx":501
- * cdef mpv_node node
- * node.format = format
- * if format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-@@ -9831,29 +9831,29 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- goto __pyx_L3;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":503
-+ /* "vidcutter/libs/pympv/mpv.pyx":505
- * node.u.string = <char*>malloc(len(value) + 1)
- * strcpy(node.u.string, value)
- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
- * node.u.flag = 1 if value else 0
- * elif format == MPV_FORMAT_INT64:
- */
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_FLAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 503, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__pyx_t_4) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":504
-+ /* "vidcutter/libs/pympv/mpv.pyx":506
- * strcpy(node.u.string, value)
- * elif format == MPV_FORMAT_FLAG:
- * node.u.flag = 1 if value else 0 # <<<<<<<<<<<<<<
- * elif format == MPV_FORMAT_INT64:
- * node.u.int64 = value
- */
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 504, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 506, __pyx_L1_error)
- if (__pyx_t_4) {
- __pyx_t_8 = 1;
- } else {
-@@ -9861,7 +9861,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- }
- __pyx_v_node.u.flag = __pyx_t_8;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":503
-+ /* "vidcutter/libs/pympv/mpv.pyx":505
- * node.u.string = <char*>malloc(len(value) + 1)
- * strcpy(node.u.string, value)
- * elif format == MPV_FORMAT_FLAG: # <<<<<<<<<<<<<<
-@@ -9871,32 +9871,32 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- goto __pyx_L3;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":505
-+ /* "vidcutter/libs/pympv/mpv.pyx":507
- * elif format == MPV_FORMAT_FLAG:
- * node.u.flag = 1 if value else 0
- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
- * node.u.int64 = value
- * elif format == MPV_FORMAT_DOUBLE:
- */
-- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_INT64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
-+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_4) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":506
-+ /* "vidcutter/libs/pympv/mpv.pyx":508
- * node.u.flag = 1 if value else 0
- * elif format == MPV_FORMAT_INT64:
- * node.u.int64 = value # <<<<<<<<<<<<<<
- * elif format == MPV_FORMAT_DOUBLE:
- * node.u.double_ = value
- */
-- __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error)
-+ __pyx_t_9 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_9 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
- __pyx_v_node.u.int64 = __pyx_t_9;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":505
-+ /* "vidcutter/libs/pympv/mpv.pyx":507
- * elif format == MPV_FORMAT_FLAG:
- * node.u.flag = 1 if value else 0
- * elif format == MPV_FORMAT_INT64: # <<<<<<<<<<<<<<
-@@ -9906,32 +9906,32 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- goto __pyx_L3;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":507
-+ /* "vidcutter/libs/pympv/mpv.pyx":509
- * elif format == MPV_FORMAT_INT64:
- * node.u.int64 = value
- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
- * node.u.double_ = value
- * elif format == MPV_FORMAT_NODE_ARRAY:
- */
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__pyx_t_4) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":508
-+ /* "vidcutter/libs/pympv/mpv.pyx":510
- * node.u.int64 = value
- * elif format == MPV_FORMAT_DOUBLE:
- * node.u.double_ = value # <<<<<<<<<<<<<<
- * elif format == MPV_FORMAT_NODE_ARRAY:
- * node.u.list = self._prep_node_list(value)
- */
-- __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error)
-+ __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 510, __pyx_L1_error)
- __pyx_v_node.u.double_ = __pyx_t_10;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":507
-+ /* "vidcutter/libs/pympv/mpv.pyx":509
- * elif format == MPV_FORMAT_INT64:
- * node.u.int64 = value
- * elif format == MPV_FORMAT_DOUBLE: # <<<<<<<<<<<<<<
-@@ -9941,22 +9941,22 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- goto __pyx_L3;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":509
-+ /* "vidcutter/libs/pympv/mpv.pyx":511
- * elif format == MPV_FORMAT_DOUBLE:
- * node.u.double_ = value
- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
- * node.u.list = self._prep_node_list(value)
- * elif format == MPV_FORMAT_NODE_MAP:
- */
-- __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_ARRAY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L1_error)
-+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_format, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 509, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_4) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":510
-+ /* "vidcutter/libs/pympv/mpv.pyx":512
- * node.u.double_ = value
- * elif format == MPV_FORMAT_NODE_ARRAY:
- * node.u.list = self._prep_node_list(value) # <<<<<<<<<<<<<<
-@@ -9965,7 +9965,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- */
- __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_list(__pyx_v_self, __pyx_v_value);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":509
-+ /* "vidcutter/libs/pympv/mpv.pyx":511
- * elif format == MPV_FORMAT_DOUBLE:
- * node.u.double_ = value
- * elif format == MPV_FORMAT_NODE_ARRAY: # <<<<<<<<<<<<<<
-@@ -9975,22 +9975,22 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- goto __pyx_L3;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":511
-+ /* "vidcutter/libs/pympv/mpv.pyx":513
- * elif format == MPV_FORMAT_NODE_ARRAY:
- * node.u.list = self._prep_node_list(value)
- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
- * node.u.list = self._prep_node_map(value)
- * else:
- */
-- __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_enum__mpv_format(MPV_FORMAT_NODE_MAP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_format, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 513, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__pyx_t_4) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":512
-+ /* "vidcutter/libs/pympv/mpv.pyx":514
- * node.u.list = self._prep_node_list(value)
- * elif format == MPV_FORMAT_NODE_MAP:
- * node.u.list = self._prep_node_map(value) # <<<<<<<<<<<<<<
-@@ -9999,7 +9999,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- */
- __pyx_v_node.u.list = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_node_map(__pyx_v_self, __pyx_v_value);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":511
-+ /* "vidcutter/libs/pympv/mpv.pyx":513
- * elif format == MPV_FORMAT_NODE_ARRAY:
- * node.u.list = self._prep_node_list(value)
- * elif format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-@@ -10009,7 +10009,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- goto __pyx_L3;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":514
-+ /* "vidcutter/libs/pympv/mpv.pyx":516
- * node.u.list = self._prep_node_map(value)
- * else:
- * node.format = MPV_FORMAT_NONE # <<<<<<<<<<<<<<
-@@ -10021,7 +10021,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- }
- __pyx_L3:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":515
-+ /* "vidcutter/libs/pympv/mpv.pyx":517
- * else:
- * node.format = MPV_FORMAT_NONE
- * return node # <<<<<<<<<<<<<<
-@@ -10031,7 +10031,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- __pyx_r = __pyx_v_node;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":496
-+ /* "vidcutter/libs/pympv/mpv.pyx":498
- * return list
- *
- * cdef mpv_node _prep_native_value(self, value, format): # <<<<<<<<<<<<<<
-@@ -10052,7 +10052,7 @@ static struct mpv_node __pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":517
-+/* "vidcutter/libs/pympv/mpv.pyx":519
- * return node
- *
- * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
-@@ -10074,7 +10074,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_free_native_value", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":518
-+ /* "vidcutter/libs/pympv/mpv.pyx":520
- *
- * cdef _free_native_value(self, mpv_node node):
- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
-@@ -10085,7 +10085,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- case MPV_FORMAT_NODE_ARRAY:
- case MPV_FORMAT_NODE_MAP:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":519
-+ /* "vidcutter/libs/pympv/mpv.pyx":521
- * cdef _free_native_value(self, mpv_node node):
- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
- * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
-@@ -10097,19 +10097,19 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
- __pyx_v_i = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":520
-+ /* "vidcutter/libs/pympv/mpv.pyx":522
- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP):
- * for i in range(node.u.list.num):
- * self._free_native_value(node.u.list.values[i]) # <<<<<<<<<<<<<<
- * free(node.u.list.values)
- * if node.format == MPV_FORMAT_NODE_MAP:
- */
-- __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
-+ __pyx_t_4 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, (__pyx_v_node.u.list->values[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 522, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":521
-+ /* "vidcutter/libs/pympv/mpv.pyx":523
- * for i in range(node.u.list.num):
- * self._free_native_value(node.u.list.values[i])
- * free(node.u.list.values) # <<<<<<<<<<<<<<
-@@ -10118,7 +10118,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- */
- free(__pyx_v_node.u.list->values);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":522
-+ /* "vidcutter/libs/pympv/mpv.pyx":524
- * self._free_native_value(node.u.list.values[i])
- * free(node.u.list.values)
- * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-@@ -10128,7 +10128,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- __pyx_t_5 = ((__pyx_v_node.format == MPV_FORMAT_NODE_MAP) != 0);
- if (__pyx_t_5) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":523
-+ /* "vidcutter/libs/pympv/mpv.pyx":525
- * free(node.u.list.values)
- * if node.format == MPV_FORMAT_NODE_MAP:
- * for i in range(node.u.list.num): # <<<<<<<<<<<<<<
-@@ -10140,7 +10140,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
- __pyx_v_i = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":524
-+ /* "vidcutter/libs/pympv/mpv.pyx":526
- * if node.format == MPV_FORMAT_NODE_MAP:
- * for i in range(node.u.list.num):
- * free(node.u.list.keys[i]) # <<<<<<<<<<<<<<
-@@ -10150,7 +10150,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- free((__pyx_v_node.u.list->keys[__pyx_v_i]));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":525
-+ /* "vidcutter/libs/pympv/mpv.pyx":527
- * for i in range(node.u.list.num):
- * free(node.u.list.keys[i])
- * free(node.u.list.keys) # <<<<<<<<<<<<<<
-@@ -10159,7 +10159,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- */
- free(__pyx_v_node.u.list->keys);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":522
-+ /* "vidcutter/libs/pympv/mpv.pyx":524
- * self._free_native_value(node.u.list.values[i])
- * free(node.u.list.values)
- * if node.format == MPV_FORMAT_NODE_MAP: # <<<<<<<<<<<<<<
-@@ -10168,7 +10168,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":526
-+ /* "vidcutter/libs/pympv/mpv.pyx":528
- * free(node.u.list.keys[i])
- * free(node.u.list.keys)
- * free(node.u.list) # <<<<<<<<<<<<<<
-@@ -10177,7 +10177,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- */
- free(__pyx_v_node.u.list);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":518
-+ /* "vidcutter/libs/pympv/mpv.pyx":520
- *
- * cdef _free_native_value(self, mpv_node node):
- * if node.format in (MPV_FORMAT_NODE_ARRAY, MPV_FORMAT_NODE_MAP): # <<<<<<<<<<<<<<
-@@ -10187,7 +10187,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- break;
- case MPV_FORMAT_STRING:
-
-- /* "vidcutter/libs/pympv/mpv.pyx":528
-+ /* "vidcutter/libs/pympv/mpv.pyx":530
- * free(node.u.list)
- * elif node.format == MPV_FORMAT_STRING:
- * free(node.u.string) # <<<<<<<<<<<<<<
-@@ -10196,7 +10196,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- */
- free(__pyx_v_node.u.string);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":527
-+ /* "vidcutter/libs/pympv/mpv.pyx":529
- * free(node.u.list.keys)
- * free(node.u.list)
- * elif node.format == MPV_FORMAT_STRING: # <<<<<<<<<<<<<<
-@@ -10207,7 +10207,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- default: break;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":517
-+ /* "vidcutter/libs/pympv/mpv.pyx":519
- * return node
- *
- * cdef _free_native_value(self, mpv_node node): # <<<<<<<<<<<<<<
-@@ -10228,7 +10228,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value(struc
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":530
-+/* "vidcutter/libs/pympv/mpv.pyx":532
- * free(node.u.string)
- *
- * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-@@ -10280,7 +10280,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__py
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 530, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "command") < 0)) __PYX_ERR(0, 532, __pyx_L3_error)
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) < 0) {
- goto __pyx_L5_argtuple_error;
-@@ -10291,7 +10291,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_9command(PyObject *__py
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 530, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("command", 0, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 532, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_DECREF(__pyx_v_cmdlist); __pyx_v_cmdlist = 0;
- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.command", __pyx_clineno, __pyx_lineno, __pyx_filename);
-@@ -10338,7 +10338,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("command", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":544
-+ /* "vidcutter/libs/pympv/mpv.pyx":546
- * Wraps: mpv_command_node and mpv_command_node_async
- * """
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -10349,19 +10349,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 544, __pyx_L1_error)
-+ __PYX_ERR(0, 546, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":545
-+ /* "vidcutter/libs/pympv/mpv.pyx":547
- * """
- * assert self._ctx
- * cdef mpv_node node = self._prep_native_value(cmdlist, self._format_for(cmdlist)) # <<<<<<<<<<<<<<
- * cdef mpv_node noderesult
- * cdef int err
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -10375,13 +10375,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_cmdlist) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_cmdlist);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_node = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_cmdlist, __pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":549
-+ /* "vidcutter/libs/pympv/mpv.pyx":551
- * cdef int err
- * cdef uint64_t data_id
- * result = None # <<<<<<<<<<<<<<
-@@ -10391,7 +10391,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __Pyx_INCREF(Py_None);
- __pyx_v_result = Py_None;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":550
-+ /* "vidcutter/libs/pympv/mpv.pyx":552
- * cdef uint64_t data_id
- * result = None
- * try: # <<<<<<<<<<<<<<
-@@ -10400,31 +10400,31 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- */
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":551
-+ /* "vidcutter/libs/pympv/mpv.pyx":553
- * result = None
- * try:
- * data_id = id(data) # <<<<<<<<<<<<<<
- * if not asynchronous:
- * with nogil:
- */
-- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L4_error)
-+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, __pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L4_error)
-+ __pyx_t_4 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_4 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L4_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_data_id = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":552
-+ /* "vidcutter/libs/pympv/mpv.pyx":554
- * try:
- * data_id = id(data)
- * if not asynchronous: # <<<<<<<<<<<<<<
- * with nogil:
- * err = mpv_command_node(self._ctx, &node, &noderesult)
- */
-- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 552, __pyx_L4_error)
-+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 554, __pyx_L4_error)
- __pyx_t_6 = ((!__pyx_t_5) != 0);
- if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":553
-+ /* "vidcutter/libs/pympv/mpv.pyx":555
- * data_id = id(data)
- * if not asynchronous:
- * with nogil: # <<<<<<<<<<<<<<
-@@ -10439,7 +10439,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":554
-+ /* "vidcutter/libs/pympv/mpv.pyx":556
- * if not asynchronous:
- * with nogil:
- * err = mpv_command_node(self._ctx, &node, &noderesult) # <<<<<<<<<<<<<<
-@@ -10449,7 +10449,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __pyx_v_err = mpv_command_node(__pyx_v_self->_ctx, (&__pyx_v_node), (&__pyx_v_noderesult));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":553
-+ /* "vidcutter/libs/pympv/mpv.pyx":555
- * data_id = id(data)
- * if not asynchronous:
- * with nogil: # <<<<<<<<<<<<<<
-@@ -10468,7 +10468,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":555
-+ /* "vidcutter/libs/pympv/mpv.pyx":557
- * with nogil:
- * err = mpv_command_node(self._ctx, &node, &noderesult)
- * try: # <<<<<<<<<<<<<<
-@@ -10477,7 +10477,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- */
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":556
-+ /* "vidcutter/libs/pympv/mpv.pyx":558
- * err = mpv_command_node(self._ctx, &node, &noderesult)
- * try:
- * result = _convert_node_value(noderesult) if err >= 0 else None # <<<<<<<<<<<<<<
-@@ -10485,7 +10485,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- * with nogil:
- */
- if (((__pyx_v_err >= 0) != 0)) {
-- __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L11_error)
-+ __pyx_t_2 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_noderesult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L11_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __pyx_t_2;
- __pyx_t_2 = 0;
-@@ -10497,7 +10497,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __pyx_t_1 = 0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":558
-+ /* "vidcutter/libs/pympv/mpv.pyx":560
- * result = _convert_node_value(noderesult) if err >= 0 else None
- * finally:
- * with nogil: # <<<<<<<<<<<<<<
-@@ -10514,7 +10514,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":559
-+ /* "vidcutter/libs/pympv/mpv.pyx":561
- * finally:
- * with nogil:
- * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
-@@ -10524,7 +10524,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- mpv_free_node_contents((&__pyx_v_noderesult));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":558
-+ /* "vidcutter/libs/pympv/mpv.pyx":560
- * result = _convert_node_value(noderesult) if err >= 0 else None
- * finally:
- * with nogil: # <<<<<<<<<<<<<<
-@@ -10570,7 +10570,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":559
-+ /* "vidcutter/libs/pympv/mpv.pyx":561
- * finally:
- * with nogil:
- * mpv_free_node_contents(&noderesult) # <<<<<<<<<<<<<<
-@@ -10580,7 +10580,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- mpv_free_node_contents((&__pyx_v_noderesult));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":558
-+ /* "vidcutter/libs/pympv/mpv.pyx":560
- * result = _convert_node_value(noderesult) if err >= 0 else None
- * finally:
- * with nogil: # <<<<<<<<<<<<<<
-@@ -10616,7 +10616,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __pyx_L12:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":552
-+ /* "vidcutter/libs/pympv/mpv.pyx":554
- * try:
- * data_id = id(data)
- * if not asynchronous: # <<<<<<<<<<<<<<
-@@ -10626,7 +10626,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- goto __pyx_L6;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":561
-+ /* "vidcutter/libs/pympv/mpv.pyx":563
- * mpv_free_node_contents(&noderesult)
- * else:
- * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
-@@ -10634,9 +10634,9 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
- */
- /*else*/ {
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_16 = NULL;
- __pyx_t_8 = 0;
-@@ -10653,7 +10653,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_2)) {
- PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-@@ -10662,14 +10662,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
- PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- } else
- #endif
- {
-- __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __pyx_t_17 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 563, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_17);
- if (__pyx_t_16) {
- __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
-@@ -10680,7 +10680,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __Pyx_GIVEREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_8, Py_None);
- __pyx_t_3 = 0;
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L4_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- }
-@@ -10688,7 +10688,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __pyx_v_userdatas = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":562
-+ /* "vidcutter/libs/pympv/mpv.pyx":564
- * else:
- * userdatas = self.reply_userdata.get(data_id, None)
- * if userdatas is None: # <<<<<<<<<<<<<<
-@@ -10699,14 +10699,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __pyx_t_5 = (__pyx_t_6 != 0);
- if (__pyx_t_5) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":563
-+ /* "vidcutter/libs/pympv/mpv.pyx":565
- * userdatas = self.reply_userdata.get(data_id, None)
- * if userdatas is None:
- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
- * userdatas.add()
- * with nogil:
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L4_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_17 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -10720,15 +10720,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- }
- __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_17, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L4_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 563, __pyx_L4_error)
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 565, __pyx_L4_error)
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":562
-+ /* "vidcutter/libs/pympv/mpv.pyx":564
- * else:
- * userdatas = self.reply_userdata.get(data_id, None)
- * if userdatas is None: # <<<<<<<<<<<<<<
-@@ -10737,14 +10737,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":564
-+ /* "vidcutter/libs/pympv/mpv.pyx":566
- * if userdatas is None:
- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
- * userdatas.add() # <<<<<<<<<<<<<<
- * with nogil:
- * err = mpv_command_node_async(self._ctx, data_id, &node)
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L4_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_17 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -10758,12 +10758,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- }
- __pyx_t_1 = (__pyx_t_17) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L4_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":565
-+ /* "vidcutter/libs/pympv/mpv.pyx":567
- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
- * userdatas.add()
- * with nogil: # <<<<<<<<<<<<<<
-@@ -10778,7 +10778,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":566
-+ /* "vidcutter/libs/pympv/mpv.pyx":568
- * userdatas.add()
- * with nogil:
- * err = mpv_command_node_async(self._ctx, data_id, &node) # <<<<<<<<<<<<<<
-@@ -10788,7 +10788,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __pyx_v_err = mpv_command_node_async(__pyx_v_self->_ctx, __pyx_v_data_id, (&__pyx_v_node));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":565
-+ /* "vidcutter/libs/pympv/mpv.pyx":567
- * _reply_userdatas[data_id] = userdatas = _ReplyUserData(data)
- * userdatas.add()
- * with nogil: # <<<<<<<<<<<<<<
-@@ -10810,7 +10810,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __pyx_L6:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":568
-+ /* "vidcutter/libs/pympv/mpv.pyx":570
- * err = mpv_command_node_async(self._ctx, data_id, &node)
- * finally:
- * self._free_native_value(node) # <<<<<<<<<<<<<<
-@@ -10819,7 +10819,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- */
- /*finally:*/ {
- /*normal exit:*/{
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- goto __pyx_L5;
-@@ -10844,7 +10844,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __Pyx_XGOTREF(__pyx_t_10);
- __pyx_t_8 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
- {
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L26_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L26_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- }
-@@ -10877,7 +10877,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __pyx_L5:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":569
-+ /* "vidcutter/libs/pympv/mpv.pyx":571
- * finally:
- * self._free_native_value(node)
- * if err < 0: # <<<<<<<<<<<<<<
-@@ -10887,16 +10887,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __pyx_t_5 = ((__pyx_v_err < 0) != 0);
- if (unlikely(__pyx_t_5)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":570
-+ /* "vidcutter/libs/pympv/mpv.pyx":572
- * self._free_native_value(node)
- * if err < 0:
- * raise MPVError(err) # <<<<<<<<<<<<<<
- * return result
- *
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 570, __pyx_L1_error)
-+ __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 572, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -10911,14 +10911,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_17);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(0, 570, __pyx_L1_error)
-+ __PYX_ERR(0, 572, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":569
-+ /* "vidcutter/libs/pympv/mpv.pyx":571
- * finally:
- * self._free_native_value(node)
- * if err < 0: # <<<<<<<<<<<<<<
-@@ -10927,7 +10927,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":571
-+ /* "vidcutter/libs/pympv/mpv.pyx":573
- * if err < 0:
- * raise MPVError(err)
- * return result # <<<<<<<<<<<<<<
-@@ -10939,7 +10939,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- __pyx_r = __pyx_v_result;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":530
-+ /* "vidcutter/libs/pympv/mpv.pyx":532
- * free(node.u.string)
- *
- * def command(self, *cmdlist, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-@@ -10964,7 +10964,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_8command(struct __pyx_o
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":574
-+/* "vidcutter/libs/pympv/mpv.pyx":576
- *
- * @_errors
- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
-@@ -11012,7 +11012,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(Py
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 574, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_property_async") < 0)) __PYX_ERR(0, 576, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -11028,7 +11028,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_11get_property_async(Py
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 574, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("get_property_async", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 576, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -11064,7 +11064,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- __Pyx_RefNannySetupContext("get_property_async", 0);
- __Pyx_INCREF(__pyx_v_prop);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":583
-+ /* "vidcutter/libs/pympv/mpv.pyx":585
- * data: Value to be passed into the reply_userdata of the response event.
- * Wraps: mpv_get_property_async"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -11075,19 +11075,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 583, __pyx_L1_error)
-+ __PYX_ERR(0, 585, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":584
-+ /* "vidcutter/libs/pympv/mpv.pyx":586
- * Wraps: mpv_get_property_async"""
- * assert self._ctx
- * prop = _strenc(prop) # <<<<<<<<<<<<<<
- * cdef uint64_t id_data = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(id_data, None)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -11101,32 +11101,32 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":585
-+ /* "vidcutter/libs/pympv/mpv.pyx":587
- * assert self._ctx
- * prop = _strenc(prop)
- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is None:
- */
-- __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 585, __pyx_L1_error)
-+ __pyx_t_4 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 587, __pyx_L1_error)
- __pyx_v_id_data = ((uint64_t)__pyx_t_4);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":586
-+ /* "vidcutter/libs/pympv/mpv.pyx":588
- * prop = _strenc(prop)
- * cdef uint64_t id_data = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
- * if userdatas is None:
- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = NULL;
- __pyx_t_6 = 0;
-@@ -11143,7 +11143,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_2)) {
- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-@@ -11152,14 +11152,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- } else
- #endif
- {
-- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 588, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (__pyx_t_5) {
- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
-@@ -11170,7 +11170,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- __Pyx_GIVEREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
- __pyx_t_3 = 0;
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- }
-@@ -11178,7 +11178,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- __pyx_v_userdatas = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":587
-+ /* "vidcutter/libs/pympv/mpv.pyx":589
- * cdef uint64_t id_data = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is None: # <<<<<<<<<<<<<<
-@@ -11189,14 +11189,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- __pyx_t_9 = (__pyx_t_8 != 0);
- if (__pyx_t_9) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":588
-+ /* "vidcutter/libs/pympv/mpv.pyx":590
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is None:
- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
- * userdatas.add()
- * cdef const char* prop_c = prop
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -11210,15 +11210,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- }
- __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 588, __pyx_L1_error)
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 590, __pyx_L1_error)
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":587
-+ /* "vidcutter/libs/pympv/mpv.pyx":589
- * cdef uint64_t id_data = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is None: # <<<<<<<<<<<<<<
-@@ -11227,14 +11227,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":589
-+ /* "vidcutter/libs/pympv/mpv.pyx":591
- * if userdatas is None:
- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
- * userdatas.add() # <<<<<<<<<<<<<<
- * cdef const char* prop_c = prop
- * with nogil:
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -11248,22 +11248,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- }
- __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":590
-+ /* "vidcutter/libs/pympv/mpv.pyx":592
- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
- * userdatas.add()
- * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
- * with nogil:
- * err = mpv_get_property_async(
- */
-- __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 590, __pyx_L1_error)
-+ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 592, __pyx_L1_error)
- __pyx_v_prop_c = __pyx_t_10;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":591
-+ /* "vidcutter/libs/pympv/mpv.pyx":593
- * userdatas.add()
- * cdef const char* prop_c = prop
- * with nogil: # <<<<<<<<<<<<<<
-@@ -11278,7 +11278,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":592
-+ /* "vidcutter/libs/pympv/mpv.pyx":594
- * cdef const char* prop_c = prop
- * with nogil:
- * err = mpv_get_property_async( # <<<<<<<<<<<<<<
-@@ -11288,7 +11288,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- __pyx_v_err = mpv_get_property_async(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_prop_c, MPV_FORMAT_NODE);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":591
-+ /* "vidcutter/libs/pympv/mpv.pyx":593
- * userdatas.add()
- * cdef const char* prop_c = prop
- * with nogil: # <<<<<<<<<<<<<<
-@@ -11307,7 +11307,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":598
-+ /* "vidcutter/libs/pympv/mpv.pyx":600
- * MPV_FORMAT_NODE,
- * )
- * return err # <<<<<<<<<<<<<<
-@@ -11315,13 +11315,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- * def try_get_property_async(self, prop, data=None, default=None):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":574
-+ /* "vidcutter/libs/pympv/mpv.pyx":576
- *
- * @_errors
- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
-@@ -11346,7 +11346,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_10get_property_async(st
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":600
-+/* "vidcutter/libs/pympv/mpv.pyx":602
- * return err
- *
- * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
-@@ -11403,7 +11403,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_asyn
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 600, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property_async") < 0)) __PYX_ERR(0, 602, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -11422,7 +11422,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_13try_get_property_asyn
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 600, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("try_get_property_async", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 602, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -11451,7 +11451,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("try_get_property_async", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":601
-+ /* "vidcutter/libs/pympv/mpv.pyx":603
- *
- * def try_get_property_async(self, prop, data=None, default=None):
- * try: # <<<<<<<<<<<<<<
-@@ -11467,7 +11467,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
- __Pyx_XGOTREF(__pyx_t_3);
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":602
-+ /* "vidcutter/libs/pympv/mpv.pyx":604
- * def try_get_property_async(self, prop, data=None, default=None):
- * try:
- * return self.get_property_async(prop, data=data) # <<<<<<<<<<<<<<
-@@ -11475,17 +11475,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
- * return default
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 602, __pyx_L3_error)
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L3_error)
-+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 604, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_INCREF(__pyx_v_prop);
- __Pyx_GIVEREF(__pyx_v_prop);
- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_prop);
-- __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 602, __pyx_L3_error)
-+ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 602, __pyx_L3_error)
-- __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L3_error)
-+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_data, __pyx_v_data) < 0) __PYX_ERR(0, 604, __pyx_L3_error)
-+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-@@ -11494,7 +11494,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
- __pyx_t_7 = 0;
- goto __pyx_L7_try_return;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":601
-+ /* "vidcutter/libs/pympv/mpv.pyx":603
- *
- * def try_get_property_async(self, prop, data=None, default=None):
- * try: # <<<<<<<<<<<<<<
-@@ -11508,7 +11508,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":603
-+ /* "vidcutter/libs/pympv/mpv.pyx":605
- * try:
- * return self.get_property_async(prop, data=data)
- * except MPVError: # <<<<<<<<<<<<<<
-@@ -11516,7 +11516,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
- *
- */
- __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L5_except_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 605, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_7, __pyx_t_4);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-@@ -11524,12 +11524,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
- __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0;
- if (__pyx_t_8) {
- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property_async", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 603, __pyx_L5_except_error)
-+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 605, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_GOTREF(__pyx_t_7);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":604
-+ /* "vidcutter/libs/pympv/mpv.pyx":606
- * return self.get_property_async(prop, data=data)
- * except MPVError:
- * return default # <<<<<<<<<<<<<<
-@@ -11547,7 +11547,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
- goto __pyx_L5_except_error;
- __pyx_L5_except_error:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":601
-+ /* "vidcutter/libs/pympv/mpv.pyx":603
- *
- * def try_get_property_async(self, prop, data=None, default=None):
- * try: # <<<<<<<<<<<<<<
-@@ -11573,7 +11573,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
- goto __pyx_L0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":600
-+ /* "vidcutter/libs/pympv/mpv.pyx":602
- * return err
- *
- * def try_get_property_async(self, prop, data=None, default=None): # <<<<<<<<<<<<<<
-@@ -11595,7 +11595,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_12try_get_property_asyn
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":606
-+/* "vidcutter/libs/pympv/mpv.pyx":608
- * return default
- *
- * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
-@@ -11642,7 +11642,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyOb
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 606, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_get_property") < 0)) __PYX_ERR(0, 608, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -11658,7 +11658,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_15try_get_property(PyOb
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 606, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("try_get_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 608, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -11687,7 +11687,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("try_get_property", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":607
-+ /* "vidcutter/libs/pympv/mpv.pyx":609
- *
- * def try_get_property(self, prop, default=None):
- * try: # <<<<<<<<<<<<<<
-@@ -11703,7 +11703,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
- __Pyx_XGOTREF(__pyx_t_3);
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":608
-+ /* "vidcutter/libs/pympv/mpv.pyx":610
- * def try_get_property(self, prop, default=None):
- * try:
- * return self.get_property(prop) # <<<<<<<<<<<<<<
-@@ -11711,7 +11711,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
- * return default
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L3_error)
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_property); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
-@@ -11725,14 +11725,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
- }
- __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_prop);
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L3_error)
-+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_r = __pyx_t_4;
- __pyx_t_4 = 0;
- goto __pyx_L7_try_return;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":607
-+ /* "vidcutter/libs/pympv/mpv.pyx":609
- *
- * def try_get_property(self, prop, default=None):
- * try: # <<<<<<<<<<<<<<
-@@ -11745,7 +11745,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":609
-+ /* "vidcutter/libs/pympv/mpv.pyx":611
- * try:
- * return self.get_property(prop)
- * except MPVError: # <<<<<<<<<<<<<<
-@@ -11753,7 +11753,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
- *
- */
- __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
-- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L5_except_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-@@ -11761,12 +11761,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
- __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
- if (__pyx_t_8) {
- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.try_get_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 609, __pyx_L5_except_error)
-+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 611, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GOTREF(__pyx_t_4);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":610
-+ /* "vidcutter/libs/pympv/mpv.pyx":612
- * return self.get_property(prop)
- * except MPVError:
- * return default # <<<<<<<<<<<<<<
-@@ -11784,7 +11784,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
- goto __pyx_L5_except_error;
- __pyx_L5_except_error:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":607
-+ /* "vidcutter/libs/pympv/mpv.pyx":609
- *
- * def try_get_property(self, prop, default=None):
- * try: # <<<<<<<<<<<<<<
-@@ -11810,7 +11810,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
- goto __pyx_L0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":606
-+ /* "vidcutter/libs/pympv/mpv.pyx":608
- * return default
- *
- * def try_get_property(self, prop, default=None): # <<<<<<<<<<<<<<
-@@ -11832,7 +11832,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_14try_get_property(stru
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":612
-+/* "vidcutter/libs/pympv/mpv.pyx":614
- * return default
- *
- * def get_property(self, prop): # <<<<<<<<<<<<<<
-@@ -11882,7 +11882,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- __Pyx_RefNannySetupContext("get_property", 0);
- __Pyx_INCREF(__pyx_v_prop);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":614
-+ /* "vidcutter/libs/pympv/mpv.pyx":616
- * def get_property(self, prop):
- * """Wraps: mpv_get_property"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -11893,19 +11893,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 614, __pyx_L1_error)
-+ __PYX_ERR(0, 616, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":616
-+ /* "vidcutter/libs/pympv/mpv.pyx":618
- * assert self._ctx
- * cdef mpv_node result
- * prop = _strenc(prop) # <<<<<<<<<<<<<<
- * cdef const char* prop_c = prop
- * cdef int err
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -11919,23 +11919,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":617
-+ /* "vidcutter/libs/pympv/mpv.pyx":619
- * cdef mpv_node result
- * prop = _strenc(prop)
- * cdef const char* prop_c = prop # <<<<<<<<<<<<<<
- * cdef int err
- * with nogil:
- */
-- __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 619, __pyx_L1_error)
- __pyx_v_prop_c = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":619
-+ /* "vidcutter/libs/pympv/mpv.pyx":621
- * cdef const char* prop_c = prop
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -11950,7 +11950,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":620
-+ /* "vidcutter/libs/pympv/mpv.pyx":622
- * cdef int err
- * with nogil:
- * err = mpv_get_property( # <<<<<<<<<<<<<<
-@@ -11960,7 +11960,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- __pyx_v_err = mpv_get_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_result));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":619
-+ /* "vidcutter/libs/pympv/mpv.pyx":621
- * cdef const char* prop_c = prop
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -11979,7 +11979,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":626
-+ /* "vidcutter/libs/pympv/mpv.pyx":628
- * &result,
- * )
- * if err < 0: # <<<<<<<<<<<<<<
-@@ -11989,16 +11989,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- __pyx_t_5 = ((__pyx_v_err < 0) != 0);
- if (unlikely(__pyx_t_5)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":627
-+ /* "vidcutter/libs/pympv/mpv.pyx":629
- * )
- * if err < 0:
- * raise MPVError(err) # <<<<<<<<<<<<<<
- * try:
- * v = _convert_node_value(result)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -12013,14 +12013,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(0, 627, __pyx_L1_error)
-+ __PYX_ERR(0, 629, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":626
-+ /* "vidcutter/libs/pympv/mpv.pyx":628
- * &result,
- * )
- * if err < 0: # <<<<<<<<<<<<<<
-@@ -12029,7 +12029,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":628
-+ /* "vidcutter/libs/pympv/mpv.pyx":630
- * if err < 0:
- * raise MPVError(err)
- * try: # <<<<<<<<<<<<<<
-@@ -12038,20 +12038,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- */
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":629
-+ /* "vidcutter/libs/pympv/mpv.pyx":631
- * raise MPVError(err)
- * try:
- * v = _convert_node_value(result) # <<<<<<<<<<<<<<
- * finally:
- * with nogil:
- */
-- __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L8_error)
-+ __pyx_t_1 = __pyx_f_9vidcutter_4libs_3mpv__convert_node_value(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L8_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_v = __pyx_t_1;
- __pyx_t_1 = 0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":631
-+ /* "vidcutter/libs/pympv/mpv.pyx":633
- * v = _convert_node_value(result)
- * finally:
- * with nogil: # <<<<<<<<<<<<<<
-@@ -12068,7 +12068,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":632
-+ /* "vidcutter/libs/pympv/mpv.pyx":634
- * finally:
- * with nogil:
- * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
-@@ -12078,7 +12078,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- mpv_free_node_contents((&__pyx_v_result));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":631
-+ /* "vidcutter/libs/pympv/mpv.pyx":633
- * v = _convert_node_value(result)
- * finally:
- * with nogil: # <<<<<<<<<<<<<<
-@@ -12125,7 +12125,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":632
-+ /* "vidcutter/libs/pympv/mpv.pyx":634
- * finally:
- * with nogil:
- * mpv_free_node_contents(&result) # <<<<<<<<<<<<<<
-@@ -12135,7 +12135,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- mpv_free_node_contents((&__pyx_v_result));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":631
-+ /* "vidcutter/libs/pympv/mpv.pyx":633
- * v = _convert_node_value(result)
- * finally:
- * with nogil: # <<<<<<<<<<<<<<
-@@ -12171,7 +12171,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- __pyx_L9:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":633
-+ /* "vidcutter/libs/pympv/mpv.pyx":635
- * with nogil:
- * mpv_free_node_contents(&result)
- * return v # <<<<<<<<<<<<<<
-@@ -12183,7 +12183,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- __pyx_r = __pyx_v_v;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":612
-+ /* "vidcutter/libs/pympv/mpv.pyx":614
- * return default
- *
- * def get_property(self, prop): # <<<<<<<<<<<<<<
-@@ -12207,7 +12207,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_16get_property(struct _
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":636
-+/* "vidcutter/libs/pympv/mpv.pyx":638
- *
- * @_errors
- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-@@ -12275,7 +12275,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 636, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_property") < 0)) __PYX_ERR(0, 638, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -12297,7 +12297,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_19set_property(PyObject
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 636, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("set_property", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 638, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -12344,7 +12344,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- __Pyx_RefNannySetupContext("set_property", 0);
- __Pyx_INCREF(__pyx_v_prop);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":638
-+ /* "vidcutter/libs/pympv/mpv.pyx":640
- * def set_property(self, prop, value=True, asynchronous=False, data=None):
- * """Wraps: mpv_set_property and mpv_set_property_async"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -12355,19 +12355,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 638, __pyx_L1_error)
-+ __PYX_ERR(0, 640, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":639
-+ /* "vidcutter/libs/pympv/mpv.pyx":641
- * """Wraps: mpv_set_property and mpv_set_property_async"""
- * assert self._ctx
- * prop = _strenc(prop) # <<<<<<<<<<<<<<
- * cdef mpv_format format = self._format_for(value)
- * cdef mpv_node v = self._prep_native_value(value, format)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -12381,20 +12381,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":640
-+ /* "vidcutter/libs/pympv/mpv.pyx":642
- * assert self._ctx
- * prop = _strenc(prop)
- * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
- * cdef mpv_node v = self._prep_native_value(value, format)
- * cdef int err
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -12408,26 +12408,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L1_error)
-+ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_format = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":641
-+ /* "vidcutter/libs/pympv/mpv.pyx":643
- * prop = _strenc(prop)
- * cdef mpv_format format = self._format_for(value)
- * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
- * cdef int err
- * cdef uint64_t data_id
- */
-- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":645
-+ /* "vidcutter/libs/pympv/mpv.pyx":647
- * cdef uint64_t data_id
- * cdef const char* prop_c
- * try: # <<<<<<<<<<<<<<
-@@ -12436,28 +12436,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- */
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":646
-+ /* "vidcutter/libs/pympv/mpv.pyx":648
- * cdef const char* prop_c
- * try:
- * prop_c = prop # <<<<<<<<<<<<<<
- * if not asynchronous:
- * with nogil:
- */
-- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 646, __pyx_L4_error)
-+ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L4_error)
- __pyx_v_prop_c = __pyx_t_5;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":647
-+ /* "vidcutter/libs/pympv/mpv.pyx":649
- * try:
- * prop_c = prop
- * if not asynchronous: # <<<<<<<<<<<<<<
- * with nogil:
- * err = mpv_set_property(
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 647, __pyx_L4_error)
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_asynchronous); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 649, __pyx_L4_error)
- __pyx_t_7 = ((!__pyx_t_6) != 0);
- if (__pyx_t_7) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":648
-+ /* "vidcutter/libs/pympv/mpv.pyx":650
- * prop_c = prop
- * if not asynchronous:
- * with nogil: # <<<<<<<<<<<<<<
-@@ -12472,7 +12472,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":649
-+ /* "vidcutter/libs/pympv/mpv.pyx":651
- * if not asynchronous:
- * with nogil:
- * err = mpv_set_property( # <<<<<<<<<<<<<<
-@@ -12482,7 +12482,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- __pyx_v_err = mpv_set_property(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":648
-+ /* "vidcutter/libs/pympv/mpv.pyx":650
- * prop_c = prop
- * if not asynchronous:
- * with nogil: # <<<<<<<<<<<<<<
-@@ -12501,7 +12501,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":655
-+ /* "vidcutter/libs/pympv/mpv.pyx":657
- * &v
- * )
- * return err # <<<<<<<<<<<<<<
-@@ -12509,13 +12509,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- * userdatas = self.reply_userdata.get(data_id, None)
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L4_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L3_return;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":647
-+ /* "vidcutter/libs/pympv/mpv.pyx":649
- * try:
- * prop_c = prop
- * if not asynchronous: # <<<<<<<<<<<<<<
-@@ -12524,26 +12524,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":656
-+ /* "vidcutter/libs/pympv/mpv.pyx":658
- * )
- * return err
- * data_id = <uint64_t>hash(data) # <<<<<<<<<<<<<<
- * userdatas = self.reply_userdata.get(data_id, None)
- * if userdatas is None:
- */
-- __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 656, __pyx_L4_error)
-+ __pyx_t_8 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_8 == ((Py_hash_t)-1))) __PYX_ERR(0, 658, __pyx_L4_error)
- __pyx_v_data_id = ((uint64_t)__pyx_t_8);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":657
-+ /* "vidcutter/libs/pympv/mpv.pyx":659
- * return err
- * data_id = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(data_id, None) # <<<<<<<<<<<<<<
- * if userdatas is None:
- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_data_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_9 = NULL;
- __pyx_t_10 = 0;
-@@ -12560,7 +12560,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_2)) {
- PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-@@ -12569,14 +12569,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
- PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_3, Py_None};
-- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- } else
- #endif
- {
-- __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 659, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_11);
- if (__pyx_t_9) {
- __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
-@@ -12587,7 +12587,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- __Pyx_GIVEREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, Py_None);
- __pyx_t_3 = 0;
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L4_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
- }
-@@ -12595,7 +12595,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- __pyx_v_userdatas = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":658
-+ /* "vidcutter/libs/pympv/mpv.pyx":660
- * data_id = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(data_id, None)
- * if userdatas is None: # <<<<<<<<<<<<<<
-@@ -12606,14 +12606,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- __pyx_t_6 = (__pyx_t_7 != 0);
- if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":659
-+ /* "vidcutter/libs/pympv/mpv.pyx":661
- * userdatas = self.reply_userdata.get(data_id, None)
- * if userdatas is None:
- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
- * userdatas.add()
- * with nogil:
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L4_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_11 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -12627,15 +12627,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- }
- __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_data);
- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L4_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 659, __pyx_L4_error)
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_data_id, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 661, __pyx_L4_error)
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":658
-+ /* "vidcutter/libs/pympv/mpv.pyx":660
- * data_id = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(data_id, None)
- * if userdatas is None: # <<<<<<<<<<<<<<
-@@ -12644,14 +12644,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":660
-+ /* "vidcutter/libs/pympv/mpv.pyx":662
- * if userdatas is None:
- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
- * userdatas.add() # <<<<<<<<<<<<<<
- * with nogil:
- * err = mpv_set_property_async(
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L4_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_11 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -12665,12 +12665,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- }
- __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L4_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L4_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":661
-+ /* "vidcutter/libs/pympv/mpv.pyx":663
- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
- * userdatas.add()
- * with nogil: # <<<<<<<<<<<<<<
-@@ -12685,7 +12685,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":662
-+ /* "vidcutter/libs/pympv/mpv.pyx":664
- * userdatas.add()
- * with nogil:
- * err = mpv_set_property_async( # <<<<<<<<<<<<<<
-@@ -12695,7 +12695,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- __pyx_v_err = mpv_set_property_async(__pyx_v_self->_ctx, __pyx_v_data_id, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":661
-+ /* "vidcutter/libs/pympv/mpv.pyx":663
- * self.reply_userdata[data_id] = userdatas = _ReplyUserData(data)
- * userdatas.add()
- * with nogil: # <<<<<<<<<<<<<<
-@@ -12715,7 +12715,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":670
-+ /* "vidcutter/libs/pympv/mpv.pyx":672
- * )
- * finally:
- * self._free_native_value(v) # <<<<<<<<<<<<<<
-@@ -12724,7 +12724,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- */
- /*finally:*/ {
- /*normal exit:*/{
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- goto __pyx_L5;
-@@ -12749,7 +12749,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- __Pyx_XGOTREF(__pyx_t_19);
- __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
- {
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L15_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L15_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- }
-@@ -12782,7 +12782,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- __pyx_L3_return: {
- __pyx_t_19 = __pyx_r;
- __pyx_r = 0;
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_r = __pyx_t_19;
-@@ -12792,7 +12792,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- __pyx_L5:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":671
-+ /* "vidcutter/libs/pympv/mpv.pyx":673
- * finally:
- * self._free_native_value(v)
- * return err # <<<<<<<<<<<<<<
-@@ -12800,13 +12800,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- * @_errors
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 673, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":636
-+ /* "vidcutter/libs/pympv/mpv.pyx":638
- *
- * @_errors
- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
-@@ -12831,7 +12831,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_18set_property(struct _
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":674
-+/* "vidcutter/libs/pympv/mpv.pyx":676
- *
- * @_errors
- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
-@@ -12879,7 +12879,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 674, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_option") < 0)) __PYX_ERR(0, 676, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -12895,7 +12895,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_21set_option(PyObject *
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 674, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("set_option", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 676, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.set_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -12935,7 +12935,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- __Pyx_RefNannySetupContext("set_option", 0);
- __Pyx_INCREF(__pyx_v_prop);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":676
-+ /* "vidcutter/libs/pympv/mpv.pyx":678
- * def set_option(self, prop, value=True):
- * """Wraps: mpv_set_option"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -12946,19 +12946,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 676, __pyx_L1_error)
-+ __PYX_ERR(0, 678, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":677
-+ /* "vidcutter/libs/pympv/mpv.pyx":679
- * """Wraps: mpv_set_option"""
- * assert self._ctx
- * prop = _strenc(prop) # <<<<<<<<<<<<<<
- * cdef mpv_format format = self._format_for(value)
- * cdef mpv_node v = self._prep_native_value(value, format)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_strenc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
-@@ -12972,20 +12972,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_prop);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":678
-+ /* "vidcutter/libs/pympv/mpv.pyx":680
- * assert self._ctx
- * prop = _strenc(prop)
- * cdef mpv_format format = self._format_for(value) # <<<<<<<<<<<<<<
- * cdef mpv_node v = self._prep_native_value(value, format)
- * cdef int err
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format_for); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -12999,26 +12999,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
-+ __pyx_t_4 = ((enum mpv_format)__Pyx_PyInt_As_enum__mpv_format(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 680, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_format = __pyx_t_4;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":679
-+ /* "vidcutter/libs/pympv/mpv.pyx":681
- * prop = _strenc(prop)
- * cdef mpv_format format = self._format_for(value)
- * cdef mpv_node v = self._prep_native_value(value, format) # <<<<<<<<<<<<<<
- * cdef int err
- * cdef const char* prop_c
- */
-- __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_enum__mpv_format(__pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_v = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_prep_native_value(__pyx_v_self, __pyx_v_value, __pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":682
-+ /* "vidcutter/libs/pympv/mpv.pyx":684
- * cdef int err
- * cdef const char* prop_c
- * try: # <<<<<<<<<<<<<<
-@@ -13027,17 +13027,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- */
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":683
-+ /* "vidcutter/libs/pympv/mpv.pyx":685
- * cdef const char* prop_c
- * try:
- * prop_c = prop # <<<<<<<<<<<<<<
- * with nogil:
- * err = mpv_set_option(
- */
-- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L4_error)
-+ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_prop); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 685, __pyx_L4_error)
- __pyx_v_prop_c = __pyx_t_5;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":684
-+ /* "vidcutter/libs/pympv/mpv.pyx":686
- * try:
- * prop_c = prop
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13052,7 +13052,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":685
-+ /* "vidcutter/libs/pympv/mpv.pyx":687
- * prop_c = prop
- * with nogil:
- * err = mpv_set_option( # <<<<<<<<<<<<<<
-@@ -13062,7 +13062,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- __pyx_v_err = mpv_set_option(__pyx_v_self->_ctx, __pyx_v_prop_c, MPV_FORMAT_NODE, (&__pyx_v_v));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":684
-+ /* "vidcutter/libs/pympv/mpv.pyx":686
- * try:
- * prop_c = prop
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13082,7 +13082,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":692
-+ /* "vidcutter/libs/pympv/mpv.pyx":694
- * )
- * finally:
- * self._free_native_value(v) # <<<<<<<<<<<<<<
-@@ -13091,7 +13091,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- */
- /*finally:*/ {
- /*normal exit:*/{
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- goto __pyx_L5;
-@@ -13114,7 +13114,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- __Pyx_XGOTREF(__pyx_t_14);
- __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
- {
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L10_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Context *)__pyx_v_self->__pyx_vtab)->_free_native_value(__pyx_v_self, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L10_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- }
-@@ -13147,7 +13147,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- __pyx_L5:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":693
-+ /* "vidcutter/libs/pympv/mpv.pyx":695
- * finally:
- * self._free_native_value(v)
- * return err # <<<<<<<<<<<<<<
-@@ -13155,13 +13155,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- * @_errors
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":674
-+ /* "vidcutter/libs/pympv/mpv.pyx":676
- *
- * @_errors
- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
-@@ -13183,7 +13183,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_20set_option(struct __p
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":696
-+/* "vidcutter/libs/pympv/mpv.pyx":698
- *
- * @_errors
- * def initialize(self): # <<<<<<<<<<<<<<
-@@ -13215,7 +13215,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("initialize", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":698
-+ /* "vidcutter/libs/pympv/mpv.pyx":700
- * def initialize(self):
- * """Wraps: mpv_initialize"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -13226,12 +13226,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 698, __pyx_L1_error)
-+ __PYX_ERR(0, 700, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":700
-+ /* "vidcutter/libs/pympv/mpv.pyx":702
- * assert self._ctx
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13246,7 +13246,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":701
-+ /* "vidcutter/libs/pympv/mpv.pyx":703
- * cdef int err
- * with nogil:
- * err = mpv_initialize(self._ctx) # <<<<<<<<<<<<<<
-@@ -13256,7 +13256,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
- __pyx_v_err = mpv_initialize(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":700
-+ /* "vidcutter/libs/pympv/mpv.pyx":702
- * assert self._ctx
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13275,7 +13275,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":702
-+ /* "vidcutter/libs/pympv/mpv.pyx":704
- * with nogil:
- * err = mpv_initialize(self._ctx)
- * return err # <<<<<<<<<<<<<<
-@@ -13283,13 +13283,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
- * def wait_event(self, timeout=None):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":696
-+ /* "vidcutter/libs/pympv/mpv.pyx":698
- *
- * @_errors
- * def initialize(self): # <<<<<<<<<<<<<<
-@@ -13308,7 +13308,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_22initialize(struct __p
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":704
-+/* "vidcutter/libs/pympv/mpv.pyx":706
- * return err
- *
- * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
-@@ -13349,7 +13349,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 704, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait_event") < 0)) __PYX_ERR(0, 706, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -13363,7 +13363,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_25wait_event(PyObject *
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 704, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("wait_event", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 706, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.wait_event", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -13391,7 +13391,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("wait_event", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":706
-+ /* "vidcutter/libs/pympv/mpv.pyx":708
- * def wait_event(self, timeout=None):
- * """Wraps: mpv_wait_event"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -13402,12 +13402,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 706, __pyx_L1_error)
-+ __PYX_ERR(0, 708, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":707
-+ /* "vidcutter/libs/pympv/mpv.pyx":709
- * """Wraps: mpv_wait_event"""
- * assert self._ctx
- * cdef double timeout_d = timeout if timeout is not None else -1 # <<<<<<<<<<<<<<
-@@ -13416,14 +13416,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
- */
- __pyx_t_2 = (__pyx_v_timeout != Py_None);
- if ((__pyx_t_2 != 0)) {
-- __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
-+ __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_timeout); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 709, __pyx_L1_error)
- __pyx_t_1 = __pyx_t_3;
- } else {
- __pyx_t_1 = -1.0;
- }
- __pyx_v_timeout_d = __pyx_t_1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":709
-+ /* "vidcutter/libs/pympv/mpv.pyx":711
- * cdef double timeout_d = timeout if timeout is not None else -1
- * cdef mpv_event* event
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13438,7 +13438,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":710
-+ /* "vidcutter/libs/pympv/mpv.pyx":712
- * cdef mpv_event* event
- * with nogil:
- * event = mpv_wait_event(self._ctx, timeout_d) # <<<<<<<<<<<<<<
-@@ -13448,7 +13448,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
- __pyx_v_event = mpv_wait_event(__pyx_v_self->_ctx, __pyx_v_timeout_d);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":709
-+ /* "vidcutter/libs/pympv/mpv.pyx":711
- * cdef double timeout_d = timeout if timeout is not None else -1
- * cdef mpv_event* event
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13467,7 +13467,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":711
-+ /* "vidcutter/libs/pympv/mpv.pyx":713
- * with nogil:
- * event = mpv_wait_event(self._ctx, timeout_d)
- * return Event()._init(event, self) # <<<<<<<<<<<<<<
-@@ -13475,16 +13475,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
- * def wakeup(self):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 713, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
-+ __pyx_t_5 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_Event *)((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4)->__pyx_vtab)->_init(((struct __pyx_obj_9vidcutter_4libs_3mpv_Event *)__pyx_t_4), __pyx_v_event, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_r = __pyx_t_5;
- __pyx_t_5 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":704
-+ /* "vidcutter/libs/pympv/mpv.pyx":706
- * return err
- *
- * def wait_event(self, timeout=None): # <<<<<<<<<<<<<<
-@@ -13504,7 +13504,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_24wait_event(struct __p
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":713
-+/* "vidcutter/libs/pympv/mpv.pyx":715
- * return Event()._init(event, self)
- *
- * def wakeup(self): # <<<<<<<<<<<<<<
-@@ -13534,7 +13534,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("wakeup", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":715
-+ /* "vidcutter/libs/pympv/mpv.pyx":717
- * def wakeup(self):
- * """Wraps: mpv_wakeup"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -13545,12 +13545,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 715, __pyx_L1_error)
-+ __PYX_ERR(0, 717, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":716
-+ /* "vidcutter/libs/pympv/mpv.pyx":718
- * """Wraps: mpv_wakeup"""
- * assert self._ctx
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13565,7 +13565,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":717
-+ /* "vidcutter/libs/pympv/mpv.pyx":719
- * assert self._ctx
- * with nogil:
- * mpv_wakeup(self._ctx) # <<<<<<<<<<<<<<
-@@ -13575,7 +13575,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
- mpv_wakeup(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":716
-+ /* "vidcutter/libs/pympv/mpv.pyx":718
- * """Wraps: mpv_wakeup"""
- * assert self._ctx
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13594,7 +13594,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":713
-+ /* "vidcutter/libs/pympv/mpv.pyx":715
- * return Event()._init(event, self)
- *
- * def wakeup(self): # <<<<<<<<<<<<<<
-@@ -13614,7 +13614,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_26wakeup(struct __pyx_o
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":719
-+/* "vidcutter/libs/pympv/mpv.pyx":721
- * mpv_wakeup(self._ctx)
- *
- * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
-@@ -13649,7 +13649,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("set_wakeup_callback", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":721
-+ /* "vidcutter/libs/pympv/mpv.pyx":723
- * def set_wakeup_callback(self, callback):
- * """Wraps: mpv_set_wakeup_callback"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -13660,25 +13660,25 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 721, __pyx_L1_error)
-+ __PYX_ERR(0, 723, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":722
-+ /* "vidcutter/libs/pympv/mpv.pyx":724
- * """Wraps: mpv_set_wakeup_callback"""
- * assert self._ctx
- * cdef uint64_t name = <uint64_t>id(self) # <<<<<<<<<<<<<<
- * self.callback = callback
- * self.callbackthread.set(callback)
- */
-- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_name = ((uint64_t)__pyx_t_2);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":723
-+ /* "vidcutter/libs/pympv/mpv.pyx":725
- * assert self._ctx
- * cdef uint64_t name = <uint64_t>id(self)
- * self.callback = callback # <<<<<<<<<<<<<<
-@@ -13691,14 +13691,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
- __Pyx_DECREF(__pyx_v_self->callback);
- __pyx_v_self->callback = __pyx_v_callback;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":724
-+ /* "vidcutter/libs/pympv/mpv.pyx":726
- * cdef uint64_t name = <uint64_t>id(self)
- * self.callback = callback
- * self.callbackthread.set(callback) # <<<<<<<<<<<<<<
- * with nogil:
- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
- */
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
-@@ -13712,12 +13712,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
- }
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_callback);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":725
-+ /* "vidcutter/libs/pympv/mpv.pyx":727
- * self.callback = callback
- * self.callbackthread.set(callback)
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13732,7 +13732,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":726
-+ /* "vidcutter/libs/pympv/mpv.pyx":728
- * self.callbackthread.set(callback)
- * with nogil:
- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name) # <<<<<<<<<<<<<<
-@@ -13742,7 +13742,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
- mpv_set_wakeup_callback(__pyx_v_self->_ctx, __pyx_f_9vidcutter_4libs_3mpv__c_callback, ((void *)__pyx_v_name));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":725
-+ /* "vidcutter/libs/pympv/mpv.pyx":727
- * self.callback = callback
- * self.callbackthread.set(callback)
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13761,7 +13761,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":719
-+ /* "vidcutter/libs/pympv/mpv.pyx":721
- * mpv_wakeup(self._ctx)
- *
- * def set_wakeup_callback(self, callback): # <<<<<<<<<<<<<<
-@@ -13784,7 +13784,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_28set_wakeup_callback(s
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":728
-+/* "vidcutter/libs/pympv/mpv.pyx":730
- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
- *
- * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
-@@ -13816,7 +13816,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("get_wakeup_pipe", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":730
-+ /* "vidcutter/libs/pympv/mpv.pyx":732
- * def get_wakeup_pipe(self):
- * """Wraps: mpv_get_wakeup_pipe"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -13827,12 +13827,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 730, __pyx_L1_error)
-+ __PYX_ERR(0, 732, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":732
-+ /* "vidcutter/libs/pympv/mpv.pyx":734
- * assert self._ctx
- * cdef int pipe
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13847,7 +13847,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":733
-+ /* "vidcutter/libs/pympv/mpv.pyx":735
- * cdef int pipe
- * with nogil:
- * pipe = mpv_get_wakeup_pipe(self._ctx) # <<<<<<<<<<<<<<
-@@ -13857,7 +13857,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
- __pyx_v_pipe = mpv_get_wakeup_pipe(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":732
-+ /* "vidcutter/libs/pympv/mpv.pyx":734
- * assert self._ctx
- * cdef int pipe
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13876,7 +13876,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":734
-+ /* "vidcutter/libs/pympv/mpv.pyx":736
- * with nogil:
- * pipe = mpv_get_wakeup_pipe(self._ctx)
- * return pipe # <<<<<<<<<<<<<<
-@@ -13884,13 +13884,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
- * def __cinit__(self):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_pipe); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":728
-+ /* "vidcutter/libs/pympv/mpv.pyx":730
- * mpv_set_wakeup_callback(self._ctx, _c_callback, <void*>name)
- *
- * def get_wakeup_pipe(self): # <<<<<<<<<<<<<<
-@@ -13909,7 +13909,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_30get_wakeup_pipe(struc
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":736
-+/* "vidcutter/libs/pympv/mpv.pyx":738
- * return pipe
- *
- * def __cinit__(self): # <<<<<<<<<<<<<<
-@@ -13947,20 +13947,20 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__cinit__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":737
-+ /* "vidcutter/libs/pympv/mpv.pyx":739
- *
- * def __cinit__(self):
- * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
- * with nogil:
- * self._ctx = mpv_create()
- */
-- __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_2 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 739, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_ctxid = ((uint64_t)__pyx_t_2);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":738
-+ /* "vidcutter/libs/pympv/mpv.pyx":740
- * def __cinit__(self):
- * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil: # <<<<<<<<<<<<<<
-@@ -13975,7 +13975,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":739
-+ /* "vidcutter/libs/pympv/mpv.pyx":741
- * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil:
- * self._ctx = mpv_create() # <<<<<<<<<<<<<<
-@@ -13985,7 +13985,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- __pyx_v_self->_ctx = mpv_create();
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":738
-+ /* "vidcutter/libs/pympv/mpv.pyx":740
- * def __cinit__(self):
- * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil: # <<<<<<<<<<<<<<
-@@ -14004,7 +14004,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":740
-+ /* "vidcutter/libs/pympv/mpv.pyx":742
- * with nogil:
- * self._ctx = mpv_create()
- * if not self._ctx: # <<<<<<<<<<<<<<
-@@ -14014,14 +14014,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- __pyx_t_3 = ((!(__pyx_v_self->_ctx != 0)) != 0);
- if (unlikely(__pyx_t_3)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":741
-+ /* "vidcutter/libs/pympv/mpv.pyx":743
- * self._ctx = mpv_create()
- * if not self._ctx:
- * raise MPVError("Context creation error") # <<<<<<<<<<<<<<
- * self.callbackthread = CallbackThread()
- * _callbacks[ctxid] = self.callbackthread
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 743, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-@@ -14035,14 +14035,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- }
- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_Context_creation_error) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Context_creation_error);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(0, 741, __pyx_L1_error)
-+ __PYX_ERR(0, 743, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":740
-+ /* "vidcutter/libs/pympv/mpv.pyx":742
- * with nogil:
- * self._ctx = mpv_create()
- * if not self._ctx: # <<<<<<<<<<<<<<
-@@ -14051,14 +14051,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":742
-+ /* "vidcutter/libs/pympv/mpv.pyx":744
- * if not self._ctx:
- * raise MPVError("Context creation error")
- * self.callbackthread = CallbackThread() # <<<<<<<<<<<<<<
- * _callbacks[ctxid] = self.callbackthread
- * self.reply_userdata = dict()
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 742, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CallbackThread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-@@ -14072,7 +14072,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- }
- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_GIVEREF(__pyx_t_1);
-@@ -14081,7 +14081,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- __pyx_v_self->callbackthread = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":743
-+ /* "vidcutter/libs/pympv/mpv.pyx":745
- * raise MPVError("Context creation error")
- * self.callbackthread = CallbackThread()
- * _callbacks[ctxid] = self.callbackthread # <<<<<<<<<<<<<<
-@@ -14090,17 +14090,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- */
- __pyx_t_1 = __pyx_v_self->callbackthread;
- __Pyx_INCREF(__pyx_t_1);
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 743, __pyx_L1_error)
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":744
-+ /* "vidcutter/libs/pympv/mpv.pyx":746
- * self.callbackthread = CallbackThread()
- * _callbacks[ctxid] = self.callbackthread
- * self.reply_userdata = dict() # <<<<<<<<<<<<<<
- * _reply_userdatas[ctxid] = self.reply_userdata
- * self.callbackthread.start()
- */
-- __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_v_self->reply_userdata);
-@@ -14108,7 +14108,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- __pyx_v_self->reply_userdata = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":745
-+ /* "vidcutter/libs/pympv/mpv.pyx":747
- * _callbacks[ctxid] = self.callbackthread
- * self.reply_userdata = dict()
- * _reply_userdatas[ctxid] = self.reply_userdata # <<<<<<<<<<<<<<
-@@ -14117,17 +14117,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- */
- __pyx_t_1 = __pyx_v_self->reply_userdata;
- __Pyx_INCREF(__pyx_t_1);
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, __pyx_t_1, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 747, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":746
-+ /* "vidcutter/libs/pympv/mpv.pyx":748
- * self.reply_userdata = dict()
- * _reply_userdatas[ctxid] = self.reply_userdata
- * self.callbackthread.start() # <<<<<<<<<<<<<<
- *
- * @_errors
- */
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 748, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
-@@ -14141,12 +14141,12 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- }
- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":736
-+ /* "vidcutter/libs/pympv/mpv.pyx":738
- * return pipe
- *
- * def __cinit__(self): # <<<<<<<<<<<<<<
-@@ -14168,7 +14168,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_7Context_32__cinit__(struct __pyx_obj_
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":749
-+/* "vidcutter/libs/pympv/mpv.pyx":751
- *
- * @_errors
- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
-@@ -14216,7 +14216,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyOb
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 749, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "observe_property") < 0)) __PYX_ERR(0, 751, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -14232,7 +14232,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_7Context_35observe_property(PyOb
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 749, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("observe_property", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 751, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.Context.observe_property", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -14268,7 +14268,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- __Pyx_RefNannySetupContext("observe_property", 0);
- __Pyx_INCREF(__pyx_v_prop);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":751
-+ /* "vidcutter/libs/pympv/mpv.pyx":753
- * def observe_property(self, prop, data=None):
- * """Wraps: mpv_observe_property"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -14279,41 +14279,41 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 751, __pyx_L1_error)
-+ __PYX_ERR(0, 753, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":752
-+ /* "vidcutter/libs/pympv/mpv.pyx":754
- * """Wraps: mpv_observe_property"""
- * assert self._ctx
- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
- * id_data = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(id_data, None)
- */
-- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 752, __pyx_L1_error)
-+ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 754, __pyx_L1_error)
- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":753
-+ /* "vidcutter/libs/pympv/mpv.pyx":755
- * assert self._ctx
- * cdef uint64_t id_data = <uint64_t>hash(data)
- * id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is None:
- */
-- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 753, __pyx_L1_error)
-+ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 755, __pyx_L1_error)
- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":754
-+ /* "vidcutter/libs/pympv/mpv.pyx":756
- * cdef uint64_t id_data = <uint64_t>hash(data)
- * id_data = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
- * if userdatas is None:
- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
- */
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 756, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- __pyx_t_6 = 0;
-@@ -14330,7 +14330,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_3)) {
- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-@@ -14339,14 +14339,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- } else
- #endif
- {
-- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 756, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (__pyx_t_5) {
- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
-@@ -14357,7 +14357,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- __Pyx_GIVEREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
- __pyx_t_4 = 0;
-- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- }
-@@ -14365,7 +14365,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- __pyx_v_userdatas = __pyx_t_2;
- __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":755
-+ /* "vidcutter/libs/pympv/mpv.pyx":757
- * id_data = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is None: # <<<<<<<<<<<<<<
-@@ -14376,14 +14376,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- __pyx_t_9 = (__pyx_t_8 != 0);
- if (__pyx_t_9) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":756
-+ /* "vidcutter/libs/pympv/mpv.pyx":758
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is None:
- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data) # <<<<<<<<<<<<<<
- * userdatas.observed = True
- * prop = _strenc(prop)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ReplyUserData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-@@ -14397,15 +14397,15 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- }
- __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data);
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
-+ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, __pyx_t_2, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 758, __pyx_L1_error)
- __Pyx_INCREF(__pyx_t_2);
- __Pyx_DECREF_SET(__pyx_v_userdatas, __pyx_t_2);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":755
-+ /* "vidcutter/libs/pympv/mpv.pyx":757
- * id_data = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is None: # <<<<<<<<<<<<<<
-@@ -14414,23 +14414,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":757
-+ /* "vidcutter/libs/pympv/mpv.pyx":759
- * if userdatas is None:
- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
- * userdatas.observed = True # <<<<<<<<<<<<<<
- * prop = _strenc(prop)
- * cdef char* propc = prop
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_True) < 0) __PYX_ERR(0, 759, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":758
-+ /* "vidcutter/libs/pympv/mpv.pyx":760
- * self.reply_userdata[id_data] = userdatas = _ReplyUserData(data)
- * userdatas.observed = True
- * prop = _strenc(prop) # <<<<<<<<<<<<<<
- * cdef char* propc = prop
- * cdef int err
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strenc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_7 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-@@ -14444,23 +14444,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- }
- __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v_prop) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_prop);
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF_SET(__pyx_v_prop, __pyx_t_2);
- __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":759
-+ /* "vidcutter/libs/pympv/mpv.pyx":761
- * userdatas.observed = True
- * prop = _strenc(prop)
- * cdef char* propc = prop # <<<<<<<<<<<<<<
- * cdef int err
- * with nogil:
- */
-- __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L1_error)
-+ __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_prop); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 761, __pyx_L1_error)
- __pyx_v_propc = __pyx_t_10;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":761
-+ /* "vidcutter/libs/pympv/mpv.pyx":763
- * cdef char* propc = prop
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -14475,7 +14475,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":762
-+ /* "vidcutter/libs/pympv/mpv.pyx":764
- * cdef int err
- * with nogil:
- * err = mpv_observe_property( # <<<<<<<<<<<<<<
-@@ -14485,7 +14485,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- __pyx_v_err = mpv_observe_property(__pyx_v_self->_ctx, __pyx_v_id_data, __pyx_v_propc, MPV_FORMAT_NODE);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":761
-+ /* "vidcutter/libs/pympv/mpv.pyx":763
- * cdef char* propc = prop
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -14504,7 +14504,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":768
-+ /* "vidcutter/libs/pympv/mpv.pyx":770
- * MPV_FORMAT_NODE,
- * )
- * return err # <<<<<<<<<<<<<<
-@@ -14512,13 +14512,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- * @_errors
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":749
-+ /* "vidcutter/libs/pympv/mpv.pyx":751
- *
- * @_errors
- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
-@@ -14543,7 +14543,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_34observe_property(stru
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":771
-+/* "vidcutter/libs/pympv/mpv.pyx":773
- *
- * @_errors
- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
-@@ -14585,7 +14585,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("unobserve_property", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":773
-+ /* "vidcutter/libs/pympv/mpv.pyx":775
- * def unobserve_property(self, data):
- * """Wraps: mpv_unobserve_property"""
- * assert self._ctx # <<<<<<<<<<<<<<
-@@ -14596,31 +14596,31 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- if (unlikely(!Py_OptimizeFlag)) {
- if (unlikely(!(__pyx_v_self->_ctx != 0))) {
- PyErr_SetNone(PyExc_AssertionError);
-- __PYX_ERR(0, 773, __pyx_L1_error)
-+ __PYX_ERR(0, 775, __pyx_L1_error)
- }
- }
- #endif
-
-- /* "vidcutter/libs/pympv/mpv.pyx":774
-+ /* "vidcutter/libs/pympv/mpv.pyx":776
- * """Wraps: mpv_unobserve_property"""
- * assert self._ctx
- * cdef uint64_t id_data = <uint64_t>hash(data) # <<<<<<<<<<<<<<
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is not None:
- */
-- __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 774, __pyx_L1_error)
-+ __pyx_t_1 = PyObject_Hash(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 776, __pyx_L1_error)
- __pyx_v_id_data = ((uint64_t)__pyx_t_1);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":775
-+ /* "vidcutter/libs/pympv/mpv.pyx":777
- * assert self._ctx
- * cdef uint64_t id_data = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(id_data, None) # <<<<<<<<<<<<<<
- * if userdatas is not None:
- * userdatas.observed = False
- */
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->reply_userdata, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_id_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 777, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- __pyx_t_6 = 0;
-@@ -14637,7 +14637,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_3)) {
- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-- __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-@@ -14646,14 +14646,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
- PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, Py_None};
-- __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- } else
- #endif
- {
-- __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 777, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- if (__pyx_t_5) {
- __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
-@@ -14664,7 +14664,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- __Pyx_GIVEREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, Py_None);
- __pyx_t_4 = 0;
-- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- }
-@@ -14672,7 +14672,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- __pyx_v_userdatas = __pyx_t_2;
- __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":776
-+ /* "vidcutter/libs/pympv/mpv.pyx":778
- * cdef uint64_t id_data = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is not None: # <<<<<<<<<<<<<<
-@@ -14683,40 +14683,40 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- __pyx_t_9 = (__pyx_t_8 != 0);
- if (__pyx_t_9) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":777
-+ /* "vidcutter/libs/pympv/mpv.pyx":779
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is not None:
- * userdatas.observed = False # <<<<<<<<<<<<<<
- * if userdatas.counter <= 0:
- * del self.reply_userdata[id_data]
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_userdatas, __pyx_n_s_observed, Py_False) < 0) __PYX_ERR(0, 779, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":778
-+ /* "vidcutter/libs/pympv/mpv.pyx":780
- * if userdatas is not None:
- * userdatas.observed = False
- * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
- * del self.reply_userdata[id_data]
- * cdef int err
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_userdatas, __pyx_n_s_counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
-+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 780, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 778, __pyx_L1_error)
-+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 780, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (__pyx_t_9) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":779
-+ /* "vidcutter/libs/pympv/mpv.pyx":781
- * userdatas.observed = False
- * if userdatas.counter <= 0:
- * del self.reply_userdata[id_data] # <<<<<<<<<<<<<<
- * cdef int err
- * with nogil:
- */
-- if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 779, __pyx_L1_error)
-+ if (unlikely(__Pyx_DelItemInt(__pyx_v_self->reply_userdata, __pyx_v_id_data, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 781, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":778
-+ /* "vidcutter/libs/pympv/mpv.pyx":780
- * if userdatas is not None:
- * userdatas.observed = False
- * if userdatas.counter <= 0: # <<<<<<<<<<<<<<
-@@ -14725,7 +14725,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":776
-+ /* "vidcutter/libs/pympv/mpv.pyx":778
- * cdef uint64_t id_data = <uint64_t>hash(data)
- * userdatas = self.reply_userdata.get(id_data, None)
- * if userdatas is not None: # <<<<<<<<<<<<<<
-@@ -14734,7 +14734,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":781
-+ /* "vidcutter/libs/pympv/mpv.pyx":783
- * del self.reply_userdata[id_data]
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -14749,7 +14749,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":782
-+ /* "vidcutter/libs/pympv/mpv.pyx":784
- * cdef int err
- * with nogil:
- * err = mpv_unobserve_property( # <<<<<<<<<<<<<<
-@@ -14759,7 +14759,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- __pyx_v_err = mpv_unobserve_property(__pyx_v_self->_ctx, __pyx_v_id_data);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":781
-+ /* "vidcutter/libs/pympv/mpv.pyx":783
- * del self.reply_userdata[id_data]
- * cdef int err
- * with nogil: # <<<<<<<<<<<<<<
-@@ -14778,7 +14778,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":786
-+ /* "vidcutter/libs/pympv/mpv.pyx":788
- * id_data,
- * )
- * return err # <<<<<<<<<<<<<<
-@@ -14786,13 +14786,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- * def shutdown(self):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 786, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 788, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":771
-+ /* "vidcutter/libs/pympv/mpv.pyx":773
- *
- * @_errors
- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
-@@ -14816,7 +14816,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_36unobserve_property(st
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":788
-+/* "vidcutter/libs/pympv/mpv.pyx":790
- * return err
- *
- * def shutdown(self): # <<<<<<<<<<<<<<
-@@ -14851,7 +14851,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("shutdown", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":789
-+ /* "vidcutter/libs/pympv/mpv.pyx":791
- *
- * def shutdown(self):
- * if self._ctx == NULL: # <<<<<<<<<<<<<<
-@@ -14861,7 +14861,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- __pyx_t_1 = ((__pyx_v_self->_ctx == NULL) != 0);
- if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":790
-+ /* "vidcutter/libs/pympv/mpv.pyx":792
- * def shutdown(self):
- * if self._ctx == NULL:
- * return # <<<<<<<<<<<<<<
-@@ -14872,7 +14872,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":789
-+ /* "vidcutter/libs/pympv/mpv.pyx":791
- *
- * def shutdown(self):
- * if self._ctx == NULL: # <<<<<<<<<<<<<<
-@@ -14881,20 +14881,20 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":791
-+ /* "vidcutter/libs/pympv/mpv.pyx":793
- * if self._ctx == NULL:
- * return
- * cdef uint64_t ctxid = <uint64_t>id(self) # <<<<<<<<<<<<<<
- * with nogil:
- * mpv_terminate_destroy(self._ctx)
- */
-- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_As_uint64_t(__pyx_t_2); if (unlikely((__pyx_t_3 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 793, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_ctxid = ((uint64_t)__pyx_t_3);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":792
-+ /* "vidcutter/libs/pympv/mpv.pyx":794
- * return
- * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil: # <<<<<<<<<<<<<<
-@@ -14909,7 +14909,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":793
-+ /* "vidcutter/libs/pympv/mpv.pyx":795
- * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil:
- * mpv_terminate_destroy(self._ctx) # <<<<<<<<<<<<<<
-@@ -14919,7 +14919,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- mpv_terminate_destroy(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":792
-+ /* "vidcutter/libs/pympv/mpv.pyx":794
- * return
- * cdef uint64_t ctxid = <uint64_t>id(self)
- * with nogil: # <<<<<<<<<<<<<<
-@@ -14938,14 +14938,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":794
-+ /* "vidcutter/libs/pympv/mpv.pyx":796
- * with nogil:
- * mpv_terminate_destroy(self._ctx)
- * self.callbackthread.shutdown() # <<<<<<<<<<<<<<
- * del _callbacks[ctxid]
- * del _reply_userdatas[ctxid]
- */
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->callbackthread, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
-@@ -14959,30 +14959,30 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- }
- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":795
-+ /* "vidcutter/libs/pympv/mpv.pyx":797
- * mpv_terminate_destroy(self._ctx)
- * self.callbackthread.shutdown()
- * del _callbacks[ctxid] # <<<<<<<<<<<<<<
- * del _reply_userdatas[ctxid]
- * self.callback = None
- */
-- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 795, __pyx_L1_error)
-+ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 797, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":796
-+ /* "vidcutter/libs/pympv/mpv.pyx":798
- * self.callbackthread.shutdown()
- * del _callbacks[ctxid]
- * del _reply_userdatas[ctxid] # <<<<<<<<<<<<<<
- * self.callback = None
- * self.reply_userdata = None
- */
-- if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 796, __pyx_L1_error)
-+ if (unlikely(__Pyx_DelItemInt(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_v_ctxid, uint64_t, 0, __Pyx_PyInt_From_uint64_t, 0, 0, 1) < 0)) __PYX_ERR(0, 798, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":797
-+ /* "vidcutter/libs/pympv/mpv.pyx":799
- * del _callbacks[ctxid]
- * del _reply_userdatas[ctxid]
- * self.callback = None # <<<<<<<<<<<<<<
-@@ -14995,7 +14995,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- __Pyx_DECREF(__pyx_v_self->callback);
- __pyx_v_self->callback = Py_None;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":798
-+ /* "vidcutter/libs/pympv/mpv.pyx":800
- * del _reply_userdatas[ctxid]
- * self.callback = None
- * self.reply_userdata = None # <<<<<<<<<<<<<<
-@@ -15008,7 +15008,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- __Pyx_DECREF(__pyx_v_self->reply_userdata);
- __pyx_v_self->reply_userdata = Py_None;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":799
-+ /* "vidcutter/libs/pympv/mpv.pyx":801
- * self.callback = None
- * self.reply_userdata = None
- * self._ctx = NULL # <<<<<<<<<<<<<<
-@@ -15017,7 +15017,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- */
- __pyx_v_self->_ctx = NULL;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":788
-+ /* "vidcutter/libs/pympv/mpv.pyx":790
- * return err
- *
- * def shutdown(self): # <<<<<<<<<<<<<<
-@@ -15040,7 +15040,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_38shutdown(struct __pyx
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":813
-+/* "vidcutter/libs/pympv/mpv.pyx":815
- * # return ctx
- *
- * def __dealloc__(self): # <<<<<<<<<<<<<<
-@@ -15069,14 +15069,14 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_o
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__dealloc__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":814
-+ /* "vidcutter/libs/pympv/mpv.pyx":816
- *
- * def __dealloc__(self):
- * self.shutdown() # <<<<<<<<<<<<<<
- *
- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -15090,12 +15090,12 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_7Context_40__dealloc__(struct __pyx_o
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":813
-+ /* "vidcutter/libs/pympv/mpv.pyx":815
- * # return ctx
- *
- * def __dealloc__(self): # <<<<<<<<<<<<<<
-@@ -15227,7 +15227,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_7Context_44__setstate_cython__(C
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":816
-+/* "vidcutter/libs/pympv/mpv.pyx":818
- * self.shutdown()
- *
- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
-@@ -15251,14 +15251,14 @@ static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx,
- #endif
- __Pyx_RefNannySetupContext("_c_getprocaddress", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":817
-+ /* "vidcutter/libs/pympv/mpv.pyx":819
- *
- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
- * return <void *><intptr_t>(<object>ctx)(name) # <<<<<<<<<<<<<<
- *
- * cdef void _c_updatecb(void *ctx) with gil:
- */
-- __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 819, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_INCREF(((PyObject *)__pyx_v_ctx));
- __pyx_t_3 = ((PyObject *)__pyx_v_ctx); __pyx_t_4 = NULL;
-@@ -15274,15 +15274,15 @@ static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx,
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 819, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_r = ((void *)((intptr_t)__pyx_t_5));
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":816
-+ /* "vidcutter/libs/pympv/mpv.pyx":818
- * self.shutdown()
- *
- * cdef void *_c_getprocaddress(void *ctx, const char *name) with gil: # <<<<<<<<<<<<<<
-@@ -15306,7 +15306,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress(void *__pyx_v_ctx,
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":819
-+/* "vidcutter/libs/pympv/mpv.pyx":821
- * return <void *><intptr_t>(<object>ctx)(name)
- *
- * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
-@@ -15327,7 +15327,7 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
- #endif
- __Pyx_RefNannySetupContext("_c_updatecb", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":820
-+ /* "vidcutter/libs/pympv/mpv.pyx":822
- *
- * cdef void _c_updatecb(void *ctx) with gil:
- * (<object>ctx)() # <<<<<<<<<<<<<<
-@@ -15347,12 +15347,12 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":819
-+ /* "vidcutter/libs/pympv/mpv.pyx":821
- * return <void *><intptr_t>(<object>ctx)(name)
- *
- * cdef void _c_updatecb(void *ctx) with gil: # <<<<<<<<<<<<<<
-@@ -15374,7 +15374,7 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_updatecb(void *__pyx_v_ctx) {
- #endif
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":886
-+/* "vidcutter/libs/pympv/mpv.pyx":888
- * object owned
- *
- * def __init__(self): # <<<<<<<<<<<<<<
-@@ -15407,14 +15407,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__init__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":887
-+ /* "vidcutter/libs/pympv/mpv.pyx":889
- *
- * def __init__(self):
- * self.owned = [] # <<<<<<<<<<<<<<
- * self.params[0].type = MPV_RENDER_PARAM_INVALID
- *
- */
-- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
-+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_1);
- __Pyx_GOTREF(__pyx_v_self->owned);
-@@ -15422,7 +15422,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
- __pyx_v_self->owned = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":888
-+ /* "vidcutter/libs/pympv/mpv.pyx":890
- * def __init__(self):
- * self.owned = []
- * self.params[0].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
-@@ -15431,7 +15431,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
- */
- (__pyx_v_self->params[0]).type = MPV_RENDER_PARAM_INVALID;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":886
-+ /* "vidcutter/libs/pympv/mpv.pyx":888
- * object owned
- *
- * def __init__(self): # <<<<<<<<<<<<<<
-@@ -15451,7 +15451,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams___init__(struct __pyx_
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":890
-+/* "vidcutter/libs/pympv/mpv.pyx":892
- * self.params[0].type = MPV_RENDER_PARAM_INVALID
- *
- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
-@@ -15480,7 +15480,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":891
-+ /* "vidcutter/libs/pympv/mpv.pyx":893
- *
- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
- * count = len(self.owned) # <<<<<<<<<<<<<<
-@@ -15489,26 +15489,26 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
- */
- __pyx_t_1 = __pyx_v_self->owned;
- __Pyx_INCREF(__pyx_t_1);
-- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 891, __pyx_L1_error)
-+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 893, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
-+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_count = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":892
-+ /* "vidcutter/libs/pympv/mpv.pyx":894
- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
- * count = len(self.owned)
- * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
- * if owned:
- * free(p)
- */
-- __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
-+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_count, __pyx_int_32, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 894, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__pyx_t_3) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":893
-+ /* "vidcutter/libs/pympv/mpv.pyx":895
- * count = len(self.owned)
- * if count >= MAX_RENDER_PARAMS:
- * if owned: # <<<<<<<<<<<<<<
-@@ -15518,7 +15518,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
- __pyx_t_3 = (__pyx_v_owned != 0);
- if (__pyx_t_3) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":894
-+ /* "vidcutter/libs/pympv/mpv.pyx":896
- * if count >= MAX_RENDER_PARAMS:
- * if owned:
- * free(p) # <<<<<<<<<<<<<<
-@@ -15527,7 +15527,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
- */
- free(__pyx_v_p);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":893
-+ /* "vidcutter/libs/pympv/mpv.pyx":895
- * count = len(self.owned)
- * if count >= MAX_RENDER_PARAMS:
- * if owned: # <<<<<<<<<<<<<<
-@@ -15536,14 +15536,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":895
-+ /* "vidcutter/libs/pympv/mpv.pyx":897
- * if owned:
- * free(p)
- * raise PyMPVError("RenderParams overflow") # <<<<<<<<<<<<<<
- *
- * self.params[count].type = t
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-@@ -15557,14 +15557,14 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
- }
- __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_RenderParams_overflow) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_RenderParams_overflow);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __PYX_ERR(0, 895, __pyx_L1_error)
-+ __PYX_ERR(0, 897, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":892
-+ /* "vidcutter/libs/pympv/mpv.pyx":894
- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False):
- * count = len(self.owned)
- * if count >= MAX_RENDER_PARAMS: # <<<<<<<<<<<<<<
-@@ -15573,52 +15573,52 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":897
-+ /* "vidcutter/libs/pympv/mpv.pyx":899
- * raise PyMPVError("RenderParams overflow")
- *
- * self.params[count].type = t # <<<<<<<<<<<<<<
- * self.params[count].data = p
- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
- */
-- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
- (__pyx_v_self->params[__pyx_t_2]).type = __pyx_v_t;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":898
-+ /* "vidcutter/libs/pympv/mpv.pyx":900
- *
- * self.params[count].type = t
- * self.params[count].data = p # <<<<<<<<<<<<<<
- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
- * self.owned.append(owned)
- */
-- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 898, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_count); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 900, __pyx_L1_error)
- (__pyx_v_self->params[__pyx_t_2]).data = __pyx_v_p;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":899
-+ /* "vidcutter/libs/pympv/mpv.pyx":901
- * self.params[count].type = t
- * self.params[count].data = p
- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID # <<<<<<<<<<<<<<
- * self.owned.append(owned)
- *
- */
-- __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- (__pyx_v_self->params[__pyx_t_2]).type = MPV_RENDER_PARAM_INVALID;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":900
-+ /* "vidcutter/libs/pympv/mpv.pyx":902
- * self.params[count].data = p
- * self.params[count + 1].type = MPV_RENDER_PARAM_INVALID
- * self.owned.append(owned) # <<<<<<<<<<<<<<
- *
- * cdef add_int(self, mpv_render_param_type t, int val):
- */
-- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 900, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->owned, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 902, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":890
-+ /* "vidcutter/libs/pympv/mpv.pyx":892
- * self.params[0].type = MPV_RENDER_PARAM_INVALID
- *
- * cdef add_voidp(self, mpv_render_param_type t, void *p, bint owned=False): # <<<<<<<<<<<<<<
-@@ -15642,7 +15642,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp(struct
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":902
-+/* "vidcutter/libs/pympv/mpv.pyx":904
- * self.owned.append(owned)
- *
- * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
-@@ -15660,7 +15660,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("add_int", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":903
-+ /* "vidcutter/libs/pympv/mpv.pyx":905
- *
- * cdef add_int(self, mpv_render_param_type t, int val):
- * cdef int *p = <int *>malloc(sizeof(int)) # <<<<<<<<<<<<<<
-@@ -15669,7 +15669,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
- */
- __pyx_v_p = ((int *)malloc((sizeof(int))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":904
-+ /* "vidcutter/libs/pympv/mpv.pyx":906
- * cdef add_int(self, mpv_render_param_type t, int val):
- * cdef int *p = <int *>malloc(sizeof(int))
- * p[0] = val # <<<<<<<<<<<<<<
-@@ -15678,18 +15678,18 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
- */
- (__pyx_v_p[0]) = __pyx_v_val;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":905
-+ /* "vidcutter/libs/pympv/mpv.pyx":907
- * cdef int *p = <int *>malloc(sizeof(int))
- * p[0] = val
- * self.add_voidp(t, p) # <<<<<<<<<<<<<<
- *
- * cdef add_string(self, mpv_render_param_type t, char *s):
- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":902
-+ /* "vidcutter/libs/pympv/mpv.pyx":904
- * self.owned.append(owned)
- *
- * cdef add_int(self, mpv_render_param_type t, int val): # <<<<<<<<<<<<<<
-@@ -15710,7 +15710,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int(struct __
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":907
-+/* "vidcutter/libs/pympv/mpv.pyx":909
- * self.add_voidp(t, p)
- *
- * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
-@@ -15728,7 +15728,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("add_string", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":908
-+ /* "vidcutter/libs/pympv/mpv.pyx":910
- *
- * cdef add_string(self, mpv_render_param_type t, char *s):
- * cdef char *p = <char *>malloc(strlen(s) + 1) # <<<<<<<<<<<<<<
-@@ -15737,7 +15737,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
- */
- __pyx_v_p = ((char *)malloc((strlen(__pyx_v_s) + 1)));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":909
-+ /* "vidcutter/libs/pympv/mpv.pyx":911
- * cdef add_string(self, mpv_render_param_type t, char *s):
- * cdef char *p = <char *>malloc(strlen(s) + 1)
- * strcpy(p, s) # <<<<<<<<<<<<<<
-@@ -15746,18 +15746,18 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
- */
- (void)(strcpy(__pyx_v_p, __pyx_v_s));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":910
-+ /* "vidcutter/libs/pympv/mpv.pyx":912
- * cdef char *p = <char *>malloc(strlen(s) + 1)
- * strcpy(p, s)
- * self.add_voidp(t, p) # <<<<<<<<<<<<<<
- *
- * def __dealloc__(self):
- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_self->__pyx_vtab)->add_voidp(__pyx_v_self, __pyx_v_t, __pyx_v_p, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":907
-+ /* "vidcutter/libs/pympv/mpv.pyx":909
- * self.add_voidp(t, p)
- *
- * cdef add_string(self, mpv_render_param_type t, char *s): # <<<<<<<<<<<<<<
-@@ -15778,7 +15778,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string(struct
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":912
-+/* "vidcutter/libs/pympv/mpv.pyx":914
- * self.add_voidp(t, p)
- *
- * def __dealloc__(self): # <<<<<<<<<<<<<<
-@@ -15813,7 +15813,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__dealloc__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":913
-+ /* "vidcutter/libs/pympv/mpv.pyx":915
- *
- * def __dealloc__(self):
- * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
-@@ -15826,26 +15826,26 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
- __pyx_t_2 = __pyx_v_self->owned; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
- __pyx_t_4 = NULL;
- } else {
-- __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 915, __pyx_L1_error)
- }
- for (;;) {
- if (likely(!__pyx_t_4)) {
- if (likely(PyList_CheckExact(__pyx_t_2))) {
- if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 915, __pyx_L1_error)
- #else
-- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- #endif
- } else {
- if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
-- __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 915, __pyx_L1_error)
- #else
-- __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- #endif
- }
-@@ -15855,7 +15855,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
- PyObject* exc_type = PyErr_Occurred();
- if (exc_type) {
- if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
-- else __PYX_ERR(0, 913, __pyx_L1_error)
-+ else __PYX_ERR(0, 915, __pyx_L1_error)
- }
- break;
- }
-@@ -15865,33 +15865,33 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
- __pyx_t_5 = 0;
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
-- __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 913, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1);
- __pyx_t_1 = __pyx_t_5;
- __pyx_t_5 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":914
-+ /* "vidcutter/libs/pympv/mpv.pyx":916
- * def __dealloc__(self):
- * for i, j in enumerate(self.owned):
- * if j: # <<<<<<<<<<<<<<
- * free(self.params[i].data)
- *
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 914, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 916, __pyx_L1_error)
- if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":915
-+ /* "vidcutter/libs/pympv/mpv.pyx":917
- * for i, j in enumerate(self.owned):
- * if j:
- * free(self.params[i].data) # <<<<<<<<<<<<<<
- *
- * cdef void *get_pointer(const char *name, object obj):
- */
-- __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 917, __pyx_L1_error)
- free((__pyx_v_self->params[__pyx_t_7]).data);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":914
-+ /* "vidcutter/libs/pympv/mpv.pyx":916
- * def __dealloc__(self):
- * for i, j in enumerate(self.owned):
- * if j: # <<<<<<<<<<<<<<
-@@ -15900,7 +15900,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":913
-+ /* "vidcutter/libs/pympv/mpv.pyx":915
- *
- * def __dealloc__(self):
- * for i, j in enumerate(self.owned): # <<<<<<<<<<<<<<
-@@ -15911,7 +15911,7 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_2__dealloc__(struct _
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":912
-+ /* "vidcutter/libs/pympv/mpv.pyx":914
- * self.add_voidp(t, p)
- *
- * def __dealloc__(self): # <<<<<<<<<<<<<<
-@@ -16045,7 +16045,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13_RenderParams_6__setstate_cyth
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":917
-+/* "vidcutter/libs/pympv/mpv.pyx":919
- * free(self.params[i].data)
- *
- * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
-@@ -16071,7 +16071,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("get_pointer", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":919
-+ /* "vidcutter/libs/pympv/mpv.pyx":921
- * cdef void *get_pointer(const char *name, object obj):
- * cdef void *p
- * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
-@@ -16081,17 +16081,17 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
- __pyx_t_1 = (PyCapsule_IsValid(__pyx_v_obj, __pyx_v_name) != 0);
- if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":920
-+ /* "vidcutter/libs/pympv/mpv.pyx":922
- * cdef void *p
- * if PyCapsule_IsValid(obj, name):
- * p = PyCapsule_GetPointer(obj, name) # <<<<<<<<<<<<<<
- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
- * p = <void *><intptr_t>obj
- */
-- __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error)
-+ __pyx_t_2 = PyCapsule_GetPointer(__pyx_v_obj, __pyx_v_name); if (unlikely(__pyx_t_2 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
- __pyx_v_p = __pyx_t_2;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":919
-+ /* "vidcutter/libs/pympv/mpv.pyx":921
- * cdef void *get_pointer(const char *name, object obj):
- * cdef void *p
- * if PyCapsule_IsValid(obj, name): # <<<<<<<<<<<<<<
-@@ -16101,7 +16101,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
- goto __pyx_L3;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":921
-+ /* "vidcutter/libs/pympv/mpv.pyx":923
- * if PyCapsule_IsValid(obj, name):
- * p = PyCapsule_GetPointer(obj, name)
- * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
-@@ -16122,22 +16122,22 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
- __pyx_t_1 = __pyx_t_3;
- goto __pyx_L4_bool_binop_done;
- }
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 921, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 923, __pyx_L1_error)
- __pyx_t_1 = __pyx_t_3;
- __pyx_L4_bool_binop_done:;
- if (likely(__pyx_t_1)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":922
-+ /* "vidcutter/libs/pympv/mpv.pyx":924
- * p = PyCapsule_GetPointer(obj, name)
- * elif isinstance(obj, int) or isinstance(obj, long) and obj:
- * p = <void *><intptr_t>obj # <<<<<<<<<<<<<<
- * else:
- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
- */
-- __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyInt_As_intptr_t(__pyx_v_obj); if (unlikely((__pyx_t_5 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 924, __pyx_L1_error)
- __pyx_v_p = ((void *)((intptr_t)__pyx_t_5));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":921
-+ /* "vidcutter/libs/pympv/mpv.pyx":923
- * if PyCapsule_IsValid(obj, name):
- * p = PyCapsule_GetPointer(obj, name)
- * elif isinstance(obj, int) or isinstance(obj, long) and obj: # <<<<<<<<<<<<<<
-@@ -16147,7 +16147,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
- goto __pyx_L3;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":924
-+ /* "vidcutter/libs/pympv/mpv.pyx":926
- * p = <void *><intptr_t>obj
- * else:
- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj) # <<<<<<<<<<<<<<
-@@ -16155,9 +16155,9 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
- *
- */
- /*else*/ {
-- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 924, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 926, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 924, __pyx_L1_error)
-+ __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_or_invalid_pointer_objec, __pyx_v_obj); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 926, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
-@@ -16172,16 +16172,16 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
- __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8);
- __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-- if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 924, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 926, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_Raise(__pyx_t_6, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- __PYX_ERR(0, 924, __pyx_L1_error)
-+ __PYX_ERR(0, 926, __pyx_L1_error)
- }
- __pyx_L3:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":925
-+ /* "vidcutter/libs/pympv/mpv.pyx":927
- * else:
- * raise PyMPVError("Unknown or invalid pointer object: %r" % obj)
- * return p # <<<<<<<<<<<<<<
-@@ -16191,7 +16191,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
- __pyx_r = __pyx_v_p;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":917
-+ /* "vidcutter/libs/pympv/mpv.pyx":919
- * free(self.params[i].data)
- *
- * cdef void *get_pointer(const char *name, object obj): # <<<<<<<<<<<<<<
-@@ -16212,7 +16212,7 @@ static void *__pyx_f_9vidcutter_4libs_3mpv_get_pointer(char const *__pyx_v_name,
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":929
-+/* "vidcutter/libs/pympv/mpv.pyx":931
- * @cython.internal
- * cdef class RenderFrameInfo(object):
- * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
-@@ -16230,83 +16230,83 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(st
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("_from_struct", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":930
-+ /* "vidcutter/libs/pympv/mpv.pyx":932
- * cdef class RenderFrameInfo(object):
- * cdef _from_struct(self, mpv_render_frame_info *info):
- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT) # <<<<<<<<<<<<<<
- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
- */
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_PRESENT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 930, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_present, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":931
-+ /* "vidcutter/libs/pympv/mpv.pyx":933
- * cdef _from_struct(self, mpv_render_frame_info *info):
- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW) # <<<<<<<<<<<<<<
- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
- */
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REDRAW)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 931, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_redraw, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":932
-+ /* "vidcutter/libs/pympv/mpv.pyx":934
- * self.present = bool(info[0].flags & MPV_RENDER_FRAME_INFO_PRESENT)
- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT) # <<<<<<<<<<<<<<
- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
- * self.target_time = info[0].target_time
- */
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_REPEAT)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 934, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_repeat, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":933
-+ /* "vidcutter/libs/pympv/mpv.pyx":935
- * self.redraw = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REDRAW)
- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC) # <<<<<<<<<<<<<<
- * self.target_time = info[0].target_time
- * return self
- */
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(((__pyx_v_info[0]).flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 935, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_block_vsync, __pyx_t_1) < 0) __PYX_ERR(0, 935, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":934
-+ /* "vidcutter/libs/pympv/mpv.pyx":936
- * self.repeat = bool(info[0].flags & MPV_RENDER_FRAME_INFO_REPEAT)
- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
- * self.target_time = info[0].target_time # <<<<<<<<<<<<<<
- * return self
- *
- */
-- __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_info[0]).target_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target_time, __pyx_t_1) < 0) __PYX_ERR(0, 936, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":935
-+ /* "vidcutter/libs/pympv/mpv.pyx":937
- * self.block_vsync = bool(info[0].flags & MPV_RENDER_FRAME_INFO_BLOCK_VSYNC)
- * self.target_time = info[0].target_time
- * return self # <<<<<<<<<<<<<<
-@@ -16318,7 +16318,7 @@ static PyObject *__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct(st
- __pyx_r = ((PyObject *)__pyx_v_self);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":929
-+ /* "vidcutter/libs/pympv/mpv.pyx":931
- * @cython.internal
- * cdef class RenderFrameInfo(object):
- * cdef _from_struct(self, mpv_render_frame_info *info): # <<<<<<<<<<<<<<
-@@ -16624,7 +16624,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_15RenderFrameInfo_2__setstate_cy
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":950
-+/* "vidcutter/libs/pympv/mpv.pyx":952
- * bint inited
- *
- * def __init__(self, mpv, # <<<<<<<<<<<<<<
-@@ -16653,7 +16653,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mpv,&__pyx_n_s_api_type,&__pyx_n_s_opengl_init_params,&__pyx_n_s_advanced_control,&__pyx_n_s_x11_display,&__pyx_n_s_wl_display,&__pyx_n_s_drm_display,&__pyx_n_s_drm_osd_size,0};
- PyObject* values[8] = {0,0,0,0,0,0,0,0};
-
-- /* "vidcutter/libs/pympv/mpv.pyx":952
-+ /* "vidcutter/libs/pympv/mpv.pyx":954
- * def __init__(self, mpv,
- * api_type,
- * opengl_init_params=None, # <<<<<<<<<<<<<<
-@@ -16662,7 +16662,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- */
- values[2] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":953
-+ /* "vidcutter/libs/pympv/mpv.pyx":955
- * api_type,
- * opengl_init_params=None,
- * advanced_control=False, # <<<<<<<<<<<<<<
-@@ -16671,7 +16671,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- */
- values[3] = ((PyObject *)Py_False);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":954
-+ /* "vidcutter/libs/pympv/mpv.pyx":956
- * opengl_init_params=None,
- * advanced_control=False,
- * x11_display=None, # <<<<<<<<<<<<<<
-@@ -16680,7 +16680,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- */
- values[4] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":955
-+ /* "vidcutter/libs/pympv/mpv.pyx":957
- * advanced_control=False,
- * x11_display=None,
- * wl_display=None, # <<<<<<<<<<<<<<
-@@ -16689,7 +16689,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- */
- values[5] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":956
-+ /* "vidcutter/libs/pympv/mpv.pyx":958
- * x11_display=None,
- * wl_display=None,
- * drm_display=None, # <<<<<<<<<<<<<<
-@@ -16698,7 +16698,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- */
- values[6] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":957
-+ /* "vidcutter/libs/pympv/mpv.pyx":959
- * wl_display=None,
- * drm_display=None,
- * drm_osd_size=None # <<<<<<<<<<<<<<
-@@ -16738,7 +16738,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- case 1:
- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_api_type)) != 0)) kw_args--;
- else {
-- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 950, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, 1); __PYX_ERR(0, 952, __pyx_L3_error)
- }
- CYTHON_FALLTHROUGH;
- case 2:
-@@ -16778,7 +16778,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 950, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 952, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -16811,7 +16811,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 950, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 952, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -16819,7 +16819,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_1__init__(PyObject *__
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_mpv, __pyx_v_api_type, __pyx_v_opengl_init_params, __pyx_v_advanced_control, __pyx_v_x11_display, __pyx_v_wl_display, __pyx_v_drm_display, __pyx_v_drm_osd_size);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":950
-+ /* "vidcutter/libs/pympv/mpv.pyx":952
- * bint inited
- *
- * def __init__(self, mpv, # <<<<<<<<<<<<<<
-@@ -16856,14 +16856,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__init__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":965
-+ /* "vidcutter/libs/pympv/mpv.pyx":967
- * mpv_opengl_drm_osd_size _drm_osd_size
- *
- * self._mpv = mpv # <<<<<<<<<<<<<<
- *
- * memset(&gl_params, 0, sizeof(gl_params))
- */
-- if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 965, __pyx_L1_error)
-+ if (!(likely(((__pyx_v_mpv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_mpv, __pyx_ptype_9vidcutter_4libs_3mpv_Context))))) __PYX_ERR(0, 967, __pyx_L1_error)
- __pyx_t_1 = __pyx_v_mpv;
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_1);
-@@ -16872,7 +16872,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- __pyx_v_self->_mpv = ((struct __pyx_obj_9vidcutter_4libs_3mpv_Context *)__pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":967
-+ /* "vidcutter/libs/pympv/mpv.pyx":969
- * self._mpv = mpv
- *
- * memset(&gl_params, 0, sizeof(gl_params)) # <<<<<<<<<<<<<<
-@@ -16881,7 +16881,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- (void)(memset((&__pyx_v_gl_params), 0, (sizeof(__pyx_v_gl_params))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":968
-+ /* "vidcutter/libs/pympv/mpv.pyx":970
- *
- * memset(&gl_params, 0, sizeof(gl_params))
- * memset(&drm_params, 0, sizeof(drm_params)) # <<<<<<<<<<<<<<
-@@ -16890,7 +16890,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- (void)(memset((&__pyx_v_drm_params), 0, (sizeof(__pyx_v_drm_params))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":969
-+ /* "vidcutter/libs/pympv/mpv.pyx":971
- * memset(&gl_params, 0, sizeof(gl_params))
- * memset(&drm_params, 0, sizeof(drm_params))
- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size)) # <<<<<<<<<<<<<<
-@@ -16899,45 +16899,45 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- (void)(memset((&__pyx_v__drm_osd_size), 0, (sizeof(__pyx_v__drm_osd_size))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":971
-+ /* "vidcutter/libs/pympv/mpv.pyx":973
- * memset(&_drm_osd_size, 0, sizeof(_drm_osd_size))
- *
- * params = _RenderParams() # <<<<<<<<<<<<<<
- *
- * if api_type == self.API_OPENGL:
- */
-- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":973
-+ /* "vidcutter/libs/pympv/mpv.pyx":975
- * params = _RenderParams()
- *
- * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
- * else:
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_api_type, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 975, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (likely(__pyx_t_3)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":974
-+ /* "vidcutter/libs/pympv/mpv.pyx":976
- *
- * if api_type == self.API_OPENGL:
- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL) # <<<<<<<<<<<<<<
- * else:
- * raise PyMPVError("Unknown api_type %r" % api_type)
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_string(__pyx_v_params, MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":973
-+ /* "vidcutter/libs/pympv/mpv.pyx":975
- * params = _RenderParams()
- *
- * if api_type == self.API_OPENGL: # <<<<<<<<<<<<<<
-@@ -16947,7 +16947,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- goto __pyx_L3;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":976
-+ /* "vidcutter/libs/pympv/mpv.pyx":978
- * params.add_string(MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL)
- * else:
- * raise PyMPVError("Unknown api_type %r" % api_type) # <<<<<<<<<<<<<<
-@@ -16955,9 +16955,9 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- * if opengl_init_params is not None:
- */
- /*else*/ {
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Unknown_api_type_r, __pyx_v_api_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
-@@ -16972,16 +16972,16 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __PYX_ERR(0, 976, __pyx_L1_error)
-+ __PYX_ERR(0, 978, __pyx_L1_error)
- }
- __pyx_L3:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":978
-+ /* "vidcutter/libs/pympv/mpv.pyx":980
- * raise PyMPVError("Unknown api_type %r" % api_type)
- *
- * if opengl_init_params is not None: # <<<<<<<<<<<<<<
-@@ -16992,14 +16992,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- __pyx_t_6 = (__pyx_t_3 != 0);
- if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":979
-+ /* "vidcutter/libs/pympv/mpv.pyx":981
- *
- * if opengl_init_params is not None:
- * self._get_proc_address = opengl_init_params["get_proc_address"] # <<<<<<<<<<<<<<
- * gl_params.get_proc_address = &_c_getprocaddress
- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
- */
-- __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_init_params, __pyx_n_s_get_proc_address); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_2);
- __Pyx_GOTREF(__pyx_v_self->_get_proc_address);
-@@ -17007,7 +17007,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- __pyx_v_self->_get_proc_address = __pyx_t_2;
- __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":980
-+ /* "vidcutter/libs/pympv/mpv.pyx":982
- * if opengl_init_params is not None:
- * self._get_proc_address = opengl_init_params["get_proc_address"]
- * gl_params.get_proc_address = &_c_getprocaddress # <<<<<<<<<<<<<<
-@@ -17016,7 +17016,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- __pyx_v_gl_params.get_proc_address = (&__pyx_f_9vidcutter_4libs_3mpv__c_getprocaddress);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":981
-+ /* "vidcutter/libs/pympv/mpv.pyx":983
- * self._get_proc_address = opengl_init_params["get_proc_address"]
- * gl_params.get_proc_address = &_c_getprocaddress
- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address # <<<<<<<<<<<<<<
-@@ -17025,18 +17025,18 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- __pyx_v_gl_params.get_proc_address_ctx = ((void *)__pyx_v_self->_get_proc_address);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":982
-+ /* "vidcutter/libs/pympv/mpv.pyx":984
- * gl_params.get_proc_address = &_c_getprocaddress
- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params) # <<<<<<<<<<<<<<
- * if advanced_control:
- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error)
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, (&__pyx_v_gl_params), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":978
-+ /* "vidcutter/libs/pympv/mpv.pyx":980
- * raise PyMPVError("Unknown api_type %r" % api_type)
- *
- * if opengl_init_params is not None: # <<<<<<<<<<<<<<
-@@ -17045,28 +17045,28 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":983
-+ /* "vidcutter/libs/pympv/mpv.pyx":985
- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
- * if advanced_control: # <<<<<<<<<<<<<<
- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
- * if x11_display:
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 983, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_advanced_control); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
- if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":984
-+ /* "vidcutter/libs/pympv/mpv.pyx":986
- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
- * if advanced_control:
- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1) # <<<<<<<<<<<<<<
- * if x11_display:
- * self._x11_display = x11_display
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_ADVANCED_CONTROL, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":983
-+ /* "vidcutter/libs/pympv/mpv.pyx":985
- * gl_params.get_proc_address_ctx = <void *>self._get_proc_address
- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_params)
- * if advanced_control: # <<<<<<<<<<<<<<
-@@ -17075,17 +17075,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":985
-+ /* "vidcutter/libs/pympv/mpv.pyx":987
- * if advanced_control:
- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
- * if x11_display: # <<<<<<<<<<<<<<
- * self._x11_display = x11_display
- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_x11_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 987, __pyx_L1_error)
- if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":986
-+ /* "vidcutter/libs/pympv/mpv.pyx":988
- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
- * if x11_display:
- * self._x11_display = x11_display # <<<<<<<<<<<<<<
-@@ -17098,18 +17098,18 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- __Pyx_DECREF(__pyx_v_self->_x11_display);
- __pyx_v_self->_x11_display = __pyx_v_x11_display;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":987
-+ /* "vidcutter/libs/pympv/mpv.pyx":989
- * if x11_display:
- * self._x11_display = x11_display
- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display)) # <<<<<<<<<<<<<<
- * if wl_display:
- * self._wl_display = wl_display
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_X11_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"Display"), __pyx_v_x11_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 989, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":985
-+ /* "vidcutter/libs/pympv/mpv.pyx":987
- * if advanced_control:
- * params.add_int(MPV_RENDER_PARAM_ADVANCED_CONTROL, 1)
- * if x11_display: # <<<<<<<<<<<<<<
-@@ -17118,17 +17118,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":988
-+ /* "vidcutter/libs/pympv/mpv.pyx":990
- * self._x11_display = x11_display
- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
- * if wl_display: # <<<<<<<<<<<<<<
- * self._wl_display = wl_display
- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 988, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_wl_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 990, __pyx_L1_error)
- if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":989
-+ /* "vidcutter/libs/pympv/mpv.pyx":991
- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
- * if wl_display:
- * self._wl_display = wl_display # <<<<<<<<<<<<<<
-@@ -17141,18 +17141,18 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- __Pyx_DECREF(__pyx_v_self->_wl_display);
- __pyx_v_self->_wl_display = __pyx_v_wl_display;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":990
-+ /* "vidcutter/libs/pympv/mpv.pyx":992
- * if wl_display:
- * self._wl_display = wl_display
- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display)) # <<<<<<<<<<<<<<
- * if drm_display:
- * drm_params.fd = drm_display.get("fd", -1)
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_WL_DISPLAY, __pyx_f_9vidcutter_4libs_3mpv_get_pointer(((char const *)"wl_display"), __pyx_v_wl_display), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":988
-+ /* "vidcutter/libs/pympv/mpv.pyx":990
- * self._x11_display = x11_display
- * params.add_voidp(MPV_RENDER_PARAM_X11_DISPLAY, get_pointer("Display", x11_display))
- * if wl_display: # <<<<<<<<<<<<<<
-@@ -17161,80 +17161,80 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":991
-+ /* "vidcutter/libs/pympv/mpv.pyx":993
- * self._wl_display = wl_display
- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
- * if drm_display: # <<<<<<<<<<<<<<
- * drm_params.fd = drm_display.get("fd", -1)
- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 991, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_drm_display); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 993, __pyx_L1_error)
- if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":992
-+ /* "vidcutter/libs/pympv/mpv.pyx":994
- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
- * if drm_display:
- * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
- * drm_params.connector_id = drm_display.get("connector_id", -1)
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 992, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_drm_params.fd = __pyx_t_7;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":993
-+ /* "vidcutter/libs/pympv/mpv.pyx":995
- * if drm_display:
- * drm_params.fd = drm_display.get("fd", -1)
- * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
- * drm_params.connector_id = drm_display.get("connector_id", -1)
- * arp = drm_display.get("atomic_request_ptr", None)
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 993, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 995, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_drm_params.crtc_id = __pyx_t_7;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":994
-+ /* "vidcutter/libs/pympv/mpv.pyx":996
- * drm_params.fd = drm_display.get("fd", -1)
- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
- * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
- * arp = drm_display.get("atomic_request_ptr", None)
- * if arp is not None:
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 994, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 996, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 994, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 996, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_drm_params.connector_id = __pyx_t_7;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":995
-+ /* "vidcutter/libs/pympv/mpv.pyx":997
- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
- * drm_params.connector_id = drm_display.get("connector_id", -1)
- * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
- * if arp is not None:
- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_arp = __pyx_t_2;
- __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":996
-+ /* "vidcutter/libs/pympv/mpv.pyx":998
- * drm_params.connector_id = drm_display.get("connector_id", -1)
- * arp = drm_display.get("atomic_request_ptr", None)
- * if arp is not None: # <<<<<<<<<<<<<<
-@@ -17245,17 +17245,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- __pyx_t_3 = (__pyx_t_6 != 0);
- if (__pyx_t_3) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":997
-+ /* "vidcutter/libs/pympv/mpv.pyx":999
- * arp = drm_display.get("atomic_request_ptr", None)
- * if arp is not None:
- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*") # <<<<<<<<<<<<<<
- * drm_params.render_fd = drm_display.get("render_fd", -1)
- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
- */
-- __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L1_error)
-+ __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_arp); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 999, __pyx_L1_error)
- __pyx_v_drm_params.atomic_request_ptr = ((struct _drmModeAtomicReq **)__pyx_f_9vidcutter_4libs_3mpv_get_pointer(__pyx_t_8, __pyx_kp_s_drmModeAtomicReq));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":996
-+ /* "vidcutter/libs/pympv/mpv.pyx":998
- * drm_params.connector_id = drm_display.get("connector_id", -1)
- * arp = drm_display.get("atomic_request_ptr", None)
- * if arp is not None: # <<<<<<<<<<<<<<
-@@ -17264,34 +17264,34 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":998
-+ /* "vidcutter/libs/pympv/mpv.pyx":1000
- * if arp is not None:
- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
- * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
- * if drm_osd_size:
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_drm_display, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1000, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1000, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_drm_params.render_fd = __pyx_t_7;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":999
-+ /* "vidcutter/libs/pympv/mpv.pyx":1001
- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
- * drm_params.render_fd = drm_display.get("render_fd", -1)
- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params) # <<<<<<<<<<<<<<
- * if drm_osd_size:
- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_DISPLAY, (&__pyx_v_drm_params), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":991
-+ /* "vidcutter/libs/pympv/mpv.pyx":993
- * self._wl_display = wl_display
- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
- * if drm_display: # <<<<<<<<<<<<<<
-@@ -17300,17 +17300,17 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1000
-+ /* "vidcutter/libs/pympv/mpv.pyx":1002
- * drm_params.render_fd = drm_display.get("render_fd", -1)
- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
- * if drm_osd_size: # <<<<<<<<<<<<<<
- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
- */
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1000, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_drm_osd_size); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1002, __pyx_L1_error)
- if (__pyx_t_3) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1001
-+ /* "vidcutter/libs/pympv/mpv.pyx":1003
- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
- * if drm_osd_size:
- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size # <<<<<<<<<<<<<<
-@@ -17323,7 +17323,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- if (unlikely(size != 2)) {
- if (size > 2) __Pyx_RaiseTooManyValuesError(2);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-- __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __PYX_ERR(0, 1003, __pyx_L1_error)
- }
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- if (likely(PyTuple_CheckExact(sequence))) {
-@@ -17336,21 +17336,21 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- __Pyx_INCREF(__pyx_t_1);
- __Pyx_INCREF(__pyx_t_2);
- #else
-- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- #endif
- } else {
- Py_ssize_t index = -1;
-- __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __pyx_t_4 = PyObject_GetIter(__pyx_v_drm_osd_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1003, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext;
- index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_1);
- index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_2);
-- if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1003, __pyx_L1_error)
- __pyx_t_9 = NULL;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- goto __pyx_L12_unpacking_done;
-@@ -17358,28 +17358,28 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_9 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-- __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __PYX_ERR(0, 1003, __pyx_L1_error)
- __pyx_L12_unpacking_done:;
- }
-- __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1003, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L1_error)
-+ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1003, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v__drm_osd_size.width = __pyx_t_7;
- __pyx_v__drm_osd_size.height = __pyx_t_10;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1002
-+ /* "vidcutter/libs/pympv/mpv.pyx":1004
- * if drm_osd_size:
- * _drm_osd_size.width, _drm_osd_size.height = drm_osd_size
- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size) # <<<<<<<<<<<<<<
- *
- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
- */
-- __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
-+ __pyx_t_2 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_DRM_OSD_SIZE, (&__pyx_v__drm_osd_size), NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1000
-+ /* "vidcutter/libs/pympv/mpv.pyx":1002
- * drm_params.render_fd = drm_display.get("render_fd", -1)
- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
- * if drm_osd_size: # <<<<<<<<<<<<<<
-@@ -17388,7 +17388,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1004
-+ /* "vidcutter/libs/pympv/mpv.pyx":1006
- * params.add_voidp(MPV_RENDER_PARAM_DRM_OSD_SIZE, &_drm_osd_size)
- *
- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params) # <<<<<<<<<<<<<<
-@@ -17397,7 +17397,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- __pyx_v_err = mpv_render_context_create((&__pyx_v_self->_ctx), __pyx_v_self->_mpv->_ctx, __pyx_v_params->params);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1005
-+ /* "vidcutter/libs/pympv/mpv.pyx":1007
- *
- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
- * if err < 0: # <<<<<<<<<<<<<<
-@@ -17407,16 +17407,16 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- __pyx_t_3 = ((__pyx_v_err < 0) != 0);
- if (unlikely(__pyx_t_3)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1006
-+ /* "vidcutter/libs/pympv/mpv.pyx":1008
- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
- * if err < 0:
- * raise MPVError(err) # <<<<<<<<<<<<<<
- * self.inited = True
- *
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1006, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1008, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
-@@ -17431,14 +17431,14 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __PYX_ERR(0, 1006, __pyx_L1_error)
-+ __PYX_ERR(0, 1008, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1005
-+ /* "vidcutter/libs/pympv/mpv.pyx":1007
- *
- * err = mpv_render_context_create(&self._ctx, self._mpv._ctx, params.params)
- * if err < 0: # <<<<<<<<<<<<<<
-@@ -17447,7 +17447,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1007
-+ /* "vidcutter/libs/pympv/mpv.pyx":1009
- * if err < 0:
- * raise MPVError(err)
- * self.inited = True # <<<<<<<<<<<<<<
-@@ -17456,7 +17456,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- */
- __pyx_v_self->inited = 1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":950
-+ /* "vidcutter/libs/pympv/mpv.pyx":952
- * bint inited
- *
- * def __init__(self, mpv, # <<<<<<<<<<<<<<
-@@ -17481,7 +17481,7 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext___init__(struct __pyx_
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1010
-+/* "vidcutter/libs/pympv/mpv.pyx":1012
- *
- * @_errors
- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
-@@ -17520,7 +17520,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("set_icc_profile", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1016
-+ /* "vidcutter/libs/pympv/mpv.pyx":1018
- * int err
- *
- * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
-@@ -17531,14 +17531,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
- if (unlikely(__pyx_t_2)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1017
-+ /* "vidcutter/libs/pympv/mpv.pyx":1019
- *
- * if not isinstance(icc_blob, bytes):
- * raise PyMPVError("icc_blob should be a bytes instance") # <<<<<<<<<<<<<<
- * val.data = <void *><char *>icc_blob
- * val.size = len(icc_blob)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PyMPVError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1019, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
-@@ -17552,14 +17552,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- }
- __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_s_icc_blob_should_be_a_bytes_insta) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_icc_blob_should_be_a_bytes_insta);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
-- if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_Raise(__pyx_t_3, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- __PYX_ERR(0, 1017, __pyx_L1_error)
-+ __PYX_ERR(0, 1019, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1016
-+ /* "vidcutter/libs/pympv/mpv.pyx":1018
- * int err
- *
- * if not isinstance(icc_blob, bytes): # <<<<<<<<<<<<<<
-@@ -17568,27 +17568,27 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1018
-+ /* "vidcutter/libs/pympv/mpv.pyx":1020
- * if not isinstance(icc_blob, bytes):
- * raise PyMPVError("icc_blob should be a bytes instance")
- * val.data = <void *><char *>icc_blob # <<<<<<<<<<<<<<
- * val.size = len(icc_blob)
- *
- */
-- __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1018, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_icc_blob); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1020, __pyx_L1_error)
- __pyx_v_val.data = ((void *)((char *)__pyx_t_6));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1019
-+ /* "vidcutter/libs/pympv/mpv.pyx":1021
- * raise PyMPVError("icc_blob should be a bytes instance")
- * val.data = <void *><char *>icc_blob
- * val.size = len(icc_blob) # <<<<<<<<<<<<<<
- *
- * param.type = MPV_RENDER_PARAM_ICC_PROFILE
- */
-- __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1019, __pyx_L1_error)
-+ __pyx_t_7 = PyObject_Length(__pyx_v_icc_blob); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1021, __pyx_L1_error)
- __pyx_v_val.size = __pyx_t_7;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1021
-+ /* "vidcutter/libs/pympv/mpv.pyx":1023
- * val.size = len(icc_blob)
- *
- * param.type = MPV_RENDER_PARAM_ICC_PROFILE # <<<<<<<<<<<<<<
-@@ -17597,7 +17597,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- */
- __pyx_v_param.type = MPV_RENDER_PARAM_ICC_PROFILE;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1022
-+ /* "vidcutter/libs/pympv/mpv.pyx":1024
- *
- * param.type = MPV_RENDER_PARAM_ICC_PROFILE
- * param.data = &val # <<<<<<<<<<<<<<
-@@ -17606,7 +17606,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- */
- __pyx_v_param.data = (&__pyx_v_val);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1024
-+ /* "vidcutter/libs/pympv/mpv.pyx":1026
- * param.data = &val
- *
- * with nogil: # <<<<<<<<<<<<<<
-@@ -17621,7 +17621,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1025
-+ /* "vidcutter/libs/pympv/mpv.pyx":1027
- *
- * with nogil:
- * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
-@@ -17631,7 +17631,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1024
-+ /* "vidcutter/libs/pympv/mpv.pyx":1026
- * param.data = &val
- *
- * with nogil: # <<<<<<<<<<<<<<
-@@ -17650,7 +17650,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1026
-+ /* "vidcutter/libs/pympv/mpv.pyx":1028
- * with nogil:
- * err = mpv_render_context_set_parameter(self._ctx, param)
- * return err # <<<<<<<<<<<<<<
-@@ -17658,13 +17658,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- * @_errors
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1028, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1010
-+ /* "vidcutter/libs/pympv/mpv.pyx":1012
- *
- * @_errors
- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
-@@ -17685,7 +17685,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_2set_icc_profile
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1029
-+/* "vidcutter/libs/pympv/mpv.pyx":1031
- *
- * @_errors
- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
-@@ -17719,17 +17719,17 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("set_ambient_light", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1035
-+ /* "vidcutter/libs/pympv/mpv.pyx":1037
- * int err
- *
- * val = lux # <<<<<<<<<<<<<<
- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
- * param.data = &val
- */
-- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_lux); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1037, __pyx_L1_error)
- __pyx_v_val = __pyx_t_1;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1036
-+ /* "vidcutter/libs/pympv/mpv.pyx":1038
- *
- * val = lux
- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT # <<<<<<<<<<<<<<
-@@ -17738,7 +17738,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
- */
- __pyx_v_param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1037
-+ /* "vidcutter/libs/pympv/mpv.pyx":1039
- * val = lux
- * param.type = MPV_RENDER_PARAM_AMBIENT_LIGHT
- * param.data = &val # <<<<<<<<<<<<<<
-@@ -17747,7 +17747,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
- */
- __pyx_v_param.data = (&__pyx_v_val);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1039
-+ /* "vidcutter/libs/pympv/mpv.pyx":1041
- * param.data = &val
- *
- * with nogil: # <<<<<<<<<<<<<<
-@@ -17762,7 +17762,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1040
-+ /* "vidcutter/libs/pympv/mpv.pyx":1042
- *
- * with nogil:
- * err = mpv_render_context_set_parameter(self._ctx, param) # <<<<<<<<<<<<<<
-@@ -17772,7 +17772,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
- __pyx_v_err = mpv_render_context_set_parameter(__pyx_v_self->_ctx, __pyx_v_param);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1039
-+ /* "vidcutter/libs/pympv/mpv.pyx":1041
- * param.data = &val
- *
- * with nogil: # <<<<<<<<<<<<<<
-@@ -17791,7 +17791,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1041
-+ /* "vidcutter/libs/pympv/mpv.pyx":1043
- * with nogil:
- * err = mpv_render_context_set_parameter(self._ctx, param)
- * return err # <<<<<<<<<<<<<<
-@@ -17799,13 +17799,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
- * def get_next_frame_info(self):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_r = __pyx_t_2;
- __pyx_t_2 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1029
-+ /* "vidcutter/libs/pympv/mpv.pyx":1031
- *
- * @_errors
- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
-@@ -17824,7 +17824,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_4set_ambient_lig
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1043
-+/* "vidcutter/libs/pympv/mpv.pyx":1045
- * return err
- *
- * def get_next_frame_info(self): # <<<<<<<<<<<<<<
-@@ -17861,7 +17861,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("get_next_frame_info", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1048
-+ /* "vidcutter/libs/pympv/mpv.pyx":1050
- * mpv_render_param param
- *
- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO # <<<<<<<<<<<<<<
-@@ -17870,7 +17870,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
- */
- __pyx_v_param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1049
-+ /* "vidcutter/libs/pympv/mpv.pyx":1051
- *
- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
- * param.data = &info # <<<<<<<<<<<<<<
-@@ -17879,7 +17879,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
- */
- __pyx_v_param.data = (&__pyx_v_info);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1050
-+ /* "vidcutter/libs/pympv/mpv.pyx":1052
- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
- * param.data = &info
- * with nogil: # <<<<<<<<<<<<<<
-@@ -17894,7 +17894,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1051
-+ /* "vidcutter/libs/pympv/mpv.pyx":1053
- * param.data = &info
- * with nogil:
- * err = mpv_render_context_get_info(self._ctx, param) # <<<<<<<<<<<<<<
-@@ -17904,7 +17904,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
- __pyx_v_err = mpv_render_context_get_info(__pyx_v_self->_ctx, __pyx_v_param);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1050
-+ /* "vidcutter/libs/pympv/mpv.pyx":1052
- * param.type = MPV_RENDER_PARAM_NEXT_FRAME_INFO
- * param.data = &info
- * with nogil: # <<<<<<<<<<<<<<
-@@ -17923,7 +17923,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1052
-+ /* "vidcutter/libs/pympv/mpv.pyx":1054
- * with nogil:
- * err = mpv_render_context_get_info(self._ctx, param)
- * if err < 0: # <<<<<<<<<<<<<<
-@@ -17933,16 +17933,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
- __pyx_t_1 = ((__pyx_v_err < 0) != 0);
- if (unlikely(__pyx_t_1)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1053
-+ /* "vidcutter/libs/pympv/mpv.pyx":1055
- * err = mpv_render_context_get_info(self._ctx, param)
- * if err < 0:
- * raise MPVError(err) # <<<<<<<<<<<<<<
- *
- * return RenderFrameInfo()._from_struct(&info)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MPVError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-@@ -17957,14 +17957,14 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
- __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_Raise(__pyx_t_2, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-- __PYX_ERR(0, 1053, __pyx_L1_error)
-+ __PYX_ERR(0, 1055, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1052
-+ /* "vidcutter/libs/pympv/mpv.pyx":1054
- * with nogil:
- * err = mpv_render_context_get_info(self._ctx, param)
- * if err < 0: # <<<<<<<<<<<<<<
-@@ -17973,7 +17973,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1055
-+ /* "vidcutter/libs/pympv/mpv.pyx":1057
- * raise MPVError(err)
- *
- * return RenderFrameInfo()._from_struct(&info) # <<<<<<<<<<<<<<
-@@ -17981,16 +17981,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
- * def set_update_callback(self, cb):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
-+ __pyx_t_3 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv_RenderFrameInfo *)((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2)->__pyx_vtab)->_from_struct(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *)__pyx_t_2), (&__pyx_v_info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_r = __pyx_t_3;
- __pyx_t_3 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1043
-+ /* "vidcutter/libs/pympv/mpv.pyx":1045
- * return err
- *
- * def get_next_frame_info(self): # <<<<<<<<<<<<<<
-@@ -18012,7 +18012,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_6get_next_frame_
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1057
-+/* "vidcutter/libs/pympv/mpv.pyx":1059
- * return RenderFrameInfo()._from_struct(&info)
- *
- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
-@@ -18038,7 +18038,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("set_update_callback", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1058
-+ /* "vidcutter/libs/pympv/mpv.pyx":1060
- *
- * def set_update_callback(self, cb):
- * with nogil: # <<<<<<<<<<<<<<
-@@ -18053,7 +18053,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1059
-+ /* "vidcutter/libs/pympv/mpv.pyx":1061
- * def set_update_callback(self, cb):
- * with nogil:
- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb) # <<<<<<<<<<<<<<
-@@ -18063,7 +18063,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
- mpv_render_context_set_update_callback(__pyx_v_self->_ctx, (&__pyx_f_9vidcutter_4libs_3mpv__c_updatecb), ((void *)__pyx_v_cb));
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1058
-+ /* "vidcutter/libs/pympv/mpv.pyx":1060
- *
- * def set_update_callback(self, cb):
- * with nogil: # <<<<<<<<<<<<<<
-@@ -18082,7 +18082,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1060
-+ /* "vidcutter/libs/pympv/mpv.pyx":1062
- * with nogil:
- * mpv_render_context_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
- * self.update_cb = cb # <<<<<<<<<<<<<<
-@@ -18095,7 +18095,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
- __Pyx_DECREF(__pyx_v_self->update_cb);
- __pyx_v_self->update_cb = __pyx_v_cb;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1057
-+ /* "vidcutter/libs/pympv/mpv.pyx":1059
- * return RenderFrameInfo()._from_struct(&info)
- *
- * def set_update_callback(self, cb): # <<<<<<<<<<<<<<
-@@ -18110,7 +18110,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_8set_update_call
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1062
-+/* "vidcutter/libs/pympv/mpv.pyx":1064
- * self.update_cb = cb
- *
- * def update(self): # <<<<<<<<<<<<<<
-@@ -18141,7 +18141,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("update", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1064
-+ /* "vidcutter/libs/pympv/mpv.pyx":1066
- * def update(self):
- * cdef uint64_t ret
- * with nogil: # <<<<<<<<<<<<<<
-@@ -18156,7 +18156,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1065
-+ /* "vidcutter/libs/pympv/mpv.pyx":1067
- * cdef uint64_t ret
- * with nogil:
- * ret = mpv_render_context_update(self._ctx) # <<<<<<<<<<<<<<
-@@ -18166,7 +18166,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
- __pyx_v_ret = mpv_render_context_update(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1064
-+ /* "vidcutter/libs/pympv/mpv.pyx":1066
- * def update(self):
- * cdef uint64_t ret
- * with nogil: # <<<<<<<<<<<<<<
-@@ -18185,7 +18185,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1066
-+ /* "vidcutter/libs/pympv/mpv.pyx":1068
- * with nogil:
- * ret = mpv_render_context_update(self._ctx)
- * return ret # <<<<<<<<<<<<<<
-@@ -18193,13 +18193,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
- * @_errors
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1062
-+ /* "vidcutter/libs/pympv/mpv.pyx":1064
- * self.update_cb = cb
- *
- * def update(self): # <<<<<<<<<<<<<<
-@@ -18218,7 +18218,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_10update(struct
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1069
-+/* "vidcutter/libs/pympv/mpv.pyx":1071
- *
- * @_errors
- * def render(self, # <<<<<<<<<<<<<<
-@@ -18244,7 +18244,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_opengl_fbo,&__pyx_n_s_flip_y,&__pyx_n_s_depth,&__pyx_n_s_block_for_target_time,&__pyx_n_s_skip_rendering,0};
- PyObject* values[5] = {0,0,0,0,0};
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1070
-+ /* "vidcutter/libs/pympv/mpv.pyx":1072
- * @_errors
- * def render(self,
- * opengl_fbo=None, # <<<<<<<<<<<<<<
-@@ -18253,7 +18253,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
- */
- values[0] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1071
-+ /* "vidcutter/libs/pympv/mpv.pyx":1073
- * def render(self,
- * opengl_fbo=None,
- * flip_y=False, # <<<<<<<<<<<<<<
-@@ -18262,7 +18262,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
- */
- values[1] = ((PyObject *)Py_False);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1072
-+ /* "vidcutter/libs/pympv/mpv.pyx":1074
- * opengl_fbo=None,
- * flip_y=False,
- * depth=None, # <<<<<<<<<<<<<<
-@@ -18271,7 +18271,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
- */
- values[2] = ((PyObject *)Py_None);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1073
-+ /* "vidcutter/libs/pympv/mpv.pyx":1075
- * flip_y=False,
- * depth=None,
- * block_for_target_time=True, # <<<<<<<<<<<<<<
-@@ -18280,7 +18280,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
- */
- values[3] = ((PyObject *)Py_True);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1074
-+ /* "vidcutter/libs/pympv/mpv.pyx":1076
- * depth=None,
- * block_for_target_time=True,
- * skip_rendering=False): # <<<<<<<<<<<<<<
-@@ -18338,7 +18338,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1069, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 1071, __pyx_L3_error)
- }
- } else {
- switch (PyTuple_GET_SIZE(__pyx_args)) {
-@@ -18364,7 +18364,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1069, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("render", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1071, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.RenderContext.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -18372,7 +18372,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_13RenderContext_13render(PyObjec
- __pyx_L4_argument_unpacking_done:;
- __pyx_r = __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(((struct __pyx_obj_9vidcutter_4libs_3mpv_RenderContext *)__pyx_v_self), __pyx_v_opengl_fbo, __pyx_v_flip_y, __pyx_v_depth, __pyx_v_block_for_target_time, __pyx_v_skip_rendering);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1069
-+ /* "vidcutter/libs/pympv/mpv.pyx":1071
- *
- * @_errors
- * def render(self, # <<<<<<<<<<<<<<
-@@ -18402,29 +18402,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("render", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1079
-+ /* "vidcutter/libs/pympv/mpv.pyx":1081
- * mpv_opengl_fbo fbo
- *
- * params = _RenderParams() # <<<<<<<<<<<<<<
- *
- * if opengl_fbo:
- */
-- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv__RenderParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_params = ((struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *)__pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1081
-+ /* "vidcutter/libs/pympv/mpv.pyx":1083
- * params = _RenderParams()
- *
- * if opengl_fbo: # <<<<<<<<<<<<<<
- * memset(&fbo, 0, sizeof(fbo))
- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
- */
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opengl_fbo); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
- if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1082
-+ /* "vidcutter/libs/pympv/mpv.pyx":1084
- *
- * if opengl_fbo:
- * memset(&fbo, 0, sizeof(fbo)) # <<<<<<<<<<<<<<
-@@ -18433,23 +18433,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- */
- (void)(memset((&__pyx_v_fbo), 0, (sizeof(__pyx_v_fbo))));
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1083
-+ /* "vidcutter/libs/pympv/mpv.pyx":1085
- * if opengl_fbo:
- * memset(&fbo, 0, sizeof(fbo))
- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
- * fbo.w = opengl_fbo["w"]
- * fbo.h = opengl_fbo["h"]
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1085, __pyx_L1_error)
- if (!__pyx_t_2) {
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- } else {
-- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
- __pyx_t_3 = __pyx_t_5;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- goto __pyx_L4_bool_binop_done;
-@@ -18458,49 +18458,49 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- __pyx_L4_bool_binop_done:;
- __pyx_v_fbo.fbo = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1084
-+ /* "vidcutter/libs/pympv/mpv.pyx":1086
- * memset(&fbo, 0, sizeof(fbo))
- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
- * fbo.w = opengl_fbo["w"] # <<<<<<<<<<<<<<
- * fbo.h = opengl_fbo["h"]
- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
- */
-- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1084, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_fbo.w = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1085
-+ /* "vidcutter/libs/pympv/mpv.pyx":1087
- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0
- * fbo.w = opengl_fbo["w"]
- * fbo.h = opengl_fbo["h"] # <<<<<<<<<<<<<<
- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
- */
-- __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_opengl_fbo, __pyx_n_s_h); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1087, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_fbo.h = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1086
-+ /* "vidcutter/libs/pympv/mpv.pyx":1088
- * fbo.w = opengl_fbo["w"]
- * fbo.h = opengl_fbo["h"]
- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
- * if flip_y:
- */
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_opengl_fbo, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
- if (!__pyx_t_2) {
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- } else {
-- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1088, __pyx_L1_error)
- __pyx_t_3 = __pyx_t_5;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- goto __pyx_L6_bool_binop_done;
-@@ -18509,18 +18509,18 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- __pyx_L6_bool_binop_done:;
- __pyx_v_fbo.internal_format = __pyx_t_3;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1087
-+ /* "vidcutter/libs/pympv/mpv.pyx":1089
- * fbo.h = opengl_fbo["h"]
- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo) # <<<<<<<<<<<<<<
- * if flip_y:
- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_voidp(__pyx_v_params, MPV_RENDER_PARAM_OPENGL_FBO, (&__pyx_v_fbo), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1081
-+ /* "vidcutter/libs/pympv/mpv.pyx":1083
- * params = _RenderParams()
- *
- * if opengl_fbo: # <<<<<<<<<<<<<<
-@@ -18529,28 +18529,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1088
-+ /* "vidcutter/libs/pympv/mpv.pyx":1090
- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
- * if flip_y: # <<<<<<<<<<<<<<
- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
- * if depth is not None:
- */
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_flip_y); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1090, __pyx_L1_error)
- if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1089
-+ /* "vidcutter/libs/pympv/mpv.pyx":1091
- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
- * if flip_y:
- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1) # <<<<<<<<<<<<<<
- * if depth is not None:
- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_FLIP_Y, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1088
-+ /* "vidcutter/libs/pympv/mpv.pyx":1090
- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0
- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
- * if flip_y: # <<<<<<<<<<<<<<
-@@ -18559,7 +18559,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1090
-+ /* "vidcutter/libs/pympv/mpv.pyx":1092
- * if flip_y:
- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
- * if depth is not None: # <<<<<<<<<<<<<<
-@@ -18570,19 +18570,19 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- __pyx_t_6 = (__pyx_t_2 != 0);
- if (__pyx_t_6) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1091
-+ /* "vidcutter/libs/pympv/mpv.pyx":1093
- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
- * if depth is not None:
- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth) # <<<<<<<<<<<<<<
- * if not block_for_target_time:
- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
- */
-- __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L1_error)
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1091, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1093, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_DEPTH, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1090
-+ /* "vidcutter/libs/pympv/mpv.pyx":1092
- * if flip_y:
- * params.add_int(MPV_RENDER_PARAM_FLIP_Y, 1)
- * if depth is not None: # <<<<<<<<<<<<<<
-@@ -18591,29 +18591,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1092
-+ /* "vidcutter/libs/pympv/mpv.pyx":1094
- * if depth is not None:
- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
- * if not block_for_target_time: # <<<<<<<<<<<<<<
- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
- * if skip_rendering:
- */
-- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block_for_target_time); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
- __pyx_t_2 = ((!__pyx_t_6) != 0);
- if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1093
-+ /* "vidcutter/libs/pympv/mpv.pyx":1095
- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
- * if not block_for_target_time:
- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0) # <<<<<<<<<<<<<<
- * if skip_rendering:
- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1092
-+ /* "vidcutter/libs/pympv/mpv.pyx":1094
- * if depth is not None:
- * params.add_int(MPV_RENDER_PARAM_DEPTH, depth)
- * if not block_for_target_time: # <<<<<<<<<<<<<<
-@@ -18622,28 +18622,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1094
-+ /* "vidcutter/libs/pympv/mpv.pyx":1096
- * if not block_for_target_time:
- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
- * if skip_rendering: # <<<<<<<<<<<<<<
- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
- *
- */
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_skip_rendering); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1096, __pyx_L1_error)
- if (__pyx_t_2) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1095
-+ /* "vidcutter/libs/pympv/mpv.pyx":1097
- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
- * if skip_rendering:
- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1) # <<<<<<<<<<<<<<
- *
- * with nogil:
- */
-- __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
-+ __pyx_t_1 = ((struct __pyx_vtabstruct_9vidcutter_4libs_3mpv__RenderParams *)__pyx_v_params->__pyx_vtab)->add_int(__pyx_v_params, MPV_RENDER_PARAM_SKIP_RENDERING, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1094
-+ /* "vidcutter/libs/pympv/mpv.pyx":1096
- * if not block_for_target_time:
- * params.add_int(MPV_RENDER_PARAM_BLOCK_FOR_TARGET_TIME, 0)
- * if skip_rendering: # <<<<<<<<<<<<<<
-@@ -18652,7 +18652,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1097
-+ /* "vidcutter/libs/pympv/mpv.pyx":1099
- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
- *
- * with nogil: # <<<<<<<<<<<<<<
-@@ -18667,7 +18667,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1098
-+ /* "vidcutter/libs/pympv/mpv.pyx":1100
- *
- * with nogil:
- * ret = mpv_render_context_render(self._ctx, params.params) # <<<<<<<<<<<<<<
-@@ -18677,7 +18677,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- __pyx_v_ret = mpv_render_context_render(__pyx_v_self->_ctx, __pyx_v_params->params);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1097
-+ /* "vidcutter/libs/pympv/mpv.pyx":1099
- * params.add_int(MPV_RENDER_PARAM_SKIP_RENDERING, 1)
- *
- * with nogil: # <<<<<<<<<<<<<<
-@@ -18696,7 +18696,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1099
-+ /* "vidcutter/libs/pympv/mpv.pyx":1101
- * with nogil:
- * ret = mpv_render_context_render(self._ctx, params.params)
- * return ret # <<<<<<<<<<<<<<
-@@ -18704,13 +18704,13 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- * def report_swap(self):
- */
- __Pyx_XDECREF(__pyx_r);
-- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_r = __pyx_t_1;
- __pyx_t_1 = 0;
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1069
-+ /* "vidcutter/libs/pympv/mpv.pyx":1071
- *
- * @_errors
- * def render(self, # <<<<<<<<<<<<<<
-@@ -18731,7 +18731,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_12render(struct
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1101
-+/* "vidcutter/libs/pympv/mpv.pyx":1103
- * return ret
- *
- * def report_swap(self): # <<<<<<<<<<<<<<
-@@ -18757,7 +18757,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("report_swap", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1102
-+ /* "vidcutter/libs/pympv/mpv.pyx":1104
- *
- * def report_swap(self):
- * with nogil: # <<<<<<<<<<<<<<
-@@ -18772,7 +18772,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1103
-+ /* "vidcutter/libs/pympv/mpv.pyx":1105
- * def report_swap(self):
- * with nogil:
- * mpv_render_context_report_swap(self._ctx) # <<<<<<<<<<<<<<
-@@ -18782,7 +18782,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
- mpv_render_context_report_swap(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1102
-+ /* "vidcutter/libs/pympv/mpv.pyx":1104
- *
- * def report_swap(self):
- * with nogil: # <<<<<<<<<<<<<<
-@@ -18801,7 +18801,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1101
-+ /* "vidcutter/libs/pympv/mpv.pyx":1103
- * return ret
- *
- * def report_swap(self): # <<<<<<<<<<<<<<
-@@ -18816,7 +18816,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_14report_swap(st
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1105
-+/* "vidcutter/libs/pympv/mpv.pyx":1107
- * mpv_render_context_report_swap(self._ctx)
- *
- * def free(self): # <<<<<<<<<<<<<<
-@@ -18843,7 +18843,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
- int __pyx_t_1;
- __Pyx_RefNannySetupContext("free", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1106
-+ /* "vidcutter/libs/pympv/mpv.pyx":1108
- *
- * def free(self):
- * if not self.inited: # <<<<<<<<<<<<<<
-@@ -18853,7 +18853,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
- __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
- if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1107
-+ /* "vidcutter/libs/pympv/mpv.pyx":1109
- * def free(self):
- * if not self.inited:
- * return # <<<<<<<<<<<<<<
-@@ -18864,7 +18864,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1106
-+ /* "vidcutter/libs/pympv/mpv.pyx":1108
- *
- * def free(self):
- * if not self.inited: # <<<<<<<<<<<<<<
-@@ -18873,7 +18873,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1108
-+ /* "vidcutter/libs/pympv/mpv.pyx":1110
- * if not self.inited:
- * return
- * with nogil: # <<<<<<<<<<<<<<
-@@ -18888,7 +18888,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1109
-+ /* "vidcutter/libs/pympv/mpv.pyx":1111
- * return
- * with nogil:
- * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
-@@ -18898,7 +18898,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
- mpv_render_context_free(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1108
-+ /* "vidcutter/libs/pympv/mpv.pyx":1110
- * if not self.inited:
- * return
- * with nogil: # <<<<<<<<<<<<<<
-@@ -18917,7 +18917,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1110
-+ /* "vidcutter/libs/pympv/mpv.pyx":1112
- * with nogil:
- * mpv_render_context_free(self._ctx)
- * self.inited = False # <<<<<<<<<<<<<<
-@@ -18926,7 +18926,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
- */
- __pyx_v_self->inited = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1105
-+ /* "vidcutter/libs/pympv/mpv.pyx":1107
- * mpv_render_context_report_swap(self._ctx)
- *
- * def free(self): # <<<<<<<<<<<<<<
-@@ -18942,7 +18942,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_16free(struct __
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1112
-+/* "vidcutter/libs/pympv/mpv.pyx":1114
- * self.inited = False
- *
- * def close(self): # <<<<<<<<<<<<<<
-@@ -18969,7 +18969,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
- int __pyx_t_1;
- __Pyx_RefNannySetupContext("close", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1113
-+ /* "vidcutter/libs/pympv/mpv.pyx":1115
- *
- * def close(self):
- * if not self.inited: # <<<<<<<<<<<<<<
-@@ -18979,7 +18979,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
- __pyx_t_1 = ((!(__pyx_v_self->inited != 0)) != 0);
- if (__pyx_t_1) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1114
-+ /* "vidcutter/libs/pympv/mpv.pyx":1116
- * def close(self):
- * if not self.inited:
- * return # <<<<<<<<<<<<<<
-@@ -18990,7 +18990,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
- __pyx_r = Py_None; __Pyx_INCREF(Py_None);
- goto __pyx_L0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1113
-+ /* "vidcutter/libs/pympv/mpv.pyx":1115
- *
- * def close(self):
- * if not self.inited: # <<<<<<<<<<<<<<
-@@ -18999,7 +18999,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1115
-+ /* "vidcutter/libs/pympv/mpv.pyx":1117
- * if not self.inited:
- * return
- * with nogil: # <<<<<<<<<<<<<<
-@@ -19014,7 +19014,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1116
-+ /* "vidcutter/libs/pympv/mpv.pyx":1118
- * return
- * with nogil:
- * mpv_render_context_free(self._ctx) # <<<<<<<<<<<<<<
-@@ -19024,7 +19024,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
- mpv_render_context_free(__pyx_v_self->_ctx);
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1115
-+ /* "vidcutter/libs/pympv/mpv.pyx":1117
- * if not self.inited:
- * return
- * with nogil: # <<<<<<<<<<<<<<
-@@ -19043,7 +19043,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1117
-+ /* "vidcutter/libs/pympv/mpv.pyx":1119
- * with nogil:
- * mpv_render_context_free(self._ctx)
- * self.inited = False # <<<<<<<<<<<<<<
-@@ -19052,7 +19052,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
- */
- __pyx_v_self->inited = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1112
-+ /* "vidcutter/libs/pympv/mpv.pyx":1114
- * self.inited = False
- *
- * def close(self): # <<<<<<<<<<<<<<
-@@ -19068,7 +19068,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_18close(struct _
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1119
-+/* "vidcutter/libs/pympv/mpv.pyx":1121
- * self.inited = False
- *
- * def __dealloc__(self): # <<<<<<<<<<<<<<
-@@ -19097,14 +19097,14 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__dealloc__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1120
-+ /* "vidcutter/libs/pympv/mpv.pyx":1122
- *
- * def __dealloc__(self):
- * self.close() # <<<<<<<<<<<<<<
- *
- * cdef class OpenGLRenderContext(RenderContext):
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -19118,12 +19118,12 @@ static void __pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_20__dealloc__(struct
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1119
-+ /* "vidcutter/libs/pympv/mpv.pyx":1121
- * self.inited = False
- *
- * def __dealloc__(self): # <<<<<<<<<<<<<<
-@@ -19255,7 +19255,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_13RenderContext_24__setstate_cyt
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1123
-+/* "vidcutter/libs/pympv/mpv.pyx":1125
- *
- * cdef class OpenGLRenderContext(RenderContext):
- * def __init__(self, mpv, # <<<<<<<<<<<<<<
-@@ -19312,12 +19312,12 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObje
- case 1:
- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_get_proc_address)) != 0)) kw_args--;
- else {
-- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1123, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, 1); __PYX_ERR(0, 1125, __pyx_L3_error)
- }
- }
- if (unlikely(kw_args > 0)) {
- const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2;
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1123, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 1125, __pyx_L3_error)
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) < 2) {
- goto __pyx_L5_argtuple_error;
-@@ -19330,7 +19330,7 @@ static int __pyx_pw_9vidcutter_4libs_3mpv_19OpenGLRenderContext_1__init__(PyObje
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1123, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1125, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
- __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
-@@ -19360,39 +19360,39 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__init__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1127
-+ /* "vidcutter/libs/pympv/mpv.pyx":1129
- * *args, **kwargs):
- * init_params = {
- * "get_proc_address": get_proc_address # <<<<<<<<<<<<<<
- * }
- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
- */
-- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1127, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_proc_address, __pyx_v_get_proc_address) < 0) __PYX_ERR(0, 1129, __pyx_L1_error)
- __pyx_v_init_params = ((PyObject*)__pyx_t_1);
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1129
-+ /* "vidcutter/libs/pympv/mpv.pyx":1131
- * "get_proc_address": get_proc_address
- * }
- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
- * init_params, *args, **kwargs)
- *
- */
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext), __pyx_n_s_API_OPENGL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1130
-+ /* "vidcutter/libs/pympv/mpv.pyx":1132
- * }
- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
- * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
- *
- * class CallbackThread(Thread):
- */
-- __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error)
-+ __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_INCREF(((PyObject *)__pyx_v_self));
- __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-@@ -19407,42 +19407,42 @@ static int __pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext___init__(struct
- PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_init_params);
- __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1129
-+ /* "vidcutter/libs/pympv/mpv.pyx":1131
- * "get_proc_address": get_proc_address
- * }
- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
- * init_params, *args, **kwargs)
- *
- */
-- __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error)
-+ __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1130
-+ /* "vidcutter/libs/pympv/mpv.pyx":1132
- * }
- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL,
- * init_params, *args, **kwargs) # <<<<<<<<<<<<<<
- *
- * class CallbackThread(Thread):
- */
-- __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error)
-+ __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1129
-+ /* "vidcutter/libs/pympv/mpv.pyx":1131
- * "get_proc_address": get_proc_address
- * }
- * RenderContext.__init__(self, mpv, RenderContext.API_OPENGL, # <<<<<<<<<<<<<<
- * init_params, *args, **kwargs)
- *
- */
-- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1123
-+ /* "vidcutter/libs/pympv/mpv.pyx":1125
- *
- * cdef class OpenGLRenderContext(RenderContext):
- * def __init__(self, mpv, # <<<<<<<<<<<<<<
-@@ -19579,7 +19579,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_19OpenGLRenderContext_4__setstat
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1133
-+/* "vidcutter/libs/pympv/mpv.pyx":1135
- *
- * class CallbackThread(Thread):
- * def __init__(self): # <<<<<<<<<<<<<<
-@@ -19612,16 +19612,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("__init__", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1134
-+ /* "vidcutter/libs/pympv/mpv.pyx":1136
- * class CallbackThread(Thread):
- * def __init__(self):
- * Thread.__init__(self) # <<<<<<<<<<<<<<
- * self.daemon = True
- * self.lock = Semaphore()
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = NULL;
-@@ -19636,28 +19636,28 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
- }
- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self);
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1135
-+ /* "vidcutter/libs/pympv/mpv.pyx":1137
- * def __init__(self):
- * Thread.__init__(self)
- * self.daemon = True # <<<<<<<<<<<<<<
- * self.lock = Semaphore()
- * self.lock.acquire(True)
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_daemon, Py_True) < 0) __PYX_ERR(0, 1137, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1136
-+ /* "vidcutter/libs/pympv/mpv.pyx":1138
- * Thread.__init__(self)
- * self.daemon = True
- * self.lock = Semaphore() # <<<<<<<<<<<<<<
- * self.lock.acquire(True)
- * self.callback = None
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Semaphore); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
-@@ -19671,22 +19671,22 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
- }
- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_lock, __pyx_t_1) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1137
-+ /* "vidcutter/libs/pympv/mpv.pyx":1139
- * self.daemon = True
- * self.lock = Semaphore()
- * self.lock.acquire(True) # <<<<<<<<<<<<<<
- * self.callback = None
- * self.isshutdown = False
- */
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acquire); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = NULL;
-@@ -19701,30 +19701,30 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_2, Py_True);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1138
-+ /* "vidcutter/libs/pympv/mpv.pyx":1140
- * self.lock = Semaphore()
- * self.lock.acquire(True)
- * self.callback = None # <<<<<<<<<<<<<<
- * self.isshutdown = False
- *
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1140, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1139
-+ /* "vidcutter/libs/pympv/mpv.pyx":1141
- * self.lock.acquire(True)
- * self.callback = None
- * self.isshutdown = False # <<<<<<<<<<<<<<
- *
- * def shutdown(self):
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_False) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1133
-+ /* "vidcutter/libs/pympv/mpv.pyx":1135
- *
- * class CallbackThread(Thread):
- * def __init__(self): # <<<<<<<<<<<<<<
-@@ -19747,7 +19747,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread___init__(CYTHON
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1141
-+/* "vidcutter/libs/pympv/mpv.pyx":1143
- * self.isshutdown = False
- *
- * def shutdown(self): # <<<<<<<<<<<<<<
-@@ -19780,34 +19780,34 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHO
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("shutdown", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1142
-+ /* "vidcutter/libs/pympv/mpv.pyx":1144
- *
- * def shutdown(self):
- * self.isshutdown = True # <<<<<<<<<<<<<<
- * self.callback = None
- * self.lock.release()
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown, Py_True) < 0) __PYX_ERR(0, 1144, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1143
-+ /* "vidcutter/libs/pympv/mpv.pyx":1145
- * def shutdown(self):
- * self.isshutdown = True
- * self.callback = None # <<<<<<<<<<<<<<
- * self.lock.release()
- *
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, Py_None) < 0) __PYX_ERR(0, 1145, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1144
-+ /* "vidcutter/libs/pympv/mpv.pyx":1146
- * self.isshutdown = True
- * self.callback = None
- * self.lock.release() # <<<<<<<<<<<<<<
- *
- * def call(self):
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = NULL;
-@@ -19822,12 +19822,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHO
- }
- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1141
-+ /* "vidcutter/libs/pympv/mpv.pyx":1143
- * self.isshutdown = False
- *
- * def shutdown(self): # <<<<<<<<<<<<<<
-@@ -19850,7 +19850,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_2shutdown(CYTHO
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1146
-+/* "vidcutter/libs/pympv/mpv.pyx":1148
- * self.lock.release()
- *
- * def call(self): # <<<<<<<<<<<<<<
-@@ -19883,16 +19883,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("call", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1147
-+ /* "vidcutter/libs/pympv/mpv.pyx":1149
- *
- * def call(self):
- * self.lock.release() # <<<<<<<<<<<<<<
- *
- * def set(self, callback):
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = NULL;
-@@ -19907,12 +19907,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
- }
- __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1146
-+ /* "vidcutter/libs/pympv/mpv.pyx":1148
- * self.lock.release()
- *
- * def call(self): # <<<<<<<<<<<<<<
-@@ -19935,7 +19935,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_4call(CYTHON_UN
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1149
-+/* "vidcutter/libs/pympv/mpv.pyx":1151
- * self.lock.release()
- *
- * def set(self, callback): # <<<<<<<<<<<<<<
-@@ -19978,11 +19978,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *
- case 1:
- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
- else {
-- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1149, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1151, __pyx_L3_error)
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1149, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1151, __pyx_L3_error)
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
- goto __pyx_L5_argtuple_error;
-@@ -19995,7 +19995,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_7set(PyObject *
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1149, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1151, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -20016,16 +20016,16 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNU
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("set", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1150
-+ /* "vidcutter/libs/pympv/mpv.pyx":1152
- *
- * def set(self, callback):
- * self.callback = callback # <<<<<<<<<<<<<<
- *
- * def run(self):
- */
-- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1150, __pyx_L1_error)
-+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1149
-+ /* "vidcutter/libs/pympv/mpv.pyx":1151
- * self.lock.release()
- *
- * def set(self, callback): # <<<<<<<<<<<<<<
-@@ -20045,7 +20045,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_6set(CYTHON_UNU
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1152
-+/* "vidcutter/libs/pympv/mpv.pyx":1154
- * self.callback = callback
- *
- * def run(self): # <<<<<<<<<<<<<<
-@@ -20082,7 +20082,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("run", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1153
-+ /* "vidcutter/libs/pympv/mpv.pyx":1155
- *
- * def run(self):
- * while not self.isshutdown: # <<<<<<<<<<<<<<
-@@ -20090,23 +20090,23 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
- * self.mpv_callback(self.callback) if self.callback else None
- */
- while (1) {
-- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_isshutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = ((!__pyx_t_2) != 0);
- if (!__pyx_t_3) break;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1154
-+ /* "vidcutter/libs/pympv/mpv.pyx":1156
- * def run(self):
- * while not self.isshutdown:
- * self.lock.acquire(True) # <<<<<<<<<<<<<<
- * self.mpv_callback(self.callback) if self.callback else None
- *
- */
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1154, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_acquire); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = NULL;
-@@ -20121,26 +20121,26 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
- }
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, Py_True) : __Pyx_PyObject_CallOneArg(__pyx_t_5, Py_True);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1155
-+ /* "vidcutter/libs/pympv/mpv.pyx":1157
- * while not self.isshutdown:
- * self.lock.acquire(True)
- * self.mpv_callback(self.callback) if self.callback else None # <<<<<<<<<<<<<<
- *
- * def mpv_callback(self, callback):
- */
-- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1157, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (__pyx_t_3) {
-- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_mpv_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1155, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_callback); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
-@@ -20155,7 +20155,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
- __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
- __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1157, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_1 = __pyx_t_5;
-@@ -20167,7 +20167,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1152
-+ /* "vidcutter/libs/pympv/mpv.pyx":1154
- * self.callback = callback
- *
- * def run(self): # <<<<<<<<<<<<<<
-@@ -20192,7 +20192,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_8run(CYTHON_UNU
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1157
-+/* "vidcutter/libs/pympv/mpv.pyx":1159
- * self.mpv_callback(self.callback) if self.callback else None
- *
- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
-@@ -20235,11 +20235,11 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(
- case 1:
- if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--;
- else {
-- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1157, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, 1); __PYX_ERR(0, 1159, __pyx_L3_error)
- }
- }
- if (unlikely(kw_args > 0)) {
-- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1157, __pyx_L3_error)
-+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mpv_callback") < 0)) __PYX_ERR(0, 1159, __pyx_L3_error)
- }
- } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
- goto __pyx_L5_argtuple_error;
-@@ -20252,7 +20252,7 @@ static PyObject *__pyx_pw_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback(
- }
- goto __pyx_L4_argument_unpacking_done;
- __pyx_L5_argtuple_error:;
-- __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1157, __pyx_L3_error)
-+ __Pyx_RaiseArgtupleInvalid("mpv_callback", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1159, __pyx_L3_error)
- __pyx_L3_error:;
- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
- __Pyx_RefNannyFinishContext();
-@@ -20285,7 +20285,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
- int __pyx_clineno = 0;
- __Pyx_RefNannySetupContext("mpv_callback", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1158
-+ /* "vidcutter/libs/pympv/mpv.pyx":1160
- *
- * def mpv_callback(self, callback):
- * try: # <<<<<<<<<<<<<<
-@@ -20301,7 +20301,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
- __Pyx_XGOTREF(__pyx_t_3);
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1159
-+ /* "vidcutter/libs/pympv/mpv.pyx":1161
- * def mpv_callback(self, callback):
- * try:
- * callback() # <<<<<<<<<<<<<<
-@@ -20321,12 +20321,12 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
- }
- __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L3_error)
-+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1161, __pyx_L3_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1158
-+ /* "vidcutter/libs/pympv/mpv.pyx":1160
- *
- * def mpv_callback(self, callback):
- * try: # <<<<<<<<<<<<<<
-@@ -20343,7 +20343,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
- __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1160
-+ /* "vidcutter/libs/pympv/mpv.pyx":1162
- * try:
- * callback()
- * except Exception as e: # <<<<<<<<<<<<<<
-@@ -20353,29 +20353,29 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
- __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
- if (__pyx_t_7) {
- __Pyx_AddTraceback("vidcutter.libs.mpv.CallbackThread.mpv_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
-- if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1160, __pyx_L5_except_error)
-+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1162, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_INCREF(__pyx_t_5);
- __pyx_v_e = __pyx_t_5;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1161
-+ /* "vidcutter/libs/pympv/mpv.pyx":1163
- * callback()
- * except Exception as e:
- * sys.stderr.write("pympv error during callback: %s\n" % e) # <<<<<<<<<<<<<<
- *
- * cdef void _c_callback(void* d) with gil:
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_9);
-- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_10);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
-- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-- __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-+ __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_pympv_error_during_callback_s, __pyx_v_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_10);
- __pyx_t_11 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
-@@ -20390,7 +20390,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
- __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
- __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
- __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
-- if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1161, __pyx_L5_except_error)
-+ if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1163, __pyx_L5_except_error)
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
-@@ -20402,7 +20402,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
- goto __pyx_L5_except_error;
- __pyx_L5_except_error:;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1158
-+ /* "vidcutter/libs/pympv/mpv.pyx":1160
- *
- * def mpv_callback(self, callback):
- * try: # <<<<<<<<<<<<<<
-@@ -20422,7 +20422,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
- __pyx_L8_try_end:;
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1157
-+ /* "vidcutter/libs/pympv/mpv.pyx":1159
- * self.mpv_callback(self.callback) if self.callback else None
- *
- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
-@@ -20450,7 +20450,7 @@ static PyObject *__pyx_pf_9vidcutter_4libs_3mpv_14CallbackThread_10mpv_callback(
- return __pyx_r;
- }
-
--/* "vidcutter/libs/pympv/mpv.pyx":1163
-+/* "vidcutter/libs/pympv/mpv.pyx":1165
- * sys.stderr.write("pympv error during callback: %s\n" % e)
- *
- * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
-@@ -20474,7 +20474,7 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
- #endif
- __Pyx_RefNannySetupContext("_c_callback", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1164
-+ /* "vidcutter/libs/pympv/mpv.pyx":1166
- *
- * cdef void _c_callback(void* d) with gil:
- * cdef uint64_t name = <uint64_t>d # <<<<<<<<<<<<<<
-@@ -20483,15 +20483,15 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
- */
- __pyx_v_name = ((uint64_t)__pyx_v_d);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1165
-+ /* "vidcutter/libs/pympv/mpv.pyx":1167
- * cdef void _c_callback(void* d) with gil:
- * cdef uint64_t name = <uint64_t>d
- * callback = _callbacks.get(name) # <<<<<<<<<<<<<<
- * callback.call()
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -20506,18 +20506,18 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
- __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
- __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_v_callback = __pyx_t_1;
- __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1166
-+ /* "vidcutter/libs/pympv/mpv.pyx":1168
- * cdef uint64_t name = <uint64_t>d
- * callback = _callbacks.get(name)
- * callback.call() # <<<<<<<<<<<<<<
- */
-- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_callback, __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = NULL;
- if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
-@@ -20531,12 +20531,12 @@ static void __pyx_f_9vidcutter_4libs_3mpv__c_callback(void *__pyx_v_d) {
- }
- __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1163
-+ /* "vidcutter/libs/pympv/mpv.pyx":1165
- * sys.stderr.write("pympv error during callback: %s\n" % e)
- *
- * cdef void _c_callback(void* d) with gil: # <<<<<<<<<<<<<<
-@@ -24444,13 +24444,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
- {0, 0, 0, 0, 0, 0, 0}
- };
- static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
-- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 44, __pyx_L1_error)
-- __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 346, __pyx_L1_error)
-- __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 58, __pyx_L1_error)
-- __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 66, __pyx_L1_error)
-- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 222, __pyx_L1_error)
-- __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 303, __pyx_L1_error)
-- __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 475, __pyx_L1_error)
-+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 46, __pyx_L1_error)
-+ __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 348, __pyx_L1_error)
-+ __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 60, __pyx_L1_error)
-+ __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 68, __pyx_L1_error)
-+ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 224, __pyx_L1_error)
-+ __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 305, __pyx_L1_error)
-+ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 477, __pyx_L1_error)
- __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
- return 0;
- __pyx_L1_error:;
-@@ -24461,17 +24461,17 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
- __Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":319
-+ /* "vidcutter/libs/pympv/mpv.pyx":321
- *
- * def _errors(fn):
- * def wrapped(*k, **kw): # <<<<<<<<<<<<<<
- * v = fn(*k, **kw)
- * if v < 0:
- */
-- __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 319, __pyx_L1_error)
-+ __pyx_tuple_ = PyTuple_Pack(3, __pyx_n_s_k, __pyx_n_s_kw, __pyx_n_s_v); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 321, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple_);
- __Pyx_GIVEREF(__pyx_tuple_);
-- __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 319, __pyx_L1_error)
-+ __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_wrapped, 321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 321, __pyx_L1_error)
-
- /* "(tree fragment)":2
- * def __reduce_cython__(self):
-@@ -24511,80 +24511,80 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
- __Pyx_GOTREF(__pyx_tuple__6);
- __Pyx_GIVEREF(__pyx_tuple__6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":992
-+ /* "vidcutter/libs/pympv/mpv.pyx":994
- * params.add_voidp(MPV_RENDER_PARAM_WL_DISPLAY, get_pointer("wl_display", wl_display))
- * if drm_display:
- * drm_params.fd = drm_display.get("fd", -1) # <<<<<<<<<<<<<<
- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
- * drm_params.connector_id = drm_display.get("connector_id", -1)
- */
-- __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 992, __pyx_L1_error)
-+ __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 994, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__7);
- __Pyx_GIVEREF(__pyx_tuple__7);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":993
-+ /* "vidcutter/libs/pympv/mpv.pyx":995
- * if drm_display:
- * drm_params.fd = drm_display.get("fd", -1)
- * drm_params.crtc_id = drm_display.get("crtc_id", -1) # <<<<<<<<<<<<<<
- * drm_params.connector_id = drm_display.get("connector_id", -1)
- * arp = drm_display.get("atomic_request_ptr", None)
- */
-- __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 993, __pyx_L1_error)
-+ __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_crtc_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 995, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__8);
- __Pyx_GIVEREF(__pyx_tuple__8);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":994
-+ /* "vidcutter/libs/pympv/mpv.pyx":996
- * drm_params.fd = drm_display.get("fd", -1)
- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
- * drm_params.connector_id = drm_display.get("connector_id", -1) # <<<<<<<<<<<<<<
- * arp = drm_display.get("atomic_request_ptr", None)
- * if arp is not None:
- */
-- __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 994, __pyx_L1_error)
-+ __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_connector_id, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 996, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__9);
- __Pyx_GIVEREF(__pyx_tuple__9);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":995
-+ /* "vidcutter/libs/pympv/mpv.pyx":997
- * drm_params.crtc_id = drm_display.get("crtc_id", -1)
- * drm_params.connector_id = drm_display.get("connector_id", -1)
- * arp = drm_display.get("atomic_request_ptr", None) # <<<<<<<<<<<<<<
- * if arp is not None:
- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
- */
-- __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 995, __pyx_L1_error)
-+ __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_atomic_request_ptr, Py_None); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 997, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__10);
- __Pyx_GIVEREF(__pyx_tuple__10);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":998
-+ /* "vidcutter/libs/pympv/mpv.pyx":1000
- * if arp is not None:
- * drm_params.atomic_request_ptr = <_drmModeAtomicReq **>get_pointer(arp, "drmModeAtomicReq*")
- * drm_params.render_fd = drm_display.get("render_fd", -1) # <<<<<<<<<<<<<<
- * params.add_voidp(MPV_RENDER_PARAM_DRM_DISPLAY, &drm_params)
- * if drm_osd_size:
- */
-- __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 998, __pyx_L1_error)
-+ __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_s_render_fd, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 1000, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__11);
- __Pyx_GIVEREF(__pyx_tuple__11);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1083
-+ /* "vidcutter/libs/pympv/mpv.pyx":1085
- * if opengl_fbo:
- * memset(&fbo, 0, sizeof(fbo))
- * fbo.fbo = opengl_fbo.get("fbo", 0) or 0 # <<<<<<<<<<<<<<
- * fbo.w = opengl_fbo["w"]
- * fbo.h = opengl_fbo["h"]
- */
-- __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 1083, __pyx_L1_error)
-+ __pyx_tuple__12 = PyTuple_Pack(2, __pyx_n_s_fbo, __pyx_int_0); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 1085, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__12);
- __Pyx_GIVEREF(__pyx_tuple__12);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1086
-+ /* "vidcutter/libs/pympv/mpv.pyx":1088
- * fbo.w = opengl_fbo["w"]
- * fbo.h = opengl_fbo["h"]
- * fbo.internal_format = opengl_fbo.get("internal_format", 0) or 0 # <<<<<<<<<<<<<<
- * params.add_voidp(MPV_RENDER_PARAM_OPENGL_FBO, &fbo)
- * if flip_y:
- */
-- __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1086, __pyx_L1_error)
-+ __pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_internal_format, __pyx_int_0); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1088, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__13);
- __Pyx_GIVEREF(__pyx_tuple__13);
-
-@@ -24626,183 +24626,183 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
- __Pyx_GOTREF(__pyx_tuple__17);
- __Pyx_GIVEREF(__pyx_tuple__17);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":52
-+ /* "vidcutter/libs/pympv/mpv.pyx":54
- * void Py_Initialize()
- *
- * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
- * # mpv -> Python
- */
-- __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 52, __pyx_L1_error)
-+ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_int_3); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__18);
- __Pyx_GIVEREF(__pyx_tuple__18);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":55
-+ /* "vidcutter/libs/pympv/mpv.pyx":57
- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
- * # mpv -> Python
- * def _strdec(s): # <<<<<<<<<<<<<<
- * try:
- * return s.decode("utf-8", _strdec_err)
- */
-- __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 55, __pyx_L1_error)
-+ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__19);
- __Pyx_GIVEREF(__pyx_tuple__19);
-- __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 55, __pyx_L1_error)
-+ __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strdec, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 57, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":63
-+ /* "vidcutter/libs/pympv/mpv.pyx":65
- *
- * # Python -> mpv
- * def _strenc(s): # <<<<<<<<<<<<<<
- * try:
- * return s.encode("utf-8", _strdec_err)
- */
-- __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 63, __pyx_L1_error)
-+ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 65, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__21);
- __Pyx_GIVEREF(__pyx_tuple__21);
-- __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 63, __pyx_L1_error)
-+ __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_strenc, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 65, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":318
-+ /* "vidcutter/libs/pympv/mpv.pyx":320
- *
- *
- * def _errors(fn): # <<<<<<<<<<<<<<
- * def wrapped(*k, **kw):
- * v = fn(*k, **kw)
- */
-- __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 318, __pyx_L1_error)
-+ __pyx_tuple__23 = PyTuple_Pack(3, __pyx_n_s_fn, __pyx_n_s_wrapped, __pyx_n_s_wrapped); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 320, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__23);
- __Pyx_GIVEREF(__pyx_tuple__23);
-- __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 318, __pyx_L1_error)
-+ __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_errors, 320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 320, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":329
-+ /* "vidcutter/libs/pympv/mpv.pyx":331
- * code = None
- *
- * def __init__(self, e): # <<<<<<<<<<<<<<
- * self.code = e
- * cdef const char* err_c
- */
-- __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 329, __pyx_L1_error)
-+ __pyx_tuple__25 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_e, __pyx_n_s_err_c, __pyx_n_s_e_i); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 331, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__25);
- __Pyx_GIVEREF(__pyx_tuple__25);
-- __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 329, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 329, __pyx_L1_error)
-+ __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 331, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":346
-+ /* "vidcutter/libs/pympv/mpv.pyx":348
- * cdef _reply_userdatas = dict()
- *
- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
- * def __init__(self, data):
- * self.counter = 0
- */
-- __pyx_tuple__27 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 346, __pyx_L1_error)
-+ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__27);
- __Pyx_GIVEREF(__pyx_tuple__27);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":347
-+ /* "vidcutter/libs/pympv/mpv.pyx":349
- *
- * class _ReplyUserData(object):
- * def __init__(self, data): # <<<<<<<<<<<<<<
- * self.counter = 0
- * self.data = data
- */
-- __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 347, __pyx_L1_error)
-+ __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_data); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 349, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__28);
- __Pyx_GIVEREF(__pyx_tuple__28);
-- __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 347, __pyx_L1_error)
-+ __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 349, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":352
-+ /* "vidcutter/libs/pympv/mpv.pyx":354
- * self.observed = False
- *
- * def add(self): # <<<<<<<<<<<<<<
- * self.counter += 1
- *
- */
-- __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 352, __pyx_L1_error)
-+ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 354, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__30);
- __Pyx_GIVEREF(__pyx_tuple__30);
-- __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 352, __pyx_L1_error)
-+ __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_add, 354, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 354, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":355
-+ /* "vidcutter/libs/pympv/mpv.pyx":357
- * self.counter += 1
- *
- * def remove(self): # <<<<<<<<<<<<<<
- * self.counter -= 1
- *
- */
-- __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 355, __pyx_L1_error)
-+ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 357, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__32);
- __Pyx_GIVEREF(__pyx_tuple__32);
-- __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 355, __pyx_L1_error)
-+ __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_remove, 357, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 357, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1133
-+ /* "vidcutter/libs/pympv/mpv.pyx":1135
- *
- * class CallbackThread(Thread):
- * def __init__(self): # <<<<<<<<<<<<<<
- * Thread.__init__(self)
- * self.daemon = True
- */
-- __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1133, __pyx_L1_error)
-+ __pyx_tuple__34 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1135, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__34);
- __Pyx_GIVEREF(__pyx_tuple__34);
-- __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1133, __pyx_L1_error)
-+ __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_init, 1135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 1135, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1141
-+ /* "vidcutter/libs/pympv/mpv.pyx":1143
- * self.isshutdown = False
- *
- * def shutdown(self): # <<<<<<<<<<<<<<
- * self.isshutdown = True
- * self.callback = None
- */
-- __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1141, __pyx_L1_error)
-+ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1143, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__36);
- __Pyx_GIVEREF(__pyx_tuple__36);
-- __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1141, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1141, __pyx_L1_error)
-+ __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_shutdown, 1143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1143, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1146
-+ /* "vidcutter/libs/pympv/mpv.pyx":1148
- * self.lock.release()
- *
- * def call(self): # <<<<<<<<<<<<<<
- * self.lock.release()
- *
- */
-- __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1146, __pyx_L1_error)
-+ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1148, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__38);
- __Pyx_GIVEREF(__pyx_tuple__38);
-- __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1146, __pyx_L1_error)
-+ __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_call, 1148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1148, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1149
-+ /* "vidcutter/libs/pympv/mpv.pyx":1151
- * self.lock.release()
- *
- * def set(self, callback): # <<<<<<<<<<<<<<
- * self.callback = callback
- *
- */
-- __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1149, __pyx_L1_error)
-+ __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1151, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__40);
- __Pyx_GIVEREF(__pyx_tuple__40);
-- __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1149, __pyx_L1_error)
-+ __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_set, 1151, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1151, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1152
-+ /* "vidcutter/libs/pympv/mpv.pyx":1154
- * self.callback = callback
- *
- * def run(self): # <<<<<<<<<<<<<<
- * while not self.isshutdown:
- * self.lock.acquire(True)
- */
-- __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1152, __pyx_L1_error)
-+ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1154, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__42);
- __Pyx_GIVEREF(__pyx_tuple__42);
-- __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 1152, __pyx_L1_error)
-+ __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_run, 1154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 1154, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1157
-+ /* "vidcutter/libs/pympv/mpv.pyx":1159
- * self.mpv_callback(self.callback) if self.callback else None
- *
- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
- * try:
- * callback()
- */
-- __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1157, __pyx_L1_error)
-+ __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_callback, __pyx_n_s_e); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_tuple__44);
- __Pyx_GIVEREF(__pyx_tuple__44);
-- __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1157, __pyx_L1_error)
-+ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_vidcutter_libs_pympv_mpv_pyx, __pyx_n_s_mpv_callback, 1159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1159, __pyx_L1_error)
-
- /* "(tree fragment)":1
- * def __pyx_unpickle_EndOfFileReached(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
-@@ -24840,9 +24840,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
- if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
- __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
- __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
-- __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
- __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
- __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
-+ __pyx_int_109 = PyInt_FromLong(109); if (unlikely(!__pyx_int_109)) __PYX_ERR(0, 1, __pyx_L1_error)
- __pyx_int_5713169 = PyInt_FromLong(5713169L); if (unlikely(!__pyx_int_5713169)) __PYX_ERR(0, 1, __pyx_L1_error)
- __pyx_int_90958262 = PyInt_FromLong(90958262L); if (unlikely(!__pyx_int_90958262)) __PYX_ERR(0, 1, __pyx_L1_error)
- __pyx_int_142036910 = PyInt_FromLong(142036910L); if (unlikely(!__pyx_int_142036910)) __PYX_ERR(0, 1, __pyx_L1_error)
-@@ -24897,122 +24897,122 @@ static int __Pyx_modinit_type_init_code(void) {
- /*--- Type init code ---*/
- __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached;
- __pyx_vtable_9vidcutter_4libs_3mpv_EndOfFileReached._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_EndOfFileReached *, struct mpv_event_end_file *))__pyx_f_9vidcutter_4libs_3mpv_16EndOfFileReached__init;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
- #if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_print = 0;
- #endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_getattro = __Pyx_PyObject_GenericGetAttr;
- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_EndOfFileReached, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
- __pyx_ptype_9vidcutter_4libs_3mpv_EndOfFileReached = &__pyx_type_9vidcutter_4libs_3mpv_EndOfFileReached;
- __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage = &__pyx_vtable_9vidcutter_4libs_3mpv_LogMessage;
- __pyx_vtable_9vidcutter_4libs_3mpv_LogMessage._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_LogMessage *, struct mpv_event_log_message *))__pyx_f_9vidcutter_4libs_3mpv_10LogMessage__init;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
- #if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_print = 0;
- #endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 182, __pyx_L1_error)
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_LogMessage.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LogMessage, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_LogMessage) < 0) __PYX_ERR(0, 184, __pyx_L1_error)
- __pyx_ptype_9vidcutter_4libs_3mpv_LogMessage = &__pyx_type_9vidcutter_4libs_3mpv_LogMessage;
- __pyx_vtabptr_9vidcutter_4libs_3mpv_Property = &__pyx_vtable_9vidcutter_4libs_3mpv_Property;
- __pyx_vtable_9vidcutter_4libs_3mpv_Property._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Property *, struct mpv_event_property *))__pyx_f_9vidcutter_4libs_3mpv_8Property__init;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
- #if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9vidcutter_4libs_3mpv_Property.tp_print = 0;
- #endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9vidcutter_4libs_3mpv_Property.tp_getattro = __Pyx_PyObject_GenericGetAttr;
- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Property.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Property, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Property) < 0) __PYX_ERR(0, 245, __pyx_L1_error)
- __pyx_ptype_9vidcutter_4libs_3mpv_Property = &__pyx_type_9vidcutter_4libs_3mpv_Property;
- __pyx_vtabptr_9vidcutter_4libs_3mpv_Event = &__pyx_vtable_9vidcutter_4libs_3mpv_Event;
- __pyx_vtable_9vidcutter_4libs_3mpv_Event._data = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *))__pyx_f_9vidcutter_4libs_3mpv_5Event__data;
- __pyx_vtable_9vidcutter_4libs_3mpv_Event._init = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Event *, struct mpv_event *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_5Event__init;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
- #if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9vidcutter_4libs_3mpv_Event.tp_print = 0;
- #endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9vidcutter_4libs_3mpv_Event.tp_getattro = __Pyx_PyObject_GenericGetAttr;
- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Event.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Event) < 0) __PYX_ERR(0, 258, __pyx_L1_error)
- __pyx_ptype_9vidcutter_4libs_3mpv_Event = &__pyx_type_9vidcutter_4libs_3mpv_Event;
- __pyx_vtabptr_9vidcutter_4libs_3mpv_Context = &__pyx_vtable_9vidcutter_4libs_3mpv_Context;
- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_list = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_list;
- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_node_map = (struct mpv_node_list *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_node_map;
- __pyx_vtable_9vidcutter_4libs_3mpv_Context._prep_native_value = (struct mpv_node (*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, PyObject *, PyObject *))__pyx_f_9vidcutter_4libs_3mpv_7Context__prep_native_value;
- __pyx_vtable_9vidcutter_4libs_3mpv_Context._free_native_value = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_Context *, struct mpv_node))__pyx_f_9vidcutter_4libs_3mpv_7Context__free_native_value;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
- #if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9vidcutter_4libs_3mpv_Context.tp_print = 0;
- #endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9vidcutter_4libs_3mpv_Context.tp_getattro = __Pyx_PyObject_GenericGetAttr;
- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_Context.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Context, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_Context) < 0) __PYX_ERR(0, 361, __pyx_L1_error)
- __pyx_ptype_9vidcutter_4libs_3mpv_Context = &__pyx_type_9vidcutter_4libs_3mpv_Context;
- __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams = &__pyx_vtable_9vidcutter_4libs_3mpv__RenderParams;
- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_voidp = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, void *, struct __pyx_opt_args_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp *__pyx_optional_args))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_voidp;
- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_int = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, int))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_int;
- __pyx_vtable_9vidcutter_4libs_3mpv__RenderParams.add_string = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv__RenderParams *, enum mpv_render_param_type, char *))__pyx_f_9vidcutter_4libs_3mpv_13_RenderParams_add_string;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
- #if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_print = 0;
- #endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_getattro = __Pyx_PyObject_GenericGetAttr;
- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv__RenderParams.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderParams, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv__RenderParams) < 0) __PYX_ERR(0, 883, __pyx_L1_error)
- __pyx_ptype_9vidcutter_4libs_3mpv__RenderParams = &__pyx_type_9vidcutter_4libs_3mpv__RenderParams;
- __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo;
- __pyx_vtable_9vidcutter_4libs_3mpv_RenderFrameInfo._from_struct = (PyObject *(*)(struct __pyx_obj_9vidcutter_4libs_3mpv_RenderFrameInfo *, struct mpv_render_frame_info *))__pyx_f_9vidcutter_4libs_3mpv_15RenderFrameInfo__from_struct;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
- #if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_print = 0;
- #endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
- }
-- if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
-+ if (__Pyx_SetVtable(__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo.tp_dict, __pyx_vtabptr_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
- __pyx_ptype_9vidcutter_4libs_3mpv_RenderFrameInfo = &__pyx_type_9vidcutter_4libs_3mpv_RenderFrameInfo;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
- #if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_print = 0;
- #endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9vidcutter_4libs_3mpv_RenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
- }
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_RenderContext) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
- __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext = &__pyx_type_9vidcutter_4libs_3mpv_RenderContext;
- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_base = __pyx_ptype_9vidcutter_4libs_3mpv_RenderContext;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
- #if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_print = 0;
- #endif
- if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_dictoffset && __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro == PyObject_GenericGetAttr)) {
- __pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext.tp_getattro = __Pyx_PyObject_GenericGetAttr;
- }
-- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
-- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
-+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OpenGLRenderContext, (PyObject *)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
-+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
- __pyx_ptype_9vidcutter_4libs_3mpv_OpenGLRenderContext = &__pyx_type_9vidcutter_4libs_3mpv_OpenGLRenderContext;
-- if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
-+ if (PyType_Ready(&__pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
- #if PY_VERSION_HEX < 0x030800B1
- __pyx_type_9vidcutter_4libs_3mpv___pyx_scope_struct___errors.tp_print = 0;
- #endif
-@@ -25315,29 +25315,29 @@ if (!__Pyx_RefNanny) {
- * __version__ = "0.3.0"
- * __author__ = "Andre D" # <<<<<<<<<<<<<<
- *
-- * _REQUIRED_CAPI_MAJOR = 2
-+ * #_REQUIRED_CAPI_MAJOR = 2
- */
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_s_Andre_D) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":33
-- * __author__ = "Andre D"
-- *
-- * _REQUIRED_CAPI_MAJOR = 2 # <<<<<<<<<<<<<<
-- * _MIN_CAPI_MINOR = 0
-+ /* "vidcutter/libs/pympv/mpv.pyx":35
-+ * #_REQUIRED_CAPI_MAJOR = 2
-+ * #_MIN_CAPI_MINOR = 0
-+ * _REQUIRED_CAPI_MAJOR = 1 # <<<<<<<<<<<<<<
-+ * _MIN_CAPI_MINOR = 109
- *
- */
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUIRED_CAPI_MAJOR, __pyx_int_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":34
-- *
-- * _REQUIRED_CAPI_MAJOR = 2
-- * _MIN_CAPI_MINOR = 0 # <<<<<<<<<<<<<<
-+ /* "vidcutter/libs/pympv/mpv.pyx":36
-+ * #_MIN_CAPI_MINOR = 0
-+ * _REQUIRED_CAPI_MAJOR = 1
-+ * _MIN_CAPI_MINOR = 109 # <<<<<<<<<<<<<<
- *
- * cdef unsigned long _CAPI_VERSION
- */
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_0) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN_CAPI_MINOR, __pyx_int_109) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":37
-+ /* "vidcutter/libs/pympv/mpv.pyx":39
- *
- * cdef unsigned long _CAPI_VERSION
- * with nogil: # <<<<<<<<<<<<<<
-@@ -25352,7 +25352,7 @@ if (!__Pyx_RefNanny) {
- #endif
- /*try:*/ {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":38
-+ /* "vidcutter/libs/pympv/mpv.pyx":40
- * cdef unsigned long _CAPI_VERSION
- * with nogil:
- * _CAPI_VERSION = mpv_client_api_version() # <<<<<<<<<<<<<<
-@@ -25362,7 +25362,7 @@ if (!__Pyx_RefNanny) {
- __pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION = mpv_client_api_version();
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":37
-+ /* "vidcutter/libs/pympv/mpv.pyx":39
- *
- * cdef unsigned long _CAPI_VERSION
- * with nogil: # <<<<<<<<<<<<<<
-@@ -25381,80 +25381,80 @@ if (!__Pyx_RefNanny) {
- }
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":40
-+ /* "vidcutter/libs/pympv/mpv.pyx":42
- * _CAPI_VERSION = mpv_client_api_version()
- *
- * _CAPI_MAJOR = _CAPI_VERSION >> 16 # <<<<<<<<<<<<<<
- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
- *
- */
-- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION >> 16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MAJOR, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":41
-+ /* "vidcutter/libs/pympv/mpv.pyx":43
- *
- * _CAPI_MAJOR = _CAPI_VERSION >> 16
- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF # <<<<<<<<<<<<<<
- *
- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
- */
-- __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
-+ __pyx_t_2 = __Pyx_PyInt_From_unsigned_long((__pyx_v_9vidcutter_4libs_3mpv__CAPI_VERSION & 0xFFFF)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CAPI_MINOR, __pyx_t_2) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":43
-+ /* "vidcutter/libs/pympv/mpv.pyx":45
- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
- *
- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
- * raise ImportError(
- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 45, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!__pyx_t_5) {
- } else {
- __pyx_t_3 = __pyx_t_5;
- goto __pyx_L6_bool_binop_done;
- }
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 43, __pyx_L1_error)
-+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 45, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = __pyx_t_5;
- __pyx_L6_bool_binop_done:;
- if (unlikely(__pyx_t_3)) {
-
-- /* "vidcutter/libs/pympv/mpv.pyx":46
-+ /* "vidcutter/libs/pympv/mpv.pyx":48
- * raise ImportError(
- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR) # <<<<<<<<<<<<<<
- * )
- *
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_REQUIRED_CAPI_MAJOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_2);
-- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MIN_CAPI_MINOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CAPI_MAJOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 46, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_CAPI_MINOR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 48, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
-+ __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 48, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_2);
- PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
-@@ -25469,32 +25469,32 @@ if (!__Pyx_RefNanny) {
- __pyx_t_4 = 0;
- __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":45
-+ /* "vidcutter/libs/pympv/mpv.pyx":47
- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
- * raise ImportError(
- * "libmpv version is incorrect. Required %d.%d got %d.%d." % # <<<<<<<<<<<<<<
- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
- * )
- */
-- __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_libmpv_version_is_incorrect_Requ, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":44
-+ /* "vidcutter/libs/pympv/mpv.pyx":46
- *
- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
- * raise ImportError( # <<<<<<<<<<<<<<
- * "libmpv version is incorrect. Required %d.%d got %d.%d." %
- * (_REQUIRED_CAPI_MAJOR, _MIN_CAPI_MINOR, _CAPI_MAJOR, _CAPI_MINOR)
- */
-- __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 44, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ImportError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_Raise(__pyx_t_7, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __PYX_ERR(0, 44, __pyx_L1_error)
-+ __PYX_ERR(0, 46, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":43
-+ /* "vidcutter/libs/pympv/mpv.pyx":45
- * _CAPI_MINOR = _CAPI_VERSION & 0xFFFF
- *
- * if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR: # <<<<<<<<<<<<<<
-@@ -25503,33 +25503,33 @@ if (!__Pyx_RefNanny) {
- */
- }
-
-- /* "vidcutter/libs/pympv/mpv.pyx":52
-+ /* "vidcutter/libs/pympv/mpv.pyx":54
- * void Py_Initialize()
- *
- * _is_py3 = sys.version_info >= (3,) # <<<<<<<<<<<<<<
- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
- * # mpv -> Python
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-- __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__18, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
-+ __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_tuple__18, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_py3, __pyx_t_7) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":53
-+ /* "vidcutter/libs/pympv/mpv.pyx":55
- *
- * _is_py3 = sys.version_info >= (3,)
- * _strdec_err = "surrogateescape" if _is_py3 else "strict" # <<<<<<<<<<<<<<
- * # mpv -> Python
- * def _strdec(s):
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_is_py3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 53, __pyx_L1_error)
-+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (__pyx_t_3) {
- __Pyx_INCREF(__pyx_n_s_surrogateescape);
-@@ -25538,34 +25538,34 @@ if (!__Pyx_RefNanny) {
- __Pyx_INCREF(__pyx_n_s_strict);
- __pyx_t_7 = __pyx_n_s_strict;
- }
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec_err, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":55
-+ /* "vidcutter/libs/pympv/mpv.pyx":57
- * _strdec_err = "surrogateescape" if _is_py3 else "strict"
- * # mpv -> Python
- * def _strdec(s): # <<<<<<<<<<<<<<
- * try:
- * return s.decode("utf-8", _strdec_err)
- */
-- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 55, __pyx_L1_error)
-+ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_1_strdec, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strdec, __pyx_t_7) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":63
-+ /* "vidcutter/libs/pympv/mpv.pyx":65
- *
- * # Python -> mpv
- * def _strenc(s): # <<<<<<<<<<<<<<
- * try:
- * return s.encode("utf-8", _strdec_err)
- */
-- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error)
-+ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_3_strenc, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 65, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_strenc, __pyx_t_7) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":70
-+ /* "vidcutter/libs/pympv/mpv.pyx":72
- * return s
- *
- * Py_Initialize() # <<<<<<<<<<<<<<
-@@ -25574,883 +25574,883 @@ if (!__Pyx_RefNanny) {
- */
- Py_Initialize();
-
-- /* "vidcutter/libs/pympv/mpv.pyx":72
-+ /* "vidcutter/libs/pympv/mpv.pyx":74
- * Py_Initialize()
- *
- * class Errors: # <<<<<<<<<<<<<<
- * """Set of known error codes from MpvError and Event responses.
- *
- */
-- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 72, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Errors, __pyx_n_s_Errors, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_error_codes_from_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":79
-+ /* "vidcutter/libs/pympv/mpv.pyx":81
- * You should handle the possibility that error codes may not be any of these values.
- * """
- * success = MPV_ERROR_SUCCESS # <<<<<<<<<<<<<<
- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
- * nomem = MPV_ERROR_NOMEM
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_SUCCESS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_success, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":80
-+ /* "vidcutter/libs/pympv/mpv.pyx":82
- * """
- * success = MPV_ERROR_SUCCESS
- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL # <<<<<<<<<<<<<<
- * nomem = MPV_ERROR_NOMEM
- * uninitialized = MPV_ERROR_UNINITIALIZED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_EVENT_QUEUE_FULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_queue_full, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":81
-+ /* "vidcutter/libs/pympv/mpv.pyx":83
- * success = MPV_ERROR_SUCCESS
- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
- * nomem = MPV_ERROR_NOMEM # <<<<<<<<<<<<<<
- * uninitialized = MPV_ERROR_UNINITIALIZED
- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOMEM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nomem, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":82
-+ /* "vidcutter/libs/pympv/mpv.pyx":84
- * queue_full = MPV_ERROR_EVENT_QUEUE_FULL
- * nomem = MPV_ERROR_NOMEM
- * uninitialized = MPV_ERROR_UNINITIALIZED # <<<<<<<<<<<<<<
- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
- * not_found = MPV_ERROR_OPTION_NOT_FOUND
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNINITIALIZED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_uninitialized, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":83
-+ /* "vidcutter/libs/pympv/mpv.pyx":85
- * nomem = MPV_ERROR_NOMEM
- * uninitialized = MPV_ERROR_UNINITIALIZED
- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER # <<<<<<<<<<<<<<
- * not_found = MPV_ERROR_OPTION_NOT_FOUND
- * option_format = MPV_ERROR_OPTION_FORMAT
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_INVALID_PARAMETER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_invalid_parameter, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":84
-+ /* "vidcutter/libs/pympv/mpv.pyx":86
- * uninitialized = MPV_ERROR_UNINITIALIZED
- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
- * not_found = MPV_ERROR_OPTION_NOT_FOUND # <<<<<<<<<<<<<<
- * option_format = MPV_ERROR_OPTION_FORMAT
- * option_error = MPV_ERROR_OPTION_ERROR
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":85
-+ /* "vidcutter/libs/pympv/mpv.pyx":87
- * invalid_parameter = MPV_ERROR_INVALID_PARAMETER
- * not_found = MPV_ERROR_OPTION_NOT_FOUND
- * option_format = MPV_ERROR_OPTION_FORMAT # <<<<<<<<<<<<<<
- * option_error = MPV_ERROR_OPTION_ERROR
- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_format, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":86
-+ /* "vidcutter/libs/pympv/mpv.pyx":88
- * not_found = MPV_ERROR_OPTION_NOT_FOUND
- * option_format = MPV_ERROR_OPTION_FORMAT
- * option_error = MPV_ERROR_OPTION_ERROR # <<<<<<<<<<<<<<
- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
- * property_format = MPV_ERROR_PROPERTY_FORMAT
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_OPTION_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_option_error, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":87
-+ /* "vidcutter/libs/pympv/mpv.pyx":89
- * option_format = MPV_ERROR_OPTION_FORMAT
- * option_error = MPV_ERROR_OPTION_ERROR
- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND # <<<<<<<<<<<<<<
- * property_format = MPV_ERROR_PROPERTY_FORMAT
- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_NOT_FOUND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_found, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":88
-+ /* "vidcutter/libs/pympv/mpv.pyx":90
- * option_error = MPV_ERROR_OPTION_ERROR
- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
- * property_format = MPV_ERROR_PROPERTY_FORMAT # <<<<<<<<<<<<<<
- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
- * property_error = MPV_ERROR_PROPERTY_ERROR
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_format, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":89
-+ /* "vidcutter/libs/pympv/mpv.pyx":91
- * not_found = MPV_ERROR_PROPERTY_NOT_FOUND
- * property_format = MPV_ERROR_PROPERTY_FORMAT
- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE # <<<<<<<<<<<<<<
- * property_error = MPV_ERROR_PROPERTY_ERROR
- * command_error = MPV_ERROR_COMMAND
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_UNAVAILABLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_unavailable, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":90
-+ /* "vidcutter/libs/pympv/mpv.pyx":92
- * property_format = MPV_ERROR_PROPERTY_FORMAT
- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
- * property_error = MPV_ERROR_PROPERTY_ERROR # <<<<<<<<<<<<<<
- * command_error = MPV_ERROR_COMMAND
- * loading_failed = MPV_ERROR_LOADING_FAILED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_PROPERTY_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_error, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":91
-+ /* "vidcutter/libs/pympv/mpv.pyx":93
- * property_unavailable = MPV_ERROR_PROPERTY_UNAVAILABLE
- * property_error = MPV_ERROR_PROPERTY_ERROR
- * command_error = MPV_ERROR_COMMAND # <<<<<<<<<<<<<<
- * loading_failed = MPV_ERROR_LOADING_FAILED
- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_COMMAND); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_error, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":92
-+ /* "vidcutter/libs/pympv/mpv.pyx":94
- * property_error = MPV_ERROR_PROPERTY_ERROR
- * command_error = MPV_ERROR_COMMAND
- * loading_failed = MPV_ERROR_LOADING_FAILED # <<<<<<<<<<<<<<
- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_LOADING_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_loading_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":93
-+ /* "vidcutter/libs/pympv/mpv.pyx":95
- * command_error = MPV_ERROR_COMMAND
- * loading_failed = MPV_ERROR_LOADING_FAILED
- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED # <<<<<<<<<<<<<<
- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_AO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_ao_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":94
-+ /* "vidcutter/libs/pympv/mpv.pyx":96
- * loading_failed = MPV_ERROR_LOADING_FAILED
- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED # <<<<<<<<<<<<<<
- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_VO_INIT_FAILED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_vo_init_failed, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":95
-+ /* "vidcutter/libs/pympv/mpv.pyx":97
- * ao_init_failed = MPV_ERROR_AO_INIT_FAILED
- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY # <<<<<<<<<<<<<<
- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
- * unsupported = MPV_ERROR_UNSUPPORTED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOTHING_TO_PLAY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_nothing_to_play, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":96
-+ /* "vidcutter/libs/pympv/mpv.pyx":98
- * vo_init_failed = MPV_ERROR_VO_INIT_FAILED
- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT # <<<<<<<<<<<<<<
- * unsupported = MPV_ERROR_UNSUPPORTED
- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNKNOWN_FORMAT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unknown_format, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":97
-+ /* "vidcutter/libs/pympv/mpv.pyx":99
- * nothing_to_play = MPV_ERROR_NOTHING_TO_PLAY
- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
- * unsupported = MPV_ERROR_UNSUPPORTED # <<<<<<<<<<<<<<
- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED
- *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_UNSUPPORTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_unsupported, __pyx_t_6) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":98
-+ /* "vidcutter/libs/pympv/mpv.pyx":100
- * unknown_format = MPV_ERROR_UNKNOWN_FORMAT
- * unsupported = MPV_ERROR_UNSUPPORTED
- * not_implemented = MPV_ERROR_NOT_IMPLEMENTED # <<<<<<<<<<<<<<
- *
- *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_error(MPV_ERROR_NOT_IMPLEMENTED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 100, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_not_implemented, __pyx_t_6) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":72
-+ /* "vidcutter/libs/pympv/mpv.pyx":74
- * Py_Initialize()
- *
- * class Errors: # <<<<<<<<<<<<<<
- * """Set of known error codes from MpvError and Event responses.
- *
- */
-- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Errors, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Errors, __pyx_t_6) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":101
-+ /* "vidcutter/libs/pympv/mpv.pyx":103
- *
- *
- * class Events: # <<<<<<<<<<<<<<
- * """Set of known values for Event ids.
- *
- */
-- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 101, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Events, __pyx_n_s_Events, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Set_of_known_values_for_Event_id); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 103, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":108
-+ /* "vidcutter/libs/pympv/mpv.pyx":110
- * You should handle the possibility that event ids may not be any of these values.
- * """
- * none = MPV_EVENT_NONE # <<<<<<<<<<<<<<
- * shutdown = MPV_EVENT_SHUTDOWN
- * log_message = MPV_EVENT_LOG_MESSAGE
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_none, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":109
-+ /* "vidcutter/libs/pympv/mpv.pyx":111
- * """
- * none = MPV_EVENT_NONE
- * shutdown = MPV_EVENT_SHUTDOWN # <<<<<<<<<<<<<<
- * log_message = MPV_EVENT_LOG_MESSAGE
- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 109, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SHUTDOWN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_shutdown, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":110
-+ /* "vidcutter/libs/pympv/mpv.pyx":112
- * none = MPV_EVENT_NONE
- * shutdown = MPV_EVENT_SHUTDOWN
- * log_message = MPV_EVENT_LOG_MESSAGE # <<<<<<<<<<<<<<
- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_LOG_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_log_message, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":111
-+ /* "vidcutter/libs/pympv/mpv.pyx":113
- * shutdown = MPV_EVENT_SHUTDOWN
- * log_message = MPV_EVENT_LOG_MESSAGE
- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY # <<<<<<<<<<<<<<
- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
- * command_reply = MPV_EVENT_COMMAND_REPLY
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_GET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_get_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":112
-+ /* "vidcutter/libs/pympv/mpv.pyx":114
- * log_message = MPV_EVENT_LOG_MESSAGE
- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY # <<<<<<<<<<<<<<
- * command_reply = MPV_EVENT_COMMAND_REPLY
- * start_file = MPV_EVENT_START_FILE
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SET_PROPERTY_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_property_reply, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":113
-+ /* "vidcutter/libs/pympv/mpv.pyx":115
- * get_property_reply = MPV_EVENT_GET_PROPERTY_REPLY
- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
- * command_reply = MPV_EVENT_COMMAND_REPLY # <<<<<<<<<<<<<<
- * start_file = MPV_EVENT_START_FILE
- * end_file = MPV_EVENT_END_FILE
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 113, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_COMMAND_REPLY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_command_reply, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":114
-+ /* "vidcutter/libs/pympv/mpv.pyx":116
- * set_property_reply = MPV_EVENT_SET_PROPERTY_REPLY
- * command_reply = MPV_EVENT_COMMAND_REPLY
- * start_file = MPV_EVENT_START_FILE # <<<<<<<<<<<<<<
- * end_file = MPV_EVENT_END_FILE
- * file_loaded = MPV_EVENT_FILE_LOADED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_START_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_start_file, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":115
-+ /* "vidcutter/libs/pympv/mpv.pyx":117
- * command_reply = MPV_EVENT_COMMAND_REPLY
- * start_file = MPV_EVENT_START_FILE
- * end_file = MPV_EVENT_END_FILE # <<<<<<<<<<<<<<
- * file_loaded = MPV_EVENT_FILE_LOADED
- * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 115, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_END_FILE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_end_file, __pyx_t_6) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":116
-+ /* "vidcutter/libs/pympv/mpv.pyx":118
- * start_file = MPV_EVENT_START_FILE
- * end_file = MPV_EVENT_END_FILE
- * file_loaded = MPV_EVENT_FILE_LOADED # <<<<<<<<<<<<<<
- * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
- * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 116, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_FILE_LOADED); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 118, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_file_loaded, __pyx_t_6) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":119
-+ /* "vidcutter/libs/pympv/mpv.pyx":121
- * # tracks_changed = MPV_EVENT_TRACKS_CHANGED
- * # tracks_switched = MPV_EVENT_TRACK_SWITCHED
- * idle = MPV_EVENT_IDLE # <<<<<<<<<<<<<<
- * # pause = MPV_EVENT_PAUSE
- * # unpause = MPV_EVENT_UNPAUSE
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_IDLE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 121, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_idle, __pyx_t_6) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":122
-+ /* "vidcutter/libs/pympv/mpv.pyx":124
- * # pause = MPV_EVENT_PAUSE
- * # unpause = MPV_EVENT_UNPAUSE
- * tick = MPV_EVENT_TICK # <<<<<<<<<<<<<<
- * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
- * client_message = MPV_EVENT_CLIENT_MESSAGE
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_TICK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_tick, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":124
-+ /* "vidcutter/libs/pympv/mpv.pyx":126
- * tick = MPV_EVENT_TICK
- * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
- * client_message = MPV_EVENT_CLIENT_MESSAGE # <<<<<<<<<<<<<<
- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 124, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_CLIENT_MESSAGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_client_message, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":125
-+ /* "vidcutter/libs/pympv/mpv.pyx":127
- * # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
- * client_message = MPV_EVENT_CLIENT_MESSAGE
- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG # <<<<<<<<<<<<<<
- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
- * # metadata_update = MPV_EVENT_METADATA_UPDATE
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_VIDEO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 127, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_video_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":126
-+ /* "vidcutter/libs/pympv/mpv.pyx":128
- * client_message = MPV_EVENT_CLIENT_MESSAGE
- * video_reconfig = MPV_EVENT_VIDEO_RECONFIG
- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG # <<<<<<<<<<<<<<
- * # metadata_update = MPV_EVENT_METADATA_UPDATE
- * seek = MPV_EVENT_SEEK
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_AUDIO_RECONFIG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_audio_reconfig, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":128
-+ /* "vidcutter/libs/pympv/mpv.pyx":130
- * audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
- * # metadata_update = MPV_EVENT_METADATA_UPDATE
- * seek = MPV_EVENT_SEEK # <<<<<<<<<<<<<<
- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
- * property_change = MPV_EVENT_PROPERTY_CHANGE
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_SEEK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_seek, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":129
-+ /* "vidcutter/libs/pympv/mpv.pyx":131
- * # metadata_update = MPV_EVENT_METADATA_UPDATE
- * seek = MPV_EVENT_SEEK
- * playback_restart = MPV_EVENT_PLAYBACK_RESTART # <<<<<<<<<<<<<<
- * property_change = MPV_EVENT_PROPERTY_CHANGE
- * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PLAYBACK_RESTART); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_playback_restart, __pyx_t_6) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":130
-+ /* "vidcutter/libs/pympv/mpv.pyx":132
- * seek = MPV_EVENT_SEEK
- * playback_restart = MPV_EVENT_PLAYBACK_RESTART
- * property_change = MPV_EVENT_PROPERTY_CHANGE # <<<<<<<<<<<<<<
- * # chapter_change = MPV_EVENT_CHAPTER_CHANGE
- *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_event_id(MPV_EVENT_PROPERTY_CHANGE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_property_change, __pyx_t_6) < 0) __PYX_ERR(0, 132, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":101
-+ /* "vidcutter/libs/pympv/mpv.pyx":103
- *
- *
- * class Events: # <<<<<<<<<<<<<<
- * """Set of known values for Event ids.
- *
- */
-- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_Events, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 103, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Events, __pyx_t_6) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":134
-+ /* "vidcutter/libs/pympv/mpv.pyx":136
- *
- *
- * class LogLevels: # <<<<<<<<<<<<<<
- * no = MPV_LOG_LEVEL_NONE
- * fatal = MPV_LOG_LEVEL_FATAL
- */
-- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_LogLevels, __pyx_n_s_LogLevels, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 136, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":135
-+ /* "vidcutter/libs/pympv/mpv.pyx":137
- *
- * class LogLevels:
- * no = MPV_LOG_LEVEL_NONE # <<<<<<<<<<<<<<
- * fatal = MPV_LOG_LEVEL_FATAL
- * error = MPV_LOG_LEVEL_ERROR
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_NONE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_no, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":136
-+ /* "vidcutter/libs/pympv/mpv.pyx":138
- * class LogLevels:
- * no = MPV_LOG_LEVEL_NONE
- * fatal = MPV_LOG_LEVEL_FATAL # <<<<<<<<<<<<<<
- * error = MPV_LOG_LEVEL_ERROR
- * warn = MPV_LOG_LEVEL_WARN
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_FATAL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_fatal, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":137
-+ /* "vidcutter/libs/pympv/mpv.pyx":139
- * no = MPV_LOG_LEVEL_NONE
- * fatal = MPV_LOG_LEVEL_FATAL
- * error = MPV_LOG_LEVEL_ERROR # <<<<<<<<<<<<<<
- * warn = MPV_LOG_LEVEL_WARN
- * info = MPV_LOG_LEVEL_INFO
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":138
-+ /* "vidcutter/libs/pympv/mpv.pyx":140
- * fatal = MPV_LOG_LEVEL_FATAL
- * error = MPV_LOG_LEVEL_ERROR
- * warn = MPV_LOG_LEVEL_WARN # <<<<<<<<<<<<<<
- * info = MPV_LOG_LEVEL_INFO
- * v = MPV_LOG_LEVEL_V
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_warn, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":139
-+ /* "vidcutter/libs/pympv/mpv.pyx":141
- * error = MPV_LOG_LEVEL_ERROR
- * warn = MPV_LOG_LEVEL_WARN
- * info = MPV_LOG_LEVEL_INFO # <<<<<<<<<<<<<<
- * v = MPV_LOG_LEVEL_V
- * debug = MPV_LOG_LEVEL_DEBUG
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_info, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":140
-+ /* "vidcutter/libs/pympv/mpv.pyx":142
- * warn = MPV_LOG_LEVEL_WARN
- * info = MPV_LOG_LEVEL_INFO
- * v = MPV_LOG_LEVEL_V # <<<<<<<<<<<<<<
- * debug = MPV_LOG_LEVEL_DEBUG
- * trace = MPV_LOG_LEVEL_TRACE
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_V); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 140, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_v, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":141
-+ /* "vidcutter/libs/pympv/mpv.pyx":143
- * info = MPV_LOG_LEVEL_INFO
- * v = MPV_LOG_LEVEL_V
- * debug = MPV_LOG_LEVEL_DEBUG # <<<<<<<<<<<<<<
- * trace = MPV_LOG_LEVEL_TRACE
- *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 141, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_DEBUG); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_debug, __pyx_t_6) < 0) __PYX_ERR(0, 143, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":142
-+ /* "vidcutter/libs/pympv/mpv.pyx":144
- * v = MPV_LOG_LEVEL_V
- * debug = MPV_LOG_LEVEL_DEBUG
- * trace = MPV_LOG_LEVEL_TRACE # <<<<<<<<<<<<<<
- *
- *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 142, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_log_level(MPV_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 144, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_trace, __pyx_t_6) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":134
-+ /* "vidcutter/libs/pympv/mpv.pyx":136
- *
- *
- * class LogLevels: # <<<<<<<<<<<<<<
- * no = MPV_LOG_LEVEL_NONE
- * fatal = MPV_LOG_LEVEL_FATAL
- */
-- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_LogLevels, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 136, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LogLevels, __pyx_t_6) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":145
-+ /* "vidcutter/libs/pympv/mpv.pyx":147
- *
- *
- * class EOFReasons: # <<<<<<<<<<<<<<
- * """Known possible values for EndOfFileReached reason.
- *
- */
-- __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 145, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_EOFReasons, __pyx_n_s_EOFReasons, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_kp_s_Known_possible_values_for_EndOfF); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 147, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":150
-+ /* "vidcutter/libs/pympv/mpv.pyx":152
- * You should handle the possibility that the reason may not be any of these values.
- * """
- * eof = MPV_END_FILE_REASON_EOF # <<<<<<<<<<<<<<
- * aborted = MPV_END_FILE_REASON_STOP
- * quit = MPV_END_FILE_REASON_QUIT
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_EOF); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_eof, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":151
-+ /* "vidcutter/libs/pympv/mpv.pyx":153
- * """
- * eof = MPV_END_FILE_REASON_EOF
- * aborted = MPV_END_FILE_REASON_STOP # <<<<<<<<<<<<<<
- * quit = MPV_END_FILE_REASON_QUIT
- * error = MPV_END_FILE_REASON_ERROR
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_STOP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_aborted, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":152
-+ /* "vidcutter/libs/pympv/mpv.pyx":154
- * eof = MPV_END_FILE_REASON_EOF
- * aborted = MPV_END_FILE_REASON_STOP
- * quit = MPV_END_FILE_REASON_QUIT # <<<<<<<<<<<<<<
- * error = MPV_END_FILE_REASON_ERROR
- *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_QUIT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 154, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_quit, __pyx_t_6) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":153
-+ /* "vidcutter/libs/pympv/mpv.pyx":155
- * aborted = MPV_END_FILE_REASON_STOP
- * quit = MPV_END_FILE_REASON_QUIT
- * error = MPV_END_FILE_REASON_ERROR # <<<<<<<<<<<<<<
- *
- *
- */
-- __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_PyInt_From_enum__mpv_end_file_reason(MPV_END_FILE_REASON_ERROR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_error, __pyx_t_6) < 0) __PYX_ERR(0, 155, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":145
-+ /* "vidcutter/libs/pympv/mpv.pyx":147
- *
- *
- * class EOFReasons: # <<<<<<<<<<<<<<
- * """Known possible values for EndOfFileReached reason.
- *
- */
-- __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_EOFReasons, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EOFReasons, __pyx_t_6) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":318
-+ /* "vidcutter/libs/pympv/mpv.pyx":320
- *
- *
- * def _errors(fn): # <<<<<<<<<<<<<<
- * def wrapped(*k, **kw):
- * v = fn(*k, **kw)
- */
-- __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
-+ __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_9vidcutter_4libs_3mpv_5_errors, NULL, __pyx_n_s_vidcutter_libs_mpv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 320, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 318, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_errors, __pyx_t_7) < 0) __PYX_ERR(0, 320, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":326
-+ /* "vidcutter/libs/pympv/mpv.pyx":328
- *
- *
- * class MPVError(Exception): # <<<<<<<<<<<<<<
- * code = None
- *
- */
-- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 326, __pyx_L1_error)
-+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 328, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
- __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
- PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 326, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 328, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_MPVError, __pyx_n_s_MPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":327
-+ /* "vidcutter/libs/pympv/mpv.pyx":329
- *
- * class MPVError(Exception):
- * code = None # <<<<<<<<<<<<<<
- *
- * def __init__(self, e):
- */
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 327, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_code, Py_None) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
-
-- /* "vidcutter/libs/pympv/mpv.pyx":329
-+ /* "vidcutter/libs/pympv/mpv.pyx":331
- * code = None
- *
- * def __init__(self, e): # <<<<<<<<<<<<<<
- * self.code = e
- * cdef const char* err_c
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_8MPVError_1__init__, 0, __pyx_n_s_MPVError___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 329, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 331, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":326
-+ /* "vidcutter/libs/pympv/mpv.pyx":328
- *
- *
- * class MPVError(Exception): # <<<<<<<<<<<<<<
- * code = None
- *
- */
-- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_MPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPVError, __pyx_t_1) < 0) __PYX_ERR(0, 328, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":340
-+ /* "vidcutter/libs/pympv/mpv.pyx":342
- * Exception.__init__(self, e)
- *
- * class PyMPVError(Exception): # <<<<<<<<<<<<<<
- * pass
- *
- */
-- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error)
-+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
- __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
- PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
-- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_7, __pyx_n_s_PyMPVError, __pyx_n_s_PyMPVError, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_PyMPVError, __pyx_t_7, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 340, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyMPVError, __pyx_t_1) < 0) __PYX_ERR(0, 342, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":343
-+ /* "vidcutter/libs/pympv/mpv.pyx":345
- * pass
- *
- * cdef _callbacks = dict() # <<<<<<<<<<<<<<
- * cdef _reply_userdatas = dict()
- *
- */
-- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 345, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__callbacks);
- __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__callbacks, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_7);
- __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":344
-+ /* "vidcutter/libs/pympv/mpv.pyx":346
- *
- * cdef _callbacks = dict()
- * cdef _reply_userdatas = dict() # <<<<<<<<<<<<<<
- *
- * class _ReplyUserData(object):
- */
-- __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_XGOTREF(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas);
- __Pyx_DECREF_SET(__pyx_v_9vidcutter_4libs_3mpv__reply_userdatas, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_7);
- __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":346
-+ /* "vidcutter/libs/pympv/mpv.pyx":348
- * cdef _reply_userdatas = dict()
- *
- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
- * def __init__(self, data):
- * self.counter = 0
- */
-- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__27); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__27); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__27, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)
-+ __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__27, __pyx_n_s_ReplyUserData, __pyx_n_s_ReplyUserData, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":347
-+ /* "vidcutter/libs/pympv/mpv.pyx":349
- *
- * class _ReplyUserData(object):
- * def __init__(self, data): # <<<<<<<<<<<<<<
- * self.counter = 0
- * self.data = data
- */
-- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_1__init__, 0, __pyx_n_s_ReplyUserData___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 349, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 347, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 349, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":352
-+ /* "vidcutter/libs/pympv/mpv.pyx":354
- * self.observed = False
- *
- * def add(self): # <<<<<<<<<<<<<<
- * self.counter += 1
- *
- */
-- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_3add, 0, __pyx_n_s_ReplyUserData_add, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 354, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_add, __pyx_t_4) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":355
-+ /* "vidcutter/libs/pympv/mpv.pyx":357
- * self.counter += 1
- *
- * def remove(self): # <<<<<<<<<<<<<<
- * self.counter -= 1
- *
- */
-- __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 355, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14_ReplyUserData_5remove, 0, __pyx_n_s_ReplyUserData_remove, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_n_s_remove, __pyx_t_4) < 0) __PYX_ERR(0, 357, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":346
-+ /* "vidcutter/libs/pympv/mpv.pyx":348
- * cdef _reply_userdatas = dict()
- *
- * class _ReplyUserData(object): # <<<<<<<<<<<<<<
- * def __init__(self, data):
- * self.counter = 0
- */
-- __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__27, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ReplyUserData, __pyx_tuple__27, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReplyUserData, __pyx_t_4) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":411
-+ /* "vidcutter/libs/pympv/mpv.pyx":413
- * # mpv_resume(self._ctx)
- *
- * @_errors # <<<<<<<<<<<<<<
- * def request_event(self, event, enable):
- * """Enable or disable a given event.
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 411, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":412
-+ /* "vidcutter/libs/pympv/mpv.pyx":414
- *
- * @_errors
- * def request_event(self, event, enable): # <<<<<<<<<<<<<<
- * """Enable or disable a given event.
- *
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_request_event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 414, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26465,31 +26465,31 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 413, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_request_event, __pyx_t_7) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":429
-+ /* "vidcutter/libs/pympv/mpv.pyx":431
- * return err
- *
- * @_errors # <<<<<<<<<<<<<<
- * def set_log_level(self, loglevel):
- * """Wraps: mpv_request_log_messages"""
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":430
-+ /* "vidcutter/libs/pympv/mpv.pyx":432
- *
- * @_errors
- * def set_log_level(self, loglevel): # <<<<<<<<<<<<<<
- * """Wraps: mpv_request_log_messages"""
- * assert self._ctx
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_log_level); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26504,31 +26504,31 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_log_level, __pyx_t_7) < 0) __PYX_ERR(0, 432, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":440
-+ /* "vidcutter/libs/pympv/mpv.pyx":442
- * return err
- *
- * @_errors # <<<<<<<<<<<<<<
- * def load_config(self, filename):
- * """Wraps: mpv_load_config_file"""
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 440, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 442, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":441
-+ /* "vidcutter/libs/pympv/mpv.pyx":443
- *
- * @_errors
- * def load_config(self, filename): # <<<<<<<<<<<<<<
- * """Wraps: mpv_load_config_file"""
- * assert self._ctx
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_load_config); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26543,31 +26543,31 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 442, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_load_config, __pyx_t_7) < 0) __PYX_ERR(0, 443, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":573
-+ /* "vidcutter/libs/pympv/mpv.pyx":575
- * return result
- *
- * @_errors # <<<<<<<<<<<<<<
- * def get_property_async(self, prop, data=None):
- * """Gets the value of a property asynchronously.
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 573, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 575, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":574
-+ /* "vidcutter/libs/pympv/mpv.pyx":576
- *
- * @_errors
- * def get_property_async(self, prop, data=None): # <<<<<<<<<<<<<<
- * """Gets the value of a property asynchronously.
- *
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_get_property_async); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26582,31 +26582,31 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 575, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 574, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_get_property_async, __pyx_t_7) < 0) __PYX_ERR(0, 576, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":635
-+ /* "vidcutter/libs/pympv/mpv.pyx":637
- * return v
- *
- * @_errors # <<<<<<<<<<<<<<
- * def set_property(self, prop, value=True, asynchronous=False, data=None):
- * """Wraps: mpv_set_property and mpv_set_property_async"""
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 637, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":636
-+ /* "vidcutter/libs/pympv/mpv.pyx":638
- *
- * @_errors
- * def set_property(self, prop, value=True, asynchronous=False, data=None): # <<<<<<<<<<<<<<
- * """Wraps: mpv_set_property and mpv_set_property_async"""
- * assert self._ctx
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26621,31 +26621,31 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 635, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 637, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 636, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_property, __pyx_t_7) < 0) __PYX_ERR(0, 638, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":673
-+ /* "vidcutter/libs/pympv/mpv.pyx":675
- * return err
- *
- * @_errors # <<<<<<<<<<<<<<
- * def set_option(self, prop, value=True):
- * """Wraps: mpv_set_option"""
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 675, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":674
-+ /* "vidcutter/libs/pympv/mpv.pyx":676
- *
- * @_errors
- * def set_option(self, prop, value=True): # <<<<<<<<<<<<<<
- * """Wraps: mpv_set_option"""
- * assert self._ctx
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 674, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_set_option); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26660,31 +26660,31 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_set_option, __pyx_t_7) < 0) __PYX_ERR(0, 676, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":695
-+ /* "vidcutter/libs/pympv/mpv.pyx":697
- * return err
- *
- * @_errors # <<<<<<<<<<<<<<
- * def initialize(self):
- * """Wraps: mpv_initialize"""
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 697, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":696
-+ /* "vidcutter/libs/pympv/mpv.pyx":698
- *
- * @_errors
- * def initialize(self): # <<<<<<<<<<<<<<
- * """Wraps: mpv_initialize"""
- * assert self._ctx
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_initialize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26699,31 +26699,31 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 697, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_initialize, __pyx_t_7) < 0) __PYX_ERR(0, 698, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":748
-+ /* "vidcutter/libs/pympv/mpv.pyx":750
- * self.callbackthread.start()
- *
- * @_errors # <<<<<<<<<<<<<<
- * def observe_property(self, prop, data=None):
- * """Wraps: mpv_observe_property"""
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 748, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 750, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":749
-+ /* "vidcutter/libs/pympv/mpv.pyx":751
- *
- * @_errors
- * def observe_property(self, prop, data=None): # <<<<<<<<<<<<<<
- * """Wraps: mpv_observe_property"""
- * assert self._ctx
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_observe_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26738,31 +26738,31 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_observe_property, __pyx_t_7) < 0) __PYX_ERR(0, 751, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":770
-+ /* "vidcutter/libs/pympv/mpv.pyx":772
- * return err
- *
- * @_errors # <<<<<<<<<<<<<<
- * def unobserve_property(self, data):
- * """Wraps: mpv_unobserve_property"""
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":771
-+ /* "vidcutter/libs/pympv/mpv.pyx":773
- *
- * @_errors
- * def unobserve_property(self, data): # <<<<<<<<<<<<<<
- * """Wraps: mpv_unobserve_property"""
- * assert self._ctx
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 771, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context, __pyx_n_s_unobserve_property); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 773, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26777,54 +26777,54 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 772, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 771, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_Context->tp_dict, __pyx_n_s_unobserve_property, __pyx_t_7) < 0) __PYX_ERR(0, 773, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_Context);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":938
-+ /* "vidcutter/libs/pympv/mpv.pyx":940
- *
- * cdef class RenderContext(object):
- * API_OPENGL = "opengl" # <<<<<<<<<<<<<<
- * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME
- *
- */
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_API_OPENGL, __pyx_n_s_opengl) < 0) __PYX_ERR(0, 940, __pyx_L1_error)
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":939
-+ /* "vidcutter/libs/pympv/mpv.pyx":941
- * cdef class RenderContext(object):
- * API_OPENGL = "opengl"
- * UPDATE_FRAME = MPV_RENDER_UPDATE_FRAME # <<<<<<<<<<<<<<
- *
- * cdef:
- */
-- __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 939, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_PyInt_From_enum__mpv_render_update_flag(MPV_RENDER_UPDATE_FRAME); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 941, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_UPDATE_FRAME, __pyx_t_7) < 0) __PYX_ERR(0, 941, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1009
-+ /* "vidcutter/libs/pympv/mpv.pyx":1011
- * self.inited = True
- *
- * @_errors # <<<<<<<<<<<<<<
- * def set_icc_profile(self, icc_blob):
- * cdef:
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1009, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1011, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1010
-+ /* "vidcutter/libs/pympv/mpv.pyx":1012
- *
- * @_errors
- * def set_icc_profile(self, icc_blob): # <<<<<<<<<<<<<<
- * cdef:
- * mpv_render_param param
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1010, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_icc_profile); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1012, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26839,31 +26839,31 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1009, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1011, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_icc_profile, __pyx_t_7) < 0) __PYX_ERR(0, 1012, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1028
-+ /* "vidcutter/libs/pympv/mpv.pyx":1030
- * return err
- *
- * @_errors # <<<<<<<<<<<<<<
- * def set_ambient_light(self, lux):
- * cdef:
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1028, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1030, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1029
-+ /* "vidcutter/libs/pympv/mpv.pyx":1031
- *
- * @_errors
- * def set_ambient_light(self, lux): # <<<<<<<<<<<<<<
- * cdef:
- * mpv_render_param param
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_set_ambient_light); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26878,31 +26878,31 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1030, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_set_ambient_light, __pyx_t_7) < 0) __PYX_ERR(0, 1031, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1068
-+ /* "vidcutter/libs/pympv/mpv.pyx":1070
- * return ret
- *
- * @_errors # <<<<<<<<<<<<<<
- * def render(self,
- * opengl_fbo=None,
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1070, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1069
-+ /* "vidcutter/libs/pympv/mpv.pyx":1071
- *
- * @_errors
- * def render(self, # <<<<<<<<<<<<<<
- * opengl_fbo=None,
- * flip_y=False,
- */
-- __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error)
-+ __Pyx_GetNameInClass(__pyx_t_4, (PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext, __pyx_n_s_render); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = NULL;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
-@@ -26917,114 +26917,114 @@ if (!__Pyx_RefNanny) {
- __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-- if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1068, __pyx_L1_error)
-+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1070, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
-- if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1069, __pyx_L1_error)
-+ if (PyDict_SetItem((PyObject *)__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext->tp_dict, __pyx_n_s_render, __pyx_t_7) < 0) __PYX_ERR(0, 1071, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- PyType_Modified(__pyx_ptype_9vidcutter_4libs_3mpv_RenderContext);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1132
-+ /* "vidcutter/libs/pympv/mpv.pyx":1134
- * init_params, *args, **kwargs)
- *
- * class CallbackThread(Thread): # <<<<<<<<<<<<<<
- * def __init__(self):
- * Thread.__init__(self)
- */
-- __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Thread); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
- __pyx_t_7 = 0;
-- __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_7);
-- __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_CallbackThread, __pyx_n_s_CallbackThread, (PyObject *) NULL, __pyx_n_s_vidcutter_libs_mpv, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_4);
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1133
-+ /* "vidcutter/libs/pympv/mpv.pyx":1135
- *
- * class CallbackThread(Thread):
- * def __init__(self): # <<<<<<<<<<<<<<
- * Thread.__init__(self)
- * self.daemon = True
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_1__init__, 0, __pyx_n_s_CallbackThread___init, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1133, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1141
-+ /* "vidcutter/libs/pympv/mpv.pyx":1143
- * self.isshutdown = False
- *
- * def shutdown(self): # <<<<<<<<<<<<<<
- * self.isshutdown = True
- * self.callback = None
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_3shutdown, 0, __pyx_n_s_CallbackThread_shutdown, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1146
-+ /* "vidcutter/libs/pympv/mpv.pyx":1148
- * self.lock.release()
- *
- * def call(self): # <<<<<<<<<<<<<<
- * self.lock.release()
- *
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_5call, 0, __pyx_n_s_CallbackThread_call, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1146, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_call, __pyx_t_1) < 0) __PYX_ERR(0, 1148, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1149
-+ /* "vidcutter/libs/pympv/mpv.pyx":1151
- * self.lock.release()
- *
- * def set(self, callback): # <<<<<<<<<<<<<<
- * self.callback = callback
- *
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_7set, 0, __pyx_n_s_CallbackThread_set, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1149, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_set, __pyx_t_1) < 0) __PYX_ERR(0, 1151, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1152
-+ /* "vidcutter/libs/pympv/mpv.pyx":1154
- * self.callback = callback
- *
- * def run(self): # <<<<<<<<<<<<<<
- * while not self.isshutdown:
- * self.lock.acquire(True)
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_9run, 0, __pyx_n_s_CallbackThread_run, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1152, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_run, __pyx_t_1) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1157
-+ /* "vidcutter/libs/pympv/mpv.pyx":1159
- * self.mpv_callback(self.callback) if self.callback else None
- *
- * def mpv_callback(self, callback): # <<<<<<<<<<<<<<
- * try:
- * callback()
- */
-- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9vidcutter_4libs_3mpv_14CallbackThread_11mpv_callback, 0, __pyx_n_s_CallbackThread_mpv_callback, NULL, __pyx_n_s_vidcutter_libs_mpv, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1157, __pyx_L1_error)
-+ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_mpv_callback, __pyx_t_1) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-- /* "vidcutter/libs/pympv/mpv.pyx":1132
-+ /* "vidcutter/libs/pympv/mpv.pyx":1134
- * init_params, *args, **kwargs)
- *
- * class CallbackThread(Thread): # <<<<<<<<<<<<<<
- * def __init__(self):
- * Thread.__init__(self)
- */
-- __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_CallbackThread, __pyx_t_6, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
-- if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1132, __pyx_L1_error)
-+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CallbackThread, __pyx_t_1) < 0) __PYX_ERR(0, 1134, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
diff --git a/vidcutter/libs/pympv/mpv.pyx b/vidcutter/libs/pympv/mpv.pyx
index 8af2dcc7..1decdda8 100644
--- a/vidcutter/libs/pympv/mpv.pyx
diff --git a/srcpkgs/vidcutter/template b/srcpkgs/vidcutter/template
index 93e6dbefaacc..6eddc1345ec1 100644
--- a/srcpkgs/vidcutter/template
+++ b/srcpkgs/vidcutter/template
@@ -11,9 +11,15 @@ short_desc="Video cutter and joiner based on FFmpeg"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/ozmartian/vidcutter"
-distfiles="https://github.com/ozmartian/vidcutter/archive/refs/tags/${version}.tar.gz"
-checksum=c6374eaedb845f9e580e555dd12c1db1cf2ffa28d3756b08e2ae28c1a4cd4a96
+# pympv isn't packaged because it will create a package conflicts with
+# python3-mpv
+distfiles="https://github.com/ozmartian/vidcutter/archive/refs/tags/${version}.tar.gz
+ https://github.com/marcan/pympv/archive/refs/tags/v0.7.1.tar.gz"
+checksum="c6374eaedb845f9e580e555dd12c1db1cf2ffa28d3756b08e2ae28c1a4cd4a96
+ 1d262e7fb2531d27633bdc2334fbc1c3ce094457a6a8f3cfc1c6c9799c1ef202"
-pre_build() {
- rm -f vidcutter/libs/pympv/mpv.c
+post_extract() {
+ mv vidcutter-*/* .
+ rm -rf vidcutter/libs/pympv
+ mv pympv-* vidcutter/libs/pympv
}
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Updated] mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (16 preceding siblings ...)
2022-11-14 15:12 ` [PR PATCH] [Updated] mpv-0.35.0 sgn
@ 2022-11-17 17:21 ` abenson
2022-11-23 15:34 ` [PR PATCH] [Merged]: mpv-0.35.0 sgn
2022-11-24 17:43 ` mpv-0.35.0 prez
19 siblings, 0 replies; 21+ messages in thread
From: abenson @ 2022-11-17 17:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
There is an updated pull request by abenson against master on the void-packages repository
https://github.com/abenson/void-packages mpv_0.35.0
https://github.com/void-linux/void-packages/pull/40497
mpv-0.35.0
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### Local build testing
- I built this PR locally for my native architecture, x86-64
[ci skip]
A patch file from https://github.com/void-linux/void-packages/pull/40497.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mpv_0.35.0-40497.patch --]
[-- Type: text/x-diff, Size: 30708 bytes --]
From 85983ca8e1a04658160769239599d4081315040b Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:06:05 -0600
Subject: [PATCH 1/8] mpv: update to 0.35.0.
---
common/shlibs | 2 +-
srcpkgs/mpv/template | 57 ++++++++++++++++++++++++--------------------
2 files changed, 32 insertions(+), 27 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 481250d5c924..aa1bbafb1bba 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2214,7 +2214,7 @@ librrd.so.8 rrdtool-1.6.0_1
librrd_th.so.4 rrdtool-1.4.9_1
libmosquitto.so.1 libmosquitto-1.6.3_5
libmosquittopp.so.1 libmosquittopp-1.6.3_5
-libmpv.so.1 mpv-0.8.0_2
+libmpv.so.2 mpv-0.35.0_1
libmbedtls.so.12 mbedtls-2.13.1_1
libmbedcrypto.so.3 mbedtls-2.9.0_1
libmbedx509.so.0 mbedtls-2.9.0_1
diff --git a/srcpkgs/mpv/template b/srcpkgs/mpv/template
index ded8c1bbe98f..0e3c3ed8f81c 100644
--- a/srcpkgs/mpv/template
+++ b/srcpkgs/mpv/template
@@ -1,15 +1,26 @@
# Template file for 'mpv'
pkgname=mpv
-version=0.34.1
-revision=2
-build_style=waf3
-configure_args="--confdir=/etc/mpv --docdir=/usr/share/examples/mpv
- --enable-cdda --enable-dvbin --enable-dvdnav --enable-libarchive
- --enable-libmpv-shared --enable-cplugins $(vopt_enable alsa) $(vopt_enable caca)
- $(vopt_enable jack) $(vopt_enable lcms lcms2) $(vopt_enable lua)
- $(vopt_enable openal) $(vopt_enable pulseaudio pulse) $(vopt_enable sdl2)
- $(vopt_enable vapoursynth) $(vopt_enable vdpau) $(vopt_enable vulkan)
- $(vopt_enable vulkan shaderc) $(vopt_enable wayland) $(vopt_enable x11)"
+version=0.35.0
+revision=1
+build_style=meson
+configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled
+ -Dlibmpv=true -Dcplugins=enabled
+ -Dalsa=$(vopt_if alsa enabled disabled)
+ -Dcaca=$(vopt_if caca enabled disabled)
+ -Djack=$(vopt_if jack enabled disabled)
+ -Dlcms2=$(vopt_if lcms enabled disabled)
+ -Dlua=$(vopt_if lua enabled disabled)
+ -Dopenal=$(vopt_if openal enabled disabled)
+ -Dpulse=$(vopt_if pulseaudio enabled disabled)
+ -Dsdl2=$(vopt_if sdl2 enabled disabled)
+ -Dvapoursynth=$(vopt_if vapoursynth enabled disabled)
+ -Dvdpau=$(vopt_if vdpau enabled disabled)
+ -Dvulkan=$(vopt_if vulkan enabled disabled)
+ -Dshaderc=$(vopt_if vulkan enabled disabled)
+ -Dwayland=$(vopt_if wayland enabled disabled)
+ -Dx11=$(vopt_if x11 enabled disabled)
+ -Dpipewire=$(vopt_if pipewire enabled disabled)
+ -Dsndio=$(vopt_if sndio enabled disabled)"
hostmakedepends="pkg-config python3-docutils $(vopt_if wayland wayland-devel)"
makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libass-devel libbluray-devel libcdio-paranoia-devel libdvdnav-devel
@@ -17,11 +28,12 @@ makedepends="MesaLib-devel ffmpeg-devel harfbuzz-devel libXv-devel
libarchive-devel $(vopt_if alsa alsa-lib-devel) $(vopt_if caca libcaca-devel)
$(vopt_if jack jack-devel) $(vopt_if lcms lcms2-devel)
$(vopt_if lua lua52-devel) $(vopt_if openal libopenal-devel)
- $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if sdl2 SDL2-devel)
- $(vopt_if vapoursynth vapoursynth-devel) $(vopt_if vdpau libvdpau-devel)
+ $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if pipewire pipewire-devel)
+ $(vopt_if sdl2 SDL2-devel) $(vopt_if vapoursynth vapoursynth-devel)
+ $(vopt_if vdpau libvdpau-devel) $(vopt_if sndio sndio-devel)
$(vopt_if vulkan "Vulkan-Headers vulkan-loader shaderc libplacebo-devel")
$(vopt_if wayland "wayland-devel wayland-protocols libxkbcommon-devel")
- $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel")"
+ $(vopt_if x11 "libXScrnSaver-devel libXinerama-devel libXrandr-devel libXpresent-devel")"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Video player based on MPlayer/mplayer2"
maintainer="travankor <travankor@tuta.io>"
@@ -29,30 +41,23 @@ license="GPL-2.0-or-later"
homepage="https://mpv.io"
changelog="https://github.com/mpv-player/mpv/releases"
distfiles="https://github.com/mpv-player/${pkgname}/archive/v${version}.tar.gz"
-checksum=32ded8c13b6398310fa27767378193dc1db6d78b006b70dbcbd3123a1445e746
+checksum=dc411c899a64548250c142bf1fa1aa7528f1b4398a24c86b816093999049ec00
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
-build_options="alsa caca jack lcms lua openal pulseaudio sdl2 vapoursynth vdpau
- vulkan wayland x11"
-build_options_default="alsa jack lcms lua pulseaudio vdpau vulkan wayland x11"
+build_options="alsa caca jack lcms lua openal pulseaudio pipewire sdl2
+ sndio vapoursynth vdpau vulkan wayland x11"
+build_options_default="alsa jack lcms lua pulseaudio pipewire vdpau vulkan
+ sndio wayland x11"
desc_option_caca="Enable support for libcaca video output"
desc_option_lcms="Enable support for LittleCMS 2 engine"
desc_option_openal="Enable support for OpenAL audio output"
vopt_conflict sdl2 wayland
-if [ -z "$CROSS_BUILD" ]; then
- configure_args+=" --zshdir=/usr/share/zsh/site-functions"
-fi
-
-pre_configure() {
- python3 bootstrap.py
-}
-
mpv-devel_package() {
- depends="${sourcepkg}>=${version}_${revision}"
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
From 204fe84127ae3f05fc4d8b14a1521f41d5207153 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 2/8] celluloid: rebuild for mpv-0.35.0
---
srcpkgs/celluloid/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/celluloid/template b/srcpkgs/celluloid/template
index 739911562045..904fe4f631c0 100644
--- a/srcpkgs/celluloid/template
+++ b/srcpkgs/celluloid/template
@@ -1,7 +1,7 @@
# Template file for 'celluloid'
pkgname=celluloid
version=0.23
-revision=1
+revision=2
build_style=meson
hostmakedepends="gettext glib-devel pkg-config"
makedepends="gtk4-devel libepoxy-devel libglib-devel mpv-devel"
From ef732e6b0565624422c33aef59547fb743d41b35 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 3/8] minitube: rebuild for mpv-0.35.0
---
srcpkgs/minitube/patches/mpv-0.35.patch | 14 ++++++++++++++
srcpkgs/minitube/template | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/minitube/patches/mpv-0.35.patch
diff --git a/srcpkgs/minitube/patches/mpv-0.35.patch b/srcpkgs/minitube/patches/mpv-0.35.patch
new file mode 100644
index 000000000000..db13f9058f7f
--- /dev/null
+++ b/srcpkgs/minitube/patches/mpv-0.35.patch
@@ -0,0 +1,14 @@
+https://github.com/mpv-player/mpv/commit/632059816adde518c67f6606e3cfdef5bec18b52
+Index: minitube-3.9.3/lib/media/src/mpv/mpvwidget.cpp
+===================================================================
+--- minitube-3.9.3.orig/lib/media/src/mpv/mpvwidget.cpp
++++ minitube-3.9.3/lib/media/src/mpv/mpvwidget.cpp
+@@ -30,7 +30,7 @@ void MpvWidget::initializeGL() {
+ qDebug() << "initializeGL" << nativeParent;
+ if (nativeParent == nullptr) qFatal("No native parent");
+
+- mpv_opengl_init_params gl_init_params{get_proc_address, this, nullptr};
++ mpv_opengl_init_params gl_init_params{get_proc_address, this};
+ mpv_render_param params[]{{MPV_RENDER_PARAM_API_TYPE, (void *)MPV_RENDER_API_TYPE_OPENGL},
+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
+ {MPV_RENDER_PARAM_INVALID, nullptr},
diff --git a/srcpkgs/minitube/template b/srcpkgs/minitube/template
index 915458a43a6a..b4b50c0f9694 100644
--- a/srcpkgs/minitube/template
+++ b/srcpkgs/minitube/template
@@ -1,7 +1,7 @@
# Template file for 'minitube'
pkgname=minitube
version=3.9.3
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-tools qt5-host-tools qt5-qmake git"
makedepends="qt5-devel phonon-qt5-devel qt5-script-devel qt5-declarative-devel
From 951818f3887589475241f394cef99a82a16ddeeb Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:14 -0600
Subject: [PATCH 4/8] mpc-qt: update to 22.02.
---
srcpkgs/mpc-qt/template | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/srcpkgs/mpc-qt/template b/srcpkgs/mpc-qt/template
index 3e60cb06c896..7a7ae6f6cf96 100644
--- a/srcpkgs/mpc-qt/template
+++ b/srcpkgs/mpc-qt/template
@@ -1,6 +1,6 @@
# Template file for 'mpc-qt'
pkgname=mpc-qt
-version=18.08
+version=22.02
revision=1
build_style=qmake
configure_args="MPCQT_VERSION=${version}"
@@ -9,16 +9,6 @@ makedepends="qt5-devel qt5-x11extras-devel mpv-devel"
short_desc="Clone of Media Player Classic reimplemented in Qt"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="GPL-2.0-or-later"
-homepage="https://github.com/cmdrkotori/mpc-qt"
-#distfiles="${homepage}/archive/v${version}.tar.gz"
-# https://github.com/mpv-player/mpv/commit/575197ff8b0a0d8cd14f7ee78461c1d61d045d72
-distfiles="https://sources.voidlinux.org/mpc-qt-18.08/v18.08.tar.gz
- https://raw.githubusercontent.com/mpv-player/mpv/2337fa4e0213993398d36cb3222633766d677dfd/libmpv/qthelper.hpp"
-checksum="c58fd90926773c9da8bdfc1a8e4dba0b95cbc58cee6db9981e8de94fd9534406
- 86e1fcba6001829b7e23a856db84d01ebc76e63528f74064d7bc5705015a2684"
-skip_extraction="qthelper.hpp"
-
-post_extract() {
- mkdir -p mpv
- cp $XBPS_SRCDISTDIR/mpc-qt-$version/qthelper.hpp mpv/
-}
+homepage="https://mpc-qt.github.io/"
+distfiles="https://github.com/mpc-qt/mpc-qt/archive/refs/tags/v${version}.tar.gz"
+checksum=fa6cffd6bde1304b6c0ec3aba8e98d03f4d73999fee4e4546026ec159530350d
From 6f9085568c75b003f86e164fee0129ac8cb54931 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 5/8] [TODO] orion: rebuild for mpv-0.35.0
---
srcpkgs/orion/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/orion/template b/srcpkgs/orion/template
index d69f2ff04dd4..b1f2215b1d43 100644
--- a/srcpkgs/orion/template
+++ b/srcpkgs/orion/template
@@ -1,7 +1,7 @@
# Template file for 'orion'
pkgname=orion
version=1.6.7
-revision=1
+revision=2
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-declarative-devel qt5-quickcontrols2-devel mpv-devel"
From 946ac44c785ce0a7796bd802ebc76d991282c30c Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 6/8] qimgv: rebuild for mpv-0.35.0
---
srcpkgs/qimgv/patches/fix-mpv-opengl.patch | 11 +++++++++++
srcpkgs/qimgv/template | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/qimgv/patches/fix-mpv-opengl.patch
diff --git a/srcpkgs/qimgv/patches/fix-mpv-opengl.patch b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
new file mode 100644
index 000000000000..9fd3dffe9f96
--- /dev/null
+++ b/srcpkgs/qimgv/patches/fix-mpv-opengl.patch
@@ -0,0 +1,11 @@
+--- a/plugins/player_mpv/src/mpvwidget.cpp
++++ b/plugins/player_mpv/src/mpvwidget.cpp
+@@ -69,7 +69,7 @@
+ }
+
+ void MpvWidget::initializeGL() {
+- mpv_opengl_init_params gl_init_params{get_proc_address, nullptr, nullptr};
++ mpv_opengl_init_params gl_init_params{get_proc_address, nullptr};
+ mpv_render_param params[]{
+ {MPV_RENDER_PARAM_API_TYPE, const_cast<char *>(MPV_RENDER_API_TYPE_OPENGL)},
+ {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
diff --git a/srcpkgs/qimgv/template b/srcpkgs/qimgv/template
index bb91ee98eab7..7eb30db33992 100644
--- a/srcpkgs/qimgv/template
+++ b/srcpkgs/qimgv/template
@@ -1,7 +1,7 @@
# Template file for 'qimgv'
pkgname=qimgv
version=1.0.2
-revision=1
+revision=2
build_style=cmake
configure_args="$(vopt_if video -DVIDEO_SUPPORT=ON -DVIDEO_SUPPORT=OFF)
$(vopt_if scale -DOPENCV_SUPPORT=ON -DOPENCV_SUPPORT=OFF)
From 2821ce720df01e44dde1922b74a840a2bf8d21a5 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sat, 12 Nov 2022 16:04:15 -0600
Subject: [PATCH 7/8] vidcutter: update to 6.0.5.1.
---
srcpkgs/vidcutter/patches/mpv-0.35-1.patch | 387 +++++++++++++++++++++
srcpkgs/vidcutter/patches/mpv-0.35-2.patch | 24 ++
srcpkgs/vidcutter/patches/mpv-0.35-3.patch | 29 ++
srcpkgs/vidcutter/template | 18 +-
4 files changed, 452 insertions(+), 6 deletions(-)
create mode 100644 srcpkgs/vidcutter/patches/mpv-0.35-1.patch
create mode 100644 srcpkgs/vidcutter/patches/mpv-0.35-2.patch
create mode 100644 srcpkgs/vidcutter/patches/mpv-0.35-3.patch
diff --git a/srcpkgs/vidcutter/patches/mpv-0.35-1.patch b/srcpkgs/vidcutter/patches/mpv-0.35-1.patch
new file mode 100644
index 000000000000..759b787f7a69
--- /dev/null
+++ b/srcpkgs/vidcutter/patches/mpv-0.35-1.patch
@@ -0,0 +1,387 @@
+https://github.com/ozmartian/vidcutter/commit/1d88825feb5a73a50d019914ba9d0008562a58ce.patch
+
+From 1d88825feb5a73a50d019914ba9d0008562a58ce Mon Sep 17 00:00:00 2001
+From: Pete Alexandrou <pete@ozmartians.com>
+Date: Tue, 22 Feb 2022 11:29:00 +1100
+Subject: [PATCH] Patches to pympv to workaround opengl_cb deprecation from
+ libmpv
+
+---
+ vidcutter/libs/pympv/client.pxd | 54 +-
+ vidcutter/libs/pympv/mpv.pyx | 192 +-
+ 3 files changed, 21832 insertions(+), 24808 deletions(-)
+
+diff --git a/vidcutter/libs/pympv/client.pxd b/vidcutter/libs/pympv/client.pxd
+index befe219e..d9a8816f 100644
+--- a/vidcutter/libs/pympv/client.pxd
++++ b/vidcutter/libs/pympv/client.pxd
+@@ -112,9 +112,9 @@ cdef extern from "mpv/client.h":
+
+ int mpv_load_config_file(mpv_handle *ctx, const char *filename) nogil
+
+- void mpv_suspend(mpv_handle *ctx) nogil
++ # void mpv_suspend(mpv_handle *ctx) nogil
+
+- void mpv_resume(mpv_handle *ctx) nogil
++ # void mpv_resume(mpv_handle *ctx) nogil
+
+ int64_t mpv_get_time_us(mpv_handle *ctx) nogil
+
+@@ -200,21 +200,21 @@ cdef extern from "mpv/client.h":
+ MPV_EVENT_START_FILE
+ MPV_EVENT_END_FILE
+ MPV_EVENT_FILE_LOADED
+- MPV_EVENT_TRACKS_CHANGED
+- MPV_EVENT_TRACK_SWITCHED
++ # MPV_EVENT_TRACKS_CHANGED
++ # MPV_EVENT_TRACK_SWITCHED
+ MPV_EVENT_IDLE
+- MPV_EVENT_PAUSE
+- MPV_EVENT_UNPAUSE
++ # MPV_EVENT_PAUSE
++ # MPV_EVENT_UNPAUSE
+ MPV_EVENT_TICK
+- MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ # MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ MPV_EVENT_CLIENT_MESSAGE
+ MPV_EVENT_VIDEO_RECONFIG
+ MPV_EVENT_AUDIO_RECONFIG
+- MPV_EVENT_METADATA_UPDATE
++ # MPV_EVENT_METADATA_UPDATE
+ MPV_EVENT_SEEK
+ MPV_EVENT_PLAYBACK_RESTART
+ MPV_EVENT_PROPERTY_CHANGE
+- MPV_EVENT_CHAPTER_CHANGE
++ # MPV_EVENT_CHAPTER_CHANGE
+
+ const char *mpv_event_name(mpv_event_id event) nogil
+
+@@ -249,9 +249,9 @@ cdef extern from "mpv/client.h":
+ int reason
+ int error
+
+- cdef struct mpv_event_script_input_dispatch:
+- int arg0
+- const char *type
++ # cdef struct mpv_event_script_input_dispatch:
++ # int arg0
++ # const char *type
+
+ cdef struct mpv_event_client_message:
+ int num_args
+@@ -282,27 +282,27 @@ cdef extern from "mpv/client.h":
+
+ void *mpv_get_sub_api(mpv_handle *ctx, mpv_sub_api sub_api) nogil
+
+-cdef extern from "mpv/opengl_cb.h":
+- struct mpv_opengl_cb_context:
+- pass
++# cdef extern from "mpv/opengl_cb.h":
++# struct mpv_opengl_cb_context:
++# pass
+
+- ctypedef void (*mpv_opengl_cb_update_fn)(void *cb_ctx) nogil
+- ctypedef void *(*mpv_opengl_cb_get_proc_address_fn)(void *fn_ctx,
+- const char *name) nogil
++# ctypedef void (*mpv_opengl_cb_update_fn)(void *cb_ctx) nogil
++# ctypedef void *(*mpv_opengl_cb_get_proc_address_fn)(void *fn_ctx,
++# const char *name) nogil
+
+- void mpv_opengl_cb_set_update_callback(mpv_opengl_cb_context *ctx,
+- mpv_opengl_cb_update_fn callback,
+- void *callback_ctx) nogil
++# void mpv_opengl_cb_set_update_callback(mpv_opengl_cb_context *ctx,
++# mpv_opengl_cb_update_fn callback,
++# void *callback_ctx) nogil
+
+- int mpv_opengl_cb_init_gl(mpv_opengl_cb_context *ctx, const char *exts,
+- mpv_opengl_cb_get_proc_address_fn get_proc_address,
+- void *get_proc_address_ctx) nogil
++# int mpv_opengl_cb_init_gl(mpv_opengl_cb_context *ctx, const char *exts,
++# mpv_opengl_cb_get_proc_address_fn get_proc_address,
++# void *get_proc_address_ctx) nogil
+
+- int mpv_opengl_cb_draw(mpv_opengl_cb_context *ctx, int fbo, int w, int h) nogil
++# int mpv_opengl_cb_draw(mpv_opengl_cb_context *ctx, int fbo, int w, int h) nogil
+
+- int mpv_opengl_cb_report_flip(mpv_opengl_cb_context *ctx, int64_t time) nogil
++# int mpv_opengl_cb_report_flip(mpv_opengl_cb_context *ctx, int64_t time) nogil
+
+- int mpv_opengl_cb_uninit_gl(mpv_opengl_cb_context *ctx) nogil
++# int mpv_opengl_cb_uninit_gl(mpv_opengl_cb_context *ctx) nogil
+
+
+ cdef extern from "mpv/render.h":
+diff --git a/vidcutter/libs/pympv/mpv.pyx b/vidcutter/libs/pympv/mpv.pyx
+index 540ea649..8af2dcc7 100644
+--- a/vidcutter/libs/pympv/mpv.pyx
++++ b/vidcutter/libs/pympv/mpv.pyx
+@@ -30,8 +30,8 @@ from client cimport *
+ __version__ = "0.3.0"
+ __author__ = "Andre D"
+
+-_REQUIRED_CAPI_MAJOR = 1
+-_MIN_CAPI_MINOR = 9
++_REQUIRED_CAPI_MAJOR = 2
++_MIN_CAPI_MINOR = 0
+
+ cdef unsigned long _CAPI_VERSION
+ with nogil:
+@@ -47,7 +47,7 @@ if _CAPI_MAJOR != _REQUIRED_CAPI_MAJOR or _CAPI_MINOR < _MIN_CAPI_MINOR:
+ )
+
+ cdef extern from "Python.h":
+- void PyEval_InitThreads()
++ void Py_Initialize()
+
+ _is_py3 = sys.version_info >= (3,)
+ _strdec_err = "surrogateescape" if _is_py3 else "strict"
+@@ -67,7 +67,7 @@ def _strenc(s):
+ # In python2, assume bytes and walk right through
+ return s
+
+-PyEval_InitThreads()
++Py_Initialize()
+
+ class Errors:
+ """Set of known error codes from MpvError and Event responses.
+@@ -114,21 +114,21 @@ class Events:
+ start_file = MPV_EVENT_START_FILE
+ end_file = MPV_EVENT_END_FILE
+ file_loaded = MPV_EVENT_FILE_LOADED
+- tracks_changed = MPV_EVENT_TRACKS_CHANGED
+- tracks_switched = MPV_EVENT_TRACK_SWITCHED
++ # tracks_changed = MPV_EVENT_TRACKS_CHANGED
++ # tracks_switched = MPV_EVENT_TRACK_SWITCHED
+ idle = MPV_EVENT_IDLE
+- pause = MPV_EVENT_PAUSE
+- unpause = MPV_EVENT_UNPAUSE
++ # pause = MPV_EVENT_PAUSE
++ # unpause = MPV_EVENT_UNPAUSE
+ tick = MPV_EVENT_TICK
+- script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
++ # script_input_dispatch = MPV_EVENT_SCRIPT_INPUT_DISPATCH
+ client_message = MPV_EVENT_CLIENT_MESSAGE
+ video_reconfig = MPV_EVENT_VIDEO_RECONFIG
+ audio_reconfig = MPV_EVENT_AUDIO_RECONFIG
+- metadata_update = MPV_EVENT_METADATA_UPDATE
++ # metadata_update = MPV_EVENT_METADATA_UPDATE
+ seek = MPV_EVENT_SEEK
+ playback_restart = MPV_EVENT_PLAYBACK_RESTART
+ property_change = MPV_EVENT_PROPERTY_CHANGE
+- chapter_change = MPV_EVENT_CHAPTER_CHANGE
++ # chapter_change = MPV_EVENT_CHAPTER_CHANGE
+
+
+ class LogLevels:
+@@ -166,17 +166,17 @@ cdef class EndOfFileReached(object):
+ return self
+
+
+-cdef class InputDispatch(object):
+- """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
++# cdef class InputDispatch(object):
++# """Data field for MPV_EVENT_SCRIPT_INPUT_DISPATCH events.
+
+- Wraps: mpv_event_script_input_dispatch
+- """
+- cdef public object arg0, type
++# Wraps: mpv_event_script_input_dispatch
++# """
++# cdef public object arg0, type
+
+- cdef _init(self, mpv_event_script_input_dispatch* input):
+- self.arg0 = input.arg0
+- self.type = _strdec(input.type)
+- return self
++# cdef _init(self, mpv_event_script_input_dispatch* input):
++# self.arg0 = input.arg0
++# self.type = _strdec(input.type)
++# return self
+
+
+ cdef class LogMessage(object):
+@@ -276,8 +276,8 @@ cdef class Event(object):
+ return Property()._init(<mpv_event_property*>data)
+ elif self.id == MPV_EVENT_LOG_MESSAGE:
+ return LogMessage()._init(<mpv_event_log_message*>data)
+- elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
+- return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
++ # elif self.id == MPV_EVENT_SCRIPT_INPUT_DISPATCH:
++ # return InputDispatch()._init(<mpv_event_script_input_dispatch*>data)
+ elif self.id == MPV_EVENT_CLIENT_MESSAGE:
+ climsg = <mpv_event_client_message*>data
+ args = []
+@@ -396,17 +396,17 @@ cdef class Context(object):
+ time = mpv_get_time_us(self._ctx)
+ return time
+
+- def suspend(self):
+- """Wraps: mpv_suspend"""
+- assert self._ctx
+- with nogil:
+- mpv_suspend(self._ctx)
++ # def suspend(self):
++ # """Wraps: mpv_suspend"""
++ # assert self._ctx
++ # with nogil:
++ # mpv_suspend(self._ctx)
+
+- def resume(self):
+- """Wraps: mpv_resume"""
+- assert self._ctx
+- with nogil:
+- mpv_resume(self._ctx)
++ # def resume(self):
++ # """Wraps: mpv_resume"""
++ # assert self._ctx
++ # with nogil:
++ # mpv_resume(self._ctx)
+
+ @_errors
+ def request_event(self, event, enable):
+@@ -798,17 +798,17 @@ cdef class Context(object):
+ self.reply_userdata = None
+ self._ctx = NULL
+
+- def opengl_cb_api(self):
+- cdef void *cb
++ # def opengl_cb_api(self):
++ # cdef void *cb
+
+- _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
+- if not _ctx:
+- raise MPVError("OpenGL API not available")
++ # _ctx = mpv_get_sub_api(self._ctx, MPV_SUB_API_OPENGL_CB)
++ # if not _ctx:
++ # raise MPVError("OpenGL API not available")
+
+- ctx = OpenGLContext()
+- ctx._ctx = <mpv_opengl_cb_context*>_ctx
++ # ctx = OpenGLContext()
++ # ctx._ctx = <mpv_opengl_cb_context*>_ctx
+
+- return ctx
++ # return ctx
+
+ def __dealloc__(self):
+ self.shutdown()
+@@ -819,62 +819,62 @@ cdef void *_c_getprocaddress(void *ctx, const char *name) with gil:
+ cdef void _c_updatecb(void *ctx) with gil:
+ (<object>ctx)()
+
+-cdef class OpenGLContext(object):
+- cdef:
+- mpv_opengl_cb_context *_ctx
+- bint inited
+- object update_cb
+-
+- def __init__(self):
+- self.inited = False
+- warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
+-
+- def init_gl(self, exts, get_proc_address):
+- exts = _strenc(exts) if exts is not None else None
+- cdef char* extsc = NULL
+- if exts is not None:
+- extsc = exts
+- with nogil:
+- err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
+- <void *>get_proc_address)
+- if err < 0:
+- raise MPVError(err)
+-
+- self.inited = True
+-
+- def set_update_callback(self, cb):
+- self.update_cb = cb
+- with nogil:
+- mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
+-
+- def draw(self, fbo, w, h):
+- cdef:
+- int fboc = fbo
+- int wc = w
+- int hc = h
+- with nogil:
+- err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
+- if err < 0:
+- raise MPVError(err)
+-
+- def report_flip(self, time):
+- cdef int64_t ctime = time
+- with nogil:
+- err = mpv_opengl_cb_report_flip(self._ctx, ctime)
+- if err < 0:
+- raise MPVError(err)
+-
+- def uninit_gl(self):
+- if not self.inited:
+- return
+- with nogil:
+- err = mpv_opengl_cb_uninit_gl(self._ctx)
+- if err < 0:
+- raise MPVError(err)
+- self.inited = False
+-
+- def __dealloc__(self):
+- self.uninit_gl()
++# cdef class OpenGLContext(object):
++# cdef:
++# mpv_opengl_cb_context *_ctx
++# bint inited
++# object update_cb
++
++# def __init__(self):
++# self.inited = False
++# warnings.warn("OpenGLContext is deprecated, please switch to RenderContext", DeprecationWarning)
++
++# def init_gl(self, exts, get_proc_address):
++# exts = _strenc(exts) if exts is not None else None
++# cdef char* extsc = NULL
++# if exts is not None:
++# extsc = exts
++# with nogil:
++# err = mpv_opengl_cb_init_gl(self._ctx, extsc, &_c_getprocaddress,
++# <void *>get_proc_address)
++# if err < 0:
++# raise MPVError(err)
++
++# self.inited = True
++
++# def set_update_callback(self, cb):
++# self.update_cb = cb
++# with nogil:
++# mpv_opengl_cb_set_update_callback(self._ctx, &_c_updatecb, <void *>cb)
++
++# def draw(self, fbo, w, h):
++# cdef:
++# int fboc = fbo
++# int wc = w
++# int hc = h
++# with nogil:
++# err = mpv_opengl_cb_draw(self._ctx, fboc, wc, hc)
++# if err < 0:
++# raise MPVError(err)
++
++# def report_flip(self, time):
++# cdef int64_t ctime = time
++# with nogil:
++# err = mpv_opengl_cb_report_flip(self._ctx, ctime)
++# if err < 0:
++# raise MPVError(err)
++
++# def uninit_gl(self):
++# if not self.inited:
++# return
++# with nogil:
++# err = mpv_opengl_cb_uninit_gl(self._ctx)
++# if err < 0:
++# raise MPVError(err)
++# self.inited = False
++
++# def __dealloc__(self):
++# self.uninit_gl()
+
+ DEF MAX_RENDER_PARAMS = 32
+
diff --git a/srcpkgs/vidcutter/patches/mpv-0.35-2.patch b/srcpkgs/vidcutter/patches/mpv-0.35-2.patch
new file mode 100644
index 000000000000..c982ded8475a
--- /dev/null
+++ b/srcpkgs/vidcutter/patches/mpv-0.35-2.patch
@@ -0,0 +1,24 @@
+https://github.com/ozmartian/vidcutter/commit/8010f5c64efe68d8130a036f976d2d2ff1c868ad.patch
+
+From 8010f5c64efe68d8130a036f976d2d2ff1c868ad Mon Sep 17 00:00:00 2001
+From: Pete Alexandrou <pete@ozmartians.com>
+Date: Tue, 22 Feb 2022 16:08:24 +1100
+Subject: [PATCH] fix libmpv version number format
+
+---
+ vidcutter/libs/mpvwidget.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vidcutter/libs/mpvwidget.py b/vidcutter/libs/mpvwidget.py
+index 239b6c9c..6661ad85 100644
+--- a/vidcutter/libs/mpvwidget.py
++++ b/vidcutter/libs/mpvwidget.py
+@@ -247,7 +247,7 @@ def format(self, stream: str='video') -> str:
+
+ def version(self) -> str:
+ ver = self.mpv.api_version
+- return '{0}.{1}'.format(ver[0], ver[1])
++ return '{0}.{1}'.format(ver[1], ver[0])
+
+ def option(self, option: str, val):
+ if isinstance(val, bool):
diff --git a/srcpkgs/vidcutter/patches/mpv-0.35-3.patch b/srcpkgs/vidcutter/patches/mpv-0.35-3.patch
new file mode 100644
index 000000000000..d1f5f1364c62
--- /dev/null
+++ b/srcpkgs/vidcutter/patches/mpv-0.35-3.patch
@@ -0,0 +1,29 @@
+https://github.com/ozmartian/vidcutter/commit/4cf1458d832e6ac7a824d7963c6dc3a0e5c17574.patch
+
+From 4cf1458d832e6ac7a824d7963c6dc3a0e5c17574 Mon Sep 17 00:00:00 2001
+From: Pete Alexandrou <pete@ozmartians.com>
+Date: Sat, 30 Apr 2022 15:49:17 +1000
+Subject: [PATCH] pympv updates
+
+---
+ vidcutter/libs/pympv/mpv.c | 3792 +++++++++++++++++-----------------
+ vidcutter/libs/pympv/mpv.pyx | 6 +-
+ 2 files changed, 1900 insertions(+), 1898 deletions(-)
+
+diff --git a/vidcutter/libs/pympv/mpv.pyx b/vidcutter/libs/pympv/mpv.pyx
+index 8af2dcc7..1decdda8 100644
+--- a/vidcutter/libs/pympv/mpv.pyx
++++ b/vidcutter/libs/pympv/mpv.pyx
+@@ -30,8 +30,10 @@ from client cimport *
+ __version__ = "0.3.0"
+ __author__ = "Andre D"
+
+-_REQUIRED_CAPI_MAJOR = 2
+-_MIN_CAPI_MINOR = 0
++#_REQUIRED_CAPI_MAJOR = 2
++#_MIN_CAPI_MINOR = 0
++_REQUIRED_CAPI_MAJOR = 1
++_MIN_CAPI_MINOR = 109
+
+ cdef unsigned long _CAPI_VERSION
+ with nogil:
diff --git a/srcpkgs/vidcutter/template b/srcpkgs/vidcutter/template
index 07bda50c917c..6eddc1345ec1 100644
--- a/srcpkgs/vidcutter/template
+++ b/srcpkgs/vidcutter/template
@@ -1,7 +1,7 @@
# Template file for 'vidcutter'
pkgname=vidcutter
-version=6.0.0
-revision=6
+version=6.0.5.1
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools python3-Cython"
makedepends="mpv-devel python3-devel"
@@ -11,9 +11,15 @@ short_desc="Video cutter and joiner based on FFmpeg"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/ozmartian/vidcutter"
-distfiles="https://github.com/ozmartian/vidcutter/archive/refs/tags/${version}.tar.gz"
-checksum=c09be7eceaf42ff7211fe3b8125279c4fec7f7d251d272b61d579e426bd4e2c2
+# pympv isn't packaged because it will create a package conflicts with
+# python3-mpv
+distfiles="https://github.com/ozmartian/vidcutter/archive/refs/tags/${version}.tar.gz
+ https://github.com/marcan/pympv/archive/refs/tags/v0.7.1.tar.gz"
+checksum="c6374eaedb845f9e580e555dd12c1db1cf2ffa28d3756b08e2ae28c1a4cd4a96
+ 1d262e7fb2531d27633bdc2334fbc1c3ce094457a6a8f3cfc1c6c9799c1ef202"
-pre_build() {
- rm -f vidcutter/libs/pympv/mpv.c
+post_extract() {
+ mv vidcutter-*/* .
+ rm -rf vidcutter/libs/pympv
+ mv pympv-* vidcutter/libs/pympv
}
From a4a7c91349e24d5149813e305e225aee4a2d5243 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Mon, 14 Nov 2022 08:08:31 -0600
Subject: [PATCH 8/8] stremio-shell: rebuild for mpv-0.35.0
---
srcpkgs/stremio-shell/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/stremio-shell/template b/srcpkgs/stremio-shell/template
index 641000d6fe64..2b0c0b23af69 100644
--- a/srcpkgs/stremio-shell/template
+++ b/srcpkgs/stremio-shell/template
@@ -1,7 +1,7 @@
# Template file for 'stremio-shell'
pkgname=stremio-shell
version=4.4.159
-revision=2
+revision=3
_singleapplication_hash=f1e15081dc57a9c03f7f4f165677f18802e1437a
_libmpv_hash=822a41a1087daf2911fc336fbd9509f962158fef
create_wrksrc=yes
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PR PATCH] [Merged]: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (17 preceding siblings ...)
2022-11-17 17:21 ` abenson
@ 2022-11-23 15:34 ` sgn
2022-11-24 17:43 ` mpv-0.35.0 prez
19 siblings, 0 replies; 21+ messages in thread
From: sgn @ 2022-11-23 15:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 319 bytes --]
There's a merged pull request on the void-packages repository
mpv-0.35.0
https://github.com/void-linux/void-packages/pull/40497
Description:
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### Local build testing
- I built this PR locally for my native architecture, x86-64
[ci skip]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: mpv-0.35.0
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
` (18 preceding siblings ...)
2022-11-23 15:34 ` [PR PATCH] [Merged]: mpv-0.35.0 sgn
@ 2022-11-24 17:43 ` prez
19 siblings, 0 replies; 21+ messages in thread
From: prez @ 2022-11-24 17:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
New comment by prez on void-packages repository
https://github.com/void-linux/void-packages/pull/40497#issuecomment-1326730661
Comment:
A little late since this is now merged, but it seems like you didn't enable the new `gpu-next` build option?
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2022-11-24 17:43 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-12 22:07 [PR PATCH] mpv-0.35.0 abenson
2022-11-13 0:04 ` mpv-0.35.0 38github
2022-11-13 1:39 ` mpv-0.35.0 travankor
2022-11-13 11:08 ` mpv-0.35.0 hazen2215
2022-11-13 14:35 ` mpv-0.35.0 q66
2022-11-14 2:29 ` mpv-0.35.0 abenson
2022-11-14 2:39 ` [PR PATCH] [Updated] mpv-0.35.0 abenson
2022-11-14 12:44 ` sgn
2022-11-14 12:44 ` mpv-0.35.0 sgn
2022-11-14 13:08 ` mpv-0.35.0 sgn
2022-11-14 13:08 ` mpv-0.35.0 sgn
2022-11-14 13:09 ` mpv-0.35.0 sgn
2022-11-14 14:10 ` [PR PATCH] [Updated] mpv-0.35.0 abenson
2022-11-14 14:11 ` mpv-0.35.0 abenson
2022-11-14 14:12 ` mpv-0.35.0 abenson
2022-11-14 14:18 ` [PR PATCH] [Updated] mpv-0.35.0 abenson
2022-11-14 14:54 ` mpv-0.35.0 sgn
2022-11-14 15:12 ` [PR PATCH] [Updated] mpv-0.35.0 sgn
2022-11-17 17:21 ` abenson
2022-11-23 15:34 ` [PR PATCH] [Merged]: mpv-0.35.0 sgn
2022-11-24 17:43 ` mpv-0.35.0 prez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).