NIMSDK-AOS
10.6.0
plugins
qchatmedia
src
main
java
com
netease
nimlib
sdk
qcmedia
model
QChatMediaVideoParams.java
浏览该文件的文档.
1
package
com.netease.nimlib.sdk.qcmedia.model;
2
3
import
android.text.TextUtils;
4
import
org.json.JSONObject;
5
6
public
class
QChatMediaVideoParams
{
7
11
private
int
width;
15
private
int
height;
19
private
int
fps;
20
21
22
public
QChatMediaVideoParams
() {
23
}
24
31
public
QChatMediaVideoParams
(
int
width,
int
height,
int
fps) {
32
this.width = width;
33
this.height = height;
34
this.fps = fps;
35
}
36
37
38
public
int
getWidth
() {
39
return
width;
40
}
41
42
public
void
setWidth
(
int
width) {
43
this.width = width;
44
}
45
46
public
int
getHeight
() {
47
return
height;
48
}
49
50
public
void
setHeight
(
int
height) {
51
this.height = height;
52
}
53
54
public
int
getFps
() {
55
return
fps;
56
}
57
58
public
void
setFps
(
int
fps) {
59
this.fps = fps;
60
}
61
62
public
String
toJson
(){
63
try
{
64
JSONObject jsonObject =
new
JSONObject();
65
jsonObject.put(
"width"
,
getWidth
());
66
jsonObject.put(
"height"
,
getHeight
());
67
jsonObject.put(
"fps"
,
getFps
());
68
return
jsonObject.toString();
69
}
catch
(Exception e) {
70
e.printStackTrace();
71
}
72
return
null;
73
}
74
75
public
static
QChatMediaVideoParams
fromJson
(String json){
76
QChatMediaVideoParams
model = null;
77
if
(!TextUtils.isEmpty(json)){
78
try
{
79
JSONObject jsonObject =
new
JSONObject(json);
80
model =
new
QChatMediaVideoParams
();
81
model.
setWidth
(jsonObject.optInt(
"width"
));
82
model.
setHeight
(jsonObject.optInt(
"height"
));
83
model.
setFps
(jsonObject.optInt(
"fps"
));
84
}
catch
(Exception e) {
85
e.printStackTrace();
86
}
87
}
88
return
model;
89
}
90
}
com.netease.nimlib.sdk.qcmedia.model.QChatMediaVideoParams.getFps
int getFps()
Definition:
QChatMediaVideoParams.java:54
com.netease.nimlib.sdk.qcmedia.model.QChatMediaVideoParams.getWidth
int getWidth()
Definition:
QChatMediaVideoParams.java:38
com.netease.nimlib.sdk.qcmedia.model.QChatMediaVideoParams.fromJson
static QChatMediaVideoParams fromJson(String json)
Definition:
QChatMediaVideoParams.java:75
com.netease.nimlib.sdk.qcmedia.model.QChatMediaVideoParams
Definition:
QChatMediaVideoParams.java:6
com.netease.nimlib.sdk.qcmedia.model.QChatMediaVideoParams.toJson
String toJson()
Definition:
QChatMediaVideoParams.java:62
com.netease.nimlib.sdk.qcmedia.model.QChatMediaVideoParams.getHeight
int getHeight()
Definition:
QChatMediaVideoParams.java:46
com.netease.nimlib.sdk.qcmedia.model.QChatMediaVideoParams.QChatMediaVideoParams
QChatMediaVideoParams()
Definition:
QChatMediaVideoParams.java:22
com.netease.nimlib.sdk.qcmedia.model.QChatMediaVideoParams.setWidth
void setWidth(int width)
Definition:
QChatMediaVideoParams.java:42
com.netease.nimlib.sdk.qcmedia.model.QChatMediaVideoParams.setFps
void setFps(int fps)
Definition:
QChatMediaVideoParams.java:58
com.netease.nimlib.sdk.qcmedia.model.QChatMediaVideoParams.QChatMediaVideoParams
QChatMediaVideoParams(int width, int height, int fps)
Definition:
QChatMediaVideoParams.java:31
com.netease.nimlib.sdk.qcmedia.model.QChatMediaVideoParams.setHeight
void setHeight(int height)
Definition:
QChatMediaVideoParams.java:50
生成于 2024年 十一月 19日 星期二 20:07:51 , 为 NIMSDK-AOS使用
1.8.13