blob: 382dc15b3a693223ac8978e04a23b4e884434ae2 [file] [log] [blame]
Sami Kalliomäki05b552f2018-07-05 17:06:51 +02001/*
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
11package 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äki05b552f2018-07-05 17:06:51 +020018 */
Sami Kalliomäki903bd412018-07-24 10:53:28 +020019public interface CapturerObserver {
Sami Kalliomäki05b552f2018-07-05 17:06:51 +020020 /** Notify if the capturer have been started successfully or not. */
Sami Kalliomäki903bd412018-07-24 10:53:28 +020021 void onCapturerStarted(boolean success);
Sami Kalliomäki05b552f2018-07-05 17:06:51 +020022 /** Notify that the capturer has been stopped. */
Sami Kalliomäki903bd412018-07-24 10:53:28 +020023 void onCapturerStopped();
Sami Kalliomäki05b552f2018-07-05 17:06:51 +020024
25 /** Delivers a captured frame. */
Sami Kalliomäki903bd412018-07-24 10:53:28 +020026 void onFrameCaptured(VideoFrame frame);
Sami Kalliomäki05b552f2018-07-05 17:06:51 +020027}