[1078] 适配新结构接入通用通道
This commit is contained in:
@@ -123,17 +123,6 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
downloadService.download(channel, startTime, stopTime, downloadSpeed, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playJt1078(CommonGBChannel channel, Boolean record, ErrorCallback<StreamInfo> callback){
|
||||
// 部标设备通道
|
||||
try {
|
||||
jt1078PlayService.start(channel.getDataDeviceId(), record, callback);
|
||||
}catch (Exception e) {
|
||||
log.info("[通用通道] 部标设备点播异常 {}", e.getMessage());
|
||||
callback.run(Response.BUSY_HERE, "busy here", null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopPlay(CommonGBChannel channel, String stream) {
|
||||
Integer dataType = channel.getDataType();
|
||||
@@ -172,36 +161,6 @@ public class GbChannelPlayServiceImpl implements IGbChannelPlayService {
|
||||
downloadService.stopDownload(channel, stream);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopPlayJt1078(CommonGBChannel channel) {
|
||||
// 推流
|
||||
try {
|
||||
jt1078PlayService.stop(channel.getDataDeviceId());
|
||||
}catch (Exception e) {
|
||||
log.error("[停止点播失败] {}({})", channel.getGbName(), channel.getGbDeviceId(), e);
|
||||
}
|
||||
}
|
||||
|
||||
private void playbackGbDeviceChannel(CommonGBChannel channel, Long startTime, Long stopTime, ErrorCallback<StreamInfo> callback){
|
||||
try {
|
||||
deviceChannelPlayService.playBack(channel, startTime, stopTime, callback);
|
||||
} catch (PlayException e) {
|
||||
callback.run(e.getCode(), e.getMsg(), null);
|
||||
} catch (Exception e) {
|
||||
callback.run(Response.BUSY_HERE, "busy here", null);
|
||||
}
|
||||
}
|
||||
|
||||
private void playbackJtDeviceChannel(CommonGBChannel channel, Long startTime, Long stopTime, ErrorCallback<StreamInfo> callback){
|
||||
try {
|
||||
jt1078PlayService.playBack(channel.getDataDeviceId(), startTime, stopTime, callback);
|
||||
} catch (PlayException e) {
|
||||
callback.run(e.getCode(), e.getMsg(), null);
|
||||
} catch (Exception e) {
|
||||
callback.run(Response.BUSY_HERE, "busy here", null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playbackPause(CommonGBChannel channel, String stream) {
|
||||
log.info("[通用通道] 回放暂停, 类型: {}, 编号:{} stream:{}", channel.getDataType(), channel.getGbDeviceId(), stream);
|
||||
|
||||
Reference in New Issue
Block a user