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

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

Issue 1361083002: Android AppRTCDemo: Add slider for changing camera capture quality during call (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Move programmatic layout changes into fragment_call.xml instead Created 5 years, 2 months 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 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 public static final String EXTRA_LOOPBACK = 51 public static final String EXTRA_LOOPBACK =
52 "org.appspot.apprtc.LOOPBACK"; 52 "org.appspot.apprtc.LOOPBACK";
53 public static final String EXTRA_VIDEO_CALL = 53 public static final String EXTRA_VIDEO_CALL =
54 "org.appspot.apprtc.VIDEO_CALL"; 54 "org.appspot.apprtc.VIDEO_CALL";
55 public static final String EXTRA_VIDEO_WIDTH = 55 public static final String EXTRA_VIDEO_WIDTH =
56 "org.appspot.apprtc.VIDEO_WIDTH"; 56 "org.appspot.apprtc.VIDEO_WIDTH";
57 public static final String EXTRA_VIDEO_HEIGHT = 57 public static final String EXTRA_VIDEO_HEIGHT =
58 "org.appspot.apprtc.VIDEO_HEIGHT"; 58 "org.appspot.apprtc.VIDEO_HEIGHT";
59 public static final String EXTRA_VIDEO_FPS = 59 public static final String EXTRA_VIDEO_FPS =
60 "org.appspot.apprtc.VIDEO_FPS"; 60 "org.appspot.apprtc.VIDEO_FPS";
61 public static final String EXTRA_VIDEO_CAPTUREQUALITYSLIDER_ENABLED =
62 "org.appsopt.apprtc.VIDEO_CAPTUREQUALITYSLIDER";
61 public static final String EXTRA_VIDEO_BITRATE = 63 public static final String EXTRA_VIDEO_BITRATE =
62 "org.appspot.apprtc.VIDEO_BITRATE"; 64 "org.appspot.apprtc.VIDEO_BITRATE";
63 public static final String EXTRA_VIDEOCODEC = 65 public static final String EXTRA_VIDEOCODEC =
64 "org.appspot.apprtc.VIDEOCODEC"; 66 "org.appspot.apprtc.VIDEOCODEC";
65 public static final String EXTRA_HWCODEC_ENABLED = 67 public static final String EXTRA_HWCODEC_ENABLED =
66 "org.appspot.apprtc.HWCODEC"; 68 "org.appspot.apprtc.HWCODEC";
67 public static final String EXTRA_AUDIO_BITRATE = 69 public static final String EXTRA_AUDIO_BITRATE =
68 "org.appspot.apprtc.AUDIO_BITRATE"; 70 "org.appspot.apprtc.AUDIO_BITRATE";
69 public static final String EXTRA_AUDIOCODEC = 71 public static final String EXTRA_AUDIOCODEC =
70 "org.appspot.apprtc.AUDIOCODEC"; 72 "org.appspot.apprtc.AUDIOCODEC";
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 peerConnectionClient.switchCamera(); 296 peerConnectionClient.switchCamera();
295 } 297 }
296 } 298 }
297 299
298 @Override 300 @Override
299 public void onVideoScalingSwitch(ScalingType scalingType) { 301 public void onVideoScalingSwitch(ScalingType scalingType) {
300 this.scalingType = scalingType; 302 this.scalingType = scalingType;
301 updateVideoView(); 303 updateVideoView();
302 } 304 }
303 305
306 @Override
307 public void onCaptureFormatChange(int width, int height, int framerate) {
308 if (peerConnectionClient != null) {
309 peerConnectionClient.changeCaptureFormat(width, height, framerate);
310 }
311 }
312
304 // Helper functions. 313 // Helper functions.
305 private void toggleCallControlFragmentVisibility() { 314 private void toggleCallControlFragmentVisibility() {
306 if (!iceConnected || !callFragment.isAdded()) { 315 if (!iceConnected || !callFragment.isAdded()) {
307 return; 316 return;
308 } 317 }
309 // Show/hide call control fragment 318 // Show/hide call control fragment
310 callControlFragmentVisible = !callControlFragmentVisible; 319 callControlFragmentVisible = !callControlFragmentVisible;
311 FragmentTransaction ft = getFragmentManager().beginTransaction(); 320 FragmentTransaction ft = getFragmentManager().beginTransaction();
312 if (callControlFragmentVisible) { 321 if (callControlFragmentVisible) {
313 ft.show(callFragment); 322 ft.show(callFragment);
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 } 650 }
642 } 651 }
643 }); 652 });
644 } 653 }
645 654
646 @Override 655 @Override
647 public void onPeerConnectionError(final String description) { 656 public void onPeerConnectionError(final String description) {
648 reportError(description); 657 reportError(description);
649 } 658 }
650 } 659 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698