This commit is contained in:
yumoqing 2022-06-19 20:24:18 +08:00
parent 87e83b9920
commit 0b065e2ea4
4 changed files with 4 additions and 26 deletions

View File

@ -1,9 +1,9 @@
import os import os
from kivy.logger import logging # from kivy.logger import logging
__version_info__ = "0.5.0" __version_info__ = "0.5.0"
from .version import __version__ from .version import __version__
path = os.path.dirname(__file__) path = os.path.dirname(__file__)
fonts_path = os.path.join(path,"ttf/") fonts_path = os.path.join(path,"ttf/")
images_path = os.path.join(path,'imgs/') images_path = os.path.join(path,'imgs/')
logging.info("kivyblocks:kivblocks version:{}".format(__version__)) # logging.info("kivyblocks:kivblocks version:{}".format(__version__))

View File

@ -38,8 +38,6 @@ class FFVideo(Image):
self.ff_opts = {} self.ff_opts = {}
self.lib_opts = {} self.lib_opts = {}
self.headers_pattern = {} self.headers_pattern = {}
self.playing_task = None
self.playing_tasks = []
super(FFVideo, self).__init__(**kwargs) super(FFVideo, self).__init__(**kwargs)
self.register_event_type('on_frame') self.register_event_type('on_frame')
self.register_event_type('on_open_failed') self.register_event_type('on_open_failed')
@ -47,22 +45,6 @@ class FFVideo(Image):
self.register_event_type('on_enter_focus') self.register_event_type('on_enter_focus')
self.register_event_type('on_load_success') self.register_event_type('on_load_success')
def add_playing_task(self, f):
if f in self.playing_tasks:
return
self.playing_tasks.append(f)
def del_playing_task(self, f):
self.playing_tasks = [ i for i in self.playing_tasks if i != f ]
def do_playing_tasks(self, *args):
for f in self.playing_tasks:
try:
f()
except Exception as e:
print('error:', e)
print_exc()
def on_open_failed(self, *args): def on_open_failed(self, *args):
pass pass
@ -239,10 +221,6 @@ class FFVideo(Image):
self._out_fmt = meta['src_pix_fmt'] self._out_fmt = meta['src_pix_fmt']
self.frame_rate = meta['frame_rate'] self.frame_rate = meta['frame_rate']
self.videosize = meta['src_vid_size'] self.videosize = meta['src_vid_size']
if self.playing_task:
self.playing_task.cancel()
self.playing_taks = None
self.playing_task = self.
def _play_stop(self): def _play_stop(self):
if self._player is None: if self._player is None:

View File

@ -1 +1 @@
__version__ = '0.2.3' __version__ = '0.2.5'

View File

@ -5,7 +5,7 @@ try:
from setuptools import setup from setuptools import setup
except ImportError: except ImportError:
from distutils.core import setup from distutils.core import setup
from Cython.Build import cythonize # from Cython.Build import cythonize
# usage: # usage:
# python setup.py bdist_wininst generate a window executable file # python setup.py bdist_wininst generate a window executable file