添加通道音频设置
添加media配置
This commit is contained in:
@@ -143,6 +143,11 @@ public class DeviceChannel {
|
||||
*/
|
||||
private String ssrc;
|
||||
|
||||
/**
|
||||
* 是否含有音频
|
||||
*/
|
||||
private boolean hasAudio;
|
||||
|
||||
public String getChannelId() {
|
||||
return channelId;
|
||||
}
|
||||
@@ -371,4 +376,16 @@ public class DeviceChannel {
|
||||
public void setSubCount(int subCount) {
|
||||
this.subCount = subCount;
|
||||
}
|
||||
|
||||
public void setPTZTypeText(String PTZTypeText) {
|
||||
this.PTZTypeText = PTZTypeText;
|
||||
}
|
||||
|
||||
public boolean isHasAudio() {
|
||||
return hasAudio;
|
||||
}
|
||||
|
||||
public void setHasAudio(boolean hasAudio) {
|
||||
this.hasAudio = hasAudio;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,13 +241,6 @@ public class SIPCommander implements ISIPCommander {
|
||||
|
||||
StreamInfo streamInfo = new StreamInfo();
|
||||
streamInfo.setSsrc(ssrc);
|
||||
// String streamId = Integer.toHexString(Integer.parseInt(streamInfo.getSsrc()));
|
||||
// String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase(); // ZLM 要求大写且首位补零
|
||||
// streamInfo.setFlv(String.format("http://%s:%s/rtp/%s.flv", mediaInfo.getLocalIP(), mediaInfo.getHttpPort(), streamId));
|
||||
// streamInfo.setWS_FLV(String.format("ws://%s:%s/rtp/%s.flv", mediaInfo.getLocalIP(), mediaInfo.getHttpPort(), streamId));
|
||||
// streamInfo.setRTMP(String.format("rtmp://%s:%s/rtp/%s", mediaInfo.getLocalIP(), mediaInfo.getRtmpPort(), streamId));
|
||||
// streamInfo.setHLS(String.format("http://%s:%s/rtp/%s/hls.m3u8", mediaInfo.getLocalIP(), mediaInfo.getHttpPort(), streamId));
|
||||
// streamInfo.setRTSP(String.format("rtsp://%s:%s/rtp/%s", mediaInfo.getLocalIP(), mediaInfo.getRtspPort(), streamId));
|
||||
streamInfo.setCahnnelId(channelId);
|
||||
streamInfo.setDeviceID(device.getDeviceId());
|
||||
storager.startPlay(streamInfo);
|
||||
|
||||
@@ -200,6 +200,7 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
|
||||
deviceChannel.setLongitude(itemDevice.element("Longitude") == null? 0.00:Double.parseDouble(XmlUtil.getText(itemDevice,"Longitude")));
|
||||
deviceChannel.setLatitude(itemDevice.element("Latitude") == null? 0.00:Double.parseDouble(XmlUtil.getText(itemDevice,"Latitude")));
|
||||
deviceChannel.setPTZType(itemDevice.element("PTZType") == null? 0:Integer.parseInt(XmlUtil.getText(itemDevice,"PTZType")));
|
||||
deviceChannel.setHasAudio(false); // 默认含有音频为false
|
||||
storager.updateChannel(device.getDeviceId(), deviceChannel);
|
||||
}
|
||||
// 更新
|
||||
|
||||
Reference in New Issue
Block a user