AVBlocks for .NET  1.13
Audio and Video Software Development Kit
MediaInfo Class Reference

Analyzes a file or a stream and provides information about its type and properties. More...

Public Member Functions

bool Load ()
 Analyzes the input specified by the InputFile or InputStream properties. More...
 

Properties

IList< StreamInfoStreams [get]
 A collection of StreamInfo objects describing the audio and video streams found in the input. More...
 
String InputFile [get, set]
 The input file that should be analyzed. More...
 
System.IO.Stream InputStream [get, set]
 The input stream that should be analyzed. More...
 
StreamType InputType [get, set]
 Forces a specific input type. More...
 
Metadata Metadata [get, set]
 Contains the metadata of the analyzed file/stream. More...
 
ErrorInfo Error [get]
 Error information for the last load operation. More...
 

Detailed Description

Analyzes a file or a stream and provides information about its type and properties.

Member Function Documentation

bool Load ( )

Analyzes the input specified by the InputFile or InputStream properties.

Returns
true if the input has been successfully analyzed, otherwise false.

If this method is successful the information about the detected media streams (tracks) can be obtained from the Streams collection.

Property Documentation

ErrorInfo Error
get

Error information for the last load operation.

String InputFile
getset

The input file that should be analyzed.

The default value is null.

System.IO.Stream InputStream
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.

StreamType InputType
getset

Forces a specific input type.

The default value is StreamType.Unknown.

If the input is a file and InputType is not set, the input type is deduced from the filename extension. If the input is a stream, MediaInfo requires InputType to be specified. If InputType is set to something other than StreamType.Unknown, it takes precedence and is used by MediaInfo regardless of the detected stream type.

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.

IList<StreamInfo> Streams
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.