Exemple #1
0
    def prompt_analysis_plugin(self, checked):
        ret, selected = PluginDialog.select_type(engine.PLUGIN_TYPE_ANALYSIS)
        if ret:
            try:
                pid, plugin = engine.load_plugin(selected)
                engine.init_analysis_plugin(pid)
            except:
                log.error("", exc_info=True)
                QMessageBox.warning(None, tr("MainWindow", "Plugin Load Error"),
                tr("MainWindow", "Got an error when trying to load the analysis plugin"))

        return
Exemple #2
0
    def prompt_filter_plugin(self, checked):
        ret, selected = PluginDialog.select_type(engine.PLUGIN_TYPE_FILTER)
        app = get_app()
        vs = engine.get_component("video_source")
        fs = engine.get_component("frame_stream")
        if ret:
            try:
                pid, plugin = engine.load_plugin(selected)
                engine.get_component("filter_rack").get_page(get_app().user_options["filter_group"]).add(pid)
                # Create the GUI
                self.add_filter_gui(pid, plugin)
            except:
                log.exception("")
                QMessageBox.warning(None, tr("MainWindow", "Plugin Load Error"),
                tr("MainWindow", "Got an error when trying to load the filter plugin"))

        return
Exemple #3
0
    def prompt_input_plugin(self, checked):
        ret, selected = PluginDialog.select_type(engine.PLUGIN_TYPE_VIDEO_INPUT)
        app = get_app()

        if ret:
            try:
                pid, plugin = engine.load_plugin(selected)
                engine.init_input_plugin(pid)
                vs = engine.get_component("video_source")
                fr = engine.get_component("filter_rack")
                color_space = vs.color_space
                page = fr.get_page("Raw")
                page.in_color  = color_space
                page.out_color = color_space
                self.update_filter_uis()
            except:
                log.exception("")
                QMessageBox.warning(None, tr("MainWindow", "Plugin Load Error"),
                tr("MainWindow", "Got an error when trying to load the input plugin"))

        return