AVBlocks for C++  1.13
Audio and Video Software Development Kit
MediaPin Class Referenceabstract

MediaPin represents an elementary media stream. More...

Inherits Reference.

Public Member Functions

virtual int32_t connection () const =0
 Returns the Pin connection ID. More...
 
virtual void setConnection (int32_t connectionID)=0
 Sets the Pin connection ID. More...
 
virtual primo::codecs::StreamInfostreamInfo () const =0
 Returns information about the elementary stream represented by this pin. More...
 
virtual void setStreamInfo (primo::codecs::StreamInfo *streamInfo)=0
 Sets the stream information for the pin. More...
 
virtual ParameterListparams () const =0
 Returns a collection of pin parameters. More...
 
virtual void setParams (ParameterList *params)=0
 Sets the filter parameters for the pin. More...
 
- Public Member Functions inherited from Reference
virtual int32_t retain () const =0
 Retains the instance. More...
 
virtual int32_t release () const =0
 Releases the instance. More...
 
virtual int32_t retainCount () const =0
 Returns the current reference count. More...
 

Protected Member Functions

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

Detailed Description

MediaPin represents an elementary media stream.

MediaPin object can exist for audio, video or any other type of stream. However, AVBlocks can process only the audio and video streams. MediaPin objects are used as inputs and outputs of Transcoder.

See Also
Library::createMediaPin
Object Management

Member Function Documentation

virtual int32_t connection ( ) const
pure virtual

Returns the Pin connection ID.

This should not be confused with the stream ID that is defined for certain stream types.

Returns
Pin ID which is either an unique value or a special value from the PinConnection::Enum.

A Transcoder object matches and connects input and output pins by their ID. The Transcoder processes the connected pins and ignores the unconnected pins.

Pins are connected to one another according to the following rules:

  • Input pins with ID greater than PinConnection::Auto are connected to output pins with the same ID. In this case the Transcoder requires that a single unique pin ID is used by exactly one input and one output pin.
  • Input and output pins with ID equal to PinConnection::Auto are connected automatically based on their media type (audio or video)
  • Input and output pins with ID equal to PinConnection::Disabled are ignored.
See Also
PinConnection::Enum
Transcoder
virtual ParameterList* params ( ) const
pure virtual

Returns a collection of pin parameters.

These parameters affect the processing of the elementary stream represented by this pin.

Returns
A ParameterList object. Can be NULL if the collection is not set. The default value is NULL.

The caller is not required to release the returned object.

See Also
Object Management
virtual void setConnection ( int32_t  connectionID)
pure virtual

Sets the Pin connection ID.

This should not be confused with the stream ID that is defined for certain stream types.

Parameters
connectionID[in] Pin connection ID should be either an unique value or a special value from the PinConnection::Enum.

A Transcoder object matches and connects input and output pins by their ID. The Transcoder processes the connected pins and ignores the unconnected pins.

Pins are connected to one another according to the following rules:

  • Input pins with ID greater than PinConnection::Auto are connected to output pins with the same ID. In this case the Transcoder requires that a single unique pin ID is used by exactly one input and one output pin.
  • Input and output pins with ID equal to PinConnection::Auto are connected automatically based on their media type (audio or video)
  • Input and output pins with ID equal to PinConnection::Disabled are ignored.
See Also
PinConnection::Enum
Transcoder
virtual void setParams ( ParameterList params)
pure virtual

Sets the filter parameters for the pin.

Parameters
params[in] A pointer to a ParameterList object. If NULL the stored collection is reset to NULL. Internally the ParameterList object is retained by the MediaPin, so it is safe to release it after this method returns.
See Also
Object Management
virtual void setStreamInfo ( primo::codecs::StreamInfo streamInfo)
pure virtual

Sets the stream information for the pin.

Parameters
streamInfo[in] A pointer to a StreamInfo object. If NULL the stream info is cleared. Internally the StreamInfo object is retained by the MediaPin, so it is safe to release it after this method returns.
See Also
MediaPin::streamInfo
Object Management
virtual primo::codecs::StreamInfo* streamInfo ( ) const
pure virtual

Returns information about the elementary stream represented by this pin.

Returns
A StreamInfo object.

The Transcoder ignores pins that are not audio or video elementary streams.

If the media type of the returned StreamInfo object is MediaType::Audio, it is safe to cast it to AudioStreamInfo.

If the media type of the returned StreamInfo object is MediaType::Video, it is safe to cast it to VideoStreamInfo.

The caller is not required to release the returned object.

See Also
Object Management