Server-side video context that generates and encodes video frames for the corresponding client-side video context. More...
Public Member Functions | |
virtual void | frame_ready ()=0 |
Notifies the Bridge that the application produced the next video frame. More... |
|
virtual void | set_video_source (IVideo_source *video_source)=0 |
Sets the video source that will produce video frames generated by the server. More... |
|
virtual IVideo_source * | get_video_source () const =0 |
Returns the currently set video source, or NULL if none is set. More... |
|
virtual Sint32 | set_video_format (const char *format)=0 |
Sets the video format for encoding. More... |
|
virtual const IString * | get_video_format () const =0 |
Returns the current video format for encoding. More... |
|
virtual Sint32 | set_frame_rate (Uint32 frame_rate)=0 |
Sets the maximum frame rate. More... |
|
virtual Uint32 | get_frame_rate () const =0 |
Returns the maximum frame rate. More... |
|
virtual Sint32 | set_bit_rate (Uint32 bit_rate)=0 |
Sets the bit rate. More... |
|
virtual Uint32 | get_bit_rate () const =0 |
Returns the bit rate. More... |
|
virtual Sint32 | set_max_pending_frames (Uint32 count)=0 |
Sets the maximum number of pending frames that the Bridge video protocol will allow. More... |
|
virtual Uint32 | get_max_pending_frames () const =0 |
Returns the maximum number of pending frames. More... |
|
virtual void | report_progress (Float64 value, const char *area, const char *message)=0 |
Communicates a progress message to the client side. More... |
|
virtual void | report_error (Sint32 error_code, const char *error_message)=0 |
Communicates an error message to the client side. More... |
|
virtual void | reset ()=0 |
Resets the video stream and any stateful video encoders like h264 . 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 the video context. More... |
|
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x9f1c260c, 0x43a7, 0x439e, 0x9a, 0x9f, 0xb0, 0xc0, 0x24, 0xc4, 0xdc, 0xbe > | |
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< 0x9f1c260c, 0x43a7, 0x439e, 0x9a, 0x9f, 0xb0, 0xc0, 0x24, 0xc4, 0xdc, 0xbe > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... |
|
Server-side video context that generates and encodes video frames for the corresponding client-side video context.
An application using the video transmission facilities of the Bridge API must implement the abstract interface mi::bridge::IVideo_source and set it by calling set_video_source() to generate 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.
|
pure virtual |
Closes the video stream associated with this context and frees all resources.
This will also close the associated video context on the client.
|
pure virtual |
Notifies the Bridge that the application produced the next video frame.
When the process is ready to process the next frame it calls as response the callback mi::bridge::IVideo_source::video_get_next_frame() of the video source associated with this video context (see also set_video_source()).
This method can be called any number of times between callbacks, but multiple calls after the last video_get_next_frame()
callback will only result in a single callback of video_get_next_frame()
.
|
pure virtual |
Returns the bit rate.
|
pure virtual |
Returns the maximum frame rate.
|
pure virtual |
Returns the ID of the video context.
|
pure virtual |
Returns the maximum number of pending frames.
|
pure virtual |
Returns the current video format for encoding.
|
pure virtual |
Returns the currently set video source, or NULL
if none is set.
|
pure virtual |
Communicates an error message to the client side.
The Bridge video protocol invokes IVideo_sink::video_error() on the video sink associated with the corresponding video context on the client side and passes the arguments provided here.
error_code | Error code specified by the application. |
error_message | A short description of the error. |
|
pure virtual |
Communicates a progress message to the client side.
The Bridge video protocol invokes IVideo_sink::video_progress() on the video sink associated with the corresponding video context on the client side and passes the arguments provided here.
value | The progress value. |
area | The progress area. |
message | The progress message. |
|
pure virtual |
Resets the video stream and any stateful video encoders like h264
.
Sets the bit rate.
The "h264"
format will use the frame rate and the current bit rate when calculating the budget for each frame. The quality of the "lossless"
format and image formats is not affected by this setting.
bit_rate | The bit rate to use |
Sets the maximum frame rate.
This setting limits the rate at with which frames are sent from the server to this rate, but the frame rate is allowed to drop below this if frames are not produced or encoded quickly enough.
The "h264"
format will use the frame rate and the current bit rate when calculating the budget for each frame. The quality of the "lossless"
format and image formats is not affected by this setting.
frame_rate | The maximum frame rate to use. |
|
pure virtual |
Sets the maximum number of pending frames that the Bridge video protocol will allow.
This prevents the server from sending more frames than the network or the client can handle to avoid frames from being queued up which could potentially cause a huge lag on the client. Setting this to a low value makes sure that the lag on the client is at a minimum even if the network can not always cope with the load, but at the expense of frame rate since the server might need to pause more often. The default of 3 frames at 15 fps is a reasonable compromise for most conditions. If ping time to the server is very high or if frame rate is set to a higher value this might have to be increased to maintain a good frame rate.
count | The maximum number of pending frames |
|
pure virtual |
Sets the video format for encoding.
format | The video format to use when encoding canvases. Supported formats:
|
|
pure virtual |
Sets the video source that will produce video frames generated by the server.
video_source | The video source to set. Replaces any previously set video source (if any). Pass NULL to disconnect the currently set video source. |