Browse Source

修改错别字

pull/212/head
648540858 3 years ago
parent
commit
61a8113c39
  1. 3
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/callback/DeferredResultHolder.java
  2. 18
      src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
  3. 4
      src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
  4. 8
      src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/DownloadController.java
  5. 8
      src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java
  6. 2
      src/main/java/com/genersoft/iot/vmp/web/ApiDeviceController.java
  7. 1
      web_src/src/components/dialog/jessibuca.vue

3
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/callback/DeferredResultHolder.java

@ -31,7 +31,7 @@ public class DeferredResultHolder {
public static final String CALLBACK_CMD_RECORDINFO = "CALLBACK_RECORDINFO"; public static final String CALLBACK_CMD_RECORDINFO = "CALLBACK_RECORDINFO";
public static final String CALLBACK_CMD_PlAY = "CALLBACK_PLAY"; public static final String CALLBACK_CMD_PLAY = "CALLBACK_PLAY";
public static final String CALLBACK_CMD_STOP = "CALLBACK_STOP"; public static final String CALLBACK_CMD_STOP = "CALLBACK_STOP";
@ -47,6 +47,7 @@ public class DeferredResultHolder {
private Map<String, DeferredResult> map = new ConcurrentHashMap<String, DeferredResult>(); private Map<String, DeferredResult> map = new ConcurrentHashMap<String, DeferredResult>();
public void put(String key, DeferredResult result) { public void put(String key, DeferredResult result) {
map.put(key, result); map.put(key, result);
} }

18
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java

@ -80,7 +80,7 @@ public class PlayServiceImpl implements IPlayService {
PlayResult playResult = new PlayResult(); PlayResult playResult = new PlayResult();
if (mediaServerItem == null) { if (mediaServerItem == null) {
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + playResult.getUuid()); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + playResult.getUuid());
WVPResult wvpResult = new WVPResult(); WVPResult wvpResult = new WVPResult();
wvpResult.setCode(-1); wvpResult.setCode(-1);
wvpResult.setMsg("未找到可用的zlm"); wvpResult.setMsg("未找到可用的zlm");
@ -96,12 +96,12 @@ public class PlayServiceImpl implements IPlayService {
DeferredResult<ResponseEntity<String>> result = new DeferredResult<ResponseEntity<String>>(userSetup.getPlayTimeout()); DeferredResult<ResponseEntity<String>> result = new DeferredResult<ResponseEntity<String>>(userSetup.getPlayTimeout());
playResult.setResult(result); playResult.setResult(result);
// 录像查询以channelId作为deviceId查询 // 录像查询以channelId作为deviceId查询
resultHolder.put(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid, result); resultHolder.put(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid, result);
// 超时处理 // 超时处理
result.onTimeout(()->{ result.onTimeout(()->{
logger.warn(String.format("设备点播超时,deviceId:%s ,channelId:%s", deviceId, channelId)); logger.warn(String.format("设备点播超时,deviceId:%s ,channelId:%s", deviceId, channelId));
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + playResult.getUuid()); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + playResult.getUuid());
WVPResult wvpResult = new WVPResult(); WVPResult wvpResult = new WVPResult();
wvpResult.setCode(-1); wvpResult.setCode(-1);
SIPDialog dialog = streamSession.getDialog(deviceId, channelId); SIPDialog dialog = streamSession.getDialog(deviceId, channelId);
@ -170,7 +170,7 @@ public class PlayServiceImpl implements IPlayService {
}, (event) -> { }, (event) -> {
// 点播返回sip错误 // 点播返回sip错误
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
Response response = event.getResponse(); Response response = event.getResponse();
mediaServerService.closeRTPServer(playResult.getDevice(), channelId); mediaServerService.closeRTPServer(playResult.getDevice(), channelId);
WVPResult wvpResult = new WVPResult(); WVPResult wvpResult = new WVPResult();
@ -187,7 +187,7 @@ public class PlayServiceImpl implements IPlayService {
String streamId = streamInfo.getStreamId(); String streamId = streamInfo.getStreamId();
if (streamId == null) { if (streamId == null) {
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
WVPResult wvpResult = new WVPResult(); WVPResult wvpResult = new WVPResult();
wvpResult.setCode(-1); wvpResult.setCode(-1);
wvpResult.setMsg(String.format("点播失败, redis缓存streamId等于null")); wvpResult.setMsg(String.format("点播失败, redis缓存streamId等于null"));
@ -201,7 +201,7 @@ public class PlayServiceImpl implements IPlayService {
JSONObject rtpInfo = zlmresTfulUtils.getRtpInfo(mediaInfo, streamId); JSONObject rtpInfo = zlmresTfulUtils.getRtpInfo(mediaInfo, streamId);
if (rtpInfo != null && rtpInfo.getBoolean("exist")) { if (rtpInfo != null && rtpInfo.getBoolean("exist")) {
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
WVPResult wvpResult = new WVPResult(); WVPResult wvpResult = new WVPResult();
wvpResult.setCode(0); wvpResult.setCode(0);
@ -230,7 +230,7 @@ public class PlayServiceImpl implements IPlayService {
}, (event) -> { }, (event) -> {
mediaServerService.closeRTPServer(playResult.getDevice(), channelId); mediaServerService.closeRTPServer(playResult.getDevice(), channelId);
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
Response response = event.getResponse(); Response response = event.getResponse();
WVPResult wvpResult = new WVPResult(); WVPResult wvpResult = new WVPResult();
@ -248,7 +248,7 @@ public class PlayServiceImpl implements IPlayService {
@Override @Override
public void onPublishHandlerForPlay(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId, String uuid) { public void onPublishHandlerForPlay(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId, String uuid) {
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
StreamInfo streamInfo = onPublishHandler(mediaServerItem, resonse, deviceId, channelId, uuid); StreamInfo streamInfo = onPublishHandler(mediaServerItem, resonse, deviceId, channelId, uuid);
if (streamInfo != null) { if (streamInfo != null) {
DeviceChannel deviceChannel = storager.queryChannel(deviceId, channelId); DeviceChannel deviceChannel = storager.queryChannel(deviceId, channelId);
@ -292,7 +292,7 @@ public class PlayServiceImpl implements IPlayService {
@Override @Override
public void onPublishHandlerForPlayBack(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId, String uuid) { public void onPublishHandlerForPlayBack(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId, String uuid) {
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
StreamInfo streamInfo = onPublishHandler(mediaServerItem, resonse, deviceId, channelId, uuid); StreamInfo streamInfo = onPublishHandler(mediaServerItem, resonse, deviceId, channelId, uuid);
if (streamInfo != null) { if (streamInfo != null) {
redisCatchStorage.startPlayback(streamInfo); redisCatchStorage.startPlayback(streamInfo);

4
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java

@ -134,13 +134,13 @@ public class PlayController {
json.put("deviceId", deviceId); json.put("deviceId", deviceId);
json.put("channelId", channelId); json.put("channelId", channelId);
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
msg.setData(json.toString()); msg.setData(json.toString());
resultHolder.invokeResult(msg); resultHolder.invokeResult(msg);
} else { } else {
logger.warn("设备预览/回放停止API调用失败!"); logger.warn("设备预览/回放停止API调用失败!");
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
msg.setData("streamId null"); msg.setData("streamId null");
resultHolder.invokeResult(msg); resultHolder.invokeResult(msg);
} }

8
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/DownloadController.java

@ -82,7 +82,7 @@ public class DownloadController {
result.onTimeout(()->{ result.onTimeout(()->{
logger.warn(String.format("设备下载响应超时,deviceId:%s ,channelId:%s", deviceId, channelId)); logger.warn(String.format("设备下载响应超时,deviceId:%s ,channelId:%s", deviceId, channelId));
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
msg.setData("Timeout"); msg.setData("Timeout");
resultHolder.invokeResult(msg); resultHolder.invokeResult(msg);
}); });
@ -92,12 +92,12 @@ public class DownloadController {
// 停止之前的下载 // 停止之前的下载
cmder.streamByeCmd(deviceId, channelId); cmder.streamByeCmd(deviceId, channelId);
} }
resultHolder.put(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid, result); resultHolder.put(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid, result);
MediaServerItem newMediaServerItem = playService.getNewMediaServerItem(device); MediaServerItem newMediaServerItem = playService.getNewMediaServerItem(device);
if (newMediaServerItem == null) { if (newMediaServerItem == null) {
logger.warn(String.format("设备下载响应超时,deviceId:%s ,channelId:%s", deviceId, channelId)); logger.warn(String.format("设备下载响应超时,deviceId:%s ,channelId:%s", deviceId, channelId));
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
msg.setData("Timeout"); msg.setData("Timeout");
resultHolder.invokeResult(msg); resultHolder.invokeResult(msg);
return result; return result;
@ -111,7 +111,7 @@ public class DownloadController {
}, event -> { }, event -> {
Response response = event.getResponse(); Response response = event.getResponse();
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
msg.setData(String.format("回放失败, 错误码: %s, %s", response.getStatusCode(), response.getReasonPhrase())); msg.setData(String.format("回放失败, 错误码: %s, %s", response.getStatusCode(), response.getReasonPhrase()));
resultHolder.invokeResult(msg); resultHolder.invokeResult(msg);
}); });

8
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/playback/PlaybackController.java

@ -91,7 +91,7 @@ public class PlaybackController {
result.onTimeout(()->{ result.onTimeout(()->{
logger.warn(String.format("设备回放超时,deviceId:%s ,channelId:%s", deviceId, channelId)); logger.warn(String.format("设备回放超时,deviceId:%s ,channelId:%s", deviceId, channelId));
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
msg.setData("Timeout"); msg.setData("Timeout");
resultHolder.invokeResult(msg); resultHolder.invokeResult(msg);
}); });
@ -101,12 +101,12 @@ public class PlaybackController {
// 停止之前的回放 // 停止之前的回放
cmder.streamByeCmd(deviceId, channelId); cmder.streamByeCmd(deviceId, channelId);
} }
resultHolder.put(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid, result); resultHolder.put(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid, result);
if (newMediaServerItem == null) { if (newMediaServerItem == null) {
logger.warn(String.format("设备回放超时,deviceId:%s ,channelId:%s", deviceId, channelId)); logger.warn(String.format("设备回放超时,deviceId:%s ,channelId:%s", deviceId, channelId));
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
msg.setData("Timeout"); msg.setData("Timeout");
resultHolder.invokeResult(msg); resultHolder.invokeResult(msg);
return result; return result;
@ -118,7 +118,7 @@ public class PlaybackController {
}, event -> { }, event -> {
Response response = event.getResponse(); Response response = event.getResponse();
RequestMessage msg = new RequestMessage(); RequestMessage msg = new RequestMessage();
msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid); msg.setId(DeferredResultHolder.CALLBACK_CMD_PLAY + uuid);
msg.setData(String.format("回放失败, 错误码: %s, %s", response.getStatusCode(), response.getReasonPhrase())); msg.setData(String.format("回放失败, 错误码: %s, %s", response.getStatusCode(), response.getReasonPhrase()));
resultHolder.invokeResult(msg); resultHolder.invokeResult(msg);
}); });

2
src/main/java/com/genersoft/iot/vmp/web/ApiDeviceController.java

@ -53,8 +53,6 @@ public class ApiDeviceController {
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("查询所有视频设备API调用"); logger.debug("查询所有视频设备API调用");
} }
logger.debug("查询所有视频设备API调用");
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
List<Device> devices; List<Device> devices;
if (start == null || limit ==null) { if (start == null || limit ==null) {

1
web_src/src/components/dialog/jessibuca.vue

@ -80,6 +80,7 @@ export default {
container: this.$refs.container, container: this.$refs.container,
videoBuffer: 0.5, // videoBuffer: 0.5, //
isResize: true, isResize: true,
isFlv: true,
decoder: "./static/js/jessibuca/index.js", decoder: "./static/js/jessibuca/index.js",
// text: "WVP-PRO", // text: "WVP-PRO",
// background: "bg.jpg", // background: "bg.jpg",

Loading…
Cancel
Save