blob: de172aa1d7cf9067394ee286e051ebb5a944a5cb [file] [log] [blame]
sakal34425792016-09-21 01:34:56 -07001/*
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
11package org.webrtc;
12
sakal34425792016-09-21 01:34:56 -070013import android.content.Context;
sakal34425792016-09-21 01:34:56 -070014
15public class Camera1Capturer extends CameraCapturer {
16 private final boolean captureToTexture;
17
sakalb6760f92016-09-29 04:12:44 -070018 public Camera1Capturer(
19 String cameraName, CameraEventsHandler eventsHandler, boolean captureToTexture) {
sakal34425792016-09-21 01:34:56 -070020 super(cameraName, eventsHandler, new Camera1Enumerator(captureToTexture));
21
22 this.captureToTexture = captureToTexture;
23 }
24
25 @Override
sakalb6760f92016-09-29 04:12:44 -070026 protected void createCameraSession(CameraSession.CreateSessionCallback createSessionCallback,
27 CameraSession.Events events, Context applicationContext,
Magnus Jedvert5ebb82b2018-04-12 16:23:34 +020028 SurfaceTextureHelper surfaceTextureHelper, String cameraName, int width, int height,
29 int framerate) {
30 Camera1Session.create(createSessionCallback, events, captureToTexture, applicationContext,
Saúl Ibarra Corretgé27edde32021-07-30 16:44:01 +020031 surfaceTextureHelper, cameraName, width, height, framerate);
sakal34425792016-09-21 01:34:56 -070032 }
33}