通道增加自定义属性 是否支持云台控制和是否支持语音对讲
This commit is contained in:
@@ -153,6 +153,12 @@ public class CommonGBChannel {
|
||||
@Schema(description = "流唯一编号,存在表示正在直播")
|
||||
private String streamId;
|
||||
|
||||
@Schema(description = "是否支持云台控制 1支持,0不支持")
|
||||
private Integer enablePtz;
|
||||
|
||||
@Schema(description = "是否支持对讲 1支持,0不支持")
|
||||
private Integer enableBroadcast;
|
||||
|
||||
public String encode(String serverDeviceId) {
|
||||
return encode(null, serverDeviceId);
|
||||
}
|
||||
@@ -340,6 +346,12 @@ public class CommonGBChannel {
|
||||
if (this.getGbSvcTimeSupportMode() != null) {
|
||||
content.append(" <SVCTimeSupportMode>" + this.getGbSvcTimeSupportMode() + "</SVCTimeSupportMode>\n");
|
||||
}
|
||||
if (this.getEnablePtz() != null) {
|
||||
content.append(" <EnablePtz>" + this.getEnablePtz() + "</EnablePtz>\n");
|
||||
}
|
||||
if (this.getEnableBroadcast() != null) {
|
||||
content.append(" <EnableBroadcast>" + this.getEnableBroadcast() + "</EnableBroadcast>\n");
|
||||
}
|
||||
content.append("</Info>\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,18 @@ public class DeviceChannel extends CommonGBChannel {
|
||||
GbCode gbCode = GbCode.decode(deviceChannel.getDeviceId());
|
||||
if (gbCode != null && "138".equals(gbCode.getTypeCode())) {
|
||||
deviceChannel.setHasAudio(true);
|
||||
if (deviceChannel.getEnableBroadcast() == null && "138".equals(gbCode.getTypeCode())) {
|
||||
deviceChannel.setEnableBroadcast(1);
|
||||
}
|
||||
if (deviceChannel.getEnablePtz() == null && (
|
||||
deviceChannel.getPtzType() == 1
|
||||
|| deviceChannel.getPtzType() == 4
|
||||
|| deviceChannel.getPtzType() == 5
|
||||
)) {
|
||||
deviceChannel.setEnablePtz(1);
|
||||
}
|
||||
}
|
||||
|
||||
return deviceChannel;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,9 @@ public interface CommonGBChannelMapper {
|
||||
"gb_business_group_id," +
|
||||
"gb_download_speed," +
|
||||
"gb_svc_space_support_mod," +
|
||||
"gb_svc_time_support_mode ) " +
|
||||
"gb_svc_time_support_mode," +
|
||||
"enable_ptz," +
|
||||
"enable_broadcast ) " +
|
||||
"VALUES (" +
|
||||
"#{gbDeviceId}, " +
|
||||
"#{dataType}, " +
|
||||
@@ -96,7 +98,9 @@ public interface CommonGBChannelMapper {
|
||||
"#{gbBusinessGroupId},"+
|
||||
"#{gbDownloadSpeed},"+
|
||||
"#{gbSvcSpaceSupportMod},"+
|
||||
"#{gbSvcTimeSupportMode}"+
|
||||
"#{gbSvcTimeSupportMode},"+
|
||||
"#{enablePtz},"+
|
||||
"#{enableBroadcast}"+
|
||||
")" +
|
||||
" </script>")
|
||||
@Options(useGeneratedKeys = true, keyProperty = "gbId", keyColumn = "id")
|
||||
@@ -144,6 +148,8 @@ public interface CommonGBChannelMapper {
|
||||
", gb_download_speed = #{gbDownloadSpeed}" +
|
||||
", gb_svc_space_support_mod = #{gbSvcSpaceSupportMod}" +
|
||||
", gb_svc_time_support_mode = #{gbSvcTimeSupportMode}" +
|
||||
", enable_ptz = #{enablePtz}" +
|
||||
", enable_broadcast = #{enableBroadcast}" +
|
||||
" WHERE id = #{gbId}"+
|
||||
" </script>"})
|
||||
int update(CommonGBChannel commonGBChannel);
|
||||
@@ -205,7 +211,9 @@ public interface CommonGBChannelMapper {
|
||||
"gb_business_group_id," +
|
||||
"gb_download_speed," +
|
||||
"gb_svc_space_support_mod," +
|
||||
"gb_svc_time_support_mode ) " +
|
||||
"gb_svc_time_support_mode," +
|
||||
"enable_ptz," +
|
||||
"enable_broadcast ) " +
|
||||
"VALUES" +
|
||||
"<foreach collection='commonGBChannels' index='index' item='item' separator=','> " +
|
||||
"(#{item.gbDeviceId}, #{item.dataType}, #{item.dataDeviceId},#{item.createTime},#{item.updateTime}," +
|
||||
@@ -214,7 +222,7 @@ public interface CommonGBChannelMapper {
|
||||
"#{item.gbRegisterWay},#{item.gbCertNum},#{item.gbCertifiable},#{item.gbErrCode},#{item.gbEndTime}, #{item.gbSecrecy},#{item.gbIpAddress}," +
|
||||
"#{item.gbPort},#{item.gbPassword},#{item.gbStatus},#{item.gbLongitude}, #{item.gbLatitude},#{item.gbPtzType},#{item.gbPositionType},#{item.gbRoomType}," +
|
||||
"#{item.gbUseType},#{item.gbSupplyLightType},#{item.gbDirectionType},#{item.gbResolution},#{item.gbBusinessGroupId},#{item.gbDownloadSpeed}," +
|
||||
"#{item.gbSvcSpaceSupportMod},#{item.gbSvcTimeSupportMode})" +
|
||||
"#{item.gbSvcSpaceSupportMod},#{item.gbSvcTimeSupportMode},#{item.enablePtz},#{item.enableBroadcast})" +
|
||||
"</foreach> " +
|
||||
" </script>")
|
||||
int batchAdd(List<CommonGBChannel> commonGBChannels);
|
||||
@@ -424,6 +432,8 @@ public interface CommonGBChannelMapper {
|
||||
", gb_download_speed=#{item.gbDownloadSpeed}" +
|
||||
", gb_svc_space_support_mod=#{item.gbSvcSpaceSupportMod}" +
|
||||
", gb_svc_time_support_mode=#{item.gbSvcTimeSupportMode}" +
|
||||
", enable_ptz = #{enablePtz}" +
|
||||
", enable_broadcast = #{enableBroadcast}" +
|
||||
" WHERE id=#{item.gbId}" +
|
||||
"</foreach>" +
|
||||
"</script>"})
|
||||
@@ -505,6 +515,8 @@ public interface CommonGBChannelMapper {
|
||||
" wdc.create_time,\n" +
|
||||
" wdc.update_time,\n" +
|
||||
" wdc.record_plan_id,\n" +
|
||||
" wdc.enable_ptz,\n" +
|
||||
" wdc.enable_broadcast,\n" +
|
||||
" coalesce( wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" +
|
||||
" coalesce( wdc.gb_name, wdc.name) as gb_name,\n" +
|
||||
" coalesce( wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" +
|
||||
|
||||
@@ -18,6 +18,8 @@ public class ChannelProvider {
|
||||
" update_time,\n" +
|
||||
" stream_id,\n" +
|
||||
" record_plan_id,\n" +
|
||||
" enable_ptz,\n" +
|
||||
" enable_broadcast,\n" +
|
||||
" coalesce(gb_device_id, device_id) as gb_device_id,\n" +
|
||||
" coalesce(gb_name, name) as gb_name,\n" +
|
||||
" coalesce(gb_manufacturer, manufacturer) as gb_manufacturer,\n" +
|
||||
@@ -63,6 +65,8 @@ public class ChannelProvider {
|
||||
" wdc.update_time,\n" +
|
||||
" wdc.stream_id,\n" +
|
||||
" wdc.record_plan_id,\n" +
|
||||
" wdc.enable_ptz,\n" +
|
||||
" wdc.enable_broadcast,\n" +
|
||||
" coalesce(wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" +
|
||||
" coalesce(wdc.gb_name, wdc.name) as gb_name,\n" +
|
||||
" coalesce(wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" +
|
||||
@@ -107,6 +111,8 @@ public class ChannelProvider {
|
||||
" wdc.data_device_id,\n" +
|
||||
" wdc.create_time,\n" +
|
||||
" wdc.update_time,\n" +
|
||||
" wdc.enable_ptz,\n" +
|
||||
" wdc.enable_broadcast,\n" +
|
||||
" coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" +
|
||||
" coalesce(wpgc.custom_name, wdc.gb_name, wdc.name) as gb_name,\n" +
|
||||
" coalesce(wpgc.custom_manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" +
|
||||
|
||||
Reference in New Issue
Block a user