FrameEncoders Class |
Defines a pair of encoders that are used to encode still and interactive frames.
Namespace: OIV.RemoteViz.Rendering
The FrameEncoders type exposes the following members.
Name | Description | |
---|---|---|
FrameEncoders | Constructor. |
Name | Description | |
---|---|---|
CopyFrom | Copy assignment operator. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
InteractiveEncoder | Sets the interactive encoder. | |
InteractiveEncoderStatus | Gets the interactive encoder status. | |
StillEncoder | Sets the still encoder. | |
StillEncoderStatus | Gets the still encoder status. |
Default value for both still and interactive is NONE when a OIV.RemoteViz.Rendering.FrameEncoders object is created. But when a client connects to the service, RemoteViz will set PNG for still frames and JPEG for interactive frames. Frames are considered "interactive" when the user is interacting with the scene, for example dragging the mouse to move the camera. In this case it may be acceptable to use (for example) lossy JPEG encoding to maximize performance, then switch to loss-less PNG encoding for the "still" frame when the user interaction is finished.
Video encoding (H.264 or VP9) generally provides better performance (frames per second) than image encoding (JPEG and PNG). However this depends on many factors. Video encoded frames usually require less bandwidth, but the encoding of each frame can take more time. See the hardware and software dependencies for each encoder below.
A OIV.RemoteViz.Rendering.FrameEncoders object is passed to the OIV.RemoteViz.Rendering.RenderAreaListener methods onOpenedConnection(), onInitializedConnection() and onRefusedEncoder().
In the onOpenedConnection() method, use the OIV.RemoteViz.Rendering.FrameEncoders object to request non-default encoders. Use the OIV.RemoteViz.Rendering.ConnectionSettings.IsSupportedEncoders(OIV.RemoteViz.Rendering.FrameEncoders) method to query if the proposed encoders are available.
onRefusedEncoder() will be called if one of the encoders is not supported in the current environment or the combination of encoders is not supported. Use the OIV.RemoteViz.Rendering.FrameEncoders object to determine which encoder is invalid (see () and ()), then set new encoders. onRefusedEncoder() will be called again if the requested encoders are not valid.
In the onInitializedConnection() method, use the OIV.RemoteViz.Rendering.FrameEncoders object to query which encoders will actually be used.
The current frame encoders can also be queried using ().
See the examples HelloConeH264 and HelloConeVP9.
Limitations:
Currently it is not possible to "mix" video and image encoding. In other words, the interactive and still encoders must be both video encoders (H264, VP9, ...) or both image encoders (JPEG, PNG, ...).
Currently, when using video encoding, the interactive and still encoders must be the same, e.g. both H264_NVENC.