OggPackage

OggPackage class

Represents a native metadata package in a OGG audio file.

public sealed class OggPackage : CustomPackage

Constructors

Name Description
OggPackage() Initializes a new instance of the OggPackage class.

Properties

Name Description
Album { get; } The collection name to which this track belongs
Artist { get; } The artist generally considered responsible for the work. In popular music this is usually the performing band or singer. For classical music it would be the composer. For an audio book it would be the author of the original text.
Contact { get; } Contact information for the creators or distributors of the track. This could be a URL, an email address, the physical address of the producing label.
Copyright { get; } Copyright attribution, e.g., ‘2001 Nobody’s Band’ or ‘1999 Jack Moffitt’
Count { get; } Gets the number of metadata properties.
Date { get; } Date the track was recorded
Description { get; } A short text description of the contents
Genre { get; } A short text indication of music genre
Isrc { get; } ISRC number for the track
Item { get; } Gets the MetadataProperty with the specified name.
Keys { get; } Gets a collection of the metadata property names.
License { get; } License information, for example, ‘All Rights Reserved’, ‘Any Use Permitted’, a URL to a license such as a Creative Commons license (e.g. “creativecommons.org/licenses/by/4.0/”), or similar.
Location { get; } Location where track was recorded
MetadataType { get; } Gets the metadata type.
OggUserComments { get; } Gets an array of OggUserComment entries inside the metadata.
Organization { get; } Name of the organization producing the track (i.e. the ‘record label’)
Performer { get; } The artist(s) who performed the work. In classical music this would be the conductor, orchestra, soloists. In an audio book it would be the actor who did the reading. In popular music this is typically the same as the ARTIST and is omitted.
PropertyDescriptors { get; } Gets a collection of descriptors that contain information about properties accessible through the GroupDocs.Metadata search engine.
Title { get; } Track/Work name
Tracknumber { get; } The track number of this piece if part of a specific larger collection or album
Vendor { get; } Vendor
Version { get; } The version field may be used to differentiate multiple versions of the same track title in a single collection. (e.g. remix info)

Methods

Name Description
virtual AddProperties(Func<MetadataProperty, bool>, PropertyValue) Adds known metadata properties satisfying the specified predicate. The operation is recursive so it affects all nested packages as well.
Contains(string) Determines whether the package contains a metadata property with the specified name.
virtual FindProperties(Func<MetadataProperty, bool>) Finds the metadata properties satisfying the specified predicate. The search is recursive so it affects all nested packages as well.
GetEnumerator() Returns an enumerator that iterates through the collection.
virtual RemoveProperties(Func<MetadataProperty, bool>) Removes metadata properties satisfying the specified predicate.
virtual Sanitize() Removes writable metadata properties from the package. The operation is recursive so it affects all nested packages as well.
virtual SetProperties(Func<MetadataProperty, bool>, PropertyValue) Sets known metadata properties satisfying the specified predicate. The operation is recursive so it affects all nested packages as well. This method is a combination of AddProperties and UpdateProperties. If an existing property satisfies the predicate its value is updated. If there is a known property missing in the package that satisfies the predicate it is added to the package.
virtual UpdateProperties(Func<MetadataProperty, bool>, PropertyValue) Updates known metadata properties satisfying the specified predicate. The operation is recursive so it affects all nested packages as well.

Remarks

Learn more

Examples

This code sample shows how to extract technical audio information from a OGG file.

using (Metadata metadata = new Metadata("input.ogg"))
{
    var root = metadata.GetRootPackage<OggRootPackage>();
    if (root.OggPackage != null)
    {
        Console.WriteLine(root.OggPackage.Title);
        Console.WriteLine(root.OggPackage.Version);
        Console.WriteLine(root.OggPackage.Album);
    }
}

See Also