mobile CCTV,mobile surveillance,police body worn cameras
标题:
布控球
[打印本页]
author:
张沛文
time:
2020-12-2 10:40
标题:
布控球
android 支持布控球的操作吗?如果支持,调用什么api
author:
coldflame
time:
2020-12-2 11:11
用MCP,进入视频浏览功能,即MCU功能,调取实时视频出来后,在屏幕上用手指头左右滑动,就是PTZ操作了。
author:
wanzongyong
time:
2020-12-2 11:23
/**
* 布控球控制方法
* 监听控制按钮的OnTouchListener
*
* 上: event.getAction() == MotionEvent.ACTION_DOWN ptzControl(0, BVCU_PTZ_Command.BVCU_PTZ_COMMAND_UP, 8, 0);
* event.getAction() == MotionEvent.ACTION_UP ptzControl(1, BVCU_PTZ_Command.BVCU_PTZ_COMMAND_UP, 8, 0);
*
* 下: event.getAction() == MotionEvent.ACTION_DOWN ptzControl(0, BVCU_PTZ_Command.BVCU_PTZ_COMMAND_DOWN, 8, 0);
* event.getAction() == MotionEvent.ACTION_UP ptzControl(1, BVCU_PTZ_Command.BVCU_PTZ_COMMAND_DOWN, 8, 0);
*
* 左: event.getAction() == MotionEvent.ACTION_DOWN ptzControl(0, BVCU_PTZ_Command.BVCU_PTZ_COMMAND_LEFT, 8, 0);
* event.getAction() == MotionEvent.ACTION_UP ptzControl(1, BVCU_PTZ_Command.BVCU_PTZ_COMMAND_LEFT, 8, 0);
*
* 右: event.getAction() == MotionEvent.ACTION_DOWN ptzControl(0, BVCU_PTZ_Command.BVCU_PTZ_COMMAND_RIGHT, 8, 0);
* event.getAction() == MotionEvent.ACTION_UP ptzControl(1, BVCU_PTZ_Command.BVCU_PTZ_COMMAND_RIGHT, 8, 0);
*
* @param bStop 开始/结束
* @param iPTZCommand 移动命令
* @param horizontalSpeed 速度
* @param verticalSpeed 速度
*/
private void ptzControl(int bStop, int iPTZCommand, int horizontalSpeed, int verticalSpeed) {
BVCU_Command command = new BVCU_Command();
command.iMethod = BVCU_Method.BVCU_METHOD_CONTROL;
command.iSubMethod = BVCU_SubMethod.BVCU_SUBMETHOD_PU_PTZCONTROL;
command.szTargetID = deviceID; // PU_ID
command.iTargetIndex = 0; //默认填0即可
command.stMsgContent = new BVCU_CmdMsgContent();
BVCU_PUCFG_PTZControl ptz = new BVCU_PUCFG_PTZControl();
ptz.iPTZCommand = iPTZCommand;
ptz.bStop = bStop;
ptz.iParam1 = verticalSpeed;
ptz.iParam2 = horizontalSpeed;
ptz.iParam3 = 0;
command.stMsgContent.pData = ptz;
command.stMsgContent.iDataCount = 1;
int token = BVCU.getSDK().sendCmd(command);
}
欢迎光临 mobile CCTV,mobile surveillance,police body worn cameras (http://bbs.besovideo.com:8067/)
Powered by Discuz! X3.2