From 2f2aa7d344d41c6d4083149b1ea6b41e7fb1f683 Mon Sep 17 00:00:00 2001 From: undisclosed Date: Sat, 07 Jan 2023 15:24:26 +0000 Subject: [PATCH] Baustelle: Calypso 'ins Reine' bauen --- src/de/uhilger/calypso/App.java | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/de/uhilger/calypso/App.java b/src/de/uhilger/calypso/App.java index 48307cb..3b17088 100644 --- a/src/de/uhilger/calypso/App.java +++ b/src/de/uhilger/calypso/App.java @@ -18,10 +18,12 @@ package de.uhilger.calypso; +import de.uhilger.calypso.handler.MPVPlayer; import de.uhilger.calypso.handler.MPlayer; import de.uhilger.calypso.handler.OMXPlayer; import de.uhilger.calypso.handler.Player; import de.uhilger.calypso.handler.VLCPlayer; +import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.logging.Level; @@ -59,8 +61,10 @@ public static final String VLC_PLAYER = "vlc"; public static final String OMX_PLAYER = "omx"; public static final String M_PLAYER = "mpl"; + public static final String MPV_PLAYER = "mpv"; public static final String OMX_WD = "omx.wd"; public static final String CTX = "ctx"; + public static final String CONF_PATH = "conf"; public static final String DEFAULT_CTX = "/calypso"; @@ -72,6 +76,7 @@ * @param args the command line arguments */ public static void main(String[] args) { + Logger.getLogger(App.class.getName()).log(Level.INFO, new File(".").getAbsolutePath()); initParams = new HashMap(); for(String arg: args) { String[] argParts = arg.split("="); @@ -80,6 +85,9 @@ String playerType = getInitParameter(IP_PLAYER); switch(playerType) { + case MPV_PLAYER: + player = new MPVPlayer(); + break; case M_PLAYER: player = new MPlayer(); break; @@ -91,6 +99,7 @@ break; } Server server = new Server(Integer.parseInt(getInitParameter(IP_PORT))); + server.setPath(getInitParameter(CONF_PATH)); String ctx = getInitParameter(CTX); if(ctx != null && ctx.length() > 0) { server.setContextName(ctx); -- Gitblit v1.9.3