neuray API Programmer's Manual

mi::bridge::IClient_video_context Class Reference

[Bridge client]

Description

Client-side video context that receives and decodes video frames from the corresponding server-side video context. An application using the video transmission facilities of the Bridge API must implement the abstract interface mi::bridge::IVideo_sink and set it by calling set_video_sink() to receive video frames.

Note that even though the focus is on video, it is equally valid to transmit any kind of data suitable for streaming, and the application can deliver pure data buffers in addition to, or instead of, video frames.

See also:

mi::bridge::IClient_session::create_video_context(), mi::bridge::IServer_video_context

Public Member Functions

virtual void close() =0
Closes the video stream associated with this context and frees all resources. More...
virtual Uint32 get_id() const =0
Returns the ID of this video context. More...
virtual Sint32 get_nvcuvid_device() const =0
Returns the GPU uses for nvcuvid hardware h264 decoding. More...
virtual IVideo_sinkget_video_sink() const =0
Returns the currently set video sink, or NULL if none is set.
virtual Sint32 set_nvcuvid_device( Sint32 device) =0
Sets the GPU to use for nvcuvid hardware h264 decoding. More...
virtual void set_video_sink( IVideo_sink* video_sink) =0
Sets the video sink that will receive the decoded video frames sent from the server. More...

Member Functions

virtual void mi::​bridge::​IClient_video_context::close() [pure virtual]

Closes the video stream associated with this context and frees all resources. This will also close the associated video context on the server.

See also:

set_video_sink(), mi::bridge::IServer_video_context

virtual Uint32 mi::​bridge::​IClient_video_context::get_id() const [pure virtual]

Returns the ID of this video context. The ID needs to be communicated to the server-side part of the application to obtain the server-side counterpart of this video context.

virtual Sint32 mi::​bridge::​IClient_video_context::get_nvcuvid_device() const [pure virtual]

Returns the GPU uses for nvcuvid hardware h264 decoding.

Returns

The CUDA ID of the GPU to use, or -1 if auto selection is enabled.

virtual IVideo_sink* mi::​bridge::​IClient_video_context::get_video_sink() const [pure virtual]

Returns the currently set video sink, or NULL if none is set.

virtual Sint32 mi::​bridge::​IClient_video_context::set_nvcuvid_device( Sint32 device) [pure virtual]

Sets the GPU to use for nvcuvid hardware h264 decoding.

Parameters

device
The CUDA ID the GPU to use, or -1 to enable auto selection.

Returns

0 in case of success, < 0 in case of failures.

virtual void mi::​bridge::​IClient_video_context::set_video_sink( IVideo_sink* video_sink) [pure virtual]

Sets the video sink that will receive the decoded video frames sent from the server.

Parameters

video_sink
The video sink to set. Replaces any previously set video sink (if any). Pass NULL to disconnect the currently set video sink.