mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-14 20:30:06 +01:00
stores bank info in memory on video player
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import time
|
||||
|
||||
try:
|
||||
from omxdriver import OMXDriver # <== for deving only
|
||||
|
||||
has_omx = True
|
||||
except ImportError:
|
||||
has_omx = False
|
||||
@@ -8,6 +10,8 @@ from Tkinter import Tk, Canvas
|
||||
import data_centre
|
||||
|
||||
logger = data_centre.setup_logging()
|
||||
|
||||
|
||||
# layer = 0
|
||||
|
||||
|
||||
@@ -98,10 +102,14 @@ class video_player(object):
|
||||
def __init__(self, widget, name):
|
||||
self.widget = widget
|
||||
self.name = name
|
||||
self.video_name = ''
|
||||
self.status = 'UNASSIGNED'
|
||||
self.bank_number = '-'
|
||||
self.position = 0
|
||||
self.video_length = 10
|
||||
self.start = ''
|
||||
self.end = ''
|
||||
self.length = 10
|
||||
self.location = ''
|
||||
|
||||
self.omx = OMXDriver(self.widget, '')
|
||||
|
||||
@@ -125,12 +133,20 @@ class video_player(object):
|
||||
|
||||
def load_content(self):
|
||||
self.status = 'LOADING'
|
||||
next_context = data_centre.get_next_context()
|
||||
self.get_context_for_this_player()
|
||||
logger.info('{} is loading now {}'.format(
|
||||
self.name, next_context['location']))
|
||||
self.name,self.location ))
|
||||
self.omx.load(next_context['location'], 'after-first-frame',
|
||||
'--win 0,0,400,400 --no-osd', '')
|
||||
|
||||
def get_context_for_this_player(self):
|
||||
next_context = data_centre.get_next_context()
|
||||
self.location = next_context['location']
|
||||
self.length = next_context['location']
|
||||
self.start = next_context['start']
|
||||
self.end = next_context['end']
|
||||
self.video_name = next_context['name']
|
||||
|
||||
def reload_content(self):
|
||||
self.status = 'RELOADING'
|
||||
if self.is_loaded():
|
||||
|
||||
Reference in New Issue
Block a user