• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2016 The WebRTC project authors. All Rights Reserved.
3  *
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
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 package org.webrtc;
12 
13 import android.content.Context;
14 
15 public class Camera1Capturer extends CameraCapturer {
16   private final boolean captureToTexture;
17 
Camera1Capturer( String cameraName, CameraEventsHandler eventsHandler, boolean captureToTexture)18   public Camera1Capturer(
19       String cameraName, CameraEventsHandler eventsHandler, boolean captureToTexture) {
20     super(cameraName, eventsHandler, new Camera1Enumerator(captureToTexture));
21 
22     this.captureToTexture = captureToTexture;
23   }
24 
25   @Override
createCameraSession(CameraSession.CreateSessionCallback createSessionCallback, CameraSession.Events events, Context applicationContext, SurfaceTextureHelper surfaceTextureHelper, String cameraName, int width, int height, int framerate)26   protected void createCameraSession(CameraSession.CreateSessionCallback createSessionCallback,
27       CameraSession.Events events, Context applicationContext,
28       SurfaceTextureHelper surfaceTextureHelper, String cameraName, int width, int height,
29       int framerate) {
30     Camera1Session.create(createSessionCallback, events, captureToTexture, applicationContext,
31         surfaceTextureHelper, cameraName, width, height, framerate);
32   }
33 }
34