AVBlocks for .NET
2.3
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. More... | |
override void | Close () |
Closes the MediaInfo. More... | |
override void | Dispose () |
Disposes the MediaInfo and reclaims the resources used by the object. More... | |
override bool | EndOfStream (int inputIndex) |
The method is not implemented. More... | |
override bool | Flush () |
The method is not implemented. More... | |
bool | Load () |
override bool | Open () |
Analyzes the input specified by the Inputs property. More... | |
override bool | Pull (out int outputIndex, MediaSample outputSample) |
The method is not implemented. More... | |
override bool | PullUnmanaged (out int outputIndex, MediaSample outputSample) |
The method is not implemented. More... | |
override bool | Push (int inputIndex, MediaSample inputSample) |
Pushes input data to the MediaInfo. More... | |
override bool | PushUnmanaged (int inputIndex, MediaSample inputSample) |
Pushes input data to the MediaInfo. More... | |
Properties | |
override ErrorInfo | Error [get] |
Error information for the last load operation. More... | |
String | InputFile [get, set] |
override MediaSocketList | Inputs [get] |
A modifiable collection of MediaSocket objects which describe the input data of the MediaInfo. More... | |
System.IO.Stream | InputStream [get, set] |
bool | IsReady [get] |
Indicates whether stream info and metadata have been loaded and parsed. More... | |
Metadata | Metadata [get] |
override MediaSocketList | Outputs [get] |
An immutable collection of MediaSocket objects describing the audio and video streams (tracks) found in the input. More... | |
IList< StreamInfo > | Streams [get] |
StreamSubType | StreamSubType [get] |
StreamType | StreamType [get, set] |
![]() | |
abstract ErrorInfo | Error [get] |
The error information for the last block operation. More... | |
abstract MediaSocketList | Inputs [get] |
A modifiable collection of MediaSocket objects which describe the input data of the Block. More... | |
abstract MediaSocketList | Outputs [get] |
A modifiable collection of MediaSocket objects which describe the output data of the Blocks. More... | |
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.
References MediaInfo.Streams.
|
virtual |
|
virtual |
The method is not implemented.
inputIndex |
Implements Block.
References MediaInfo.IsReady.
|
virtual |
bool Load | ( | ) |
Analyzes the input specified by the InputFile or InputStream properties.
If this method is successful the information about the detected media streams (tracks) can be obtained from the Streams collection.
References Metadata.Clone(), StreamInfo.Clone(), MediaInfo.Error, ObjectCollection< T >.Immutable, MediaInfo.Metadata, MediaInfo.Open(), MediaSocket.Pins, and MediaPin.StreamInfo.
|
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.
|
get |
Error information for the last load operation.
Referenced by MediaInfo.Load().
|
getset |
The input file that should be analyzed. The default value is null.
|
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 |
The input stream that should be analyzed. The default value is null. This is an alternative to InputFile.
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 MediaInfo.EndOfStream(), MediaSocket.FromMediaInfo(), MediaInfo.Push(), and MediaInfo.PushUnmanaged().
Contains the metadata of the analyzed file/stream. The default value is null. When there's no metadata for the analyzed file/stream, null is returned.
Referenced by MediaInfo.Load().
|
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 |
A collection of StreamInfo objects describing the audio and video streams found in the input.
This collection is read-only. Each StreamInfo object in the collection represents a stream (track) in the analyzed input.
Referenced by MediaInfo.MediaInfo().
Returns the stream subtype detected by MediaInfo. The default value is StreamSubType.Unknown.
|
getset |
Forces a specific stream type on the input stream or file. The default value is StreamType.Unknown.
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.