view_01bbef22dea19670a34ba4931f2f06e4.c 8.42 KB
/*
   Generated from client/settings/base/bitRate.esp
 */
#include "esp.h"

static void view_01bbef22dea19670a34ba4931f2f06e4(HttpConn *conn) {
  espRenderBlock(conn, "<!DOCTYPE html>\r\n\
<html>\r\n\
\r\n\
<head>\r\n\
    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n\
    <title></title>\r\n\
    <link href=\"../../css/frame.css\" rel=\"stylesheet\" />\r\n\
    <link href=\"../../scripts/easyui/themes/default/easyui.css\" rel=\"stylesheet\" />\r\n\
    <link href=\"../../scripts/easyui/themes/icon.css\" rel=\"stylesheet\" />\r\n\
    <style type=\"text/css\">\r\n\
        #bitRateForm {\r\n\
            padding: 8px;\r\n\
        }\r\n\
\r\n\
        .tdTitle {\r\n\
            width: 80px;\r\n\
        }\r\n\
\r\n\
        .tdMiddleTitle {\r\n\
            text-align: left;\r\n\
            padding-left: 20px;\r\n\
        }\r\n\
    </style>\r\n\
</head>\r\n\
\r\n\
<body>\r\n\
    <form id=\"bitRateForm\">\r\n\
        <table class=\"settingsContainer\">\r\n\
            <tr>\r\n\
                <td class=\"tdMiddleTitle\" colspan=\"2\">\r\n\
                    主码流\r\n\
                </td>\r\n\
                <td class=\"tdMiddleTitle\" colspan=\"2\">\r\n\
                    子码流\r\n\
                </td>\r\n\
            </tr>\r\n\
            <tr>\r\n\
                <td class=\"tdTitle\">\r\n\
                    <label for=\"107\">编码格式</label>\r\n\
                </td>\r\n\
                <td class=\"tdContent\">\r\n\
                    <select id=\"107\" name=\"107\" class=\"settingParameter \" disabled=\"disabled\">\r\n\
                        <option value=\"0\">h264</option>\r\n\
                    </select>\r\n\
                </td>\r\n\
                <td class=\"tdTitle\">\r\n\
                    <label>编码格式</label>\r\n\
                </td>\r\n\
                <td class=\"tdContent\">\r\n\
                    <select id=\"112\" name=\"112\" class=\"settingParameter \" disabled=\"disabled\">\r\n\
                        <option value=\"0\">h264</option>\r\n\
                    </select>\r\n\
                </td>\r\n\
            </tr>\r\n\
            <tr>\r\n\
                <td class=\"tdTitle\">\r\n\
                    <label>码率类型</label>\r\n\
                </td>\r\n\
                <td class=\"tdContent\">\r\n\
                    <select id=\"108\" name=\"108\" class=\"settingParameter \" disabled=\"disabled\">\r\n\
                        <option value=\"0\">CBR</option>\r\n\
                        <option value=\"1\">VBR</option>\r\n\
                    </select>\r\n\
                </td>\r\n\
                <td class=\"tdTitle\">\r\n\
                    <label>码率类型</label>\r\n\
                </td>\r\n\
                <td class=\"tdContent\">\r\n\
                    <select id=\"113\" name=\"113\" class=\"settingParameter \" disabled=\"disabled\">\r\n\
                        <option value=\"0\">CBR</option>\r\n\
                        <option value=\"1\">VBR</option>\r\n\
                    </select>\r\n\
                </td>\r\n\
            </tr>\r\n\
            <tr>\r\n\
                <td class=\"tdTitle\">\r\n\
                    <label>分辨率</label>\r\n\
                </td>\r\n\
                <td class=\"tdContent\">\r\n\
                    <select id=\"109\" name=\"109\" class=\"settingParameter \" disabled=\"disabled\">\r\n\
                        <option value=\"0\">全分辨率</option>\r\n\
                        <option value=\"1\">1080P</option>\r\n\
                        <option value=\"2\">720P</option>\r\n\
                        <option value=\"3\">D1</option>\r\n\
                        <option value=\"4\">Cif</option>\r\n\
                    </select>\r\n\
                </td>\r\n\
                <td class=\"tdTitle\">\r\n\
                    <label>分辨率</label>\r\n\
                </td>\r\n\
                <td class=\"tdContent\">\r\n\
                    <select id=\"114\" name=\"114\" class=\"settingParameter \" disabled=\"disabled\">\r\n\
                        <option value=\"0\">全分辨率</option>\r\n\
                        <option value=\"1\">1080P</option>\r\n\
                        <option value=\"2\">720P</option>\r\n\
                        <option value=\"3\">D1</option>\r\n\
                        <option value=\"4\">Cif</option>\r\n\
                    </select>\r\n\
                </td>\r\n\
            </tr>\r\n\
            <tr>\r\n\
                <td class=\"tdTitle\">\r\n\
                    <label class=\"needRebootHint\" title=\"修改需重启生效\">码率</label>\r\n\
                </td>\r\n\
                <td class=\"tdContent\">\r\n\
                    <input id=\"110\" name=\"110\" class=\"settingParameter needReboot\" type=\"text\" />\r\n\
                </td>\r\n\
                <td class=\"tdTitle\">\r\n\
                    <label class=\"needRebootHint\" title=\"修改需重启生效\">码率</label>\r\n\
                </td>\r\n\
                <td class=\"tdContent\">\r\n\
                    <input id=\"115\" name=\"115\" class=\"settingParameter needReboot\" type=\"text\" />\r\n\
                </td>\r\n\
            </tr>\r\n\
            <tr>\r\n\
                <td class=\"tdTitle\">\r\n\
                    <label>I帧间隔</label>\r\n\
                </td>\r\n\
                <td class=\"tdContent\">\r\n\
                    <input id=\"111\" name=\"111\" class=\"settingParameter \" type=\"text\" />\r\n\
                </td>\r\n\
                <td class=\"tdTitle\">\r\n\
                    <label>I帧间隔</label>\r\n\
                </td>\r\n\
                <td class=\"tdContent\">\r\n\
                    <input id=\"116\" name=\"116\" class=\"settingParameter \" type=\"text\" />\r\n\
                </td>\r\n\
            </tr>\r\n\
            <tr>\r\n\
                <td colspan=\"4\">\r\n\
                    <a class=\"settingBtn\" id=\"btnSave\" href=\"#\">保存</a>\r\n\
                    ", 5182);
inputSecurityToken();   espRenderBlock(conn, "\r\n\
                </td>\r\n\
            </tr>\r\n\
        </table>\r\n\
    </form>\r\n\
    <script src=\"../../scripts/easyui/jquery.min.js\"></script>\r\n\
    <script src=\"../../scripts/easyui/jquery.easyui.min.js\"></script>\r\n\
    <script src=\"../../scripts/easyui/locale/easyui-lang-zh_CN.js\"></script>\r\n\
    <script src=\"../../scripts/utilities.js\"></script>\r\n\
    <script src=\"../../scripts/jquery.validate.min.js\"></script>\r\n\
    <script src=\"../../scripts/jquery.validate.extend.js\"></script>\r\n\
    <script type=\"text/javascript\">\r\n\
        var parameterAdaptor = new ParameterAdaptor();\r\n\
\r\n\
        $().ready(function () {\r\n\
            loadBitRateInfo();\r\n\
            //保存参数\r\n\
            $(\"#btnSave\").click(saveParametersToServer);\r\n\
\r\n\
            //验证\r\n\
            var rules = {};\r\n\
            rules[110] = {\r\n\
                range: [1, 10000],\r\n\
                digits: true,\r\n\
                required: true\r\n\
            };\r\n\
            rules[115] = {\r\n\
                range: [1, 3000],\r\n\
                digits: true,\r\n\
                required: true\r\n\
            };\r\n\
            rules[111] = rules[116] = {\r\n\
                range: [0, 100],\r\n\
                digits: true,\r\n\
                required: true\r\n\
            };\r\n\
            $(\"#bitRateForm\").validate({\r\n\
                rules: rules\r\n\
            });\r\n\
        });\r\n\
\r\n\
        //加载数据\r\n\
        function loadBitRateInfo() {\r\n\
            var RefererInfo = \"bitRate\";\r\n\
            parameterAdaptor.getParameters(RefererInfo, function (data) {\r\n\
                $(\"#bitRateForm\").form(\"load\", data.feedback);\r\n\
            });\r\n\
        };\r\n\
\r\n\
        //保存参数\r\n\
        function saveParametersToServer() {\r\n\
            var formObj = $(\"#bitRateForm\");\r\n\
            if (!formObj.valid()) {\r\n\
                $.messager.alert(\"提示\", \"参数验证有误,请修改后再提交!\", \"error\");\r\n\
                return;\r\n\
            }\r\n\
            parameterAdaptor.saveParameters(formObj);\r\n\
        }\r\n\
    </script>\r\n\
</body>\r\n\
\r\n\
</html>", 1989);
}

ESP_EXPORT int esp_view_01bbef22dea19670a34ba4931f2f06e4(HttpRoute *route, MprModule *module) {
   espDefineView(route, "client/settings/base/bitRate.esp", view_01bbef22dea19670a34ba4931f2f06e4);
   return 0;
}