示例#1
0
        public JsonResult StopSrs(string deviceId)
        {
            ResponseStruct rss = CommonFunctions.CheckParams(new object[] { deviceId });

            if (rss.Code != ErrorNumber.None)
            {
                return(Program.CommonFunctions.DelApisResult(null !, rss));
            }

            var rt = GlobalSrsApis.StopSrs(deviceId, out ResponseStruct rs);

            return(Program.CommonFunctions.DelApisResult(rt, rs));
        }
示例#2
0
        public JsonResult GlobalChangeHttpServerEnable(string deviceId, bool enable)
        {
            ResponseStruct rss = CommonFunctions.CheckParams(new object[] { deviceId, enable });

            if (rss.Code != ErrorNumber.None)
            {
                return(Program.CommonFunctions.DelApisResult(null !, rss));
            }

            var rt = GlobalSrsApis.GlobalChangeHttpServerEnable(deviceId, enable, out ResponseStruct rs);

            return(Program.CommonFunctions.DelApisResult(rt, rs));
        }
示例#3
0
        public JsonResult ChangeGlobalParams(ReqChangeSrsGlobalParams req)
        {
            ResponseStruct rss = CommonFunctions.CheckParams(new object[] { req });

            if (rss.Code != ErrorNumber.None)
            {
                return(Program.CommonFunctions.DelApisResult(null !, rss));
            }

            var rt = GlobalSrsApis.ChangeGlobalParams(req.DeviceId, req.Gm, out ResponseStruct rs);

            return(Program.CommonFunctions.DelApisResult(rt, rs));
        }
示例#4
0
        public JsonResult GlobalChangeRtmpListen(string deviceId, ushort port)
        {
            ResponseStruct rss = CommonFunctions.CheckParams(new object[] { deviceId, port });

            if (rss.Code != ErrorNumber.None)
            {
                return(Program.CommonFunctions.DelApisResult(null !, rss));
            }

            var rt = GlobalSrsApis.GlobalChangeRtmpListen(deviceId, port, out ResponseStruct rs);

            return(Program.CommonFunctions.DelApisResult(rt, rs));
        }