Sami Kalliomäki | 05b552f | 2018-07-05 17:06:51 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 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 | /** |
| 14 | * Interface for observering a capturer. Passed to {@link VideoCapturer#initialize}. Provided by |
| 15 | * {@link VideoSource#getCapturerObserver}. |
| 16 | * |
| 17 | * All callbacks must be executed on a single thread. |
Sami Kalliomäki | 05b552f | 2018-07-05 17:06:51 +0200 | [diff] [blame] | 18 | */ |
Sami Kalliomäki | 903bd41 | 2018-07-24 10:53:28 +0200 | [diff] [blame] | 19 | public interface CapturerObserver { |
Sami Kalliomäki | 05b552f | 2018-07-05 17:06:51 +0200 | [diff] [blame] | 20 | /** Notify if the capturer have been started successfully or not. */ |
Sami Kalliomäki | 903bd41 | 2018-07-24 10:53:28 +0200 | [diff] [blame] | 21 | void onCapturerStarted(boolean success); |
Sami Kalliomäki | 05b552f | 2018-07-05 17:06:51 +0200 | [diff] [blame] | 22 | /** Notify that the capturer has been stopped. */ |
Sami Kalliomäki | 903bd41 | 2018-07-24 10:53:28 +0200 | [diff] [blame] | 23 | void onCapturerStopped(); |
Sami Kalliomäki | 05b552f | 2018-07-05 17:06:51 +0200 | [diff] [blame] | 24 | |
| 25 | /** Delivers a captured frame. */ |
Sami Kalliomäki | 903bd41 | 2018-07-24 10:53:28 +0200 | [diff] [blame] | 26 | void onFrameCaptured(VideoFrame frame); |
Sami Kalliomäki | 05b552f | 2018-07-05 17:06:51 +0200 | [diff] [blame] | 27 | } |