Class MediaInfoReader
MediaInfoReader class.
Inherited Members
Namespace: VisioForge.Core.MediaInfo
Assembly: VisioForge.Core.dll
Syntax
public class MediaInfoReader
Constructors
MediaInfoReader()
Initializes a new instance of the MediaInfoReader class.
Declaration
public MediaInfoReader()
MediaInfoReader(string)
Initializes a new instance of the MediaInfoReader class.
Declaration
public MediaInfoReader(string filename)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filename | The filename. |
MediaInfoReader(string, DSContext)
Initializes a new instance of the MediaInfoReader class.
Declaration
public MediaInfoReader(string filename, DSContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filename | The filename. |
| DSContext | context | The context. |
Fields
Context
The context.
Declaration
protected DSContext Context
Field Value
| Type | Description |
|---|---|
| DSContext |
Properties
AudioStreams
Gets audio streams.
Declaration
public List<AudioStreamInfo> AudioStreams { get; }
Property Value
| Type | Description |
|---|---|
| List<AudioStreamInfo> | The audio streams. |
Audio_Streams_AllInOne
Gets or sets a value indicating whether additional streams are enabled.
Declaration
public bool Audio_Streams_AllInOne { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Debug_Dir
Gets or sets the debug dir.
Declaration
public string Debug_Dir { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The debug dir. |
Debug_Mode
Gets or sets a value indicating whether debug mode used.
Declaration
public bool Debug_Mode { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
DefaultAudioDuration
Gets default audio duration.
Declaration
public TimeSpan DefaultAudioDuration { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan | The default duration of the audio. |
DefaultVideoDuration
Gets default video duration.
Declaration
public TimeSpan DefaultVideoDuration { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan | The default duration of the video. |
FileFormat
Gets file format.
Declaration
public string FileFormat { get; }
Property Value
| Type | Description |
|---|---|
| string | The file format. |
Filename
Gets or sets file name.
Declaration
public string Filename { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The filename. |
Subtitles
Gets subtitle streams.
Declaration
public List<SubtitleStreamInfo> Subtitles { get; }
Property Value
| Type | Description |
|---|---|
| List<SubtitleStreamInfo> | The subtitles. |
VideoStreams
Gets video streams.
Declaration
public List<VideoStreamInfo> VideoStreams { get; }
Property Value
| Type | Description |
|---|---|
| List<VideoStreamInfo> | The video streams. |
Methods
AddMediaType(AMMediaType, IMediaDet)
Fills media type.
Declaration
protected void AddMediaType(AMMediaType mt, IMediaDet mediaDet)
Parameters
| Type | Name | Description |
|---|---|---|
| AMMediaType | mt | Media type. |
| IMediaDet | mediaDet | IMediaDet interface. |
Attach(DSContext)
Attaches the specified context.
Declaration
public void Attach(DSContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| DSContext | context | The context. |
ConfigureLocalRedist()
Configures the local redist.
Declaration
public static void ConfigureLocalRedist()
EvalAudioCodec(ushort)
Gets codec name.
Declaration
protected static string EvalAudioCodec(ushort tag)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | tag | Audio tag. |
Returns
| Type | Description |
|---|---|
| string | Returns codec name. |
EvalFourCC(string)
Gets codec name.
Declaration
protected static string EvalFourCC(string srcFourCC)
Parameters
| Type | Name | Description |
|---|---|---|
| string | srcFourCC | FourCC code. |
Returns
| Type | Description |
|---|---|
| string | Returns codec name. |
FillFileFormat()
Fills file format.
Declaration
public void FillFileFormat()
~MediaInfoReader()
Finalizes an instance of the MediaInfoReader class.
Declaration
protected ~MediaInfoReader()
FixBitrates()
Fixes bitrates.
Declaration
protected void FixBitrates()
GetStreamAvailabilityFromMemoryStream(DSContext, IStream, long, out bool, out bool)
Gets the stream availability from memory stream.
Declaration
public static bool GetStreamAvailabilityFromMemoryStream(DSContext context, IStream stream, long streamSize, out bool videoStream, out bool audioStream)
Parameters
| Type | Name | Description |
|---|---|---|
| DSContext | context | The context. |
| IStream | stream | The stream. |
| long | streamSize | Size of the stream. |
| bool | videoStream | if set to |
| bool | audioStream | if set to |
Returns
| Type | Description |
|---|---|
| bool |
|
IsFilePlayable(string, out FilePlaybackError, out string)
Returns true if the file is playable.
Declaration
public static bool IsFilePlayable(string filename, out FilePlaybackError errorCode, out string errorText)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filename | File name. |
| FilePlaybackError | errorCode | Error code. |
| string | errorText | Error text. |
Returns
| Type | Description |
|---|---|
| bool | Returns true if the file is playable, otherwise returns false. |
ReadBluRayInfo()
Reads DVD info.
Declaration
public void ReadBluRayInfo()
ReadFileInfo(bool)
Reads file info.
Declaration
public void ReadFileInfo(bool allowLibMediaInfoUsage)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | allowLibMediaInfoUsage | True to allow LibMediaInfo usage. |
ReadFileInfo(bool, object, EncryptionKeyType, bool)
Reads file info.
Declaration
public void ReadFileInfo(bool encryptedFile, object encryptionKey, EncryptionKeyType encryptionKeyType, bool allowLibMediaInfoUsage)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | encryptedFile | True if file is encrypted. |
| object | encryptionKey | Encryption key. |
| EncryptionKeyType | encryptionKeyType | Encryption key type. |
| bool | allowLibMediaInfoUsage | True to allow LibMediaInfo usage. |
ReadFileInfo(Stream)
Reads file info from stream using LibMediaInfo.
Declaration
public void ReadFileInfo(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | Seekable stream. |
ReadFullFileInfoEx()
Reads full file info.
Declaration
protected void ReadFullFileInfoEx()
ReadInfoMain()
Reads media info.
Declaration
protected bool ReadInfoMain()
Returns
| Type | Description |
|---|---|
| bool | Returns true if the operation was successful. |
SecondsToString(int)
Converts time to string.
Declaration
protected static string SecondsToString(int seconds)
Parameters
| Type | Name | Description |
|---|---|---|
| int | seconds | Seconds. |
Returns
| Type | Description |
|---|---|
| string | Returns time as a string. |
Video_ResolutionWithAspect(int, out bool)
Returns video width.
Declaration
public Size Video_ResolutionWithAspect(int streamIndex, out bool notOriginal)
Parameters
| Type | Name | Description |
|---|---|---|
| int | streamIndex | Stream index. |
| bool | notOriginal | True if video size changed. |
Returns
| Type | Description |
|---|---|
| Size | Returns video width, 0 if error happen. |