// // 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.Collections.Generic; using System.Linq; using GooglePlayGames.OurUtils; /// /// Represents the video recording capabilities. /// public class VideoCaptureState { private bool mIsCapturing; private VideoCaptureMode mCaptureMode; private VideoQualityLevel mQualityLevel; private bool mIsOverlayVisible; private bool mIsPaused; internal VideoCaptureState(bool isCapturing, VideoCaptureMode captureMode, VideoQualityLevel qualityLevel, bool isOverlayVisible, bool isPaused) { mIsCapturing = isCapturing; mCaptureMode = captureMode; mQualityLevel = qualityLevel; mIsOverlayVisible = isOverlayVisible; mIsPaused = isPaused; } /// Returns whether the service is currently capturing or not. public bool IsCapturing { get { return mIsCapturing; } } /// Returns the capture mode of the current capture. public VideoCaptureMode CaptureMode { get { return mCaptureMode; } } /// Returns the quality level of the current capture. public VideoQualityLevel QualityLevel { get { return mQualityLevel; } } /// /// Returns whether the capture overlay is currently visible or not. /// /// /// This also indicates the capture overlay is being used by the user and background capture will fail. /// public bool IsOverlayVisible { get { return mIsOverlayVisible; } } /// /// Returns whether the capture is currently paused or not. /// /// /// Will always be false if IsCapturing if false. /// public bool IsPaused { get { return mIsPaused; } } public override string ToString() { return string.Format("[VideoCaptureState: mIsCapturing={0}, mCaptureMode={1}, mQualityLevel={2}, " + "mIsOverlayVisible={3}, mIsPaused={4}]", mIsCapturing, mCaptureMode.ToString(), mQualityLevel.ToString(), mIsOverlayVisible, mIsPaused); } } }