Parameter¶
primo::avblocks::Parameter
-
class Parameter : public primo::Reference¶
Parameter is the base class for named parameters passed to various classes in AVBlocks.
The parameter name is an ANSI string. The parameter content can be a simple value or a complex structure. This is determined by the parameter type.
Subclassed by primo::avblocks::FloatParameter, primo::avblocks::IntParameter, primo::avblocks::MediaBufferParameter, primo::avblocks::StringParameter, primo::avblocks::VideoStreamInfoParameter
Public Functions
-
virtual const char *name() const = 0¶
Returns the parameter name.
- Returns:
A pointer to zero terminated ANSI string. The returned pointer cannot be NULL but the string can be empty.
-
virtual bool_t setName(const char *name) = 0¶
Sets the parameter name.
- Parameters:
name – [in] A pointer to zero terminated ANSI string. If NULL it is interpreted as if an empty string is provided. The string pointed by name is copied internally and is not required to be valid after the method returns.
-
virtual ParamType::Enum type() const = 0¶
Returns the parameter type.
- Returns:
A ParamType constant.
-
virtual Parameter *clone() const = 0¶
Creates a deep copy of the underlying StringParameter, IntParameter, FloatParameter, or MediaBufferParameter object.
Remark
this method uses primo::codecs::MediaBuffer::clone, to clone the MediaBufferParameter::buffer object.
See also
- Returns:
A new Parameter object. The caller is responsible for releasing the new object when it is not needed anymore.
- Returns:
NULL when there is not enough memory to clone the object.
-
virtual const char *name() const = 0¶