-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #532 from HugoLipeng/qvs/VoiceChat
qvs add VoiceChat interface
- Loading branch information
Showing
9 changed files
with
263 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,33 @@ | ||
package com.qiniu.qvs.model; | ||
|
||
import com.google.gson.Gson; | ||
import com.google.gson.GsonBuilder; | ||
import com.qiniu.util.StringMap; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Builder | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class Device { | ||
private int type; //可选项为摄像头、平台两类,1:摄像头,2:平台。 | ||
private String name; // 设备名称 (可包含 字母、数字、中划线、下划线;1 ~ 100 个字符长) | ||
private String username; // 用户名, 4~40位,可包含大写字母、小写字母、数字、中划线,建议与设备国标ID一致 | ||
private String password; // 密码, 4~40位,可包含大写字母、小写字母、数字、中划线 | ||
private boolean pullIfRegister; // 注册成功后启动拉流, 默认关闭 | ||
private String desc; // 关于设备的描述信息 | ||
private String gbId; // 设备国标ID | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getGbId() { | ||
return gbId; | ||
} | ||
|
||
public void setGbId(String gbId) { | ||
this.gbId = gbId; | ||
} | ||
|
||
public String getUsername() { | ||
return username; | ||
} | ||
|
||
public void setUsername(String username) { | ||
this.username = username; | ||
} | ||
|
||
public String getPassword() { | ||
return password; | ||
} | ||
|
||
public void setPassword(String password) { | ||
this.password = password; | ||
} | ||
|
||
public boolean isPullIfRegister() { | ||
return pullIfRegister; | ||
} | ||
|
||
public void setPullIfRegister(boolean pullIfRegister) { | ||
this.pullIfRegister = pullIfRegister; | ||
} | ||
|
||
public String getDesc() { | ||
return desc; | ||
} | ||
|
||
public void setDesc(String desc) { | ||
this.desc = desc; | ||
/** | ||
* 转换为POST参数对象 | ||
* | ||
* @return POST参数对象 | ||
*/ | ||
public StringMap transferPostParam() { | ||
Gson gson = new GsonBuilder().enableComplexMapKeySerialization().create(); | ||
return gson.fromJson(gson.toJson(this), StringMap.class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.qiniu.qvs.model; | ||
|
||
public class VoiceChat { | ||
private Boolean latency; // 该字段为true时,启用低延迟版本,收到返回地址后在发送语音数据 | ||
private String[] channels; // 平台设备指定需要启动的通道国标ID(为空表示启动平台下的所有设备) | ||
private String version; // 对讲国标协议版本,取值"2014"或"2016",默认为2014,例如大部分大华摄像头为GBT 28181-2014版本对讲模式 | ||
private String transProtocol; // 取值"tcp"或"udp",流传输模式,默认udp | ||
|
||
public Boolean getLatency() { | ||
return latency; | ||
} | ||
|
||
public void setLatency(Boolean latency) { | ||
this.latency = latency; | ||
} | ||
|
||
public String[] getChannels() { | ||
return channels; | ||
} | ||
|
||
public void setChannels(String[] channels) { | ||
this.channels = channels; | ||
} | ||
|
||
public String getVersion() { | ||
return version; | ||
} | ||
|
||
public void setVersion(String version) { | ||
this.version = version; | ||
} | ||
|
||
public String getTransProtocol() { | ||
return transProtocol; | ||
} | ||
|
||
public void setTransProtocol(String transProtocol) { | ||
this.transProtocol = transProtocol; | ||
} | ||
} |
Oops, something went wrong.