OLD | NEW |
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 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 | 837 |
838 public void switchCamera() { | 838 public void switchCamera() { |
839 executor.execute(new Runnable() { | 839 executor.execute(new Runnable() { |
840 @Override | 840 @Override |
841 public void run() { | 841 public void run() { |
842 switchCameraInternal(); | 842 switchCameraInternal(); |
843 } | 843 } |
844 }); | 844 }); |
845 } | 845 } |
846 | 846 |
| 847 public void changeCaptureFormat(final int width, final int height, final int f
ramerate) { |
| 848 executor.execute(new Runnable() { |
| 849 @Override |
| 850 public void run() { |
| 851 changeCaptureFormatInternal(width, height, framerate); |
| 852 } |
| 853 }); |
| 854 } |
| 855 |
| 856 private void changeCaptureFormatInternal(int width, int height, int framerate)
{ |
| 857 if (!videoCallEnabled || isError || videoCapturer == null) { |
| 858 Log.e(TAG, "Failed to change capture format. Video: " + videoCallEnabled +
". Error : " |
| 859 + isError); |
| 860 return; |
| 861 } |
| 862 videoCapturer.onOutputFormatRequest(width, height, framerate); |
| 863 } |
| 864 |
847 // Implementation detail: observe ICE & stream changes and react accordingly. | 865 // Implementation detail: observe ICE & stream changes and react accordingly. |
848 private class PCObserver implements PeerConnection.Observer { | 866 private class PCObserver implements PeerConnection.Observer { |
849 @Override | 867 @Override |
850 public void onIceCandidate(final IceCandidate candidate){ | 868 public void onIceCandidate(final IceCandidate candidate){ |
851 executor.execute(new Runnable() { | 869 executor.execute(new Runnable() { |
852 @Override | 870 @Override |
853 public void run() { | 871 public void run() { |
854 events.onIceCandidate(candidate); | 872 events.onIceCandidate(candidate); |
855 } | 873 } |
856 }); | 874 }); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 public void onCreateFailure(final String error) { | 1027 public void onCreateFailure(final String error) { |
1010 reportError("createSDP error: " + error); | 1028 reportError("createSDP error: " + error); |
1011 } | 1029 } |
1012 | 1030 |
1013 @Override | 1031 @Override |
1014 public void onSetFailure(final String error) { | 1032 public void onSetFailure(final String error) { |
1015 reportError("setSDP error: " + error); | 1033 reportError("setSDP error: " + error); |
1016 } | 1034 } |
1017 } | 1035 } |
1018 } | 1036 } |
OLD | NEW |