This documentation is for the old version. Go to the latest Graphics Mill docs

MediaProcessorMetadataDictionary Class

This class represents a metadata collection.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill.Codecs.MediaProcessor (in Aurigma.GraphicsMill.Codecs.MediaProcessor.dll)

Syntax

Visual Basic
Public NotInheritable Class MediaProcessorMetadataDictionary _
	Inherits MetadataDictionary
C#
public sealed class MediaProcessorMetadataDictionary : MetadataDictionary

Remarks

This class contains a dictionary of audio or video file metadata, for example, ID3 fields. Typically you get this class instance from the Metadata property of the format reader.

Metadata are stored as pairs of keys and values. Keys are field identifiers, and values are actual data provided for the corresponding fields. Most popular key IDs are presented as static fields of this class (such as Album, Title, TrackNumber, etc).

Examples

This example shows the general pattern of working with metadata.
Visual Basic
'Get all metadata
Private Sub GetMetadata(ByVal fileName As String)
    Dim _reader As New WMReader(fileName)
    Dim tags As MediaProcessorMetadataDictionary = _reader.Metadata
    
    'Print all text fields
    For Each key As Object In tags.Keys
        If key <> MediaProcessorMetadataDictionary.SynchronizedLyrics And _
            key <> MediaProcessorMetadataDictionary.AttachedPicture Then
            Console.WriteLine(tags.GetKeyDescription(key).ToString() & _
            ": " & tags(key).ToString())
        End If
    Next
End Sub
C#
//Get all metadata
private void GetMetadata(String fileName)
{
    WMReader _reader = new WMReader(fileName);
    MediaProcessorMetadataDictionary tags = _reader.Metadata;
    
    //Print all text fields
    foreach (System.Object key in tags.Keys)
        if (!key.Equals(MediaProcessorMetadataDictionary.SynchronizedLyrics) &&
            !key.Equals(MediaProcessorMetadataDictionary.AttachedPicture))
            Console.WriteLine(tags.GetKeyDescription(key).ToString() +
                ": " + tags[key].ToString());
}

Inheritance Hierarchy

System.Object
L Aurigma.GraphicsMill.LockableObject
L Aurigma.GraphicsMill.Codecs.MetadataDictionary
L Aurigma.GraphicsMill.Codecs.MediaProcessorMetadataDictionary

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

Object Model







See Also

Reference