mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-13 20:00:12 +01:00
fixed current position
This commit is contained in:
14
README.md
14
README.md
@@ -1,6 +1,16 @@
|
|||||||
# r_e_c_u_r
|
# r_e_c_u_r
|
||||||
a diy videolooper for py/pi
|
a diy videolooper for py/pi
|
||||||
|
|
||||||
things to do / bugs to fix:
|
#things to do / bugs to fix:
|
||||||
|
|
||||||
- [ ] reload video on press is broken - the pause after load (when its not loaded in time) seems to not notwork
|
- [ ] reload video on press is broken - the pause after load (when its not loaded in time) seems to not to work
|
||||||
|
|
||||||
|
#things iv done on a freshly flashed pi to run/dev r_e_c_u_r
|
||||||
|
|
||||||
|
- sudo apt-get install git
|
||||||
|
|
||||||
|
- git clone https://github.com/langolierz/r_e_c_u_r.git
|
||||||
|
|
||||||
|
- sudo apt-get install gedit
|
||||||
|
|
||||||
|
- change keyboard layout : sudo raspi-config => localiation options => change keyboard layout => generic 104 => english us => english us => the default for => no compose => no then sudo reboot
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ def setup_logging():
|
|||||||
logger = setup_logging()
|
logger = setup_logging()
|
||||||
|
|
||||||
######## sets paths and constants ########
|
######## sets paths and constants ########
|
||||||
PATH_TO_BROWSER = get_the_current_dir_path() #TODO replace this with pi path name when i know what makes sense
|
PATH_TO_BROWSER = '/media/pi/TIM' #get_the_current_dir_path() #TODO replace this with pi path name when i know what makes sense
|
||||||
PATH_TO_DATA_OBJECTS = get_the_current_dir_path()
|
PATH_TO_DATA_OBJECTS = get_the_current_dir_path()
|
||||||
EMPTY_BANK = dict(name='',location='',length=-1,start=-1,end=-1)
|
EMPTY_BANK = dict(name='',location='',length=-1,start=-1,end=-1)
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ def load_looper(display):
|
|||||||
|
|
||||||
def get_text_for_video_display():
|
def get_text_for_video_display():
|
||||||
now_bank, now_status, next_bank, next_status, duration, video_length = video_driver.get_info_for_video_display()
|
now_bank, now_status, next_bank, next_status, duration, video_length = video_driver.get_info_for_video_display()
|
||||||
|
print 'just got info for display! the current time is {}'.format(duration)
|
||||||
banner = create_video_display_banner(duration, video_length)
|
banner = create_video_display_banner(duration, video_length)
|
||||||
time_been = data_centre.convert_int_to_string_for_display(duration)
|
time_been = data_centre.convert_int_to_string_for_display(duration)
|
||||||
time_left = data_centre.convert_int_to_string_for_display(
|
time_left = data_centre.convert_int_to_string_for_display(
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
[{"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}, {"start": -1, "length": -1, "end": -1, "location": "", "name": ""}]
|
[{"start": -1, "length": -1, "end": -1, "location": "/media/pi/TIM/samplerloop3s2.mp4", "name": "samplerloop3s2.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "/media/pi/TIM/samplerloop3s.mp4", "name": "samplerloop3s.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "/media/pi/TIM/samplerloop3s3.mp4", "name": "samplerloop3s3.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "/media/pi/TIM/samplerloop3s.mp4", "name": "samplerloop3s.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "/media/pi/TIM/samplerloop3s2.mp4", "name": "samplerloop3s2.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "/media/pi/TIM/samplerloop3s3.mp4", "name": "samplerloop3s3.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "/media/pi/TIM/samplerloop3s3.mp4", "name": "samplerloop3s3.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "/media/pi/TIM/samplerloop3s3.mp4", "name": "samplerloop3s3.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "/media/pi/TIM/samplerloop3s3.mp4", "name": "samplerloop3s3.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "/media/pi/TIM/samplerloop3s.mp4", "name": "samplerloop3s.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "", "name": "01_trashpalaceintro.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "", "name": "01_trashpalaceintro.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "", "name": "03_For_the_Plasma.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "", "name": "05_BEYOND_DREAMS_DOOR.mp4"}, {"start": -1, "length": -1, "end": -1, "location": "", "name": "05_BEYOND_DREAMS_DOOR.mp4"}]
|
||||||
@@ -121,7 +121,7 @@ class video_player(object):
|
|||||||
|
|
||||||
def get_position(self):
|
def get_position(self):
|
||||||
if self.is_loaded():
|
if self.is_loaded():
|
||||||
return self.omx.video_position
|
return self.omx.video_position/1000000
|
||||||
else:
|
else:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user