Server-side video context that generates and encodes video frames for the corresponding client-side video context. More...
#include <ibridge_video_server.h>
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_max_frame_rate (Uint32 frame_rate)=0 |
Sets the maximum frame rate. More... | |
virtual Uint32 | get_max_frame_rate () const =0 |
Returns the maximum frame rate. More... | |
virtual Sint32 | set_render_frame_rate (Float64 frame_rate)=0 |
Sets the current frame rate. More... | |
virtual Sint32 | set_bit_rate (Uint32 bit_rate)=0 |
Sets the bit rate. More... | |
virtual Sint32 | set_max_bitrate (Uint32 bit_rate)=0 |
Sets the maximum bitrate used by the video stream. More... | |
virtual Uint32 | get_max_bitrate () const =0 |
Returns the currently set maximum bitrate. More... | |
virtual Sint32 | set_min_bitrate (Uint32 bit_rate)=0 |
Sets the minimum bitrate used by the video stream. More... | |
virtual Uint32 | get_min_bitrate () const =0 |
Returns the currently set minimum bitrate. More... | |
virtual Uint32 | get_bit_rate () const =0 |
Returns the currently used bit rate. 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... | |
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 IInterface * | get_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 IInterface * | get_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< 0x9f1c260c, ... > | |
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< 0x9f1c260c, ... > | |
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... | |
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 currently used bit rate.
|
pure virtual |
Returns the ID of the video context.
|
pure virtual |
Returns the currently set maximum bitrate.
|
pure virtual |
Returns the maximum frame rate.
|
pure virtual |
Returns the currently set minimum bitrate.
|
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.
This method is deprecated and is equivalent to calling set_max_bitrate() and set_min_bitrate() with the same value.
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 bitrate used by the video stream.
To adapt to the available bandwidth, the bridge video will automatically adjust the bitrate. However, the bitrate will not be set below the minimum bitrate. If the available bandwidth is smaller then frame rate will go down to compensate. Likewise, the bitrate won't go above the set maximum bitrate. Set min and max bitrate to the same value to override the automatic adjustment. The max bitrate setting takes precedence if max bitrate is set lower than min bitrate.
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 |
|
pure virtual |
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. |
Sets the minimum bitrate used by the video stream.
To adapt to the available bandwidth, the bridge video will automatically adjust the bitrate. is smaller then frame rate will go down to compensate. Likewise, the bitrate won't go above the set maximum bitrate. Set min and max bitrate to the same value to override the automatic adjustment. The max bitrate setting takes precedence if max bitrate is set lower than min bitrate.
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 |
|
pure virtual |
Sets the current frame rate.
This is an optional hint that can be set to inform the video context about the actual current frame rate. It is recommended to call this every time the actual frame rate changes substantially, or simply call in each mi::bridge::IVideo_source::video_get_next_frame() callback with the current value.
frame_rate | The maximum frame rate to use. |
|
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. |