Abstract interface for video encoders. More...
#include <ivideo_plugin.h>
Public Member Functions | |
virtual Sint32 | init (Uint32 resolution_x, Uint32 resolution_y, IVideo_data **out)=0 |
Initializes the video stream. More... | |
virtual bool | set_parameter (const char *name, const char *value)=0 |
Sets a parameter for the video stream. More... | |
virtual const char * | get_parameter (const char *name)=0 |
Returns the value of a parameter for the video stream. More... | |
virtual const char * | get_supported_type (Uint32 index) const =0 |
Returns the index -th supported pixel type. More... | |
virtual Sint32 | encode_canvas (const ICanvas *canvas, IVideo_data **out)=0 |
Encodes the pixel data contained in a canvas. More... | |
virtual Sint32 | encode_canvas (const ICanvas_cuda *canvas, IVideo_data **out)=0 |
Encodes the pixel data contained in a cuda canvas. More... | |
virtual Sint32 | close (IVideo_data **out)=0 |
Closes the video stream. More... | |
virtual const char * | get_identifier () const =0 |
Returns a concise single-line unique identifier. 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< 0x572ef6ad, ... > | |
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< 0x572ef6ad, ... > | |
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... | |
Abstract interface for video encoders.
Note that the video encoder has an internal state. Hence, a separate encoder is needed for each stream. It is not possible to use one encoder for different streams, even if all parameters are identical. Therefore, the terms "encoder" and "stream" are used synonymously below.
|
pure virtual |
Closes the video stream.
[out] | out | Returns any remaining encoded data here. The ownership of *out is passed to the caller as for a return value. In particular, the caller must call release() when *out is no longer needed. |
|
pure virtual |
Encodes the pixel data contained in a canvas.
canvas | Encode this canvas. | |
[out] | out | The encoded data. The ownership of *out is passed to the caller as for a return value. In particular, the caller must call release() when *out is no longer needed. |
|
pure virtual |
Encodes the pixel data contained in a cuda canvas.
canvas | Encode this cuda canvas. | |
[out] | out | The encoded data. The ownership of *out is passed to the caller as for a return value. In particular, the caller must call release() when *out is no longer needed. |
|
pure virtual |
Returns a concise single-line unique identifier.
|
pure virtual |
Returns the value of a parameter for the video stream.
name | The name of the parameter to query. |
NULL
if it doesn't exist.
|
pure virtual |
Returns the index
-th supported pixel type.
The canvas passed to encode_canvas() must use one of the supported types.
The pixel types should be ordered, from index 0 for the most preferred to the least preferred type. See Types for a list of supported pixel types.
index | The index of the pixel type to be returned. |
index
-th supported pixel type, NULL
if index
is out of bounds.
|
pure virtual |
Initializes the video stream.
resolution_x | The width of the video stream. | |
resolution_y | The height of the video stream. | |
[out] | out | Optionally, the method may return data. The ownership of *out is passed to the caller as for a return value. In particular, the caller must call release() when *out is no longer needed. |
|
pure virtual |
Sets a parameter for the video stream.
name | The name of the parameter to be changed. |
value | The new value to be set for the parameter. |
true
, if the parameter could be successfully set, false
otherwise.