bitRate.esp
6.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../../css/frame.css" rel="stylesheet" />
<link href="../../scripts/easyui/themes/default/easyui.css" rel="stylesheet" />
<link href="../../scripts/easyui/themes/icon.css" rel="stylesheet" />
<style type="text/css">
#bitRateForm {
padding: 8px;
}
.tdTitle {
width: 80px;
}
.tdMiddleTitle {
text-align: left;
padding-left: 20px;
}
</style>
</head>
<body>
<form id="bitRateForm">
<table class="settingsContainer">
<tr>
<td class="tdMiddleTitle" colspan="2">
主码流
</td>
<td class="tdMiddleTitle" colspan="2">
子码流
</td>
</tr>
<tr>
<td class="tdTitle">
<label for="107">编码格式</label>
</td>
<td class="tdContent">
<select id="107" name="107" class="settingParameter " disabled="disabled">
<option value="0">h264</option>
</select>
</td>
<td class="tdTitle">
<label>编码格式</label>
</td>
<td class="tdContent">
<select id="112" name="112" class="settingParameter " disabled="disabled">
<option value="0">h264</option>
</select>
</td>
</tr>
<tr>
<td class="tdTitle">
<label>码率类型</label>
</td>
<td class="tdContent">
<select id="108" name="108" class="settingParameter " disabled="disabled">
<option value="0">CBR</option>
<option value="1">VBR</option>
</select>
</td>
<td class="tdTitle">
<label>码率类型</label>
</td>
<td class="tdContent">
<select id="113" name="113" class="settingParameter " disabled="disabled">
<option value="0">CBR</option>
<option value="1">VBR</option>
</select>
</td>
</tr>
<tr>
<td class="tdTitle">
<label>分辨率</label>
</td>
<td class="tdContent">
<select id="109" name="109" class="settingParameter " disabled="disabled">
<option value="0">全分辨率</option>
<option value="1">1080P</option>
<option value="2">720P</option>
<option value="3">D1</option>
<option value="4">Cif</option>
</select>
</td>
<td class="tdTitle">
<label>分辨率</label>
</td>
<td class="tdContent">
<select id="114" name="114" class="settingParameter " disabled="disabled">
<option value="0">全分辨率</option>
<option value="1">1080P</option>
<option value="2">720P</option>
<option value="3">D1</option>
<option value="4">Cif</option>
</select>
</td>
</tr>
<tr>
<td class="tdTitle">
<label class="needRebootHint" title="修改需重启生效">码率</label>
</td>
<td class="tdContent">
<input id="110" name="110" class="settingParameter needReboot" type="text" />
</td>
<td class="tdTitle">
<label class="needRebootHint" title="修改需重启生效">码率</label>
</td>
<td class="tdContent">
<input id="115" name="115" class="settingParameter needReboot" type="text" />
</td>
</tr>
<tr>
<td class="tdTitle">
<label>I帧间隔</label>
</td>
<td class="tdContent">
<input id="111" name="111" class="settingParameter " type="text" />
</td>
<td class="tdTitle">
<label>I帧间隔</label>
</td>
<td class="tdContent">
<input id="116" name="116" class="settingParameter " type="text" />
</td>
</tr>
<tr>
<td colspan="4">
<a class="settingBtn" id="btnSave" href="#">保存</a>
<% inputSecurityToken(); %>
</td>
</tr>
</table>
</form>
<script src="../../scripts/easyui/jquery.min.js"></script>
<script src="../../scripts/easyui/jquery.easyui.min.js"></script>
<script src="../../scripts/easyui/locale/easyui-lang-zh_CN.js"></script>
<script src="../../scripts/utilities.js"></script>
<script src="../../scripts/jquery.validate.min.js"></script>
<script src="../../scripts/jquery.validate.extend.js"></script>
<script type="text/javascript">
var parameterAdaptor = new ParameterAdaptor();
$().ready(function () {
loadBitRateInfo();
//保存参数
$("#btnSave").click(saveParametersToServer);
//验证
var rules = {};
rules[110] = {
range: [1, 10000],
digits: true,
required: true
};
rules[115] = {
range: [1, 3000],
digits: true,
required: true
};
rules[111] = rules[116] = {
range: [0, 100],
digits: true,
required: true
};
$("#bitRateForm").validate({
rules: rules
});
});
//加载数据
function loadBitRateInfo() {
var RefererInfo = "bitRate";
parameterAdaptor.getParameters(RefererInfo, function (data) {
$("#bitRateForm").form("load", data.feedback);
});
};
//保存参数
function saveParametersToServer() {
var formObj = $("#bitRateForm");
if (!formObj.valid()) {
$.messager.alert("提示", "参数验证有误,请修改后再提交!", "error");
return;
}
parameterAdaptor.saveParameters(formObj);
}
</script>
</body>
</html>