AVBlocks for .NET
3.0
Audio and Video Software Development Kit
|
Analyzes a file or a stream and provides information about its type and properties. More...
Public Member Functions | |
MediaInfo () | |
Creates a MediaInfo object in its default state. | |
override void | Close () |
Closes the MediaInfo. | |
override void | Dispose () |
Disposes the MediaInfo and reclaims the resources used by the object. | |
override bool | EndOfStream (int inputIndex) |
The method is not implemented. | |
override bool | Flush () |
The method is not implemented. | |
bool | Load () |
override bool | Open () |
Analyzes the input specified by the Inputs property. | |
override bool | Pull (out int outputIndex, MediaSample outputSample) |
The method is not implemented. | |
override bool | PullUnmanaged (out int outputIndex, MediaSample outputSample) |
The method is not implemented. | |
override bool | Push (int inputIndex, MediaSample inputSample) |
Pushes input data to the MediaInfo. | |
override bool | PushUnmanaged (int inputIndex, MediaSample inputSample) |
Pushes input data to the MediaInfo. | |
abstract void | Close () |
Closes the Block. | |
abstract void | Dispose () |
Disposes the Block and reclaims the resources used by the object. | |
abstract bool | EndOfStream (int inputIndex) |
Tells the Block that there's no more data for the specified input socket. | |
abstract bool | Flush () |
Flushes the data buffered in the Block to the output. | |
abstract bool | Open () |
Initializes the Block based on the specified input and desired output. | |
abstract bool | Pull (out int outputIndex, MediaSample outputSample) |
Pulls output data from the Block. | |
abstract bool | PullUnmanaged (out int outputIndex, MediaSample outputSample) |
Pulls output data from the Block. | |
abstract bool | Push (int inputIndex, MediaSample inputSample) |
Pushes input data to the Blocks. | |
abstract bool | PushUnmanaged (int inputIndex, MediaSample inputSample) |
Pushes input data to the Block. | |
Properties | |
override ErrorInfo | Error [get] |
Error information for the last load operation. | |
String | InputFile [get, set] |
override MediaSocketList | Inputs [get] |
A modifiable collection of MediaSocket objects which describe the input data of the MediaInfo. | |
System.IO.Stream | InputStream [get, set] |
bool | IsReady [get] |
Indicates whether stream info and metadata have been loaded and parsed. | |
Metadata | Metadata [get] |
override MediaSocketList | Outputs [get] |
An immutable collection of MediaSocket objects describing the audio and video streams (tracks) found in the input. | |
IList< StreamInfo > | Streams [get] |
StreamSubType | StreamSubType [get] |
StreamType | StreamType [get, set] |
Properties inherited from Block | |
abstract ErrorInfo | Error [get] |
The error information for the last block operation. | |
abstract MediaSocketList | Inputs [get] |
A modifiable collection of MediaSocket objects which describe the input data of the Block. | |
abstract MediaSocketList | Outputs [get] |
A modifiable collection of MediaSocket objects which describe the output data of the Blocks. | |
Analyzes a file or a stream and provides information about its type and properties.
MediaInfo | ( | ) |
Creates a MediaInfo object in its default state.
When the MediaInfo object is not needed anymore it should be disposed in order to deterministically reclaim the allocated resources.
|
virtual |
Closes the MediaInfo.
Implements Block.
|
virtual |
Disposes the MediaInfo and reclaims the resources used by the object.
Implements Block.
|
virtual |
|
virtual |
bool Load | ( | ) |
If this method is successful the information about the detected media streams (tracks) can be obtained from the Streams collection.
References MediaInfo.Open().
|
virtual |
Analyzes the input specified by the Inputs property.
If this method is succeeds the information about the detected media streams (tracks) can be obtained from the Outputs property.
Implements Block.
Referenced by MediaSocket.FromMediaInfo(), and MediaInfo.Load().
|
virtual |
|
virtual |
|
virtual |
Pushes input data to the MediaInfo.
inputIndex | Specifies the index of the input socket whose data is pushed to the MediaInfo. Must be zero. |
inputSample | A MediaSample object that contains the input data in the MediaBuffer property. |
In order to use this method the Inputs[0].StreamType must be set.
Supported stream types: | StreamType.Mpeg1Video |
StreamType.Mpeg2Video | |
StreamType.H264 | |
StreamType.MpegTS |
Implements Block.
References MediaSample.Buffer, MediaBuffer.DataOffset, MediaBuffer.DataSize, MediaInfo.IsReady, MediaBuffer.SetData(), and MediaBuffer.Start.
|
virtual |
Pushes input data to the MediaInfo.
inputIndex | Specifies the index of the input socket whose data is pushed to the MediaInfo. Must be zero. |
inputSample | A MediaSample object that contains the input data in the UnmanagedMediaBuffer property. |
In order to use this method the Inputs[0].StreamType must be set.
Supported stream types: | StreamType.Mpeg1Video |
StreamType.Mpeg2Video | |
StreamType.H264 | |
StreamType.MpegTS |
Implements Block.
References UnmanagedMediaBuffer.Clear(), UnmanagedMediaBuffer.DataSize, MediaInfo.IsReady, and MediaSample.UnmanagedBuffer.
|
getset |
|
get |
A modifiable collection of MediaSocket objects which describe the input data of the MediaInfo.
Each socket in the collection represents an input point - it can be a container with one or more streams or just an elementary stream.
The default value of this property is a collection with one element.
|
getset |
MediaInfo will use InputFile when both InputStream and InputFile are set.
|
get |
Indicates whether stream info and metadata have been loaded and parsed.
Referenced by MediaSocket.FromMediaInfo(), MediaInfo.Push(), and MediaInfo.PushUnmanaged().
|
get |
An immutable collection of MediaSocket objects describing the audio and video streams (tracks) found in the input.
The default value of this property is an empty collection.
Referenced by MediaSocket.FromMediaInfo().
|
get |
This collection is read-only. Each StreamInfo object in the collection represents a stream (track) in the analyzed input.
|
getset |
If the input is a file and StreamType is not set, the stream type is deduced from the filename extension. If the input is a stream, MediaInfo requires StreamType to be specified. If StreamType is set to something other than StreamType.Unknown, it takes precedence and is used by MediaInfo regardless of the detected stream type.