Merge remote-tracking branch 'origin/jtdev' into jtdev
| | |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | ProtocolConstant.WS, |
| | | expand); |
| | | expand, |
| | | null==hk.getStreamType()?1:hk.getStreamType()); |
| | | if (null!=result) { |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | Map map = (Map) jsonObject.get("data"); |
| | |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | hk.getProtocol(), |
| | | expand); |
| | | expand, |
| | | null==hk.getStreamType()?1:hk.getStreamType()); |
| | | if (null!=result) { |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | Map map = (Map) jsonObject.get("data"); |
| | |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | ProtocolConstant.HLS, |
| | | expand); |
| | | expand, |
| | | null==hk.getStreamType()?1:hk.getStreamType()); |
| | | if (null!=result) { |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | Map map = (Map) jsonObject.get("data"); |
| | |
| | | */ |
| | | JSONObject jsonBody = new JSONObject(); |
| | | jsonBody.put("cameraIndexCode", hk.getCameraIndexCode()); |
| | | jsonBody.put("streamType",null==hk.getStreamType()?1:hk.getStreamType()); |
| | | jsonBody.put("protocol", hk.getProtocol()); |
| | | String body = jsonBody.toJSONString(); |
| | | |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.hikvision.artemis.sdk.ArtemisHttpUtil; |
| | | import com.hikvision.artemis.sdk.config.ArtemisConfig; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | | import java.util.*; |
| | | |
| | | import static cn.gistack.sm.hk.constant.HkConstant.ARTEMIS_PATH; |
| | | import static cn.gistack.sm.hk.util.GetCameraUtils.GetCameraPreviewURL; |
| | | |
| | | public class GetCameraUtils { |
| | | |
| | | /** |
| | |
| | | * @param expand |
| | | * @return |
| | | */ |
| | | public static String GetCameraPreviewURL(Integer type,String url, String cameraIndexCode, String protocol,String expand) { |
| | | public static String GetCameraPreviewURL(Integer type,String url, String cameraIndexCode, String protocol,String expand,Integer streamType) { |
| | | /** |
| | | * 组装请求参数 |
| | | */ |
| | | JSONObject jsonBody = new JSONObject(); |
| | | jsonBody.put("cameraIndexCode", cameraIndexCode); |
| | | jsonBody.put("streamType", 0); |
| | | jsonBody.put("streamType",streamType); |
| | | jsonBody.put("protocol", protocol); |
| | | jsonBody.put("transmode", 1); |
| | | if (null!= expand && !expand.equals("")) { |