mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 4050|reply: 2
打印 prevThread nextThread

布控球

[copyURL]

1

主题

1

帖子

15

积分

newBie

Rank: 1

积分
15
jumpTo
owner
poston 2020-12-2 10:40 | authorOnly 回帖奖励 |倒序浏览 |阅读模式
android 支持布控球的操作吗?如果支持,调用什么api

reply

使用道具 report

3

主题

356

帖子

1881

积分

vipMem

Rank: 6Rank: 6

积分
1881
sofa
poston 2020-12-2 11:11 | authorOnly
用MCP,进入视频浏览功能,即MCU功能,调取实时视频出来后,在屏幕上用手指头左右滑动,就是PTZ操作了。
reply agree Against

使用道具 report

4

主题

70

帖子

242

积分

midMem

Rank: 3Rank: 3

积分
242
bench
poston 2020-12-2 11:23 | authorOnly
/**
         * 布控球控制方法
         * 监听控制按钮的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);
        }

本帖子中包含更多资源

pls login 才可以下载或查看,没有帐号?registerNow

x
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-12-22 19:03 , Processed in 0.056637 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList