WebRTCDemo: set local SSRC for loopback test, otherwise receiver would reset it due to ssrc clash, which would cause delayed remote rendering.

(Including another fix here, https://review.webrtc.org/16779004/, to make the test run)

BUG=3500
TEST=Manual Test
R=glaznev@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/13819004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6587 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
braveyao@webrtc.org 2014-07-03 05:59:22 +00:00
parent 3ffa1f917e
commit 9c89e932c9
4 changed files with 16 additions and 2 deletions

View File

@ -710,3 +710,9 @@ JOWW(void, VideoCodecInst_setMaxFrameRate)(JNIEnv* jni, jobject j_codec,
JOWW(void, CameraDesc_dispose)(JNIEnv* jni, jobject j_camera) { JOWW(void, CameraDesc_dispose)(JNIEnv* jni, jobject j_camera) {
delete GetCameraDesc(jni, j_camera); delete GetCameraDesc(jni, j_camera);
} }
JOWW(jint, VideoEngine_setLocalSSRC)(JNIEnv* jni, jobject j_vie, jint channel,
jint ssrc) {
VideoEngineData* vie_data = GetVideoEngineData(jni, j_vie);
return vie_data->rtp->SetLocalSSRC(channel, ssrc);
}

View File

@ -259,7 +259,7 @@ public class MediaEngine implements VideoDecodeEncodeObserver {
public void setTrace(boolean enable) { public void setTrace(boolean enable) {
if (enable) { if (enable) {
vie.setTraceFile("/sdcard/trace.txt", false); vie.setTraceFile("/sdcard/trace.txt", false);
vie.setTraceFilter(VideoEngine.TraceLevel.TRACE_ERROR); vie.setTraceFilter(VideoEngine.TraceLevel.TRACE_ALL);
return; return;
} }
vie.setTraceFilter(VideoEngine.TraceLevel.TRACE_NONE); vie.setTraceFilter(VideoEngine.TraceLevel.TRACE_NONE);
@ -561,6 +561,14 @@ public class MediaEngine implements VideoDecodeEncodeObserver {
check(vie.setSendDestination(videoChannel, videoTxPort, remoteIp) == 0, check(vie.setSendDestination(videoChannel, videoTxPort, remoteIp) == 0,
"Failed setSendDestination"); "Failed setSendDestination");
} }
// Setting localSSRC manually (arbitrary value) for loopback test,
// As otherwise we will get a clash and a new SSRC will be set,
// Which will reset the receiver and other minor issues.
if (remoteIp.equals("127.0.0.1")) {
check(vie.setLocalSSRC(videoChannel, 0x01234567) == 0,
"Failed setLocalSSRC");
}
} }
public int videoTxPort() { public int videoTxPort() {

View File

@ -116,4 +116,5 @@ public class VideoEngine {
return stopRtpDump(channel, direction.ordinal()); return stopRtpDump(channel, direction.ordinal());
} }
private native int stopRtpDump(int channel, int direction); private native int stopRtpDump(int channel, int direction);
public native int setLocalSSRC(int channel, int ssrc);
} }

View File

@ -15,7 +15,6 @@
'type': 'loadable_module', 'type': 'loadable_module',
'dependencies': [ 'dependencies': [
'<(DEPTH)/third_party/icu/icu.gyp:icuuc', '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
'<(webrtc_root)/modules/modules.gyp:*',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:field_trial_default', '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:field_trial_default',
'<(webrtc_root)/test/test.gyp:channel_transport', '<(webrtc_root)/test/test.gyp:channel_transport',
'<(webrtc_root)/video_engine/video_engine.gyp:video_engine_core', '<(webrtc_root)/video_engine/video_engine.gyp:video_engine_core',