mi::neuraylib::IVideo_encoder Class Reference
[Extensions and Plugins]
Description
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.
Public Member Functions
- virtual bool close( IVideo_data** out) =0
- Closes the video stream. More...
- virtual bool encode_canvas( const ICanvas* canvas, IVideo_data** out) =0
- Encodes the pixel data contained in a canvas. More...
- virtual const char* get_identifier() const =0
- Returns a concise single-line unique identifier.
- 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 bool 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...
Member Functions
- virtual bool mi::neuraylib::IVideo_encoder::close( IVideo_data** out) [pure virtual]
-
Closes the video stream.
Parameters
- 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.
Returns
true , if the stream was successfully closed, false otherwise.
- virtual bool mi::neuraylib::IVideo_encoder::encode_canvas( const ICanvas* canvas, IVideo_data** out) [pure virtual]
-
Encodes the pixel data contained in a canvas.
Parameters
- canvas
- Encode this canvas.
- 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.
Returns
true , if the data was successfully encoded, false otherwise.
- virtual const char* mi::neuraylib::IVideo_encoder::get_identifier() const [pure virtual]
-
Returns a concise single-line unique identifier.
- virtual const char* mi::neuraylib::IVideo_encoder::get_parameter( const char* name) [pure virtual]
-
Returns the value of a parameter for the video stream.
Parameters
- name
- The name of the parameter to query.
Returns
The value of the parameter.
- virtual const char* mi::neuraylib::IVideo_encoder::get_supported_type( Uint32 index) const [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.
Parameters
- index
- The index of the pixel type to be returned.
Returns
The index -th supported pixel type, NULL if index is out of bounds.
- virtual bool mi::neuraylib::IVideo_encoder::init( Uint32 resolution_x, Uint32 resolution_y, IVideo_data** out) [pure virtual]
-
Initializes the video stream.
Parameters
- resolution_x
- The width of the video stream.
- resolution_y
- The height of the video stream.
- 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.
Returns
true , if the stream was successfully initialized, false otherwise.
- virtual bool mi::neuraylib::IVideo_encoder::set_parameter( const char* name, const char* value) [pure virtual]
-
Sets a parameter for the video stream.
Parameters
- name
- The name of the parameter to be changed.
- value
- The new value to be set for the parameter.
Returns
true , if the parameter could be successfully set, false otherwise.