临时提交
parent
ad240ba9a4
commit
d5621f9489
|
@ -79,5 +79,5 @@ public interface IGbChannelService {
|
||||||
|
|
||||||
CommonGBChannel queryOneWithPlatform(Integer platformId, String channelDeviceId);
|
CommonGBChannel queryOneWithPlatform(Integer platformId, String channelDeviceId);
|
||||||
|
|
||||||
void start(CommonGBChannel channel, ErrorCallback<CommonChannelPlayInfo> callback);
|
void start(CommonGBChannel channel, InviteInfo inviteInfo, ErrorCallback<CommonChannelPlayInfo> callback);
|
||||||
}
|
}
|
||||||
|
|
|
@ -654,8 +654,13 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(CommonGBChannel channel, ErrorCallback<CommonChannelPlayInfo> callback) {
|
public void start(CommonGBChannel channel, InviteInfo inviteInfo, ErrorCallback<CommonChannelPlayInfo> callback) {
|
||||||
log.info("[点播通用通道] 通道: {}({})", channel.getGbName(), channel.getGbDeviceId());
|
if (channel == null || inviteInfo == null || callback == null) {
|
||||||
|
log.warn("[通用通道点播] 参数异常, channel: {}, inviteInfo: {}, callback: {}", channel != null, inviteInfo != null, callback != null);
|
||||||
|
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
||||||
|
}
|
||||||
|
log.info("[点播通用通道] 类型:{}, 通道: {}({})", inviteInfo.getSessionName(), channel.getGbName(), channel.getGbDeviceId());
|
||||||
|
if ("Play".equalsIgnoreCase(inviteInfo.getSessionName())) {
|
||||||
if (channel.getGbDeviceDbId() > 0) {
|
if (channel.getGbDeviceDbId() > 0) {
|
||||||
// 国标通道
|
// 国标通道
|
||||||
Device device = deviceService.getDevice(channel.getGbDeviceDbId());
|
Device device = deviceService.getDevice(channel.getGbDeviceDbId());
|
||||||
|
@ -683,5 +688,12 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
||||||
log.error("[点播通用通道] 通道数据异常,无法识别通道来源: {}({})", channel.getGbName(), channel.getGbDeviceId());
|
log.error("[点播通用通道] 通道数据异常,无法识别通道来源: {}({})", channel.getGbName(), channel.getGbDeviceId());
|
||||||
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
throw new PlayException(Response.SERVER_INTERNAL_ERROR, "server internal error");
|
||||||
}
|
}
|
||||||
|
}else if ("Playback".equals(inviteInfo.getSessionName())) {
|
||||||
|
|
||||||
|
}else if ("Download".equals(inviteInfo.getSessionName())) {
|
||||||
|
|
||||||
|
}else {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||||
log.error("[命令发送失败] 上级Invite TRYING: {}", e.getMessage());
|
log.error("[命令发送失败] 上级Invite TRYING: {}", e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
channelService.start(channel, ((code, msg, commonChannelPlayInfo) -> {
|
channelService.start(channel, inviteInfo, ((code, msg, commonChannelPlayInfo) -> {
|
||||||
if (code != Response.OK) {
|
if (code != Response.OK) {
|
||||||
try {
|
try {
|
||||||
responseAck(request, code, msg);
|
responseAck(request, code, msg);
|
||||||
|
|
Loading…
Reference in New Issue