Beispiel #1
0
def IkaUI_main():
    IkaUtils.dprint(_('Hello!'))

    application = wx.App()
    input_plugin = VideoCapture()

    engine = IkaEngine(keep_alive=True)
    engine.close_session_at_eof = True
    engine.set_capture(input_plugin)

    # 設定画面を持つ各種 Output Plugin
    # -> 設定画面の生成とプラグインリストへの登録
    outputs_with_gui = [
        outputs.CSV(),
        # outputs.Fluentd(),
        outputs.JSON(),
        # outputs.Hue(),
        outputs.OBS(),
        outputs.Twitter(),
        outputs.Screenshot(),
        outputs.Boyomi(),
        outputs.Slack(),
        outputs.StatInk(),
        outputs.DebugVideoWriter(),
        outputs.WebSocketServer(),
    ]
    gui = IkaLogGUI(engine, outputs_with_gui)

    plugins = []

    # とりあえずデバッグ用にコンソールプラグイン
    plugins.append(outputs.Console())

    # 各パネルをプラグインしてイベントを受信する
    plugins.append(gui.preview)
    plugins.append(gui.last_result)

    # 設定画面を持つ input plugin もイベントを受信する
    plugins.append(input_plugin)

    # UI 自体もイベントを受信
    plugins.append(gui)

    plugins.extend(outputs_with_gui)

    # 本当に困ったときのデバッグログ増加モード
    if 'IKALOG_DEBUG' in os.environ:
        plugins.append(outputs.DebugLog())

    # プラグインリストを登録
    engine.set_plugins(plugins)

    gui.run()
    application.MainLoop()

    IkaUtils.dprint(_('Bye!'))
Beispiel #2
0
def IkaUI_main():
    IkaUtils.dprint(_('Hello!'))

    application = wx.App()
    input_plugin = VideoCapture()

    engine = IkaEngine(keep_alive=True)
    engine.close_session_at_eof = True
    engine.set_capture(input_plugin)

    # 設定画面を持つ各種 Output Plugin
    # -> 設定画面の生成とプラグインリストへの登録
    outputs_with_gui = [
        outputs.CSV(),
        # outputs.Fluentd(),
        outputs.JSON(),
        # outputs.Hue(),
        outputs.OBS(),
        outputs.Twitter(),
        outputs.Screenshot(),
        outputs.Boyomi(),
        outputs.Slack(),
        outputs.StatInk(),
        outputs.DebugVideoWriter(),
        outputs.WebSocketServer(),
    ]
    gui = IkaLogGUI(engine, outputs_with_gui)

    plugins = []

    # とりあえずデバッグ用にコンソールプラグイン
    plugins.append(outputs.Console())

    # 各パネルをプラグインしてイベントを受信する
    plugins.append(gui.preview)
    plugins.append(gui.last_result)

    # 設定画面を持つ input plugin もイベントを受信する
    plugins.append(input_plugin)

    # UI 自体もイベントを受信
    plugins.append(gui)

    plugins.extend(outputs_with_gui)

    # 本当に困ったときのデバッグログ増加モード
    if 'IKALOG_DEBUG' in os.environ:
        plugins.append(outputs.DebugLog())

    # プラグインリストを登録
    engine.set_plugins(plugins)

    gui.run()
    application.MainLoop()

    IkaUtils.dprint(_('Bye!'))
Beispiel #3
0
from ikalog.utils import *
Localization.print_language_settings()

# from ikalog.engine import *
from ikalog import outputs
from ikalog.ui.panel import *
from ikalog.ui import VideoCapture, IkaLogGUI

_ = Localization.gettext_translation('IkaUI', fallback=True).gettext

if __name__ == "__main__":
    IkaUtils.dprint(_('Hello!'))

    application = wx.App()
    input_plugin = VideoCapture()
    gui = IkaLogGUI()
    input_plugin.on_option_tab_create(gui.options.notebookOptions)
    gui.frame.Show()

    engine = gui.create_engine()
    engine.close_session_at_eof = True
    engine.set_capture(input_plugin)
    plugins = []

    # とりあえずデバッグ用にコンソールプラグイン
    plugins.append(outputs.Console())

    # 各パネルをプラグインしてイベントを受信する
    plugins.append(gui.preview)
    plugins.append(gui.last_result)
    plugins.append(gui.timeline)
Beispiel #4
0
def IkaUI_main():
    IkaUtils.dprint(_('Hello!'))

    application = wx.App()
    input_plugin = VideoCapture()
    gui = IkaLogGUI()
    input_plugin.on_option_tab_create(gui.options.notebookOptions)
    gui.frame.Show()

    engine = gui.create_engine()
    engine.close_session_at_eof = True
    engine.set_capture(input_plugin)
    plugins = []

    # とりあえずデバッグ用にコンソールプラグイン
    plugins.append(outputs.Console())

    # 各パネルをプラグインしてイベントを受信する
    plugins.append(gui.preview)
    plugins.append(gui.last_result)
    plugins.append(gui.timeline)

    # 設定画面を持つ input plugin もイベントを受信する
    plugins.append(input_plugin)

    # UI 自体もイベントを受信
    plugins.append(gui)

    # 設定画面を持つ各種 Output Plugin
    # -> 設定画面の生成とプラグインリストへの登録
    for plugin in [
            outputs.CSV(),
            # outputs.Fluentd(),
            outputs.JSON(),
            # outputs.Hue(),
            outputs.OBS(),
            outputs.Twitter(),
            outputs.Screenshot(),
            outputs.Boyomi(),
            outputs.Slack(),
            outputs.StatInk(),
            outputs.DebugVideoWriter(),
            outputs.WebSocketServer(),
    ]:
        print('Initializing %s' % plugin)
        plugin.on_option_tab_create(gui.options.notebookOptions)
        plugins.append(plugin)

    # 本当に困ったときのデバッグログ増加モード
    if 'IKALOG_DEBUG' in os.environ:
        plugins.append(outputs.DebugLog())

    # プラグインリストを登録
    engine.set_plugins(plugins)

    # IkaLog GUI 起動時にキャプチャが enable 状態かどうか
    gui.set_enable(True)

    # Loading config
    engine.call_plugins('on_config_reset', debug=True)
    gui.load_config(engine.context)
    engine.call_plugins('on_config_load_from_context', debug=True)

    gui.start_engine()
    application.MainLoop()

    IkaUtils.dprint(_('Bye!'))