/****************************************************************************
* Copyright 2019 Nreal Techonology Limited. All rights reserved.
*
* This file is part of NRSDK.
*
* https://www.nreal.ai/
*
*****************************************************************************/
namespace NRKernal.Record
{
/// A camera parameters.
public struct CameraParameters
{
/// Constructor.
/// The web camera mode.
/// The mode.
public CameraParameters(CamMode webCamMode, BlendMode mode)
{
this.camMode = webCamMode;
this.hologramOpacity = 1f;
this.frameRate = NativeConstants.RECORD_FPS_DEFAULT;
this.cameraResolutionWidth = 1280;
this.cameraResolutionHeight = 720;
this.pixelFormat = CapturePixelFormat.BGRA32;
this.blendMode = mode;
this.audioState = NRVideoCapture.AudioState.ApplicationAndMicAudio;
this.mediaProjection = null;
}
/// The opacity of captured holograms.
/// The hologram opacity.
public float hologramOpacity { get; set; }
///
/// The framerate at which to capture video. This is only for use with VideoCapture.
/// The frame rate.
public int frameRate { get; set; }
/// A valid width resolution for use with the web camera.
public int cameraResolutionWidth { get; set; }
/// A valid height resolution for use with the web camera.
/// The height of the camera resolution.
public int cameraResolutionHeight { get; set; }
/// The pixel format used to capture and record your image data.
public CapturePixelFormat pixelFormat { get; set; }
/// The camera mode of capture.
/// The camera mode.
public CamMode camMode { get; set; }
/// The audio state of capture.
public NRVideoCapture.AudioState audioState { get; set; }
public bool CaptureAudioMic { get { return audioState == NRVideoCapture.AudioState.MicAudio || audioState == NRVideoCapture.AudioState.ApplicationAndMicAudio; }}
public bool CaptureAudioApplication { get { return audioState == NRVideoCapture.AudioState.ApplicationAudio || audioState == NRVideoCapture.AudioState.ApplicationAndMicAudio; }}
/// The android MediaProjection object.
public UnityEngine.AndroidJavaObject mediaProjection { get; set; }
/// The blend mode of camera output.
public BlendMode blendMode { get; set; }
}
}