DiCE API nvidia_logo_transpbg.gif Up
mi::bridge::IClient_video_context Class Referenceabstract

Client-side video context that receives and decodes video frames from the corresponding server-side video context. More...

#include <ibridge_video_client.h>

Inheritance diagram for mi::bridge::IClient_video_context:

Public Member Functions

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...
 
virtual IVideo_sinkget_video_sink () const =0
 Returns the currently set video sink, or NULL if none is set. More...
 
virtual Sint32 set_nvcuvid_device (Sint32 device)=0
 Sets the GPU to use for nvcuvid hardware h264 decoding. More...
 
virtual Sint32 get_nvcuvid_device () const =0
 Returns the GPU uses for nvcuvid hardware h264 decoding. More...
 
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...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x4b817707, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x4b817707, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. More...
 

Detailed 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

Member Function Documentation

 close()

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

 get_id()

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.

 get_nvcuvid_device()

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.

 get_video_sink()

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.

 set_nvcuvid_device()

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
deviceThe CUDA ID the GPU to use, or -1 to enable auto selection.
Returns
0 in case of success, < 0 in case of failures.

 set_video_sink()

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_sinkThe video sink to set. Replaces any previously set video sink (if any). Pass NULL to disconnect the currently set video sink.