MixedReality-WebRTC MixedReality-WebRTC
Search Results for

    Show / Hide Table of Contents

    Class ExternalVideoTrackSource

    Video source for WebRTC video tracks based on a custom source of video frames managed by the user and external to the WebRTC implementation.

    This class is used to inject into the WebRTC engine a video track whose frames are produced by a user-managed source the WebRTC engine knows nothing about, like programmatically generated frames, including frames not strictly of video origin like a 3D rendered scene, or frames coming from a specific capture device not supported natively by WebRTC. This class serves as an adapter for such video frame sources.

    Inheritance
    Object
    VideoTrackSource
    ExternalVideoTrackSource
    Implements
    IVideoSource
    IDisposable
    Inherited Members
    VideoTrackSource.Name
    VideoTrackSource.Tracks
    VideoTrackSource.I420AVideoFrameReady
    VideoTrackSource.Argb32VideoFrameReady
    VideoTrackSource.Enabled
    Namespace: Microsoft.MixedReality.WebRTC
    Assembly: Microsoft.MixedReality.WebRTC.dll
    Syntax
    public class ExternalVideoTrackSource : VideoTrackSource, IVideoSource

    Fields

    | Improve this Doc View Source

    _frameRequestCallbackArgsHandle

    GC handle to frame request callback args keeping the delegate alive while the callback is registered with the native implementation.

    Declaration
    protected IntPtr _frameRequestCallbackArgsHandle
    Field Value
    Type Description
    IntPtr

    Properties

    | Improve this Doc View Source

    FrameEncoding

    Video encoding indicating the kind of frames the source is producing.

    Declaration
    public override VideoEncoding FrameEncoding { get; }
    Property Value
    Type Description
    VideoEncoding
    Overrides
    VideoTrackSource.FrameEncoding

    Methods

    | Improve this Doc View Source

    CompleteFrameRequest(UInt32, Int64, in Argb32VideoFrame)

    Complete the current request by providing a video frame for it. This must be used if the video track source was created with CreateFromArgb32Callback(Argb32VideoFrameRequestDelegate).

    Declaration
    public void CompleteFrameRequest(uint requestId, long timestampMs, in Argb32VideoFrame frame)
    Parameters
    Type Name Description
    UInt32 requestId

    The original request ID.

    Int64 timestampMs

    The video frame timestamp.

    Argb32VideoFrame frame

    The video frame used to complete the request.

    | Improve this Doc View Source

    CompleteFrameRequest(UInt32, Int64, in I420AVideoFrame)

    Complete the current request by providing a video frame for it. This must be used if the video track source was created with CreateFromI420ACallback(I420AVideoFrameRequestDelegate).

    Declaration
    public void CompleteFrameRequest(uint requestId, long timestampMs, in I420AVideoFrame frame)
    Parameters
    Type Name Description
    UInt32 requestId

    The original request ID.

    Int64 timestampMs

    The video frame timestamp.

    I420AVideoFrame frame

    The video frame used to complete the request.

    | Improve this Doc View Source

    CreateFromArgb32Callback(Argb32VideoFrameRequestDelegate)

    Create a new external video track source from a given user callback providing ARGB32-encoded frames.

    Declaration
    public static ExternalVideoTrackSource CreateFromArgb32Callback(Argb32VideoFrameRequestDelegate frameCallback)
    Parameters
    Type Name Description
    Argb32VideoFrameRequestDelegate frameCallback

    The callback that will be used to request frames for tracks.

    Returns
    Type Description
    ExternalVideoTrackSource

    The newly created track source.

    | Improve this Doc View Source

    CreateFromI420ACallback(I420AVideoFrameRequestDelegate)

    Create a new external video track source from a given user callback providing I420A-encoded frames.

    Declaration
    public static ExternalVideoTrackSource CreateFromI420ACallback(I420AVideoFrameRequestDelegate frameCallback)
    Parameters
    Type Name Description
    I420AVideoFrameRequestDelegate frameCallback

    The callback that will be used to request frames for tracks.

    Returns
    Type Description
    ExternalVideoTrackSource

    The newly created track source.

    | Improve this Doc View Source

    Dispose()

    Declaration
    public override void Dispose()
    Overrides
    VideoTrackSource.Dispose()
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    VideoTrackSource.ToString()

    Implements

    IVideoSource
    IDisposable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX