This commit is contained in:
yumoqing 2021-01-10 12:37:20 +08:00
parent e8674f61e2
commit 26f7c6c47d
6 changed files with 1778 additions and 0 deletions

Binary file not shown.

1753
kivyblocks/graph/__init__.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
__version__ = '0.4.1.dev0'

View File

@ -0,0 +1,6 @@
import pytest
def test_flower():
from kivy_garden.graph import Graph
widget = Graph()

View File

@ -22,8 +22,23 @@ class NewVideo(BGColorBehavior, Video):
radius=radius) radius=radius)
Window.allow_screensaver = False Window.allow_screensaver = False
set_log_callback(self.ffplayerLog) set_log_callback(self.ffplayerLog)
self.register_event_type('on_open_failed')
def on_open_failed(self, o, source):
print('source=',source, 'open failed')
def ffplayerLog(self, msg, level): def ffplayerLog(self, msg, level):
if 'Connection to tcp' in msg and 'failed' in msg:
self.dispatch('on_open_failed', self.source)
if 'Invalid data found when processing input' in msg:
self.dispatch('on_open_failed', self.source)
if 'End of file' in msg:
self.dispatch('on_open_failed', self.source)
if 'Server returned 404 Not Found' in msg:
self.dispatch('on_open_failed', self.source)
if 'Server returned 403 Forbidden' in msg:
self.dispatch('on_open_failed', self.source)
msg = msg.strip() msg = msg.strip()
if msg: if msg:
logger_func[level]('yffpyplayer: {}'.format(msg)) logger_func[level]('yffpyplayer: {}'.format(msg))

View File

@ -16,6 +16,9 @@ from .qrdata import QRCodeWidget
# from .kivycamera import KivyCamera # from .kivycamera import KivyCamera
from .filebrowser import FileLoaderBrowser from .filebrowser import FileLoaderBrowser
from .osc_server import OSCServer from .osc_server import OSCServer
from graph import Graph, MeshLinePlot, MeshStemPlot, LinePlot, \
SmoothLinePlot, ContourPlot, BarPlot, HBar, VBar, ScatterPlot, \
PointPlot
r = Factory.register r = Factory.register
r('OSCServer',OSCServer) r('OSCServer',OSCServer)