OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 public void switchCamera(final CameraSwitchHandler switchEventsHandler) { | 240 public void switchCamera(final CameraSwitchHandler switchEventsHandler) { |
241 Logging.d(TAG, "switchCamera"); | 241 Logging.d(TAG, "switchCamera"); |
242 cameraThreadHandler.post(new Runnable() { | 242 cameraThreadHandler.post(new Runnable() { |
243 @Override | 243 @Override |
244 public void run() { | 244 public void run() { |
245 switchCameraInternal(switchEventsHandler); | 245 switchCameraInternal(switchEventsHandler); |
246 } | 246 } |
247 }); | 247 }); |
248 } | 248 } |
249 | 249 |
| 250 @Override |
| 251 public boolean isScreencast() { |
| 252 return false; |
| 253 } |
| 254 |
250 private void switchCameraInternal(final CameraSwitchHandler switchEventsHandle
r) { | 255 private void switchCameraInternal(final CameraSwitchHandler switchEventsHandle
r) { |
251 Logging.d(TAG, "switchCamera internal"); | 256 Logging.d(TAG, "switchCamera internal"); |
252 | 257 |
253 final String[] deviceNames = cameraEnumerator.getDeviceNames(); | 258 final String[] deviceNames = cameraEnumerator.getDeviceNames(); |
254 | 259 |
255 if (deviceNames.length < 2) { | 260 if (deviceNames.length < 2) { |
256 if (switchEventsHandler != null) { | 261 if (switchEventsHandler != null) { |
257 switchEventsHandler.onCameraSwitchError("No camera to switch to."); | 262 switchEventsHandler.onCameraSwitchError("No camera to switch to."); |
258 } | 263 } |
259 return; | 264 return; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 } | 309 } |
305 } | 310 } |
306 | 311 |
307 abstract protected void createCameraSession( | 312 abstract protected void createCameraSession( |
308 CameraSession.CreateSessionCallback createSessionCallback, | 313 CameraSession.CreateSessionCallback createSessionCallback, |
309 CameraEventsHandler eventsHandler, Context applicationContext, | 314 CameraEventsHandler eventsHandler, Context applicationContext, |
310 CameraVideoCapturer.CapturerObserver capturerObserver, | 315 CameraVideoCapturer.CapturerObserver capturerObserver, |
311 SurfaceTextureHelper surfaceTextureHelper, | 316 SurfaceTextureHelper surfaceTextureHelper, |
312 String cameraName, int width, int height, int framerate); | 317 String cameraName, int width, int height, int framerate); |
313 } | 318 } |
OLD | NEW |