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