Show / Hide Table of Contents

    Class CompositionManager

    Manages compositing real-world video and holograms together and creating an output video texture with recorded audio.

    Inheritance
    Object
    CompositionManager
    Namespace: Microsoft.MixedReality.SpectatorView
    Assembly: cs.temp.dll.dll
    Syntax
    public class CompositionManager : MonoBehaviour

    Fields

    AntiAliasing

    Gets or sets the sampling level for antialiasing when supersampling is used.

    Declaration
    public CompositionManager.AntiAliasingSamples AntiAliasing
    Field Value
    Type Description
    CompositionManager.AntiAliasingSamples

    DefaultAlpha

    Gets or sets the alpha value used for rendering holograms on top of video.

    Declaration
    public float DefaultAlpha
    Field Value
    Type Description
    Single

    EnableMicrophoneAudio

    Gets or sets whether microphone audio should be recorded into the output video.

    Declaration
    public bool EnableMicrophoneAudio
    Field Value
    Type Description
    Boolean

    Filter

    Gets or sets the filter mode for downsampling when supersampling is used.

    Declaration
    public FilterMode Filter
    Field Value
    Type Description
    FilterMode

    SuperSampleLevel

    Gets or sets the number of additional buffers to use for supersampling. Each additional buffer doubles the size of the rendered holograms before they're downsampled to the video resolution.

    Declaration
    public int SuperSampleLevel
    Field Value
    Type Description
    Int32

    TextureDepth

    Gets or sets the texture depth used for the RenderTextures used during compositing.

    Declaration
    public CompositionManager.Depth TextureDepth
    Field Value
    Type Description
    CompositionManager.Depth

    Properties

    CaptureDevice

    Gets or sets the type of capture device to read video content from.

    Declaration
    public FrameProviderDeviceType CaptureDevice { get; set; }
    Property Value
    Type Description
    FrameProviderDeviceType

    CurrentCompositeFrame

    Gets the index of the video frame currently being composited.

    Declaration
    public int CurrentCompositeFrame { get; }
    Property Value
    Type Description
    Int32

    FramerateStatistics

    Declaration
    public Queue<float> FramerateStatistics { get; }
    Property Value
    Type Description
    Queue<Single>

    IsVideoFrameProviderInitialized

    Gets whether or not the video frame provider has finished initialization.

    Declaration
    public bool IsVideoFrameProviderInitialized { get; }
    Property Value
    Type Description
    Boolean

    TextureManager

    Gets the texture manager used for compositing.

    Declaration
    public TextureManager TextureManager { get; }
    Property Value
    Type Description
    TextureManager

    VideoRecordingLayout

    Declaration
    public VideoRecordingFrameLayout VideoRecordingLayout { get; set; }
    Property Value
    Type Description
    VideoRecordingFrameLayout

    VideoTimestampToHolographicTimestampOffset

    Gets or sets the additional time offset in seconds to adjust holographic timestamps from the HoloLens to video timestamps from the compositor.

    Declaration
    public float VideoTimestampToHolographicTimestampOffset { get; set; }
    Property Value
    Type Description
    Single

    Methods

    AddCameraPose(Vector3, Quaternion, Single)

    Adds a new camera pose with the time the camera was at when that pose was registered.

    Declaration
    public void AddCameraPose(Vector3 cameraPosition, Quaternion cameraRotation, float cameraTimestamp)
    Parameters
    Type Name Description
    Vector3 cameraPosition

    The position of the camera relative to the origin anchor.

    Quaternion cameraRotation

    The rotation of the camera relative to the origin anchor.

    Single cameraTimestamp

    The timestamp the pose was recorded at in the camera's time system.

    EnableHolographicCamera(Transform, ICalibrationData)

    Enables the holographic camera rig for compositing. The hologram camera will be adjusted to match calibration data (its position and rotation will track the external camera, and its projection matrix will match the calibration information for the video camera used for compositing).

    Declaration
    public void EnableHolographicCamera(Transform parent, ICalibrationData calibrationData)
    Parameters
    Type Name Description
    Transform parent

    The parent transform that the holographic camera rig should be attached to.

    ICalibrationData calibrationData

    The calibration data used to set up the position, rotation, and projection matrix for the holographic camera.

    GetHologramTime()

    Gets the timestamp of the hologram that will be composited for the current frame of the compositor.

    Declaration
    public float GetHologramTime()
    Returns
    Type Description
    Single

    The hologram timestamp corresponding to the current video frame, in Unity's timeline.

    OnPreCull()

    Declaration
    protected void OnPreCull()

    ResetOnNewCameraConnection()

    Clears cached information about synchronized poses and time offsets.

    Declaration
    public void ResetOnNewCameraConnection()
    In This Article
    • Fields
      • AntiAliasing
      • DefaultAlpha
      • EnableMicrophoneAudio
      • Filter
      • SuperSampleLevel
      • TextureDepth
    • Properties
      • CaptureDevice
      • CurrentCompositeFrame
      • FramerateStatistics
      • IsVideoFrameProviderInitialized
      • TextureManager
      • VideoRecordingLayout
      • VideoTimestampToHolographicTimestampOffset
    • Methods
      • AddCameraPose(Vector3, Quaternion, Single)
      • EnableHolographicCamera(Transform, ICalibrationData)
      • GetHologramTime()
      • OnPreCull()
      • ResetOnNewCameraConnection()
    Back to top Generated by DocFX