[*] 日常优化

This commit is contained in:
acgist
2023-06-13 08:10:37 +08:00
parent c35869df0c
commit ebda8b0bbd
11 changed files with 159 additions and 114 deletions

View File

@@ -8,35 +8,35 @@ package com.acgist.taoyao.media.config;
public class Config {
/**
* 屏幕捕获
* 屏幕捕获消息
*/
public static final int WHAT_SCREEN_CAPTURE = 1000;
/**
* 视频录像
* 视频录像消息
*/
public static final int WHAT_RECORD = 1001;
/**
* 新建本地音频
* 新建本地音频消息
*/
public static final int WHAT_NEW_LOCAL_AUDIO = 2000;
/**
* 新建本地视频
* 新建本地视频消息
*/
public static final int WHAT_NEW_LOCAL_VIDEO = 2001;
/**
* 新建远程音频
* 新建远程音频消息
*/
public static final int WHAT_NEW_REMOTE_AUDIO = 2002;
/**
* 新建远程视频
* 新建远程视频消息
*/
public static final int WHAT_NEW_REMOTE_VIDEO = 2003;
/**
* 移除远程音频
* 移除远程音频消息
*/
public static final int WHAT_REMOVE_AUDIO = 2998;
/**
* 移除远程视频
* 移除远程视频消息
*/
public static final int WHAT_REMOVE_VIDEO = 2999;
/**

View File

@@ -2,71 +2,76 @@ package com.acgist.taoyao.media.config;
/**
* 音频配置
*
*
* 注意:完全拷贝信令模块`MediaAudioProperties`代码
*
* @author acgist
*/
public class MediaAudioProperties {
/**
* 音频格式
*
* @author acgist
*/
public enum Format {
G722,
PCMA,
PCMU,
OPUS;
}
/**
* 音频格式
*
* @author acgist
*/
public enum Format {
/**
* 格式G722|PCMA|PCMU|OPUS
*/
private Format format;
/**
* 比特率96|128|256
*/
private Integer bitrate;
/**
* 采样位数8|16|32
*/
private Integer sampleSize;
/**
* 采样率8000|16000|32000|48000
*/
private Integer sampleRate;
G722,
// G711A
PCMA,
// G711U
PCMU,
OPUS;
public Format getFormat() {
return this.format;
}
}
public void setFormat(Format format) {
this.format = format;
}
/**
* 格式G722|PCMA|PCMU|OPUS
*/
private Format format;
/**
* 比特率96|128|256
*/
private Integer bitrate;
/**
* 采样位数位深8|16|32
*/
private Integer sampleSize;
/**
* 采样率8000|16000|32000|48000
*/
private Integer sampleRate;
public Integer getBitrate() {
return bitrate;
}
public Format getFormat() {
return this.format;
}
public void setBitrate(Integer bitrate) {
this.bitrate = bitrate;
}
public void setFormat(Format format) {
this.format = format;
}
public Integer getSampleSize() {
return this.sampleSize;
}
public Integer getBitrate() {
return bitrate;
}
public void setSampleSize(Integer sampleSize) {
this.sampleSize = sampleSize;
}
public void setBitrate(Integer bitrate) {
this.bitrate = bitrate;
}
public Integer getSampleRate() {
return this.sampleRate;
}
public Integer getSampleSize() {
return this.sampleSize;
}
public void setSampleSize(Integer sampleSize) {
this.sampleSize = sampleSize;
}
public Integer getSampleRate() {
return this.sampleRate;
}
public void setSampleRate(Integer sampleRate) {
this.sampleRate = sampleRate;
}
public void setSampleRate(Integer sampleRate) {
this.sampleRate = sampleRate;
}
}

View File

@@ -5,6 +5,8 @@ import java.util.Map;
/**
* 媒体配置
*
* 注意:完全拷贝信令模块`MediaProperties`代码
*
* @author acgist
*/
public class MediaProperties {

View File

@@ -2,23 +2,25 @@ package com.acgist.taoyao.media.config;
/**
* 视频配置
*
*
* 注意:完全拷贝信令模块`MediaVideoProperties`代码
*
* @author acgist
*/
public class MediaVideoProperties {
/**
* 视频格式
*
*
* @author acgist
*/
public enum Format {
VP8,
VP9,
H264,
H265;
}
/**
@@ -96,4 +98,5 @@ public class MediaVideoProperties {
public void setHeight(Integer height) {
this.height = height;
}
}