📄 cfgdisplay.jsp
字号:
<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="org.homeplayer.util.*"%>
<%@page import="org.homeplayer.data.*"%>
<%
VLCControl vlc = VLCControl.shareInstance();
VLCInfo info = vlc.getInfo();
String state = info.getState();
MediaItem media = info.getCurrentMedia();
boolean playingVideo = false;
if (state.equals(VLCInfo.STATE_PLAYING) && ((media instanceof Film) || (media instanceof FreeBoxTV) || (media instanceof Photo)
|| (media instanceof WEBClip) || (media instanceof WEBTV) || (media instanceof WEBVideoStream))) {
playingVideo = true;
}
if (! playingVideo) {
Photo mire = new Photo();
mire.setPath(IOUtil.getRessourceFilePath("/images/mire_PM5544.gif"));
mire.setTitle("mire PM5544");
vlc.playMedia(mire);
HPSession.set("RELOADBG",true) ;
}
boolean focusSet = false;
String type = WebUtil.getParam(request, "type", "SIZE");
int vos = HPConf.getInt(HPConf.OPTIONS_VIDEO_OUTPUT_SCALE);
int sValue = WebUtil.getParam(request, "sValue", vos);
int sDelta = WebUtil.getParam(request, "sDelta", 0);
if (sDelta != 0) {
sValue += sDelta;
}
if (sValue != vos) {
focusSet = true;
vos = sValue;
vos = Math.min(100, vos);
vos = Math.max(0, vos);
HPConf.set(HPConf.OPTIONS_VIDEO_OUTPUT_SCALE, vos);
HPConf.saveSilently();
}
int bright = HPConf.getInt(HPConf.OPTIONS_VIDEO_BRIGHTNESS);
int bValue = WebUtil.getParam(request, "bValue", bright);
int bDelta = WebUtil.getParam(request, "bDelta", 0);
if (bDelta != 0) {
bValue += bDelta;
}
if (bValue != bright) {
focusSet = true;
bright = bValue;
bright = Math.min(255, bright);
bright = Math.max(0, bright);
HPConf.set(HPConf.OPTIONS_VIDEO_BRIGHTNESS, bright);
HPConf.saveSilently();
}
int contr = HPConf.getInt(HPConf.OPTIONS_VIDEO_CONTRAST);
int cValue = WebUtil.getParam(request, "cValue", contr);
int cDelta = WebUtil.getParam(request, "cDelta", 0);
if (cDelta != 0) {
cValue += cDelta;
}
if (cValue != contr) {
focusSet = true;
contr = cValue;
contr = Math.min(127, contr);
contr = Math.max(-127, contr);
HPConf.set(HPConf.OPTIONS_VIDEO_CONTRAST, contr);
HPConf.saveSilently();
}
int sat = HPConf.getInt(HPConf.OPTIONS_VIDEO_SATURATION);
int satValue = WebUtil.getParam(request, "satValue", sat);
int satDelta = WebUtil.getParam(request, "satDelta", 0);
if (satDelta != 0) {
satValue += satDelta;
}
if (satValue != sat) {
focusSet = true;
sat = satValue;
sat = Math.min(255, sat);
sat = Math.max(0, sat);
HPConf.set(HPConf.OPTIONS_VIDEO_SATURATION, sat);
HPConf.saveSilently();
}
String ratio = HPConf.getString(HPConf.OPTIONS_VIDEO_ASPECT_RATIO);
String ratValue = WebUtil.getParam(request, "ratValue", ratio);
if (!ratValue.equals(ratio)) {
ratio = ratValue;
HPConf.set(HPConf.OPTIONS_VIDEO_ASPECT_RATIO, ratio);
HPConf.saveSilently();
}
String mode = HPConf.getString(HPConf.OPTIONS_VIDEO_OUTPUT_MODE);
String mValue = WebUtil.getParam(request, "mValue", mode);
if (!mValue.equals(mode)) {
mode = mValue;
HPConf.set(HPConf.OPTIONS_VIDEO_OUTPUT_MODE, mode);
HPConf.saveSilently();
}
%>
<jsp:useBean id="hppc" class="org.homeplayer.web.HPPageContext" scope="request">
<jsp:setProperty name="hppc" property="request" value="<%=request%>"/>
<jsp:setProperty name="hppc" property="playPage" value="true"/>
<jsp:setProperty name="hppc" property="menuTitle" value="Affichage"/>
<jsp:setProperty name="hppc" property="serviceName" value="Options"/>
<jsp:setProperty name="hppc" property="headerTitle" value="Réglage de l'Affichage"/>
</jsp:useBean>
<%
String pageUrl = request.getContextPath() + request.getRequestURI();
String localUrl = pageUrl + "?type=" + type;
%>
<jsp:include page="<%= hppc.getSkin().getSmallHeader() + "?width=400&valign=top&title=" + WebUtil.urlEncode("Affichage") %>" />
<table cellpadding="0" cellspacing="0">
<tr>
<% if (type.equals("SIZE")) { %>
<td style="width:25%;text-align:center"><a href="<%= WebUtil.setParam(localUrl, "type=SIZE") %>" title="Taille">Taille</a></td>
<% } else { %>
<td style="width:25%;text-align:center"><a href="<%= WebUtil.setParam(localUrl, "type=SIZE") %>" title="Taille"><span style="font-color:<%= hppc.color("#8888883F") %>">Taille</span></a></td>
<% } %>
<% if (type.equals("COLORS")) { %>
<td style="width:25%;text-align:center"><a href="<%= WebUtil.setParam(localUrl, "type=COLORS") %>" title="Couleurs">Couleurs</a></td>
<% } else { %>
<td style="width:25%;text-align:center"><a href="<%= WebUtil.setParam(localUrl, "type=COLORS") %>" title="Couleurs"><span style="font-color:<%= hppc.color("#8888883F") %>">Couleurs</span></a></td>
<% } %>
<% if (type.equals("FORMAT")) { %>
<td style="width:25%;text-align:center"><a href="<%= WebUtil.setParam(localUrl, "type=FORMAT") %>" title="Format">Format</a></td>
<% } else { %>
<td style="width:25%;text-align:center"><a href="<%= WebUtil.setParam(localUrl, "type=FORMAT") %>" title="Format"><span style="font-color:<%= hppc.color("#8888883F") %>">Format</span>></a></td>
<% } %>
<% if (type.equals("MODE")) { %>
<td style="width:25%;text-align:center"><a href="<%= WebUtil.setParam(localUrl, "type=MODE") %>" title="Mode">Mode</a></td>
<% } else { %>
<td style="width:25%;text-align:center"><a href="<%= WebUtil.setParam(localUrl, "type=MODE") %>" title="Mode"><span style="font-color:<%= hppc.color("#8888883F") %>">Mode</span></a></td>
<% } %>
</tr>
</table>
<hr>
<form action="<%= pageUrl %>">
<fieldset class="hidden-opts">
<input type="hidden" name="type" value="<%= type %>" />
</fieldset>
<table cellpadding="0" cellspacing="0">
<% if (type.equals("SIZE")) { %>
<tr>
<td style="text-align:right;width:120px;height:100px">
Taille :
</td>
<td style="text-align:left">
<a href="<%= WebUtil.setParam(localUrl, "sDelta=-10") %>" title="-10">-10</a>
<a href="<%= WebUtil.setParam(localUrl, "sDelta=-5") %>" title="-5">-5</a>
<a href="<%= WebUtil.setParam(localUrl, "sDelta=-1") %>" title="-1">-1</a>
<input type="text" size="3" name="sValue" value="<%= vos %>" />
<a href="<%= WebUtil.setParam(localUrl, "sDelta=1") %>" title="+1">+1</a>
<a href="<%= WebUtil.setParam(localUrl, "sDelta=5") %>" title="+5">+5</a>
<a href="<%= WebUtil.setParam(localUrl, "sDelta=10") %>" title="+10">+10</a>
</td>
</tr>
<% } else if (type.equals("COLORS")) { %>
<tr>
<td style="text-align:right;width:120px;height:33px">
Luminosité :
</td>
<td style="text-align:left" >
<a href="<%= WebUtil.setParam(localUrl, "bDelta=-10") %>" title="-10">-10</a>
<a href="<%= WebUtil.setParam(localUrl, "bDelta=-5") %>" title="-5">-5</a>
<a href="<%= WebUtil.setParam(localUrl, "bDelta=-1") %>" title="-1">-1</a>
<input type="text" size="3" name="bValue" value="<%= bright %>" />
<a href="<%= WebUtil.setParam(localUrl, "bDelta=1") %>" title="+1">+1</a>
<a href="<%= WebUtil.setParam(localUrl, "bDelta=5") %>" title="+5">+5</a>
<a href="<%= WebUtil.setParam(localUrl, "bDelta=10") %>" title="+10">+10</a>
</td>
</tr>
<tr>
<td style="text-align:right;width:120px;height:33px">
Contrast :
</td>
<td style="text-align:left" >
<a href="<%= WebUtil.setParam(localUrl, "cDelta=-10") %>" title="-10">-10</a>
<a href="<%= WebUtil.setParam(localUrl, "cDelta=-5") %>" title="-5">-5</a>
<a href="<%= WebUtil.setParam(localUrl, "cDelta=-1") %>" title="-1">-1</a>
<input type="text" size="3" name="cValue" value="<%= contr %>" />
<a href="<%= WebUtil.setParam(localUrl, "cDelta=1") %>" title="+1">+1</a>
<a href="<%= WebUtil.setParam(localUrl, "cDelta=5") %>" title="+5">+5</a>
<a href="<%= WebUtil.setParam(localUrl, "cDelta=10") %>" title="+10">+10</a>
</td>
</tr>
<tr>
<td style="text-align:right;width:120px;height:34px">
Saturation :
</td>
<td style="text-align="left" >
<a href="<%= WebUtil.setParam(localUrl, "satDelta=-10") %>" title="-10">-10</a>
<a href="<%= WebUtil.setParam(localUrl, "satDelta=-5") %>" title="-5">-5</a>
<a href="<%= WebUtil.setParam(localUrl, "satDelta=-1") %>" title="-1">-1</a>
<input type="text" size="3" name="satValue" value="<%= sat %>" />
<a href="<%= WebUtil.setParam(localUrl, "satDelta=1") %>" title="+1">+1</a>
<a href="<%= WebUtil.setParam(localUrl, "satDelta=5") %>" title="+5">+5</a>
<a href="<%= WebUtil.setParam(localUrl, "satDelta=10") %>" title="+10">+10</a>
</td>
</tr>
<% } else if (type.equals("FORMAT")) { %>
<tr>
<td style="text-align:right;width:120px;height:75px">
Format :
</td>
<td style="text-align:left" >
<input type="radio" name="ratValue" value="letterbox" <% if (ratio.equals("letterbox")){%>checked<%}%> />4/3 Letterbox <br />
<input type="radio" name="ratValue" value="combined" <% if (ratio.equals("combined")){%>checked<%}%> />4/3 Combined <br />
<input type="radio" name="ratValue" value="panscan" <% if (ratio.equals("panscan")){%>checked<%}%> />4/3 Pan Scan <br />
<input type="radio" name="ratValue" value="ignore" <% if (ratio.equals("ignore")){%>checked<%}%> />16/9 <br />
</td>
</tr>
<tr>
<td style="text-align:right;width:120px;height:25px">
</td>
<td style="text-align:left">
<input type="submit" value="Valider" />
</td>
</tr>
<% } else if (type.equals("MODE")) { %>
<tr>
<td style="text-align:right;width:120px;height:75px">
Sortie :
</td>
<td style="text-align:left" >
<input type="radio" name="mValue" value="rgb" <% if (mode.equals("rgb")){%>checked<%}%> />RGB <br />
<input type="radio" name="mValue" value="video" <% if (mode.equals("video")){%>checked<%}%> />Vidéo <br />
</td>
</tr>
<tr>
<td style="text-align:right;width:120px;height:25px">
</td>
<td style="text-align:left">
<input type="submit" value="Valider" />
</td>
</tr>
<% } %>
</table>
</form>
<hr>
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align:center">
<a href="options.jsp" title="Retour aux options">Retour aux options</a>
</td>
</tr>
</table>
<jsp:include page="<%= hppc.getSkin().getSmallFooter() %>" />
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -