无法获取视频quickBlox的新的Android SDK工作 [英] Can't get video working for new android SDK of quickBlox
问题描述
我一直试图让视频聊天,为quickblox的Android 2.0的SDK工作在过去的两天。
我可以接受,制作,拒绝videocalls但视频不会对surfaceview发送或接收。
我可以看到我自己的相机和视频切换摄像机罚款。
我已经走了演示多次过来,我pretty备受线复制其行。
谁能给我如何得到它的工作有什么秘诀?我是超级感谢。
下面是我的QBChatListener声明
OnQBVideoChatListener qbVideoChatListener =新OnQBVideoChatListener(){
@覆盖
公共无效onCameraDataReceive(字节[]可视数据){ 。QBVideoChatController.getInstance()sendVideo(可视数据);
Log.d(送,视频); } @覆盖
公共无效onMicrophoneDataReceive(字节[] audioData){
如果(!muteOn){
。QBVideoChatController.getInstance()sendAudio(audioData);
Log.d(送,音频); }
} @覆盖
公共无效onOpponentVideoDataReceive(字节[]可视数据){
toUserSurfaceView.render(可视数据);
Log.d(接收,视频);
} @覆盖
公共无效onOpponentAudioDataReceive(字节[] audioData){
。QBVideoChatController.getInstance()playAudio(audioData);
Log.d(接收,音频); } @覆盖
公共无效onProgress(布尔进度){
// progressBar.setVisibility(进度View.VISIBLE:View.GONE?);
} @覆盖
公共无效onVideoChatStateChange(CallState callState,VideoChatConfig receivedVideoChatConfig){
videoChatConfig = receivedVideoChatConfig; 开关(callState){ 案例ON_CALL_START:
Log.d(ON_CALL_START,ON_CALL_START); 打破;
案例ON_CANCELED_CALL: videoChatConfig = NULL;
Log.d(on_cancel,on_cancel);
//播放声音
回去();
打破;
案例ON_CALL_END:
Log.d(oncallend,oncallend); //明确的对手视图
toUserSurfaceView.clear();
回去(); 打破;
情况下接受: callingTitle.setText(试图用\\ N连接+ callTitle);
mySurfaceView.setVisibility(View.VISIBLE);
toUserSurfaceView.setVisibility(View.VISIBLE);
。QBVideoChatController.getInstance()acceptCallByFriend(videoChatConfig,NULL);
Log.d(接受,接受);
打破;
案例ON_ACCEPT_BY_USER:
callingTitle.setText(callTitle +\\ n接受尝试连接。);
mySurfaceView.setVisibility(View.VISIBLE);
toUserSurfaceView.setVisibility(View.VISIBLE); QBVideoChatController.getInstance()onAcceptFriendCall(videoChatConfig,NULL);
Log.d(ON_ACCEPT_BY_USER,ON_ACCEPT_BY_USER); 打破;
案例ON_REJECTED_BY_USER:
打破;
案例ON_DID_NOT_ANSWERED:
打破;
案例ON_CONNECTED:
hideTitleAndIndicator();
Log.d(onConnected,onConnected); switchCameraButton.setEnabled(真); 打破;
案例ON_START_CONNECTING:
Log.d(onstartconnection,onstartconnection);
打破; } }
下面是我得到在我的日志中的错误:
21 10-03:08:36.910 D / QBDataSenders:真的假的假的
10-03 21:08:36.910 D / QBDataSenders:可视数据didn`t发
10-03 21:08:36.918 D / CameraView:时间= 368 9600 1000
10-03 21:08:36.918 D / CameraView:处理我的音频帧,时间= 368,大小= 0.9765625 KB假
10-03 21:08:36.918 D / QBDataSenders:audiData didn`t发
10-03 21:08:36.918 D /送:音频
10-03 21:08:36.957 D / Skia的:onFlyCom preSS
10-03 21:08:37.012 GC_FOR_ALLOC释放1218K,免费13%13441K / 15392K,暂停为32ms,共为32ms
10-03 21:08:37.051 D / QBDataSenders:真的假的假的
10-03 21:08:37.051 D / QBDataSenders:可视数据didn`t发
也
21 10-03:23:09.528 W / System.err的:java.lang.InterruptedException
10-03 21:23:09.528 W / System.err的:在java.lang.VMThread.sleep(本机方法)
10-03 21:23:09.528 W / System.err的:在java.lang.Thread.sleep(Thread.java:1031)
10-03 21:23:09.535 W / System.err的:在java.lang.Thread.sleep(Thread.java:1013)
10-03 21:23:09.535的W / System.err的:在com.quickblox.module.videochat.core.objects.AudioRecorder$AudioPlayingRunnable.run(AudioRecorder.java:126)
10-03 21:23:09.535 W / System.err的:在java.lang.Thread.run(Thread.java:856)
10-03 21:23:09.535的W / System.err的:java.lang.InterruptedException
10-03 21:23:09.535的W / System.err的:java.lang.InterruptedException
10-03 21:23:09.535 W / System.err的:在java.lang.VMThread.sleep(本机方法)
10-03 21:23:09.535 W / System.err的:在java.lang.Thread.sleep(Thread.java:1031)
10-03 21:23:09.535 W / System.err的:在java.lang.Thread.sleep(Thread.java:1013)
10-03 21:23:09.535的W / System.err的:在com.quickblox.module.videochat.core.objects.AudioRecorder$AudioPlayingRunnable.run(AudioRecorder.java:126)
10-03 21:23:09.535 W / System.err的:在java.lang.Thread.run(Thread.java:856)
和
10-03 22:27:49.824 W / System.err的:java.lang.InterruptedException
10-03 22:27:49.831 W / System.err的:在java.lang.VMThread.sleep(本机方法)
10-03 22:27:49.831 W / System.err的:在java.lang.Thread.sleep(Thread.java:1031)
10-03 22:27:49.831 W / System.err的:在java.lang.Thread.sleep(Thread.java:1013)
10-03 22:27:49.831 W / System.err的:在com.quickblox.module.videochat.core.objects.XMPPConnectionClient$CallingRunnable.run(XMPPConnectionClient.java:150)
这解决方案是Eclipse的Android项目结构: -
在SDK示例,您将获得codeC一个.so文件应该是在project.Copy这个文件到您的库/ armeabi文件夹中。
I've been trying to get videochat to work for the android 2.0 SDK of quickblox for the past two days. I can accept, make, reject videocalls but the video will not send or receive on the surfaceview.
I can see my own camera video and switch the camera fine.
I've gone over the demo multiple times and I pretty much copied it line by line.
Can anyone give me some tips on how to get it working? I would be super thankful.
Here is my QBChatListener declaration
OnQBVideoChatListener qbVideoChatListener = new OnQBVideoChatListener() {
@Override
public void onCameraDataReceive(byte[] videoData) {
QBVideoChatController.getInstance().sendVideo(videoData);
Log.d("send", "video");
}
@Override
public void onMicrophoneDataReceive(byte[] audioData) {
if (!muteOn) {
QBVideoChatController.getInstance().sendAudio(audioData);
Log.d("send", "audio");
}
}
@Override
public void onOpponentVideoDataReceive(byte[] videoData) {
toUserSurfaceView.render(videoData);
Log.d("receive", "video");
}
@Override
public void onOpponentAudioDataReceive(byte[] audioData) {
QBVideoChatController.getInstance().playAudio(audioData);
Log.d("receive", "audio");
}
@Override
public void onProgress(boolean progress) {
// progressBar.setVisibility(progress ? View.VISIBLE : View.GONE);
}
@Override
public void onVideoChatStateChange(CallState callState, VideoChatConfig receivedVideoChatConfig) {
videoChatConfig = receivedVideoChatConfig;
switch (callState) {
case ON_CALL_START:
Log.d("ON_CALL_START", "ON_CALL_START");
break;
case ON_CANCELED_CALL:
videoChatConfig = null;
Log.d("on_cancel", "on_cancel");
//play sound
goBack();
break;
case ON_CALL_END:
Log.d("oncallend", "oncallend");
// clear opponent view
toUserSurfaceView.clear();
goBack();
break;
case ACCEPT:
callingTitle.setText("Attempting to connect with \n" + callTitle);
mySurfaceView.setVisibility(View.VISIBLE);
toUserSurfaceView.setVisibility(View.VISIBLE);
QBVideoChatController.getInstance().acceptCallByFriend(videoChatConfig, null);
Log.d("accept", "accept");
break;
case ON_ACCEPT_BY_USER:
callingTitle.setText(callTitle + "\n accepted. Attempting to connect");
mySurfaceView.setVisibility(View.VISIBLE);
toUserSurfaceView.setVisibility(View.VISIBLE);
QBVideoChatController.getInstance().onAcceptFriendCall(videoChatConfig, null);
Log.d("ON_ACCEPT_BY_USER", "ON_ACCEPT_BY_USER");
break;
case ON_REJECTED_BY_USER:
break;
case ON_DID_NOT_ANSWERED:
break;
case ON_CONNECTED:
hideTitleAndIndicator();
Log.d("onConnected", "onConnected");
switchCameraButton.setEnabled(true);
break;
case ON_START_CONNECTING:
Log.d("onstartconnection", "onstartconnection");
break;
}
}
Here are the errors I'm getting in my log:
10-03 21:08:36.910 D/QBDataSenders﹕ true false false
10-03 21:08:36.910 D/QBDataSenders﹕ videoData didn`t send
10-03 21:08:36.918 D/CameraView﹕ time=368 9600 1000
10-03 21:08:36.918 D/CameraView﹕ processed my audio frame, time=368, size=0.9765625 kb false
10-03 21:08:36.918 D/QBDataSenders﹕ audiData didn`t send
10-03 21:08:36.918 D/send﹕ audio
10-03 21:08:36.957 D/skia﹕ onFlyCompress
10-03 21:08:37.012 GC_FOR_ALLOC freed 1218K, 13% free 13441K/15392K, paused 32ms, total 32ms
10-03 21:08:37.051 D/QBDataSenders﹕ true false false
10-03 21:08:37.051 D/QBDataSenders﹕ videoData didn`t send
also
10-03 21:23:09.528 W/System.err﹕ java.lang.InterruptedException
10-03 21:23:09.528 W/System.err﹕ at java.lang.VMThread.sleep(Native Method)
10-03 21:23:09.528 W/System.err﹕ at java.lang.Thread.sleep(Thread.java:1031)
10-03 21:23:09.535 W/System.err﹕ at java.lang.Thread.sleep(Thread.java:1013)
10-03 21:23:09.535 W/System.err﹕ at com.quickblox.module.videochat.core.objects.AudioRecorder$AudioPlayingRunnable.run(AudioRecorder.java:126)
10-03 21:23:09.535 W/System.err﹕ at java.lang.Thread.run(Thread.java:856)
10-03 21:23:09.535 W/System.err﹕ java.lang.InterruptedException
10-03 21:23:09.535 W/System.err﹕ java.lang.InterruptedException
10-03 21:23:09.535 W/System.err﹕ at java.lang.VMThread.sleep(Native Method)
10-03 21:23:09.535 W/System.err﹕ at java.lang.Thread.sleep(Thread.java:1031)
10-03 21:23:09.535 W/System.err﹕ at java.lang.Thread.sleep(Thread.java:1013)
10-03 21:23:09.535 W/System.err﹕ at com.quickblox.module.videochat.core.objects.AudioRecorder$AudioPlayingRunnable.run(AudioRecorder.java:126)
10-03 21:23:09.535 W/System.err﹕ at java.lang.Thread.run(Thread.java:856)
and
10-03 22:27:49.824 W/System.err﹕ java.lang.InterruptedException
10-03 22:27:49.831 W/System.err﹕ at java.lang.VMThread.sleep(Native Method)
10-03 22:27:49.831 W/System.err﹕ at java.lang.Thread.sleep(Thread.java:1031)
10-03 22:27:49.831 W/System.err﹕ at java.lang.Thread.sleep(Thread.java:1013)
10-03 22:27:49.831 W/System.err﹕ at com.quickblox.module.videochat.core.objects.XMPPConnectionClient$CallingRunnable.run(XMPPConnectionClient.java:150)
This solution is for eclipse Android project structure:-
In SDK sample you will find a .SO file for codec which should be in the project.Copy this file into your libs/armeabi folder.
这篇关于无法获取视频quickBlox的新的Android SDK工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!