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

A collection of Parameter objects. More...

#include <avb.h>

Inheritance diagram for ParameterList:
Reference

Public Member Functions

virtual bool_t add (Parameter *item)=0
 Adds a parameter to the collection.
 
virtual bool_t addFloat (const char *name, double value)=0
 Creates a FloatParameter and adds it to the collection.
 
virtual bool_t addInt (const char *name, int64_t value)=0
 Creates an IntParameter and adds it to the collection.
 
virtual bool_t addMediaBuffer (const char *name, primo::codecs::MediaBuffer *value)=0
 Creates a MediaBufferParameter and adds it to the collection.
 
virtual bool_t addString (const char *name, const char_t *value)=0
 Creates a StringParameter and adds it to the collection.
 
virtual bool_t addVideoStreamInfo (const char *name, codecs::VideoStreamInfo *value)=0
 Creates a VideoStreamInfoParameter and adds it to the collection.
 
virtual Parameterat (int32_t index) const =0
 Returns a parameter specified by index.
 
virtual bool_t clear ()=0
 Removes all parameters from the collection.
 
virtual ParameterListclone () const =0
 Creates a deep copy of this object.
 
virtual int32_t count () const =0
 Returns the number of parameters in the collection.
 
virtual bool_t immutable () const =0
 Returns whether the object is immutable.
 
virtual bool_t insert (int32_t itemIndex, Parameter *item)=0
 Inserts a parameter at the specified index.
 
virtual ParameteritemByName (const char *name) const =0
 Returns a parameter specified by its name.
 
virtual bool_t remove (int32_t itemIndex)=0
 Removes a parameter from the collection.
 
virtual bool_t setAt (int32_t itemIndex, Parameter *item)=0
 Sets a new parameter at the specified index.
 
- 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

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

Detailed Description

A collection of Parameter objects.

It is used for passing parameters to different AVBlocks components.

See also
Parameter
Library::createParameterList

Member Function Documentation

◆ add()

virtual bool_t add ( Parameter item)
pure virtual

Adds a parameter to the collection.

Parameters
item[in] A pointer to a Parameter object that should be added to the collection. It is allowed to add a NULL item to the collection. Internally if the Parameter object is not NULL it is retained by ParameterList, so it is safe to release it after this method returns.
Returns
TRUE if the specified item is added to the collection, otherwise FALSE.
See also
Parameter creating methods in Library
Object Management Topic

◆ addFloat()

virtual bool_t addFloat ( const char *  name,
double  value 
)
pure virtual

Creates a FloatParameter and adds it to the collection.

Parameters
name[in] The parameter name. 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.
value[in] The parameter value.
Returns
TRUE if the parameter is added to the collection, otherwise FALSE.
See also
Library::createFloatParameter

◆ addInt()

virtual bool_t addInt ( const char *  name,
int64_t  value 
)
pure virtual

Creates an IntParameter and adds it to the collection.

Parameters
name[in] The parameter name. 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.
value[in] The parameter value.
Returns
TRUE if the parameter is added to the collection, otherwise FALSE.
See also
Library::createIntParameter

◆ addMediaBuffer()

virtual bool_t addMediaBuffer ( const char *  name,
primo::codecs::MediaBuffer value 
)
pure virtual

Creates a MediaBufferParameter and adds it to the collection.

Parameters
name[in] The parameter name. 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.
value[in] A pointer to MediaBuffer that will be stored in the parameter.
Returns
TRUE if the parameter is added to the collection, otherwise FALSE.
See also
Library::createMediaBufferParameter

◆ addString()

virtual bool_t addString ( const char *  name,
const char_t *  value 
)
pure virtual

Creates a StringParameter and adds it to the collection.

Parameters
name[in] The parameter name. 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.
value[in] The parameter value.
Returns
TRUE if the parameter is added to the collection, otherwise FALSE.
See also
Library::createStringParameter

◆ addVideoStreamInfo()

virtual bool_t addVideoStreamInfo ( const char *  name,
codecs::VideoStreamInfo value 
)
pure virtual

Creates a VideoStreamInfoParameter and adds it to the collection.

Parameters
name[in] The parameter name. 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.
value[in] A pointer to VideoStreamInfo that will be stored in the parameter.
Returns
TRUE if the parameter is added to the collection, otherwise FALSE.
See also
Library::createVideoStreamInfoParameter

◆ at()

virtual Parameter * at ( int32_t  index) const
pure virtual

Returns a parameter specified by index.

Parameters
index[in] The index of the parameter to be returned. Indexing starts from 0.
Returns
A pointer to the Parameter object specified by index or NULL if the index is invalid.

The caller is not required to release the returned object.

See also
Object Management

◆ clear()

virtual bool_t clear ( )
pure virtual

Removes all parameters from the collection.

When removed from the collection each Parameter object is released.

Returns
TRUE if the collection is cleared, otherwise FALSE.
See also
Object Management

◆ clone()

virtual ParameterList * clone ( ) const
pure virtual

Creates a deep copy of this object.

Returns
A new ParameterList 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 clones every parameter in the collection by calling Parameter::clone.
When cloned an immutable object becomes mutable.
See also
Parameter::clone
Object Management

◆ count()

virtual int32_t count ( ) const
pure virtual

Returns the number of parameters in the collection.

Returns
number of items in the collection.

◆ immutable()

virtual bool_t immutable ( ) const
pure virtual

Returns whether the object is immutable.

An immmutable object cannot be modified and all modifying methods fail to produce a result.

Returns
TRUE if the object is immutable, FALSE otherwise.
Remarks
An immutable object can be modified by the AVBlocks library.
Object immutability spreads to all nested objects. Therefore it is not possible to add/set an immutable object to a mutable object.
When cloned an immutable object becomes mutable.

◆ insert()

virtual bool_t insert ( int32_t  itemIndex,
Parameter item 
)
pure virtual

Inserts a parameter at the specified index.

Parameters
itemIndex[in] The index in the collection where the new item shall be inserted. This must be a valid index in the collection. Indexing starts from 0. After the new item is inserted in the collection its index is the value of the itemIndex param.
item[in] A pointer to the Parameter object that shall be inserted. It is allowed to insert a NULL value in the collection. Internally the new item is retained (if not NULL), so it is safe to release it after this method returns.
Returns
TRUE The item is set, FALSE otherwise.
See also
Object Management

◆ itemByName()

virtual Parameter * itemByName ( const char *  name) const
pure virtual

Returns a parameter specified by its name.

Parameters
name[in] A pointer to a parameter name for which a Parameter object shall be returned. The name is case sensitive and only the first 64 characters are compared.
Returns
A pointer to a Parameter object which has the name specified by the name parameter. NULL if there's no parameter with the specified name in the collection.

If two or more parameters in the collection have the same name the one with the lowest index is returned.

◆ remove()

virtual bool_t remove ( int32_t  itemIndex)
pure virtual

Removes a parameter from the collection.

Parameters
itemIndex[in] The index of the parameter that should be removed from the collection. Indexing starts from 0.
Returns
TRUE if the specified item is removed from the collection, otherwise FALSE.

When a Parameter object is removed from the collection it is also released.

See also
Object Management

◆ setAt()

virtual bool_t setAt ( int32_t  itemIndex,
Parameter item 
)
pure virtual

Sets a new parameter at the specified index.

Parameters
itemIndex[in] The index in the collection where the new item shall be set. This must be a valid index in the collection. Indexing starts from 0.
item[in] A pointer to the Parameter object that shall be set. It is allowed to set a NULL value to the collection. Internally the new item is retained (if not NULL), so it is safe to release it after this method returns. The old item is released (if not NULL).
Returns
TRUE The item is set, FALSE otherwise.
See also
Object Management