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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 capturerObserver.onCapturerStopped(); | 301 capturerObserver.onCapturerStopped(); |
302 } else { | 302 } else { |
303 Logging.d(TAG, "Stop capture: No session open"); | 303 Logging.d(TAG, "Stop capture: No session open"); |
304 } | 304 } |
305 } | 305 } |
306 | 306 |
307 Logging.d(TAG, "Stop capture done"); | 307 Logging.d(TAG, "Stop capture done"); |
308 } | 308 } |
309 | 309 |
310 @Override | 310 @Override |
311 public void onOutputFormatRequest(final int width, final int height, final int
framerate) { | |
312 cameraThreadHandler.post(new Runnable() { | |
313 @Override public void run() { | |
314 Logging.d(TAG, "onOutputFormatRequestOnCameraThread: " + width + "x" + h
eight + | |
315 "@" + framerate); | |
316 capturerObserver.onOutputFormatRequest(width, height, framerate); | |
317 } | |
318 }); | |
319 } | |
320 | |
321 @Override | |
322 public void changeCaptureFormat(int width, int height, int framerate) { | 311 public void changeCaptureFormat(int width, int height, int framerate) { |
323 Logging.d(TAG, "changeCaptureFormat: " + width + "x" + height + "@" + framer
ate); | 312 Logging.d(TAG, "changeCaptureFormat: " + width + "x" + height + "@" + framer
ate); |
324 synchronized (stateLock) { | 313 synchronized (stateLock) { |
325 stopCapture(); | 314 stopCapture(); |
326 startCapture(width, height, framerate); | 315 startCapture(width, height, framerate); |
327 } | 316 } |
328 } | 317 } |
329 | 318 |
330 @Override | 319 @Override |
331 public void dispose() { | 320 public void dispose() { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 synchronized (stateLock) { | 424 synchronized (stateLock) { |
436 return cameraName; | 425 return cameraName; |
437 } | 426 } |
438 } | 427 } |
439 | 428 |
440 abstract protected void createCameraSession( | 429 abstract protected void createCameraSession( |
441 CameraSession.CreateSessionCallback createSessionCallback, CameraSession.E
vents events, | 430 CameraSession.CreateSessionCallback createSessionCallback, CameraSession.E
vents events, |
442 Context applicationContext, SurfaceTextureHelper surfaceTextureHelper, | 431 Context applicationContext, SurfaceTextureHelper surfaceTextureHelper, |
443 String cameraName, int width, int height, int framerate); | 432 String cameraName, int width, int height, int framerate); |
444 } | 433 } |
OLD | NEW |