//
// Copyright (C) 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
namespace GooglePlayGames.BasicApi.Video
{
using System;
using System.Collections.Generic;
///
/// An interface for interacting with the video recording API.
///
///
/// All callbacks in this interface must be invoked on the game thread.
///
public interface IVideoClient
{
///
/// Fetches the video capabilities of the service.
///
/// Includes whether the mic or front-facing camera are supported,
/// if the service can write to external storage, and what capture modes
/// and quality levels are available.
///
/// The callback for the results. The passed capabilities will be non-null if
/// and only if the request succeeded. This callback will be invoked on the game thread.
void GetCaptureCapabilities(Action callback);
///
/// Launches the video capture overlay.
///
void ShowCaptureOverlay();
///
/// Fetches the current state of the capture service.
///
///
/// This will inform about whether the capture overlay is visible,
/// if the overlay is actively being used to capture, and much more.
/// See for more details.
///
/// The callback for the results. The passed capture state will be non-null if
/// and only if the request succeeded. This callback will be invoked on the game thread.
void GetCaptureState(Action callback);
///
/// Fetches if the capture service is already in use or not.
///
///
/// Use this call to check if a start capture api call will return ErrorVideoAlreadyCapturing.
/// If this returns true, then its safe to start capturing.
///
/// Do not use this call to check if capture is supported, instead use
/// or .
///
///
/// The callback for the results.
/// This callback will be invoked on the game thread.
void IsCaptureAvailable(VideoCaptureMode captureMode, Action callback);
///
/// Synchronous simple check to determine if the device supports capture.
///
/// If video capture is supported on this device.
bool IsCaptureSupported();
///
/// Register a listener to listen for changes to the video capture overlay state.
///
///
/// Note that only one overlay state listener may be active at a time.
/// Calling this method while another overlay state listener was previously
/// registered will replace the original listener with the new one.
///
///
void RegisterCaptureOverlayStateChangedListener(CaptureOverlayStateListener listener);
///
/// Unregisters this client's overlay state update listener, if any.
///
void UnregisterCaptureOverlayStateChangedListener();
}
}