Re: $BF0$-$^$;$s(B multimedia/hypnotix

From: bluesky <xlsvx_at_yahoo.co.jp>
Date: Sun, 02 Jun 2024 05:27:25 UTC
$BX)B<$G$9!#(B

$B@DLZ(B@$BL>8E20$5$s!"$4=u8@$r$"$j$,$H$&$4$6$$$^$9!#(B

> FreshPorts$B$G%G%U%)%k%H$N0MB84X78$r8+$k8B$j!"(Bsmplayer$B$b:F@8<+BN$K$O(B
> mpv$B$r;H$C$F$$$k$N$OF1$8$G$9$7!":G=i$N%a!<%k$N%(%i!<%a%C%;!<%8$N(B
> Traceback$B$G%3%1$F$$$k$H$3$m$,(Bmpv_detach_destroy$B$H$$$&%7%s%\%k$,(B
> $BDj5A$5$l$F$$$J$$$H$$$&$b$N$J$N$G!"62$i$/(Bmpv$B$r8F$S=P$=$&$H$7$F(B
> $B<:GT$7$?8e=hM}$G%/%i%C%7%e$7$F$$$k$/$5$$$G$9$M!#(B

mpv.py $B$H$$$&%U%!%$%k$KBP$9$kJQ99$r(B diffutils $B$GC5$C$F$_$^$7$?!#(B
pkg $B$N%P%$%J%j$r<g$KMxMQ$7$F$$$^$9!#(BFreeBSD-3.3-p2 (amd64) $B$G$9!#(B

hypnotics $B$N%=!<%9$O(B github $B$G3+H/$5$l$F$$$k$h$&$G!"(B git clone $B$G(B
$BF~<j$G$-$k$N$G$9$,!"(BLinuxMint $B$N%5%$%H$G$bG[I[$5$l$F$$$k$h$&$G$9!#(B

https://github.com/linuxmint/hypnotix
http://packages.linuxmint.com/search.php?release=any&section=any&keyword=hypnotix

$B$G!"(BLinuxMint $B$N(B .deb $B%U%!%$%k$rF~<j$7!"(B2.9 $B$H(B 3.2 $B$N:9J,$r<h$j!"(B
$B2CI.$V$s$r(B mpv.py $B$KE,MQ$7$?$i!"(B FreeBSD $B$N(B hypnotix -2.9 $B$O(B
$B5/F0$9$k$h$&$K$J$j$^$7$?!#<B9T%U%!%$%k(B = python $B$N%9%/%j%W%H$G:n6H(B
$B$7$?(B ($B:n6H$7$F$7$^$C$?(B) $B7k2L$G$9!#(B
( /usr/local/lib/hypnotix/mpv.py )
FreeBSD ports $B$N%9%1%k%H%s$KBP$9$k2~JQ$OL$<B9T$G$9!#(B

hypnotix $B$,;HMQ$9$k(B Free-TV $B$J$k(B IPTV $B$G$9$,!"(Bhypnotix $B$N(B
$B%5%$%H$G$O!"(B"legal" ($B9gK!E*(B) $B$H8+$F$$$k;]!"=q$+$l$F$$$k$N$G$9$,!"(B
$BF|K\9qFb$N(B TV $B$K4X$9$kK!N'(B ($BJ|AwK!!"Cx:n8"K!$J$I(B) $B$G$I$&$J$k$N$+!"$O$C$-$j(B
$BM}2r$G$-$J$$>u67$G$O$J$$$G$7$g$&$+!#(B
( $BA0=P(B: https://github.com/linuxmint/hypnotix)

$B;2>H(B: $B%$%s%?!<%M%C%H%5%$%^%kG[?.!"%5%$%^%kJ|AwEy(B

-- 
$BX)B<@.0l(B

25$B9T$N(B hypnotix $B%=!<%9!&%U%!%$%k$N:9J,$J$N$G!"9gK!$J:9J,$H9M$(!":G8e$KE>5-$7$F$*$-$^$9!#(B
$B%?%V$,(B2$B8D!"4^$^$l$F$$$^$9(B (1$B9T$a!"(B2$B9T$a(B - file $BL>$N8e$m(B)$B!#(B

diff.mpv.py-2.9-to-3.2
--- 2.9/src/usr/lib/hypnotix/mpv.py	2022-07-24 19:13:16.000000000 +0900
+++ 3.2/src/usr/lib/hypnotix/mpv.py	2023-01-07 01:36:05.000000000 +0900
@@ -525,10 +525,12 @@
 backend.mpv_create.restype = MpvHandle
 _mpv_create = backend.mpv_create
 
+_API_VER = _mpv_client_api_version()[0]
+
+_handle_func('mpv_destroy' if _API_VER > 1 else 'mpv_detach_destroy', [], None, errcheck=None)
 _handle_func('mpv_create_client',           [c_char_p],                                 MpvHandle, notnull_errcheck)
 _handle_func('mpv_client_name',             [],                                         c_char_p, errcheck=None)
 _handle_func('mpv_initialize',              [],                                         c_int, ec_errcheck)
-_handle_func('mpv_detach_destroy',          [],                                         None, errcheck=None)
 _handle_func('mpv_terminate_destroy',       [],                                         None, errcheck=None)
 _handle_func('mpv_load_config_file',        [c_char_p],                                 c_int, ec_errcheck)
 _handle_func('mpv_get_time_us',             [],                                         c_ulonglong, errcheck=None)
@@ -881,7 +883,7 @@
                         self._message_handlers[target](*args)
 
                 if eid == MpvEventID.SHUTDOWN:
-                    _mpv_detach_destroy(self._event_handle)
+                    _mpv_destroy(self._event_handle) if _API_VER > 1 else _mpv_detach_destroy(self._event_handle)
                     return
 
             except Exception as e:
[EOF]