AVBlocks for C++  3.0
Audio and Video Software Development Kit
Loading...
Searching...
No Matches
Parameter Class Referenceabstract

Parameter is the base class for named parameters passed to various classes in AVBlocks. More...

#include <avb.h>

Inheritance diagram for Parameter:
Reference FloatParameter IntParameter MediaBufferParameter StringParameter VideoStreamInfoParameter

Public Member Functions

virtual Parameterclone () const =0
 Creates a deep copy of the underlying StringParameter, IntParameter, FloatParameter, or MediaBufferParameter object.
 
virtual const char * name () const =0
 Returns the parameter name.
 
virtual bool_t setName (const char *name)=0
 Sets the parameter name.
 
virtual ParamType::Enum type () const =0
 Returns the parameter type.
 
- Public Member Functions inherited from Reference
virtual int32_t release () const =0
 Releases the instance.
 
virtual int32_t retain () const =0
 Retains the instance.
 
virtual int32_t retainCount () const =0
 Returns the current reference count.
 

Protected Member Functions

 ~Parameter ()
 This object can be destroyed only by the AVBlocks library.
 

Detailed Description

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.

Member Function Documentation

◆ clone()

virtual Parameter * clone ( ) const
pure virtual

Creates a deep copy of the underlying StringParameter, IntParameter, FloatParameter, or MediaBufferParameter object.

Returns
A new Parameter object. The caller is responsible for releasing the new object when it is not needed anymore.
NULL when there is not enough memory to clone the object.
Remarks
this method uses primo::codecs::MediaBuffer::clone, to clone the MediaBufferParameter::buffer object.
See also
Object Management

◆ name()

virtual const char * name ( ) const
pure virtual

Returns the parameter name.

Returns
A pointer to zero terminated ANSI string. The returned pointer cannot be NULL but the string can be empty.

◆ setName()

virtual bool_t setName ( const char *  name)
pure virtual

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.

◆ type()

virtual ParamType::Enum type ( ) const
pure virtual

Returns the parameter type.

Returns
A ParamType constant.