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

Abstract interface to generate video frames that are transmitted to the corresponding client-side video context. More...

#include <ibridge_video_server.h>

Inheritance diagram for mi::bridge::IVideo_source:

Public Member Functions

virtual Sint32 video_get_next_frame (neuraylib::ICanvas **frame, neuraylib::IBuffer **data)=0
 Returns data for the next frame. More...
 
virtual void video_error (Sint32 error_code, const char *message)=0
 Called if the video context failed to encode or send the last frame delivered by a call to video_get_next_frame(). More...
 
virtual void video_context_closed (Sint32 reason)=0
 Called when the video context has been closed. 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< 0x972224a4, ... >
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< 0x972224a4, ... >
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

Abstract interface to generate video frames that are transmitted to the corresponding client-side video context.

See also
mi::bridge::IServer_video_context::set_video_source()

Member Function Documentation

 video_context_closed()

virtual void mi::bridge::IVideo_source::video_context_closed ( Sint32  reason)
pure virtual

Called when the video context has been closed.

Parameters
reason
  • 0: Closed by the server.
  • 1: Closed by the client.
  • -1: Network error.

 video_error()

virtual void mi::bridge::IVideo_source::video_error ( Sint32  error_code,
const char *  message 
)
pure virtual

Called if the video context failed to encode or send the last frame delivered by a call to video_get_next_frame().

Parameters
error_code
  • -1: Invalid canvas. The canvas has unsupported features, or is not compatible with current settings.
  • -3: Network error. Lost connection to the client.
  • -4: Encoding error. Failed to encode the frame.
messageA short description of the error.

 video_get_next_frame()

virtual Sint32 mi::bridge::IVideo_source::video_get_next_frame ( neuraylib::ICanvas **  frame,
neuraylib::IBuffer **  data 
)
pure virtual

Returns data for the next frame.

The Bridge video protocol calls this method in response to a call to mi::bridge::IServer_video_context::frame_ready().

The data buffer can contain data associated with the canvas, or, if it suits the application more, it can be sent instead of a canvas. The raw data buffer will be delivered to the client as is (not encoded or compressed in any way) and it is up to the application to define the format of the data.

Note
The content of *frame and *data must not be modified until the next call of this method.
Parameters
[out]frameThe optional frame to send. *frame can be NULL if only data is to be sent. If both *frame and *data are NULL, nothing will be sent.
[out]dataThe optional data to send. *data can be NULL if only a frame is to be sent. If both *frame and *data are NULL, nothing will be sent.
Returns
0 in case of success, < 0 in case of failure.