コード例 #1
0
    def load_modules(self):
        self.window = context.get_mainwindow()
        # Load plugins after loading the main window (fixes a problem with the plugin 'nocursor')
        plugins.init()

        # Recorder
        self.recorder = RecorderClassUI()
        self.insert_page(self.recorder, 'REC')

        if 'scheduler' in self.modules:
            self.scheduler = context.get_scheduler()

        if 'ocservice' in self.modules:
            self.ocservice = context.get_ocservice()

        if 'media_manager' in self.modules:
            self.dispatcher.connect('action-view-change', self.change_mode)

            # Distribution
            self.distribution = DistribUI()
            self.insert_page(self.distribution, 'DIS')

            # Media Manager
            self.listing  = ListingClassUI()
            self.insert_page(self.listing, 'MMA')

        if 'player' in self.modules:
            self.player = PlayerClassUI()
            self.insert_page(self.player, 'PLA')

        self.window.start()

        # Set home page
        homepage = self.conf.get_choice('basic', 'homepage', ['rec', 'pla', 'mma', 'dis'], 'mma').upper()
        if not 'media_manager' in self.modules or PAGES[homepage] not in PAGES_LOADED:
            logger.info("Set REC as home page (default value), modules loaded: {}".format(self.modules))
            self.window.set_current_page(PAGES['REC'])
            self.recorder.block()
        else:
            logger.info("Set {} as home page, modules loaded: {}".format(homepage, self.modules))
            self.window.set_current_page(PAGES[homepage])

        # Notify home page setting by issuing a 'view-changed' signal
        self.dispatcher.emit('view-changed', None, self.window.get_current_page())

        context.get_heartbeat().init_timer()
        self.dispatcher.emit("init")
コード例 #2
0
ファイル: core.py プロジェクト: polimediaupv/Galicaster
    def load_modules(self):        
        self.window = context.get_mainwindow()

        # Load plugins after loading the main window (fixes a problem with the plugin 'nocursor')
        plugins.init()
               
        # Recorder
        self.recorder = RecorderClassUI()
        self.window.insert_page(self.recorder, 'REC', REC) 

        if 'scheduler' in self.modules:        
            self.scheduler = context.get_scheduler()

        if 'media_manager' in self.modules:
            self.dispatcher.connect('change-mode', self.change_mode)

            # Distribution
            self.distribution = DistribUI()
            self.window.insert_page(self.distribution, 'DISTRIBUTION', DIS) 

            # Media Manager
            self.listing  = ListingClassUI()
            self.window.insert_page(self.listing, 'LIST', MMA)
        
        if 'player' in self.modules:
            self.player = PlayerClassUI()
            self.window.insert_page(self.player, 'PLAYER', PLA)

        self.window.start()

        self.recorder.go_ahead() # allows record area to load devices and show preview

        if 'media_manager' in self.modules:            
            self.window.set_current_page(DIS)
            self.state.area = DIS
        else:
            self.window.set_current_page(REC)
            self.state.area = REC
            self.recorder.block()  

        context.get_heartbeat().init_timer()
        self.dispatcher.emit("galicaster-init")
コード例 #3
0
ファイル: core.py プロジェクト: zenny/Galicaster
    def load_modules(self):
        plugins.init()

        self.window = context.get_mainwindow()

        # Recorder
        self.recorder = RecorderClassUI()
        self.window.insert_page(self.recorder, 'REC', REC)

        if 'scheduler' in self.modules:
            self.scheduler = context.get_scheduler()

        if 'media_manager' in self.modules:
            self.dispatcher.connect('change-mode', self.change_mode)

            # Distribution
            self.distribution = DistribUI()
            self.window.insert_page(self.distribution, 'DISTRIBUTION', DIS)

            # Media Manager
            self.listing = ListingClassUI()
            self.window.insert_page(self.listing, 'LIST', MMA)

        if 'player' in self.modules:
            self.player = PlayerClassUI()
            self.window.insert_page(self.player, 'PLAYER', PLA)

        self.window.start()

        self.recorder.go_ahead(
        )  # allows record area to load devices and show preview

        if 'media_manager' in self.modules:
            self.window.set_current_page(DIS)
            self.state.area = DIS
        else:
            self.window.set_current_page(REC)
            self.state.area = REC
            self.recorder.block()

        context.get_heartbeat().init_timer()
        self.dispatcher.emit("galicaster-init")
コード例 #4
0
ファイル: core.py プロジェクト: CGreweling/Galicaster
    def load_modules(self):
        plugins.init()

        self.window = context.get_mainwindow()

        # Recorder
        self.recorder = RecorderClassUI()
        self.window.insert_page(self.recorder, "REC", REC)

        if "scheduler" in self.modules:
            self.scheduler = context.get_scheduler()

        if "media_manager" in self.modules:
            self.dispatcher.connect("change-mode", self.change_mode)

            # Distribution
            self.distribution = DistribUI()
            self.window.insert_page(self.distribution, "DISTRIBUTION", DIS)

            # Media Manager
            self.listing = ListingClassUI()
            self.window.insert_page(self.listing, "LIST", MMA)

        if "player" in self.modules:
            self.player = PlayerClassUI()
            self.window.insert_page(self.player, "PLAYER", PLA)

        self.window.start()

        self.recorder.go_ahead()  # allows record area to load devices and show preview

        if "media_manager" in self.modules:
            self.window.set_current_page(DIS)
            self.state.area = DIS
        else:
            self.window.set_current_page(REC)
            self.state.area = REC
            self.recorder.block()

        context.get_heartbeat().init_timer()
        self.dispatcher.emit("galicaster-init")
コード例 #5
0
    def load_modules(self):
        self.window = context.get_mainwindow()
               
        # Recorder
        self.recorder = RecorderClassUI()
        self.window.insert_page(self.recorder, 'REC', REC) 

        if 'scheduler' in self.modules:        
            self.scheduler = context.get_scheduler()

        if 'media_manager' in self.modules:
            self.dispatcher.connect('change-mode', self.change_mode)
            self.dispatcher.connect('play-list', self.play_mp)

            # Distribution
            self.distribution = DistribUI()
            self.window.insert_page(self.distribution, 'DISTRIBUTION', DIS) 

            # Media Manager
            self.listing  = ListingClassUI()
            self.window.insert_page(self.listing, 'LIST', MMA)
        
        if 'player' in self.modules:
            self.player = PlayerClassUI()
            self.window.insert_page(self.player, 'PLAYER', PLA)

        self.window.start()

        self.recorder.go_ahead() # allows record area to load devices and show preview

        if 'media_manager' in self.modules:            
            self.window.set_current_page(DIS)
        else:
            self.window.set_current_page(REC)
            self.recorder.block()  

        plugins.init()
        context.get_heartbeat().init_timer()
コード例 #6
0
    def load_modules(self):
        self.window = context.get_mainwindow()

        # Recorder
        self.recorder = RecorderClassUI()
        self.window.insert_page(self.recorder, 'REC', REC)

        if 'scheduler' in self.modules:
            self.scheduler = context.get_scheduler()

        if 'media_manager' in self.modules:
            self.dispatcher.connect('change-mode', self.change_mode)
            self.dispatcher.connect('play-list', self.play_mp)

            # Distribution
            self.distribution = DistribUI()
            self.window.insert_page(self.distribution, 'DISTRIBUTION', DIS)

            # Media Manager
            self.listing = ListingClassUI()
            self.window.insert_page(self.listing, 'LIST', MMA)

        if 'player' in self.modules:
            self.player = PlayerClassUI()
            self.window.insert_page(self.player, 'PLAYER', PLA)

        self.window.start()

        if 'recorder' and 'media_manager' in self.modules:
            self.window.set_current_page(DIS)
        else:
            self.window.set_current_page(REC)
            self.recorder.block()

        plugins.init()
        context.get_heartbeat().init_timer()