NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::bridge::IVideo_source Class Referenceabstract

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

Inheritance diagram for mi::bridge::IVideo_source:
Inheritance graph
[legend]

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...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x972224a4, 0xa63b, 0x42ce, 0x96, 0xfe, 0xe1, 0x33, 0xf9, 0x81, 0x1c, 0x64 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
  Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
  Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x972224a4, 0xa63b, 0x42ce, 0x96, 0xfe, 0xe1, 0x33, 0xf9, 0x81, 0x1c, 0x64 >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. 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

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.
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.
message A short description of the error.
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] frame The frame to send. Can be NULL if only data is to be sent. If frame and data are NULL, nothing will be sent.
[out] data The optional data to send. Can be NULL if only a frame is to be sent. If frame and data are NULL, nothing will be sent.
Returns
0 in case of success, < 0 in case of failure.