Class NativeVideoRenderer
This will render the video stream through native calls with DX11 or OpenGL, completely bypassing C# marshalling. This provides a considerable performance improvement compared to VideoRenderer.
Namespace: Microsoft.MixedReality.WebRTC.Unity
Assembly: cs.temp.dll.dll
Syntax
public class NativeVideoRenderer : MonoBehaviour
Methods
StartRendering(IVideoSource)
Start rendering the passed source.
Declaration
public void StartRendering(IVideoSource source)
Parameters
Type | Name | Description |
---|---|---|
IVideoSource | source |
Remarks
Can be used to handle VideoStreamStarted or VideoStreamStarted.
StopRendering(IVideoSource)
Stop rendering the passed source. Must be called with the same source passed to StartRendering(IVideoSource)
Declaration
public void StopRendering(IVideoSource _)
Parameters
Type | Name | Description |
---|---|---|
IVideoSource | _ |
Remarks
Can be used to handle VideoStreamStopped or VideoStreamStopped.