大qn0te增强手机上qq视频张丘4移动通话记录不了,请求各位指点

android 开发中如何实现视频通话功能 !求大神指点!功能实现的思路,及用到的知识点!!感激不尽!!_百度知道
android 开发中如何实现视频通话功能 !求大神指点!功能实现的思路,及用到的知识点!!感激不尽!!
提问者采纳
remoteSurfaceView = (SurfaceView) findViewById(R; 显示即时视频通话画面
public void VideoChat(){
if (.cancel();&#47&#47.show();&#47.GetUserVideoWidth(userid) ;&#47.BRAC_SO_LOCALVIDEO_OVERLAY; 初始化SDK 连接服务器
mTimerTask = new TimerTask(){
public void run(){
Message mesasge = new Message(); 关闭用户视频
anychat, &quot.makeText(
anychat, 0.show().id.BRAC_SO_CORESDK_USEHWCODEC;
&#47, int dwErrorCode){
if (dwErrorCode == 0) {
/&#47.id.show().videoCapDriver),编码质量越高;&#47.add(user[i]+&quot.GetUserVideoHeight(-1));&#47,configEntity.UserCameraControl(userid.LENGTH_SHORT).enableAEC);
&#47, boolean bEnter){
if (bEnter) {&#47.SetSDKOptionInt(AnyChatDefine. 打开本地音频
Toast,configE登录成功, &
Surface s =&#47, 1);
anychat.InitSDK( 请求用户视频
anychat.setFormat(PixelFormat.setFormat(PixelF程序退出
anychat, &quot.UserSpeakControl(userid.layout.BRAC_SO_LOCALVIDEO_CAPDRIVER.SDK_INT;&#47.SetSDKOptionInt(AnyChatD
让视频参数生效
anychat.SetSDKOptionInt(AnyChatD
&#47.Login(&quot!= 0)
String temp =userlist.GetUserVideoWidth(-1);).BRAC_SO_LOCALVIDEO_HEIGHTCTRL; + dwErrorC 视频采集驱动设置
anychat.get(0);注销登录
anychat, 8906);
mTimer.UserSpeakControl(-1; 连接服务器
/4; 本地视频是否已打开
private boolean bOtherVideoOpened =
userid = Integer.makeText(this.SetSDKOptionInt(AnyChatDefine.makeText(VideoChatA
).remove(dwUserId+&quot, 0.makeText(VideoChatActivity.configMode).BRAC_SO_LOCALVIDEO_APPLYPARAM;
bSelfVideoOpened = true, 0, Toast.LENGTH_SHORT); 视频显示驱动设置
anychat,configEntity.GetCameraState(userid) == 2
&& anychat.onCreate(savedInstanceState);&#47.;/ 关闭用户音频
private SurfaceView remoteSurfaceV
/登录失败.EnterRoom(1;
&#47.SetSDKOptionInt(AnyChatDefine, &quot:&quot, int dwErrorCode){
if (dwErrorCode == 0) {
T&quot, T 设置本地视频编码的帧率
&#47.Connect(&quot.GetUserVideoWidth(-1) ,configEntity.&#47, 1);
}.makeText(this.RGB_565);
super.resolution_height);新用户进入房间
userlist.videorotatemode).BRAC_SO_STREAM_SMOOTHPLAYMODE, 0),configEntity.SetSDKOptionInt(AnyChatDefine.
String temp =userlist.BRAC_SO_LOCALVIDEO_WIDTHCTRL.videoFps), T
&#47.SetSDKOptionInt(AnyChatD &#47.SetSDKOptionInt(AnyChatDefine.LoadConfig(this);
/ 请求用户音频
/), 0):&quot.get(0);
public void OnAnyChatConnectMessage(boolean bSuccess){
/ 调用API显示视频画面
bOtherVideoOpened =/ 服务器连接成功 用户登录
public void OnAnyChatLoginMessage(int dwUserId, 1000.LENGTH_SHORT);String&gt.SetVideoPos(
&#47,configE
/&#47.Build!&
anychat,错误代码;/
private Handler handler.BRAC_SO_LOCALVIDEO_BITRATECTRL.LENGTH_SHORT);&#47,错误代码;
/android&/ 初始化SDK 连接服务器
private void loginSystem(){
if (anychat == null){
anychat = new AnyChatCoreSDK(), Toast,configEntity, 0; 自定义视频参数配置
&#47.VERSION.show();
holder,configE&#47.RGB_565);
/加载视频通话设置
loginSystem().anychat, &quot,configE
if (;&#47.BRAC_SO_LOCALVIDEO_FPSCTRL;/
&#47.show().sendMessage(mesasge); 本地视频
private ConfigEntity configEntity!= 0)
&#47.UserCameraControl(userid, 0).GetUserVideoWidth(userid).UserSpeakControl(userid.surface_remote);
private boolean bSelfVideoOpened = false.SetVideoPos(-1.SetSDKOptionInt(AnyChatD 视频旋转模式设置
anychat!bSuccess){
Toast.activity_video_chat);连接服务器失败.fixcolordeviation); 定时器
private Timer mTimer = new Timer(true);
userid = I& 初始化SDK
获得视频画面
anychat.SetSDKOptionInt(AnyChatDefine、初始化SDK 2,error.videoShowDriver);
/&quot.this, T 设置本地视频采集分辨率
anychat;5; 本地视频Overlay模式设置
anychat.makeText(VideoChatActivity,configE/&#47.videoFps * 4), 1); 平台硬件编码设置
anychat.setFixedSize(用户离开房间
if (dwUserId == userid)
BRAC_SO_CORESDK_USEARMV6LIB, &/
&#47.getHolder();
/ 进入房间成功
打开本地音视频
T &#47..parseInt(temp); 使用ARMv6指令集
对方视频是否已打开
private TimerTask mTimerTask!bOtherVideoOpened){
if (//6; 设置本地视频编码的质量
&#47.SetSDKOptionInt(AnyChatDefine.schedule(mTimerT
public class VideoChatActivity extends Activity implements AnyChatBaseEvent
private AnyChatCoreSDK// i++){
用Handler来不间断刷新即时视频
private List&lt, Toast.LENGTH_SHORT); + dwErrorCdemo.BRAC_SO_AUDIO_ECHOCTRL, 0).GetUserVideoHeight(userid));/// 请求其他用户视频
回音消除设置
anychat.show();&#47.UserCameraControl(-1、打开本地视频;&#47.this, 1). 请求其他用户音频
141.Logout();当前没有在线用户&quot.useARMv6Lib .Release(), 1).this!= 0){
SurfaceHolder holder = remoteSurfaceView.videoOverlay).BRAC_SO_LOCALVIDEO_QUALITYCTRL.SetSDKOptionInt(AnyChatDefine, &quot.setFixedSize();;
/()、连接服务器; 设置本地视频编码的码率(如果码率为0; 打开本地视频
anychat, 100).enableP2P);///.surface_local);
// 设置本地视频编码的关键帧间隔
进入房间成功&
&#47.videoPreset),configE
anychat.SetBaseEvent(this);移除该用户
if (userlist.videoQuality);
&#47.SetSDKOptionInt(AnyChatD 设置视频编码预设参数(值越大.handleMessage(msg);
if (configEntity.BRAC_SO_LOCALVIDEO_FIXCOLORDEVIA;
/; P2P设置
protected void onDestroy(){ /&#47.getHolder().SetSDKOptionInt(AnyChatDefine.add(dwUserId+&quot, &
setContentView(R;
Surface s =;; userlist = new ArrayList& 用户ID
public void onCreate(Bundle savedInstanceState)
&#47.UserCameraControl(/ 不间断显示即时视频通话画面
super.LENGTH_SHORT).parseInt(temp)、 3,configEntity.configMode == 1) /移除该用户
public void OnAnyChatLinkCloseMessage(int dwErrorCode){
T// &#47.UserSpeakControl(userid.BRAC_SO_LOCALVIDEO_PRESETCTRL;
anychat,占用CPU资源也会越高)
T&#47, int dwRoomId){
if (dwRoomId == 1){
int user[] = anychat,configE / 用户登录成功 进入房间
ApplyVideoConfig(); + dwErrorC
/视频用户已下线&/
handler = new Handler(){
public void handleMessage(Message msg){
VideoChat();
&#47.show();//&#47,configE
; 对方视频
private SurfaceView localSurfaceV
anychat.LENGTH_SHORT).GetOnlineUser(), Toast,则表示使用质量优先模式)
&#47、用户登录.BRAC_SO_LOCALVIDEO_ROTATECTRL,configE/; i &).SetSDKOptionInt(AnyChatDefine.videoBitrate == 0)
&#47,自动重连; /&#47.getSurface().smoothPlayMode);/String&gt, T&&#47.getSurface(); 根据配置文件配置视频参数
private void ApplyVideoConfig(){
if (configE/&#47,请稍后.LeaveRoom(-1)、进入房间;
public void OnAnyChatUserAtRoomMessage(int dwUserId;/).onDestroy();释放资源
mTimer,/&#47.videoBitrate),
anychat, &quot.SetSDKOptionInt(AnyChatD&
public void OnAnyChatEnterRoomMessage(int dwRoomId;保存在线用户列表
private int userid.GetCameraState(-1) == 2
&& 视频平滑播放模式设置
anychat.SetSDKOptionInt(AnyChatD&#47, 0、请求对方视频
*&#47.size() , &quot!bSelfVideoOpened){
if (anychat.remove(userid+&quot,
public void OnAnyChatOnlineUserMessage(int dwUserNum.BRAC_SO_VIDEOSHOW_DRIVERCTRL.LENGTH_SHORT);/
anychat.makeText(&#47.resolution_width)!= 0){
for (int i = 0.length , 1);&#47.BRAC_SO_NETWORK_P2PPOLITIC;
configEntity = ConfigService.SetSDKOptionInt(AnyChatDefine!= 0){
SurfaceHolder holder = localSurfaceV
&#47.BRAC_SO_LOCALVIDEO_GOPCTRL;
localSurfaceView = (SurfaceView) findViewById(R; 本地视频采集偏色修正设置
anychat, 1);**
* Android视频聊天
/ 设置基本事件回调函数
if (configE连接关闭;离开房间
进入房间失败;
// user, s, 0).show(),configEntity.makeText(VideoChatActivity.useHWCodec)
提问者评价
其他类似问题
android的相关知识
您可能关注的推广
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 手机通话记录网上查询 的文章

 

随机推荐