NIMSDK-AOS  9.16.0
AVChatStateObserverLite.java
浏览该文件的文档.
1 /*
2  * Copyright (c) 2014-2018 NetEase, Inc.
3  * All right reserved.
4  */
5 
6 package com.netease.nimlib.sdk.avchat;
7 
19 import com.netease.nrtc.sdk.common.VideoFilterParameter;
20 import com.netease.nrtc.sdk.video.VideoFrame;
21 
22 import java.util.Map;
23 import java.util.Set;
24 
28 public interface AVChatStateObserverLite {
29 
30 
42  void onJoinedChannel(int code, String audioFile, String videoFile, int elapsed);
43 
44 
53  void onUserJoined(String account);
54 
55 
64  void onUserLeave(String account, int event);
65 
66 
73  void onLeaveChannel();
74 
75 
83  void onProtocolIncompatible(int status);
84 
85 
93  void onDisconnectServer(int code);
94 
95 
104  void onNetworkQuality(String account, int quality, AVChatNetworkStats stats);
105 
109  void onCallEstablished();
110 
111 
119  void onDeviceEvent(int code, String desc);
120 
121 
128  void onConnectionTypeChanged(int netType);
129 
130 
136  void onFirstVideoFrameAvailable(String account);
137 
138 
144  void onFirstVideoFrameRendered(String account);
145 
146 
155  void onVideoFrameResolutionChanged(String account, int width, int height, int rotate);
156 
157 
166  void onVideoFpsReported(String account, int fps);
167 
168 
179  boolean onVideoFrameFilter(AVChatVideoFrame frame, boolean maybeDualInput);
180 
190  boolean onVideoFrameFilter(final VideoFrame input, VideoFrame[] outputFrames, VideoFilterParameter filterParameter);
191 
192 
201  boolean onAudioFrameFilter(AVChatAudioFrame frame);
202 
203 
212  void onAudioDeviceChanged(int device, Set<Integer> set, boolean shouldSelect);
213 
214 
223  void onReportSpeaker(Map<String, Integer> speakers, int mixedEnergy);
224 
230  void onSessionStats(AVChatSessionStats sessionStats);
231 
237  void onLiveEvent(int event);
238 }
void onUserLeave(String account, int event)
用户离开频道
void onReportSpeaker(Map< String, Integer > speakers, int mixedEnergy)
汇报正在说话的用户。 需要设置参数 AVChatParameters#KEY_AUDIO_REPORT_SPEAKER.
void onVideoFrameResolutionChanged(String account, int width, int height, int rotate)
用户画面尺寸改变通知
void onFirstVideoFrameRendered(String account)
第一帧绘制通知
void onLiveEvent(int event)
互动直播相关事件通知
void onVideoFpsReported(String account, int fps)
用户视频画面fps更新, 需要设置参数 AVChatParameters#KEY_VIDEO_FPS_REPORTED.
void onDisconnectServer(int code)
从服务器断开连接会收到此通知。
void onFirstVideoFrameAvailable(String account)
用户第一帧视频数据绘制前通知.
boolean onAudioFrameFilter(AVChatAudioFrame frame)
语音数据处理接口, 不要改变数据的长度.
void onAudioDeviceChanged(int device, Set< Integer > set, boolean shouldSelect)
音频设备变化
void onConnectionTypeChanged(int netType)
客户端网络类型发生了变化
void onSessionStats(AVChatSessionStats sessionStats)
实时统计信息
boolean onVideoFrameFilter(AVChatVideoFrame frame, boolean maybeDualInput)
视频数据外部处理接口, 此接口需要同步执行.
void onJoinedChannel(int code, String audioFile, String videoFile, int elapsed)
服务器连接回调
void onProtocolIncompatible(int status)
双方协议版本不兼容
void onDeviceEvent(int code, String desc)
语音采集设备和视频采集设备事件通知
void onNetworkQuality(String account, int quality, AVChatNetworkStats stats)
网络状态发生变化
void onUserJoined(String account)
用户加入频道