Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: webrtc/examples/androidapp/src/org/appspot/apprtc/ConnectActivity.java

Issue 1514473008: Add aecdump support to AppRTCDemo (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix try and tests Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 private String keyprefCaptureQualitySlider; 60 private String keyprefCaptureQualitySlider;
61 private String keyprefVideoBitrateType; 61 private String keyprefVideoBitrateType;
62 private String keyprefVideoBitrateValue; 62 private String keyprefVideoBitrateValue;
63 private String keyprefVideoCodec; 63 private String keyprefVideoCodec;
64 private String keyprefAudioBitrateType; 64 private String keyprefAudioBitrateType;
65 private String keyprefAudioBitrateValue; 65 private String keyprefAudioBitrateValue;
66 private String keyprefAudioCodec; 66 private String keyprefAudioCodec;
67 private String keyprefHwCodecAcceleration; 67 private String keyprefHwCodecAcceleration;
68 private String keyprefCaptureToTexture; 68 private String keyprefCaptureToTexture;
69 private String keyprefNoAudioProcessingPipeline; 69 private String keyprefNoAudioProcessingPipeline;
70 private String keyprefAecDump;
70 private String keyprefOpenSLES; 71 private String keyprefOpenSLES;
71 private String keyprefDisplayHud; 72 private String keyprefDisplayHud;
72 private String keyprefRoomServerUrl; 73 private String keyprefRoomServerUrl;
73 private String keyprefRoom; 74 private String keyprefRoom;
74 private String keyprefRoomList; 75 private String keyprefRoomList;
75 private ArrayList<String> roomList; 76 private ArrayList<String> roomList;
76 private ArrayAdapter<String> adapter; 77 private ArrayAdapter<String> adapter;
77 78
78 @Override 79 @Override
79 public void onCreate(Bundle savedInstanceState) { 80 public void onCreate(Bundle savedInstanceState) {
80 super.onCreate(savedInstanceState); 81 super.onCreate(savedInstanceState);
81 82
82 // Get setting keys. 83 // Get setting keys.
83 PreferenceManager.setDefaultValues(this, R.xml.preferences, false); 84 PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
84 sharedPref = PreferenceManager.getDefaultSharedPreferences(this); 85 sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
85 keyprefVideoCallEnabled = getString(R.string.pref_videocall_key); 86 keyprefVideoCallEnabled = getString(R.string.pref_videocall_key);
86 keyprefResolution = getString(R.string.pref_resolution_key); 87 keyprefResolution = getString(R.string.pref_resolution_key);
87 keyprefFps = getString(R.string.pref_fps_key); 88 keyprefFps = getString(R.string.pref_fps_key);
88 keyprefCaptureQualitySlider = getString(R.string.pref_capturequalityslider_k ey); 89 keyprefCaptureQualitySlider = getString(R.string.pref_capturequalityslider_k ey);
89 keyprefVideoBitrateType = getString(R.string.pref_startvideobitrate_key); 90 keyprefVideoBitrateType = getString(R.string.pref_startvideobitrate_key);
90 keyprefVideoBitrateValue = getString(R.string.pref_startvideobitratevalue_ke y); 91 keyprefVideoBitrateValue = getString(R.string.pref_startvideobitratevalue_ke y);
91 keyprefVideoCodec = getString(R.string.pref_videocodec_key); 92 keyprefVideoCodec = getString(R.string.pref_videocodec_key);
92 keyprefHwCodecAcceleration = getString(R.string.pref_hwcodec_key); 93 keyprefHwCodecAcceleration = getString(R.string.pref_hwcodec_key);
93 keyprefCaptureToTexture = getString(R.string.pref_capturetotexture_key); 94 keyprefCaptureToTexture = getString(R.string.pref_capturetotexture_key);
94 keyprefAudioBitrateType = getString(R.string.pref_startaudiobitrate_key); 95 keyprefAudioBitrateType = getString(R.string.pref_startaudiobitrate_key);
95 keyprefAudioBitrateValue = getString(R.string.pref_startaudiobitratevalue_ke y); 96 keyprefAudioBitrateValue = getString(R.string.pref_startaudiobitratevalue_ke y);
96 keyprefAudioCodec = getString(R.string.pref_audiocodec_key); 97 keyprefAudioCodec = getString(R.string.pref_audiocodec_key);
97 keyprefNoAudioProcessingPipeline = getString(R.string.pref_noaudioprocessing _key); 98 keyprefNoAudioProcessingPipeline = getString(R.string.pref_noaudioprocessing _key);
99 keyprefAecDump = getString(R.string.pref_aecdump_key);
98 keyprefOpenSLES = getString(R.string.pref_opensles_key); 100 keyprefOpenSLES = getString(R.string.pref_opensles_key);
99 keyprefDisplayHud = getString(R.string.pref_displayhud_key); 101 keyprefDisplayHud = getString(R.string.pref_displayhud_key);
100 keyprefRoomServerUrl = getString(R.string.pref_room_server_url_key); 102 keyprefRoomServerUrl = getString(R.string.pref_room_server_url_key);
101 keyprefRoom = getString(R.string.pref_room_key); 103 keyprefRoom = getString(R.string.pref_room_key);
102 keyprefRoomList = getString(R.string.pref_room_list_key); 104 keyprefRoomList = getString(R.string.pref_room_list_key);
103 105
104 setContentView(R.layout.activity_connect); 106 setContentView(R.layout.activity_connect);
105 107
106 roomEditText = (EditText) findViewById(R.id.room_edittext); 108 roomEditText = (EditText) findViewById(R.id.room_edittext);
107 roomEditText.setOnEditorActionListener( 109 roomEditText.setOnEditorActionListener(
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 259
258 // Check Capture to texture. 260 // Check Capture to texture.
259 boolean captureToTexture = sharedPref.getBoolean(keyprefCaptureToTexture, 261 boolean captureToTexture = sharedPref.getBoolean(keyprefCaptureToTexture,
260 Boolean.valueOf(getString(R.string.pref_capturetotexture_default))); 262 Boolean.valueOf(getString(R.string.pref_capturetotexture_default)));
261 263
262 // Check Disable Audio Processing flag. 264 // Check Disable Audio Processing flag.
263 boolean noAudioProcessing = sharedPref.getBoolean( 265 boolean noAudioProcessing = sharedPref.getBoolean(
264 keyprefNoAudioProcessingPipeline, 266 keyprefNoAudioProcessingPipeline,
265 Boolean.valueOf(getString(R.string.pref_noaudioprocessing_default))); 267 Boolean.valueOf(getString(R.string.pref_noaudioprocessing_default)));
266 268
269 // Check Disable Audio Processing flag.
270 boolean aecDump = sharedPref.getBoolean(
271 keyprefAecDump,
272 Boolean.valueOf(getString(R.string.pref_aecdump_default)));
273
267 // Check OpenSL ES enabled flag. 274 // Check OpenSL ES enabled flag.
268 boolean useOpenSLES = sharedPref.getBoolean( 275 boolean useOpenSLES = sharedPref.getBoolean(
269 keyprefOpenSLES, 276 keyprefOpenSLES,
270 Boolean.valueOf(getString(R.string.pref_opensles_default))); 277 Boolean.valueOf(getString(R.string.pref_opensles_default)));
271 278
272 // Get video resolution from settings. 279 // Get video resolution from settings.
273 int videoWidth = 0; 280 int videoWidth = 0;
274 int videoHeight = 0; 281 int videoHeight = 0;
275 String resolution = sharedPref.getString(keyprefResolution, 282 String resolution = sharedPref.getString(keyprefResolution,
276 getString(R.string.pref_resolution_default)); 283 getString(R.string.pref_resolution_default));
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 intent.putExtra(CallActivity.EXTRA_VIDEO_HEIGHT, videoHeight); 348 intent.putExtra(CallActivity.EXTRA_VIDEO_HEIGHT, videoHeight);
342 intent.putExtra(CallActivity.EXTRA_VIDEO_FPS, cameraFps); 349 intent.putExtra(CallActivity.EXTRA_VIDEO_FPS, cameraFps);
343 intent.putExtra(CallActivity.EXTRA_VIDEO_CAPTUREQUALITYSLIDER_ENABLED, 350 intent.putExtra(CallActivity.EXTRA_VIDEO_CAPTUREQUALITYSLIDER_ENABLED,
344 captureQualitySlider); 351 captureQualitySlider);
345 intent.putExtra(CallActivity.EXTRA_VIDEO_BITRATE, videoStartBitrate); 352 intent.putExtra(CallActivity.EXTRA_VIDEO_BITRATE, videoStartBitrate);
346 intent.putExtra(CallActivity.EXTRA_VIDEOCODEC, videoCodec); 353 intent.putExtra(CallActivity.EXTRA_VIDEOCODEC, videoCodec);
347 intent.putExtra(CallActivity.EXTRA_HWCODEC_ENABLED, hwCodec); 354 intent.putExtra(CallActivity.EXTRA_HWCODEC_ENABLED, hwCodec);
348 intent.putExtra(CallActivity.EXTRA_CAPTURETOTEXTURE_ENABLED, captureToText ure); 355 intent.putExtra(CallActivity.EXTRA_CAPTURETOTEXTURE_ENABLED, captureToText ure);
349 intent.putExtra(CallActivity.EXTRA_NOAUDIOPROCESSING_ENABLED, 356 intent.putExtra(CallActivity.EXTRA_NOAUDIOPROCESSING_ENABLED,
350 noAudioProcessing); 357 noAudioProcessing);
358 intent.putExtra(CallActivity.EXTRA_AECDUMP_ENABLED, aecDump);
351 intent.putExtra(CallActivity.EXTRA_OPENSLES_ENABLED, useOpenSLES); 359 intent.putExtra(CallActivity.EXTRA_OPENSLES_ENABLED, useOpenSLES);
352 intent.putExtra(CallActivity.EXTRA_AUDIO_BITRATE, audioStartBitrate); 360 intent.putExtra(CallActivity.EXTRA_AUDIO_BITRATE, audioStartBitrate);
353 intent.putExtra(CallActivity.EXTRA_AUDIOCODEC, audioCodec); 361 intent.putExtra(CallActivity.EXTRA_AUDIOCODEC, audioCodec);
354 intent.putExtra(CallActivity.EXTRA_DISPLAY_HUD, displayHud); 362 intent.putExtra(CallActivity.EXTRA_DISPLAY_HUD, displayHud);
355 intent.putExtra(CallActivity.EXTRA_CMDLINE, commandLineRun); 363 intent.putExtra(CallActivity.EXTRA_CMDLINE, commandLineRun);
356 intent.putExtra(CallActivity.EXTRA_RUNTIME, runTimeMs); 364 intent.putExtra(CallActivity.EXTRA_RUNTIME, runTimeMs);
357 365
358 startActivityForResult(intent, CONNECTION_REQUEST); 366 startActivityForResult(intent, CONNECTION_REQUEST);
359 } 367 }
360 } 368 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 } 415 }
408 } 416 }
409 if (position != AdapterView.INVALID_POSITION) { 417 if (position != AdapterView.INVALID_POSITION) {
410 return adapter.getItem(position); 418 return adapter.getItem(position);
411 } else { 419 } else {
412 return null; 420 return null;
413 } 421 }
414 } 422 }
415 423
416 } 424 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698