当前位置: 首页>>代码示例>>PHP>>正文


PHP Monitor::Controllable方法代码示例

本文整理汇总了PHP中Monitor::Controllable方法的典型用法代码示例。如果您正苦于以下问题:PHP Monitor::Controllable方法的具体用法?PHP Monitor::Controllable怎么用?PHP Monitor::Controllable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Monitor的用法示例。


在下文中一共展示了Monitor::Controllable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: intval

}
// This is for input sanitation
$mid = intval($_REQUEST['mid']);
if (!visibleMonitor($mid)) {
    $view = "error";
    return;
}
$sql = 'SELECT C.*, M.* FROM Monitors AS M LEFT JOIN Controls AS C ON (M.ControlId = C.Id ) WHERE M.Id = ?';
$monitor = new Monitor($mid);
#dbFetchOne( $sql, NULL, array( $_REQUEST['mid'] ) );
if (isset($_REQUEST['showControls'])) {
    $showControls = validInt($_REQUEST['showControls']);
} else {
    $showControls = canView('Control') && $monitor->DefaultView() == 'Control';
}
$showPtzControls = ZM_OPT_CONTROL && $monitor->Controllable() && canView('Control');
if (isset($_REQUEST['scale'])) {
    $scale = validInt($_REQUEST['scale']);
} else {
    $scale = reScale(SCALE_BASE, $monitor->DefaultScale, ZM_WEB_DEFAULT_SCALE);
}
$connkey = generateConnKey();
if (ZM_WEB_STREAM_METHOD == 'mpeg' && ZM_MPEG_LIVE_FORMAT) {
    $streamMode = "mpeg";
    $streamSrc = $monitor->getStreamSrc(array("mode=" . $streamMode, "scale=" . $scale, "bitrate=" . ZM_WEB_VIDEO_BITRATE, "maxfps=" . ZM_WEB_VIDEO_MAXFPS, "format=" . ZM_MPEG_LIVE_FORMAT));
} elseif (canStream()) {
    $streamMode = "jpeg";
    $streamSrc = $monitor->getStreamSrc(array("mode=" . $streamMode, "scale=" . $scale, "maxfps=" . ZM_WEB_VIDEO_MAXFPS, "buffer=" . $monitor->StreamReplayBuffer()));
} else {
    $streamMode = "single";
    $streamSrc = $monitor->getStreamSrc(array("mode=" . $streamMode, "scale=" . $scale));
开发者ID:schrorg,项目名称:ZoneMinder,代码行数:31,代码来源:watch.php


注:本文中的Monitor::Controllable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。