예제 #1
0
    def __init__(self, show_id, showlist, root, canvas, show_params,
                 track_params, pp_dir, pp_home, pp_profile, end_callback,
                 command_callback):

        # initialise items common to all players
        Player.__init__(self, show_id, showlist, root, canvas, show_params,
                        track_params, pp_dir, pp_home, pp_profile,
                        end_callback, command_callback)
        # print ' !!!!!!!!!!!videoplayer init'
        self.mon.trace(self, '')

        # get player parameters
        if self.track_params['omx-audio'] != "":
            self.omx_audio = self.track_params['omx-audio']
        else:
            self.omx_audio = self.show_params['omx-audio']
        if self.omx_audio != "": self.omx_audio = "-o " + self.omx_audio

        if self.track_params['omx-volume'] != "":
            self.omx_volume = self.track_params['omx-volume']
        else:
            self.omx_volume = self.show_params['omx-volume']
        if self.omx_volume != "":
            self.omx_volume = int(self.omx_volume) * 100

        if self.track_params['omx-window'] != '':
            self.omx_window = self.track_params['omx-window']
        else:
            self.omx_window = self.show_params['omx-window']

        if self.track_params['omx-other-options'] != '':
            self.omx_other_options = self.track_params['omx-other-options']
        else:
            self.omx_other_options = self.show_params['omx-other-options']

        if self.track_params['freeze-at-start'] != '':
            self.freeze_at_start = self.track_params['freeze-at-start']
        else:
            self.freeze_at_start = self.show_params['freeze-at-start']

        if self.track_params['freeze-at-end'] != '':
            freeze_at_end_text = self.track_params['freeze-at-end']
        else:
            freeze_at_end_text = self.show_params['freeze-at-end']

        if freeze_at_end_text == 'yes':
            self.freeze_at_end_required = True
        else:
            self.freeze_at_end_required = False

        if self.track_params['seamless-loop'] == 'yes':
            self.seamless_loop = ' --loop '
        else:
            self.seamless_loop = ''

        # initialise video playing state and signals
        self.quit_signal = False
        self.unload_signal = False
        self.play_state = 'initialised'
        self.frozen_at_end = False
예제 #2
0
    def __init__(self, show_id, showlist, root, canvas, show_params,
                 track_params, pp_dir, pp_home, pp_profile, end_callback,
                 command_callback):

        # initialise items common to all players
        Player.__init__(self, show_id, showlist, root, canvas, show_params,
                        track_params, pp_dir, pp_home, pp_profile,
                        end_callback, command_callback)

        # stopwatch for timing functions
        StopWatch.global_enable = False
        self.sw = StopWatch()
        self.sw.off()

        self.mon.trace(self, '')
        # and initilise things for this player

        # get duration from profile
        if self.track_params['duration'] != "":
            self.duration = int(self.track_params['duration'])
        else:
            self.duration = int(self.show_params['duration'])

        self.html_message_text_obj = None
        self.track_obj = None

        # initialise the state machine
        self.play_state = 'initialised'
예제 #3
0
    def __init__(self, show_id, showlist, root, canvas, show_params,
                 track_params, pp_dir, pp_home, pp_profile, end_callback,
                 command_callback):

        # initialise items common to all players
        Player.__init__(self, show_id, showlist, root, canvas, show_params,
                        track_params, pp_dir, pp_home, pp_profile,
                        end_callback, command_callback)

        self.mon.trace(self, '')
        # get duration limit (secs ) from profile
        if self.show_params['type'] in ('liveshow', 'artliveshow'):
            duration_text = ''
        else:
            duration_text = self.track_params['duration']
        if duration_text != '':
            self.duration_limit = 20 * int(duration_text)
        else:
            self.duration_limit = -1
        # print self.duration_limit
        # get audio device from profile.
        if self.track_params['mplayer-audio'] != "":
            self.mplayer_audio = self.track_params['mplayer-audio']
        else:
            self.mplayer_audio = self.show_params['mplayer-audio']

        # get audio volume from profile.
        if self.track_params['mplayer-volume'] != "":
            mplayer_volume = self.track_params['mplayer-volume'].strip()
        else:
            mplayer_volume = self.show_params['mplayer-volume'].strip()
        mplayer_volume_int = int(mplayer_volume) + 60
        self.volume_option = '-volume ' + str(mplayer_volume_int)

        # get speaker from profile
        if self.track_params['audio-speaker'] != "":
            self.audio_speaker = self.track_params['audio-speaker']
        else:
            self.audio_speaker = self.show_params['audio-speaker']

        if self.audio_speaker == 'left':
            self.speaker_option = AudioPlayer._LEFT
        elif self.audio_speaker == 'right':
            self.speaker_option = AudioPlayer._RIGHT
        else:
            self.speaker_option = AudioPlayer._STEREO

        if self.track_params['mplayer-other-options'] != '':
            self.mplayer_other_options = self.track_params[
                'mplayer-other-options']
        else:
            self.mplayer_other_options = self.show_params[
                'mplayer-other-options']

        # initialise the state and signals
        self.tick_timer = None
        self.quit_signal = False
        self.play_state = 'initialised'
        self.waiting = False
예제 #4
0
    def __init__(self,
                 show_id,
                 showlist,
                 root,
                 canvas,
                 show_params,
                 track_params ,
                 pp_dir,
                 pp_home,
                 pp_profile,
                 end_callback,
                 command_callback):

        # initialise items common to all players   
        Player.__init__( self,
                         show_id,
                         showlist,
                         root,
                         canvas,
                         show_params,
                         track_params ,
                         pp_dir,
                         pp_home,
                         pp_profile,
                         end_callback,
                         command_callback)

        self.mon.trace(self,'')
        # and initialise things for this player        

    
        # get duration limit (secs ) from profile
        if self.track_params['duration'] != '':
            self.duration= int(self.track_params['duration'])
        else:
            self.duration= int(self.show_params['duration'])
        self.duration_limit=20*self.duration

        # process web window                  
        if self.track_params['web-window'] != '':
            self.web_window= self.track_params['web-window']
        else:
            self.web_window= self.show_params['web-window']

        # create an instance of uzbl driver
        self.bplayer=UZBLDriver(self.canvas)

        # Initialize variables
        self.command_timer=None
        self.tick_timer=None
        self.quit_signal=False     # signal that user has pressed stop
        
        # initialise the play state
        self.play_state='initialised'
        self.show_state=''
        self.load_state=''
예제 #5
0
    def __init__(self,
                 show_id,
                 showlist,
                 root,
                 canvas,
                 show_params,
                 track_params ,
                 pp_dir,
                 pp_home,
                 pp_profile,
                 end_callback,
                 command_callback):

        # initialise items common to all players   
        Player.__init__( self,
                         show_id,
                         showlist,
                         root,
                         canvas,
                         show_params,
                         track_params ,
                         pp_dir,
                         pp_home,
                         pp_profile,
                         end_callback,
                         command_callback)

        self.mon.trace(self,'')
        # and initialise things for this player        

    
        # get duration limit (secs ) from profile
        if self.track_params['duration'] != '':
            self.duration= int(self.track_params['duration'])
        else:
            self.duration= int(self.show_params['duration'])
        self.duration_limit=20*self.duration

        # process web window                  
        if self.track_params['web-window'] != '':
            self.web_window= self.track_params['web-window']
        else:
            self.web_window= self.show_params['web-window']

        # create an instance of uzbl driver
        self.bplayer=UZBLDriver(self.canvas)

        # Initialize variables
        self.command_timer=None
        self.tick_timer=None
        self.quit_signal=False     # signal that user has pressed stop
        
        # initialise the play state
        self.play_state='initialised'
        self.show_state=''
        self.load_state=''
예제 #6
0
    def __init__(self, show_id, showlist, root, canvas, show_params,
                 track_params, pp_dir, pp_home, pp_profile, end_callback,
                 command_callback):

        # initialise items common to all players
        Player.__init__(self, show_id, showlist, root, canvas, show_params,
                        track_params, pp_dir, pp_home, pp_profile,
                        end_callback, command_callback)

        # stopwatch for timing functions
        StopWatch.global_enable = False
        self.sw = StopWatch()
        self.sw.off()

        self.mon.trace(self, '')
        # and initialise things for this player
        # print 'imageplayer init'
        # get duration from profile
        if self.track_params['duration'] != '':
            self.duration = int(self.track_params['duration'])
        else:
            self.duration = int(self.show_params['duration'])

        # get  image window from profile
        if self.track_params['image-window'].strip() != '':
            self.image_window = self.track_params['image-window'].strip()
        else:
            self.image_window = self.show_params['image-window'].strip()

        # get  image rotation from profile
        if self.track_params['image-rotate'].strip() != '':
            self.image_rotate = int(self.track_params['image-rotate'].strip())
        else:
            self.image_rotate = int(self.show_params['image-rotate'].strip())

        if self.track_params['pause-timeout'] != '':
            pause_timeout_text = self.track_params['pause-timeout']
        else:
            pause_timeout_text = self.show_params['pause-timeout']

        if pause_timeout_text.isdigit():
            self.pause_timeout = int(pause_timeout_text)
        else:
            self.pause_timeout = 0

        self.track_image_obj = None
        self.tk_img = None
        self.paused = False
        self.pause_text_obj = None
        self.pause_timer = None

        # initialise the state machine
        self.play_state = 'initialised'
예제 #7
0
    def __init__(self, show_id, showlist, root, canvas, show_params,
                 track_params, pp_dir, pp_home, pp_profile, end_callback,
                 command_callback):

        # initialise items common to all players
        Player.__init__(self, show_id, showlist, root, canvas, show_params,
                        track_params, pp_dir, pp_home, pp_profile,
                        end_callback, command_callback)

        self.mon.trace(self, '')

        # and initialise things for this player
        self.dm = DisplayManager()

        # get duration limit (secs ) from profile
        if self.track_params['duration'] != '':
            self.duration_text = self.track_params['duration']
        else:
            self.duration_text = self.show_params['duration']

        # process chrome window
        if self.track_params['chrome-window'] != '':
            self.chrome_window_text = self.track_params['chrome-window']
        else:
            self.chrome_window_text = self.show_params['chrome-window']

        # process chrome things
        if self.track_params['chrome-freeze-at-end'] != '':
            self.freeze_at_end = self.track_params['chrome-freeze-at-end']
        else:
            self.freeze_at_end = self.show_params['chrome-freeze-at-end']

        if self.track_params['chrome-zoom'] != '':
            self.chrome_zoom_text = self.track_params['chrome-zoom']
        else:
            self.chrome_zoom_text = self.show_params['chrome-zoom']

        if self.track_params['chrome-other-options'] != '':
            self.chrome_other_options = self.track_params[
                'chrome-other-options']
        else:
            self.chrome_other_options = self.show_params[
                'chrome-other-options']

        # Initialize variables
        self.command_timer = None
        self.tick_timer = None
        self.quit_signal = False  # signal that user has pressed stop

        # initialise the play state
        self.play_state = 'initialised'
        self.load_state = ''
    def __init__(self, show_id, showlist, root, canvas, show_params,
                 track_params, pp_dir, pp_home, pp_profile, end_callback,
                 command_callback):

        # initialise items common to all players
        Player.__init__(self, show_id, showlist, root, canvas, show_params,
                        track_params, pp_dir, pp_home, pp_profile,
                        end_callback, command_callback)

        self.mon.trace(self, '')

        # and initialise things for this player
        self.display_guidelines = track_params['menu-guidelines']
        self.play_state = 'initialised'
        self.menu_entry_id = []
        self.menu_text_obj = None
        self.hint_text_obj = None
예제 #9
0
    def __init__(self, show_id, showlist, root, canvas, show_params,
                 track_params, pp_dir, pp_home, pp_profile, end_callback,
                 command_callback):

        # initialise items common to all players
        Player.__init__(self, show_id, showlist, root, canvas, show_params,
                        track_params, pp_dir, pp_home, pp_profile,
                        end_callback, command_callback)

        self.mon.trace(self, '')

        # and initialise things for this player
        self.display_guidelines = track_params['menu-guidelines']
        self.play_state = 'initialised'
        self.menu_entry_id = []
        self.menu_text_obj = None
        self.hint_text_obj = None
예제 #10
0
    def __init__(self,
                 show_id,
                 showlist,
                 root,
                 canvas,
                 show_params,
                 track_params ,
                 pp_dir,
                 pp_home,
                 pp_profile,
                 end_callback,
                 command_callback):

        # initialise items common to all players   
        Player.__init__( self,
                         show_id,
                         showlist,
                         root,
                         canvas,
                         show_params,
                         track_params ,
                         pp_dir,
                         pp_home,
                         pp_profile,
                         end_callback,
                         command_callback)                    

        # stopwatch for timing functions
        StopWatch.global_enable=False
        self.sw=StopWatch()
        self.sw.off()

        self.mon.trace(self,'')
        # and initilise things for this player
        
        # get duration from profile
        if self.track_params['duration'] != "":
            self.duration= int(self.track_params['duration'])
        else:
            self.duration= int(self.show_params['duration'])       
        
        # initialise the state machine
        self.play_state='initialised'    
예제 #11
0
    def __init__(self, show_id, showlist, root, canvas, show_params,
                 track_params, pp_dir, pp_home, pp_profile, end_callback,
                 command_callback):

        # initialise items common to all players
        Player.__init__(self, show_id, showlist, root, canvas, show_params,
                        track_params, pp_dir, pp_home, pp_profile,
                        end_callback, command_callback)
        # print ' !!!!!!!!!!!videoplayer init'
        self.mon.trace(self, '')
        self.video_start_timestamp = 0
        self.dm = DisplayManager()

        # get player parameters
        if self.track_params['omx-audio'] != "":
            self.omx_audio = self.track_params['omx-audio']
        else:
            self.omx_audio = self.show_params['omx-audio']
        if self.omx_audio != "": self.omx_audio = "-o " + self.omx_audio

        self.omx_max_volume_text = self.track_params['omx-max-volume']
        if self.omx_max_volume_text != "":
            self.omx_max_volume = int(self.omx_max_volume_text)
        else:
            self.omx_max_volume = 0

        if self.track_params['omx-volume'] != "":
            self.omx_volume = self.track_params['omx-volume']
        else:
            self.omx_volume = self.show_params['omx-volume']

        if self.omx_volume != "":
            self.omx_volume = int(self.omx_volume)
        else:
            self.omx_volume = 0

        self.omx_volume = min(self.omx_volume, self.omx_max_volume)

        if self.track_params['omx-window'] != '':
            self.omx_window = self.track_params['omx-window']
        else:
            self.omx_window = self.show_params['omx-window']

        if self.track_params['omx-other-options'] != '':
            self.omx_other_options = self.track_params['omx-other-options']
        else:
            self.omx_other_options = self.show_params['omx-other-options']

        if self.track_params['freeze-at-start'] != '':
            self.freeze_at_start = self.track_params['freeze-at-start']
        else:
            self.freeze_at_start = self.show_params['freeze-at-start']

        if self.track_params['freeze-at-end'] != '':
            freeze_at_end_text = self.track_params['freeze-at-end']
        else:
            freeze_at_end_text = self.show_params['freeze-at-end']

        if freeze_at_end_text == 'yes':
            self.freeze_at_end_required = True
        else:
            self.freeze_at_end_required = False

        if self.track_params['seamless-loop'] == 'yes':
            self.seamless_loop = ' --loop '
        else:
            self.seamless_loop = ''

        if self.track_params['pause-timeout'] != '':
            pause_timeout_text = self.track_params['pause-timeout']
        else:
            pause_timeout_text = self.show_params['pause-timeout']

        if pause_timeout_text.isdigit():
            self.pause_timeout = int(pause_timeout_text)
        else:
            self.pause_timeout = 0

        # initialise video playing state and signals
        self.quit_signal = False
        self.unload_signal = False
        self.play_state = 'initialised'
        self.frozen_at_end = False
        self.pause_timer = None
    def __init__(self,
                 show_id,
                 showlist,
                 root,
                 canvas,
                 show_params,
                 track_params ,
                 pp_dir,
                 pp_home,
                 pp_profile,
                 end_callback,
                 command_callback):

        # initialise items common to all players   
        Player.__init__( self,
                         show_id,
                         showlist,
                         root,
                         canvas,
                         show_params,
                         track_params ,
                         pp_dir,
                         pp_home,
                         pp_profile,
                         end_callback,
                         command_callback)


        # stopwatch for timing functions
        StopWatch.global_enable=False
        self.sw=StopWatch()
        self.sw.off()

        
        self.mon.trace(self,'')
        # and initialise things for this player
        # print 'imageplayer init'
        # get duration from profile
        if self.track_params['duration'] != '':
            self.duration= int(self.track_params['duration'])
        else:
            self.duration= int(self.show_params['duration'])
            
        # get  image window from profile
        if self.track_params['image-window'].strip() != '':
            self.image_window= self.track_params['image-window'].strip()
        else:
            self.image_window= self.show_params['image-window'].strip()


        # get  image rotation from profile
        if self.track_params['image-rotate'].strip() != '':
            self.image_rotate = int(self.track_params['image-rotate'].strip())
        else:
            self.image_rotate= int(self.show_params['image-rotate'].strip())

        self.track_image_obj=None
        self.tk_img=None
        # krt 28/1/2016
        self.paused=False
        self.pause_text_obj=None

        # initialise the state machine
        self.play_state='initialised'    
예제 #13
0
    def __init__(self,
                 show_id,
                 showlist,
                 root,
                 canvas,
                 show_params,
                 track_params ,
                 pp_dir,
                 pp_home,
                 pp_profile,
                 end_callback,
                 command_callback):

        # initialise items common to all players   
        Player.__init__( self,
                         show_id,
                         showlist,
                         root,
                         canvas,
                         show_params,
                         track_params ,
                         pp_dir,
                         pp_home,
                         pp_profile,
                         end_callback,
                         command_callback)
        # print ' !!!!!!!!!!!videoplayer init'
        self.mon.trace(self,'')

        # get player parameters
        if self.track_params['omx-audio'] != "":
            self.omx_audio= self.track_params['omx-audio']
        else:
            self.omx_audio= self.show_params['omx-audio']
        if self.omx_audio != "": self.omx_audio= "-o "+ self.omx_audio
        
        if self.track_params['omx-volume'] != "":
            self.omx_volume= self.track_params['omx-volume']
        else:
            self.omx_volume= self.show_params['omx-volume']
        if self.omx_volume != "":
            self.omx_volume= "--vol "+ str(int(self.omx_volume)*100) + ' '

        if self.track_params['omx-window'] != '':
            self.omx_window= self.track_params['omx-window']
        else:
            self.omx_window= self.show_params['omx-window']

        if self.track_params['omx-other-options'] != '':
            self.omx_other_options= self.track_params['omx-other-options']
        else:
            self.omx_other_options= self.show_params['omx-other-options']

        if self.track_params['freeze-at-end'] != '':
            freeze_at_end_text= self.track_params['freeze-at-end']
        else:
            freeze_at_end_text= self.show_params['freeze-at-end']

        if freeze_at_end_text == 'yes':
            self.freeze_at_end_required=True
        else:
            self.freeze_at_end_required=False
            

        if self.track_params['seamless-loop'] == 'yes':
            self.seamless_loop=' --loop '
        else:
            self.seamless_loop=''
            
        # initialise video playing state and signals
        self.quit_signal=False
        self.unload_signal=False
        self.play_state='initialised'
        self.frozen_at_end=False
예제 #14
0
    def __init__(self,
                 show_id,
                 showlist,
                 root,
                 canvas,
                 show_params,
                 track_params,
                 pp_dir,
                 pp_home,
                 pp_profile,
                 end_callback,
                 command_callback):

        # initialise items common to all players   
        Player.__init__( self,
                         show_id,
                         showlist,
                         root,
                         canvas,
                         show_params,
                         track_params ,
                         pp_dir,
                         pp_home,
                         pp_profile,
                         end_callback,
                         command_callback)


        self.mon.trace(self,'')
        # get duration limit (secs ) from profile
        if self.show_params['type'] in ('liveshow','artliveshow'):
            duration_text=''
        else:
            duration_text= self.track_params['duration']
        if duration_text != '':
            self.duration_limit= 20 * int(duration_text)
        else:
            self.duration_limit=-1
        # print self.duration_limit                   
        # get audio device from profile.
        if  self.track_params['mplayer-audio'] != "":
            self.mplayer_audio= self.track_params['mplayer-audio']
        else:
            self.mplayer_audio= self.show_params['mplayer-audio']
            
        # get audio volume from profile.
        if  self.track_params['mplayer-volume'] != "":
            mplayer_volume= self.track_params['mplayer-volume'].strip()
        else:
            mplayer_volume= self.show_params['mplayer-volume'].strip()
        mplayer_volume_int=int(mplayer_volume)+100
        self.volume_option= '-volume ' + str(mplayer_volume_int)

        # get speaker from profile
        if  self.track_params['audio-speaker'] != "":
            self.audio_speaker= self.track_params['audio-speaker']
        else:
            self.audio_speaker= self.show_params['audio-speaker']

        if self.audio_speaker == 'left':
            self.speaker_option=AudioPlayer._LEFT
        elif self.audio_speaker == 'right':
            self.speaker_option=AudioPlayer._RIGHT
        else:
            self.speaker_option=AudioPlayer._STEREO

        if self.track_params['mplayer-other-options'] != '':
            self.mplayer_other_options= self.track_params['mplayer-other-options']
        else:
            self.mplayer_other_options= self.show_params['mplayer-other-options']

        # initialise the state and signals      
        self.tick_timer=None
        self.quit_signal=False
        self.play_state='initialised'
        self.waiting=False
예제 #15
0
    def __init__(self, show_id, showlist, root, canvas, show_params,
                 track_params, pp_dir, pp_home, pp_profile, end_callback,
                 command_callback):

        # initialise items common to all players
        Player.__init__(self, show_id, showlist, root, canvas, show_params,
                        track_params, pp_dir, pp_home, pp_profile,
                        end_callback, command_callback)
        self.mon.trace(self, '')

        self.dm = DisplayManager()
        self.am = AudioManager()

        # get player parameters from show/track
        if self.track_params['vlc-audio'] != "":
            self.vlc_audio = self.track_params['vlc-audio']
        else:
            self.vlc_audio = self.show_params['vlc-audio']

        if self.track_params['vlc-volume'] != "":
            self.vlc_volume_text = self.track_params['vlc-volume']
        else:
            self.vlc_volume_text = self.show_params['vlc-volume']

        if self.track_params['vlc-window'] != '':
            self.vlc_window_text = self.track_params['vlc-window']
        else:
            self.vlc_window_text = self.show_params['vlc-window']

        if self.track_params['vlc-aspect-mode'] != '':
            self.vlc_aspect_mode = self.track_params['vlc-aspect-mode']
        else:
            self.vlc_aspect_mode = self.show_params['vlc-aspect-mode']

        if self.track_params['vlc-image-duration'] != '':
            self.vlc_image_duration_text = self.track_params[
                'vlc-image-duration']
        else:
            self.vlc_image_duration_text = self.show_params[
                'vlc-image-duration']

        if self.track_params['vlc-other-options'] != '':
            self.vlc_other_options = self.track_params['vlc-other-options']
        else:
            self.vlc_other_options = self.show_params['vlc-other-options']

        if self.track_params['vlc-layer'] != '':
            self.vlc_layer_text = self.track_params['vlc-layer']
        else:
            self.vlc_layer_text = self.show_params['vlc-layer']

        if self.track_params['vlc-freeze-at-start'] != '':
            self.freeze_at_start_text = self.track_params[
                'vlc-freeze-at-start']
        else:
            self.freeze_at_start_text = self.show_params['vlc-freeze-at-start']

        if self.track_params['vlc-freeze-at-end'] != '':
            self.freeze_at_end_text = self.track_params['vlc-freeze-at-end']
        else:
            self.freeze_at_end_text = self.show_params['vlc-freeze-at-end']

        if self.track_params['pause-timeout'] != '':
            pause_timeout_text = self.track_params['pause-timeout']
        else:
            pause_timeout_text = self.show_params['pause-timeout']

        if pause_timeout_text.isdigit():
            self.pause_timeout = int(pause_timeout_text)
        else:
            self.pause_timeout = 0

        # track only

        self.vlc_subtitles = self.track_params['vlc-subtitles']

        self.vlc_max_volume_text = self.track_params['vlc-max-volume']

        self.vlc_aspect_ratio = self.track_params['vlc-aspect-ratio']

        self.vlc_crop = self.track_params['vlc-crop']

        # initialise video playing state and signals
        self.quit_signal = False
        self.unload_signal = False
        self.play_state = 'initialised'
        self.frozen_at_end = False
        self.pause_timer = None