AVBlocks for .NET
3.0
Audio and Video Software Development Kit
|
An input or output point of the Transcoder. More...
Public Member Functions | |
virtual object | Clone () |
Creates a deep copy of this object. | |
Static Public Member Functions | |
static MediaSocket | FromMediaInfo (MediaInfo mediaInfo) |
Creates a media socket from a MediaInfo object. | |
static MediaSocket | FromPreset (string preset) |
Creates a media socket from an AVBlocks Preset. | |
Properties | |
string | File [get, set] |
The file associated with the media socket. | |
bool | Immutable [get] |
Returns whether the object is immutable. | |
Metadata | Metadata [get, set] |
The socket metadata. | |
ParameterList | Params [get, set] |
A collection of socket parameters. | |
MediaPinList | Pins [get] |
A modifiable collection with all the pins (elementary streams) that are defined for this socket. | |
System.IO.Stream | Stream [get, set] |
The user stream associated with the media socket. | |
StreamSubType | StreamSubType [get, set] |
Specifies explicitly the subtype of the associated MediaSocket.File or MediaSocket.Stream. | |
StreamType | StreamType [get, set] |
Specifies explicitly the format of the associated MediaSocket.File or MediaSocket.Stream. | |
double | TimePosition [get, set] |
Specifies the position within file / stream (in seconds). | |
An input or output point of the Transcoder.
A MediaSocket object describes either a container (WAV, AVI, MP4, etc.) with one or more streams or simply an elementary stream (MP3, M2V, etc.)
When MediaSocket describes a container the child collection of media pins can contain one or more items (for each contained stream). The socket stream type designates the container type.
When MediaSocket describes an elementary stream the child collection of media pins contains a single item which is the elementary stream itself. The socket stream type is the same as the pin stream type.
|
virtual |
Creates a deep copy of this object.
System.OutOfMemoryException | The object cannot be cloned because there's not enough memory. |
References Metadata.Clone(), and MediaSocket.Metadata.
|
static |
Creates a media socket from a MediaInfo object.
mediaInfo | A MediaInfo object with audio/video information. The object may or may not be loaded before calling this function. This object is not needed after the method returns. |
This method is meant to help in setting correctly the inputs of a Transcoder.
The intended usage is as follows:
Use MediaInfo to load information for a file or user stream.
Create a media socket from the MediaInfo object (MediaSocket.FromMediaInfo(mediaInfo)
).
Transcoder.Inputs.Add(socket)
). References PinConnection.Auto, StreamInfo.Clone(), MediaInfo.IsReady, MediaInfo.Open(), MediaInfo.Outputs, and MediaSocket.Pins.
|
static |
Creates a media socket from an AVBlocks Preset.
preset | A constant from the Preset enum. |
This method is meant to help in setting correctly the outputs of the Transcoder.
. The intended usage is as follows:
Create a media socket from a Preset (MediaSocket.FromPreset(preset)
).
Transcoder.Outputs.Add(socket)
).
|
getset |
The file associated with the media socket.
The default value is null.
|
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.
|
getset |
A collection of socket parameters.
These parameters are used when demuxing the input or multiplexing the output defined by this media socket. The default value of this property is an empty list.
Param
Param
|
get |
A modifiable collection with all the pins (elementary streams) that are defined for this socket.
The default value of this property is an empty collection which can be modified but it cannot be replaced.
Referenced by MediaSocket.FromMediaInfo().
|
getset |
The user stream associated with the media socket.
The default value of this property is null.
This is an alternative to the File property. When both a file and a user stream are associated with a socket the Transcoder prefers the user stream.
|
getset |
Specifies explicitly the subtype of the associated MediaSocket.File or MediaSocket.Stream.
The default value of this property is StreamSubType.Unknown.
|
getset |
Specifies explicitly the format of the associated MediaSocket.File or MediaSocket.Stream.
The default value of this property is StreamType.Unknown.
|
getset |
Specifies the position within file / stream (in seconds).
The transcoder tries to seek to the time position before the transcoding operation starts.
Seeking is not possible while transcoder is open. The Transcoder needs to be closed before setting a new time position with this property.