mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-12 19:30:11 +01:00
displaying video
This commit is contained in:
@@ -29,10 +29,10 @@ def key(event):
|
|||||||
if(event.char in ['0','1','2'] ):
|
if(event.char in ['0','1','2'] ):
|
||||||
print 'updating next bank'
|
print 'updating next bank'
|
||||||
data_centre.update_next_bank_number(int(event.char))
|
data_centre.update_next_bank_number(int(event.char))
|
||||||
video_driver.next_player.reload_content()
|
#video_driver.next_player.reload_content()
|
||||||
|
|
||||||
def update_current_time():
|
def update_current_time():
|
||||||
label1Text.set(convert_int_to_string_for_display(video_driver.current_player.omx.get_position() / 1000))
|
label1Text.set(convert_int_to_string_for_display(video_driver.current_player.get_position() / 1000000))
|
||||||
tk.after(500, update_current_time)
|
tk.after(500, update_current_time)
|
||||||
|
|
||||||
frame.bind("<Key>", key)
|
frame.bind("<Key>", key)
|
||||||
|
|||||||
@@ -112,7 +112,10 @@ class video_player(object):
|
|||||||
return self.omx.end_play_signal
|
return self.omx.end_play_signal
|
||||||
|
|
||||||
def get_position(self):
|
def get_position(self):
|
||||||
return self.omx.video_position
|
if self.is_loaded():
|
||||||
|
return self.omx.video_position
|
||||||
|
else:
|
||||||
|
return 0
|
||||||
|
|
||||||
def play_content(self):
|
def play_content(self):
|
||||||
self.status = 'PLAYING'
|
self.status = 'PLAYING'
|
||||||
|
|||||||
Reference in New Issue
Block a user