AVBlocks for .NET  2.3
Audio and Video Software Development Kit
MediaPin Class Reference

MediaPin represents an elementary media stream. More...

Inheritance diagram for MediaPin:

Public Member Functions

virtual object Clone ()
 Creates a deep copy of this object. More...
 

Properties

int Connection [get, set]
 Connection ID. More...
 
bool Immutable [get]
 Returns whether the object is immutable. More...
 
ParameterList Params [get, set]
 A collection of pin parameters. More...
 
StreamInfo StreamInfo [get, set]
 Information about the elementary stream represented by this pin. More...
 

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.

Member Function Documentation

virtual object Clone ( )
virtual

Creates a deep copy of this object.

Returns
A new MediaPin object.
Exceptions
System.OutOfMemoryExceptionThe object cannot be cloned because there's not enough memory.

References StreamInfo.Clone(), and MediaPin.Immutable.

Property Documentation

int Connection
getset

Connection ID.

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

A Transcoder object matches and connects input and output pins by their connection 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 connection ID greater than PinConnection.Auto are connected to output pins with the same connection ID. In this case the Transcoder requires that a single unique connection ID is used by exactly one input and one output pin.
  • Input and output pins with connection ID equal to PinConnection.Auto are connected automatically based on their media type (audio or video).
  • Input and output pins with connection ID equal to PinConnection.Disabled are ignored.
See also
Transcoder

Transcoder Class

See also
PinConnection

PinConnection constants

Referenced by MediaSocket.FromMediaInfo().

bool Immutable
get

Returns whether the object is immutable.

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

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.

Referenced by MediaPin.Clone().

ParameterList Params
getset

A collection of pin parameters.

These parameters affect the processing of the elementary stream represented by this pin. The default value of this property is an empty list.

See also
Param

Param

See also
ParameterList

Param

Information about the elementary stream represented by this pin.

The Transcoder ignores pins that are not audio or video elementary streams. If the value of StreamInfo.MediaType is MediaType.Audio, it is safe to cast this property to AudioStreamInfo. If the media type is MediaType.Video, it is safe to cast this property to VideoStreamInfo.

Referenced by MediaSocket.FromMediaInfo(), and MediaInfo.Load().