Abstract interface to generate video frames that are transmitted to the corresponding client-side video context.
More...
#include <ibridge_video_server.h>
|
typedef Interface_declare< id1, ... > | Self |
| Own type. More...
|
|
typedef Uuid_t< id1, ... > | IID |
| Declares the interface ID (IID) of this interface. More...
|
|
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 bool | compare_iid (const Uuid &iid) |
| Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
|
|
static bool | compare_iid (const Uuid &iid) |
| Compares the interface ID iid against the interface ID of this interface. More...
|
|
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()
◆ 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.
|
message | A 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] | frame | The 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] | data | The 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.