mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-12 19:30:11 +01:00
fixed video position display and ending pause_at_end loop
This commit is contained in:
@@ -1 +1 @@
|
||||
3
|
||||
7
|
||||
@@ -9,6 +9,7 @@ class omx_driver:
|
||||
self.status = 'UNASSIGNED'
|
||||
self.duration = 0
|
||||
self.dbus_name = dbus_name
|
||||
self.omx_running = True
|
||||
|
||||
|
||||
def load(self, location, arguments):
|
||||
@@ -41,7 +42,7 @@ class omx_driver:
|
||||
print('time to end is {}'.format(self.duration - position))
|
||||
self.player.pause()
|
||||
print('its finished')
|
||||
else:
|
||||
elif(self.omx_running):
|
||||
self.root.after(5,self.pause_at_end)
|
||||
|
||||
def get_position(self):
|
||||
@@ -60,4 +61,5 @@ class omx_driver:
|
||||
|
||||
def quit(self):
|
||||
self.player.quit()
|
||||
self.omx_running = False
|
||||
|
||||
|
||||
@@ -96,8 +96,8 @@ class video_driver(object):
|
||||
|
||||
def get_info_for_video_display(self):
|
||||
if has_omx:
|
||||
return self.current_player.bank_number, self.current_player.status, self.next_player.bank_number, \
|
||||
self.next_player.status, self.current_player.get_position(), self.current_player.length
|
||||
return self.current_player.bank_number, self.current_player.omx.status, self.next_player.bank_number, \
|
||||
self.next_player.omx.status, self.current_player.get_position(), self.current_player.length
|
||||
else:
|
||||
return 0, 'test', 1, 'test', 0, 10
|
||||
|
||||
@@ -128,7 +128,7 @@ class video_player(object):
|
||||
return self.omx.status is 'FINISHED'
|
||||
|
||||
def get_position(self):
|
||||
if self.is_loaded():
|
||||
if self.omx.status is not 'LOADING':
|
||||
return self.omx.get_position()
|
||||
else:
|
||||
return 0
|
||||
@@ -172,8 +172,6 @@ class video_player(object):
|
||||
print("trying to reload")
|
||||
self.load_content()
|
||||
|
||||
# layer = layer + 1
|
||||
|
||||
def exit(self):
|
||||
try:
|
||||
if (self.is_loaded):
|
||||
|
||||
Reference in New Issue
Block a user