MixedReality-WebRTC MixedReality-WebRTC
Search Results for

    Show / Hide Table of Contents

    Class SceneVideoSource

    Custom video source capturing the Unity scene content as rendered by a given camera, and sending it as a video track through the selected peer connection.

    Inheritance
    Object
    MediaTrackSource
    VideoTrackSource
    CustomVideoSource<Argb32VideoFrameStorage>
    SceneVideoSource
    Inherited Members
    VideoTrackSource.Source
    VideoTrackSource.VideoStreamStarted
    VideoTrackSource.VideoStreamStopped
    VideoTrackSource.IsLive
    VideoTrackSource.MediaKind
    VideoTrackSource.AttachSource(VideoTrackSource)
    VideoTrackSource.DisposeSource()
    MediaTrackSource.MediaLines
    MediaTrackSource.AttachToMediaLines()
    MediaTrackSource.DetachFromMediaLines()
    Namespace: Microsoft.MixedReality.WebRTC.Unity
    Assembly: cs.temp.dll.dll
    Syntax
    public class SceneVideoSource : CustomVideoSource<Argb32VideoFrameStorage>

    Fields

    CameraEvent

    Camera event indicating the point in time during the Unity frame rendering when the camera rendering is to be captured.

    This defaults to , which is a reasonable default to capture the entire scene rendering, but can be customized to achieve other effects like capturing only a part of the scene.

    Declaration
    public CameraEvent CameraEvent
    Field Value
    Type Description
    CameraEvent

    SourceCamera

    Camera used to capture the scene content, whose rendering is used as video content for the track.

    Declaration
    public Camera SourceCamera
    Field Value
    Type Description
    Camera
    Remarks

    If the project uses Multi-Pass stereoscopic rendering, then this camera needs to render to a single eye to produce a single video frame. Generally this means that this needs to be a separate Unity camera from the one used for XR rendering, which is generally rendering to both eyes.

    If the project uses Single-Pass Instanced stereoscopic rendering, then Unity 2019.1+ is required to make this component work, due to the fact earlier versions of Unity are missing some command buffer API calls to be able to efficiently access the camera backbuffer in this mode. For Unity 2018.3 users who cannot upgrade, use Single-Pass (non-instanced) instead.

    Methods

    OnDisable()

    Declaration
    protected override void OnDisable()
    Overrides
    Microsoft.MixedReality.WebRTC.Unity.CustomVideoSource<Argb32VideoFrameStorage>.OnDisable()

    OnEnable()

    Declaration
    protected override void OnEnable()
    Overrides
    Microsoft.MixedReality.WebRTC.Unity.CustomVideoSource<Argb32VideoFrameStorage>.OnEnable()

    OnFrameRequested(in FrameRequest)

    Declaration
    protected override void OnFrameRequested(in FrameRequest request)
    Parameters
    Type Name Description
    FrameRequest request
    Overrides
    Microsoft.MixedReality.WebRTC.Unity.CustomVideoSource<Argb32VideoFrameStorage>.OnFrameRequested(FrameRequest)
    In This Article
    Back to top Generated by DocFX