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

MediaPinList represents the elementary pins within a MediaSocket object. More...

#include <avb.h>

Public Member Functions

virtual bool_t add (MediaPin *item)=0
 Adds a pin (elementary stream) to the collection.
 
virtual MediaPinat (int32_t itemIndex) const =0
 Returns a pin (elementary stream) specified by index.
 
virtual bool_t clear ()=0
 Removes all pins from the collection.
 
virtual int32_t count () const =0
 Returns the number of pins in the collection.
 
virtual bool_t immutable () const =0
 Returns whether the object is immutable.
 
virtual bool_t insert (int32_t itemIndex, MediaPin *item)=0
 Inserts a pin at the specified index.
 
virtual bool_t remove (int32_t itemIndex)=0
 Removes a pin (elementary stream) from the collection.
 
virtual bool_t setAt (int32_t itemIndex, MediaPin *item)=0
 Sets a new pin at the specified index.
 

Protected Member Functions

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

Detailed Description

MediaPinList represents the elementary pins within a MediaSocket object.

This is a modifiable and indexable collection that exists only in the context of a MediaSocket and cannot be created separately from it, nor detached.

Member Function Documentation

◆ add()

virtual bool_t add ( MediaPin item)
pure virtual

Adds a pin (elementary stream) to the collection.

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

◆ at()

virtual MediaPin * at ( int32_t  itemIndex) const
pure virtual

Returns a pin (elementary stream) specified by index.

Parameters
itemIndexThe index of the elementary pin to be returned. Indexing starts from 0.
Returns
A pointer to the MediaPin object specified by itemIndex.

The caller is not required to release the returned object.

See also
Object Management

◆ clear()

virtual bool_t clear ( )
pure virtual

Removes all pins from the collection.

When removed from the collection each MediaPin object is released.

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

◆ count()

virtual int32_t count ( ) const
pure virtual

Returns the number of pins 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.

◆ insert()

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

Inserts a pin 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 MediaPin 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 inserted, FALSE otherwise.
See also
Object Management

◆ remove()

virtual bool_t remove ( int32_t  itemIndex)
pure virtual

Removes a pin (elementary stream) from the collection.

Parameters
itemIndex[in] The index of the pin 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 an MediaPin object is removed from the collection it is also released.

See also
Object Management

◆ setAt()

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

Sets a new pin 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 MediaPin 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