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

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

Issue 2350933006: Android VideoSource: Add adaptOutputFormat function (Closed)
Patch Set: Change deprecated annotation Created 4 years, 3 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 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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 }); 1051 });
1052 } 1052 }
1053 1053
1054 private void changeCaptureFormatInternal(int width, int height, int framerate) { 1054 private void changeCaptureFormatInternal(int width, int height, int framerate) {
1055 if (!videoCallEnabled || isError || videoCapturer == null) { 1055 if (!videoCallEnabled || isError || videoCapturer == null) {
1056 Log.e(TAG, "Failed to change capture format. Video: " + videoCallEnabled + ". Error : " 1056 Log.e(TAG, "Failed to change capture format. Video: " + videoCallEnabled + ". Error : "
1057 + isError); 1057 + isError);
1058 return; 1058 return;
1059 } 1059 }
1060 Log.d(TAG, "changeCaptureFormat: " + width + "x" + height + "@" + framerate) ; 1060 Log.d(TAG, "changeCaptureFormat: " + width + "x" + height + "@" + framerate) ;
1061 videoCapturer.onOutputFormatRequest(width, height, framerate); 1061 videoSource.adaptOutputFormat(width, height, framerate);
1062 } 1062 }
1063 1063
1064 // Implementation detail: observe ICE & stream changes and react accordingly. 1064 // Implementation detail: observe ICE & stream changes and react accordingly.
1065 private class PCObserver implements PeerConnection.Observer { 1065 private class PCObserver implements PeerConnection.Observer {
1066 @Override 1066 @Override
1067 public void onIceCandidate(final IceCandidate candidate){ 1067 public void onIceCandidate(final IceCandidate candidate){
1068 executor.execute(new Runnable() { 1068 executor.execute(new Runnable() {
1069 @Override 1069 @Override
1070 public void run() { 1070 public void run() {
1071 events.onIceCandidate(candidate); 1071 events.onIceCandidate(candidate);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 public void onCreateFailure(final String error) { 1236 public void onCreateFailure(final String error) {
1237 reportError("createSDP error: " + error); 1237 reportError("createSDP error: " + error);
1238 } 1238 }
1239 1239
1240 @Override 1240 @Override
1241 public void onSetFailure(final String error) { 1241 public void onSetFailure(final String error) {
1242 reportError("setSDP error: " + error); 1242 reportError("setSDP error: " + error);
1243 } 1243 }
1244 } 1244 }
1245 } 1245 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698