NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IVideo_encoder Class Referenceabstract

Abstract interface for video encoders. More...

Inheritance diagram for mi::neuraylib::IVideo_encoder:
Inheritance graph
[legend]

Public Member Functions

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...
 
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  encode_canvas (const ICanvas *canvas, IVideo_data **out)=0
  Encodes the pixel data contained in a canvas. More...
 
virtual bool  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...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x572ef6ad, 0xbc37, 0x417d, 0xbf, 0x7c, 0x17, 0x17, 0x4e, 0x96, 0xa3, 0x06 >
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< 0x572ef6ad, 0xbc37, 0x417d, 0xbf, 0x7c, 0x17, 0x17, 0x4e, 0x96, 0xa3, 0x06 >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed 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.

Member Function Documentation

virtual bool mi::neuraylib::IVideo_encoder::close ( IVideo_data **  out)
pure virtual

Closes the video stream.

Parameters
[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.
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] 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] 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.