Fix broken audio.

The problem was introduced in 3712, no need to external transport in
real test app, revert the change.

TBR=pwestin@webrtc.org
BUG=1539
Review URL: https://webrtc-codereview.appspot.com/1266005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3735 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
leozwang@webrtc.org 2013-03-27 20:55:54 +00:00
parent 4b1cd5c5c0
commit 458194ba65

View File

@ -34,9 +34,6 @@
#include "common_types.h"
#include "android_media_codec_decoder.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/test/channel_transport/include/channel_transport.h"
#define WEBRTC_LOG_TAG "*WEBRTCN*"
#define VALIDATE_BASE_POINTER \
if (!voeData.base) \
@ -91,7 +88,6 @@
}
using namespace webrtc;
using namespace test;
//Forward declaration.
class VideoCallbackAndroid;
@ -111,7 +107,6 @@ typedef struct
VoEHardware* hardware;
VoERTP_RTCP* rtp;
JavaVM* jvm;
scoped_ptr<VoiceChannelTransport> transport;
} VoiceEngineData;
class AndroidVideoRenderCallback;
@ -127,7 +122,6 @@ typedef struct
ViECapture* capture;
ViEExternalCodec* externalCodec;
VideoCallbackAndroid* callback;
scoped_ptr<VideoChannelTransport> transport;
} VideoEngineData;
// Global variables
@ -594,7 +588,6 @@ JNIEXPORT jint JNICALL Java_org_webrtc_videoengineapp_ViEAndroidJavaAPI_CreateCh
if (voiceChannel >= 0) {
vieData.base->ConnectAudioChannel(channel, voiceChannel);
}
vieData.transport.reset(new VideoChannelTransport(vieData.netw, channel));
return channel;
}
else {
@ -615,9 +608,14 @@ JNIEXPORT jint JNICALL Java_org_webrtc_videoengineapp_ViEAndroidJavaAPI_SetLocal
{
__android_log_write(ANDROID_LOG_DEBUG, WEBRTC_LOG_TAG, "SetLocalReceiver");
if (vieData.transport.get()) {
return vieData.transport->SetLocalReceiver(port);
if (vieData.vie) {
int ret = vieData.netw->SetLocalReceiver(channel, port);
return ret;
}
else {
return -1;
}
return -1;
}
@ -648,10 +646,7 @@ JNIEXPORT jint JNICALL Java_org_webrtc_videoengineapp_ViEAndroidJavaAPI_SetSendD
"SetSendDestination: channel=%d, port=%d, ip=%s\n",
channel, port, ip);
if (vieData.transport.get()) {
return vieData.transport->SetSendDestination(ip, port);
}
return -1;
return vieData.netw->SetSendDestination(channel, ip, port);
}
@ -1269,7 +1264,6 @@ JNIEXPORT jint JNICALL Java_org_webrtc_videoengineapp_ViEAndroidJavaAPI_VoE_1Cre
}
jint channel = voeData.base->CreateChannel();
voeData.transport.reset(new VoiceChannelTransport(voeData.netw, channel));
return channel;
}
@ -1300,10 +1294,7 @@ JNIEXPORT jint JNICALL Java_org_webrtc_videoengineapp_ViEAndroidJavaAPI_VoE_1Set
{
__android_log_write(ANDROID_LOG_DEBUG, WEBRTC_LOG_TAG, "SetLocalReceiver");
VALIDATE_BASE_POINTER;
if (voeData.transport.get()) {
return voeData.transport->SetLocalReceiver(port);
}
return -1;
return voeData.base->SetLocalReceiver(channel, port);
}
/*
@ -1327,13 +1318,9 @@ JNIEXPORT jint JNICALL Java_org_webrtc_videoengineapp_ViEAndroidJavaAPI_VoE_1Set
"Could not get UTF string");
return -1;
}
if (voeData.transport.get()) {
jint retVal = voeData.transport->SetSendDestination(ipaddrNative, port);
env->ReleaseStringUTFChars(ipaddr, ipaddrNative);
return retVal;
}
env->ReleaseStringUTFChars(ipaddr, ipaddrNative);
return -1;
jint retVal = voeData.base->SetSendDestination(channel, port, ipaddrNative);
return retVal;
}
/*