Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | Private Attributes

TagLib::Mpeg::AudioFile Class Reference

This class extends TagLib.NonContainer.File to provide tagging and properties support for MPEG-1, MPEG-2, and MPEG-2.5 audio files. More...

Inheritance diagram for TagLib::Mpeg::AudioFile:
Inheritance graph
[legend]
Collaboration diagram for TagLib::Mpeg::AudioFile:
Collaboration graph
[legend]

List of all members.

Public Types

enum  AccessMode { Read, Write, Closed }
 

Specifies the type of file access operations currently permitted on an instance of File.

More...

Public Member Functions

 AudioFile (string path, ReadStyle propertiesStyle)
 Constructs and initializes a new instance of AudioFile for a specified path in the local file system and specified read style.
 AudioFile (string path)
 Constructs and initializes a new instance of AudioFile for a specified path in the local file system with an average read style.
 AudioFile (File.IFileAbstraction abstraction)
 Constructs and initializes a new instance of AudioFile for a specified file abstraction with an average read style.
 AudioFile (File.IFileAbstraction abstraction, ReadStyle propertiesStyle)
 Constructs and initializes a new instance of AudioFile for a specified file abstraction and specified read style.
void Dispose ()
 Dispose the current file. Equivalent to setting the mode to closed.
delegate File FileTypeResolver (IFileAbstraction abstraction, string mimetype, ReadStyle style)
 This delegate is used for intervening in File.Create(string) by resolving the file type before any standard resolution operations.
long Find (ByteVector pattern, long startPosition, ByteVector before)
 Searches forwards through a file for a specified pattern, starting at a specified offset.
long Find (ByteVector pattern, long startPosition)
 Searches forwards through a file for a specified pattern, starting at a specified offset.
long Find (ByteVector pattern)
 Searches forwards through a file for a specified pattern, starting at the beginning of the file.
override TagLib.Tag GetTag (TagTypes type, bool create)
 Gets a tag of a specified type from the current instance, optionally creating a new tag if possible.
Tag GetTag (TagTypes type)
 Gets a tag of a specified type from the current instance.
void Insert (ByteVector data, long start)
 Inserts a specifed block of data into the file repesented by the current instance at a specified location.
void Insert (ByteVector data, long start, long replace)
 Inserts a specifed block of data into the file repesented by the current instance at a specified location, replacing a specified number of bytes.
ByteVector ReadBlock (int length)
 Reads a specified number of bytes at the current seek position from the current instance.
void RemoveBlock (long start, long length)
 Removes a specified block of data from the file represented by the current instance.
override void RemoveTags (TagTypes types)
 Removes a set of tag types from the current instance.
long RFind (ByteVector pattern, long startPosition)
 Searches backwards through a file for a specified pattern, starting at a specified offset.
long RFind (ByteVector pattern)
 Searches backwards through a file for a specified pattern, starting at the end of the file.
override void Save ()
 Saves the changes made in the current instance to the file it represents.
void Seek (long offset)
 Seeks the read/write pointer to a specified offset in the current instance, relative to the beginning of the file.
void Seek (long offset, System.IO.SeekOrigin origin)
 Seeks the read/write pointer to a specified offset in the current instance, relative to a specified origin.
void WriteBlock (ByteVector data)
 Writes a block of data to the file represented by the current instance at the current seek position.

Static Public Member Functions

static void AddFileTypeResolver (FileTypeResolver resolver)
 Adds a FileTypeResolver to the File class. The one added last gets run first.
static File Create (string path, ReadStyle propertiesStyle)
 Creates a new instance of a File subclass for a specified path and read style, guessing the mime-type from the file's extension.
static File Create (IFileAbstraction abstraction, string mimetype, ReadStyle propertiesStyle)
 Creates a new instance of a File subclass for a specified file abstraction, mime-type, and read style.
static File Create (string path, string mimetype, ReadStyle propertiesStyle)
 Creates a new instance of a File subclass for a specified path, mime-type, and read style.
static File Create (IFileAbstraction abstraction, ReadStyle propertiesStyle)
 Creates a new instance of a File subclass for a specified file abstraction and read style, guessing the mime-type from the file's extension.
static File Create (string path)
 Creates a new instance of a File subclass for a specified path, guessing the mime-type from the file's extension and using the average read style.
static File Create (IFileAbstraction abstraction)
 Creates a new instance of a File subclass for a specified file abstraction, guessing the mime-type from the file's extension and using the average read style.

Protected Member Functions

override void ReadEnd (long end, ReadStyle propertiesStyle)
 Reads format specific information at the end of the file.
override Properties ReadProperties (long start, long end, ReadStyle propertiesStyle)
 Reads the audio properties from the file represented by the current instance.
override void ReadStart (long start, ReadStyle propertiesStyle)
 Reads format specific information at the start of the file.
void Truncate (long length)
 Resized the current instance to a specified number of bytes.

Properties

static uint BufferSize [get]
 The buffer size to use when reading large blocks of data in the File class.
IEnumerable< string > CorruptionReasons [get]
 The reasons for which this file is marked as corrupt.
EndTag EndTag [get]
 Gets the collection of tags appearing at the end of the file.
long InvariantEndPosition [get, set]
 Gets the position at which the invariant portion of the current instance ends.
long InvariantStartPosition [get, set]
 Gets the position at which the invariant portion of the current instance begins.
long Length [get]
 Gets the length of the file represented by the current instance.
string MimeType [get, set]
 Gets the mime-type of the file as determined by Create(IFileAbstraction,string,ReadStyle) if that method was used to create the current instance.
AccessMode Mode [get, set]
 Gets and sets the file access mode in use by the current instance.
string Name [get]
 Gets the name of the file as stored in its file abstraction.
bool PossiblyCorrupt [get]
 Indicates whether or not this file may be corrupt.
override TagLib.Properties Properties [get]
 Gets the media properties of the file represented by the current instance.
StartTag StartTag [get]
 Gets the collection of tags appearing at the start of the file.
override TagLib.Tag Tag [get]
 Gets a abstract representation of all tags stored in the current instance.
TagTypes TagTypes [get]
 Gets the tag types contained in the current instance.
TagTypes TagTypesOnDisk [get, set]
 Gets the tag types contained in the physical file represented by the current instance.
long Tell [get]
 Gets the seek position in the internal stream used by the current instance.
virtual bool Writeable [get]
 Indicates if tags can be written back to the current file or not.

Private Attributes

AudioHeader first_header
 Contains the first audio header.

Detailed Description

This class extends TagLib.NonContainer.File to provide tagging and properties support for MPEG-1, MPEG-2, and MPEG-2.5 audio files.

A TagLib.Id3v1.Tag and TagLib.Id3v2.Tag will be added automatically to any file that doesn't contain one. This change does not effect the file until it is saved and can be reversed using the following method:

file.RemoveTags (file.TagTypes &amp; ~file.TagTypesOnDisk);

Definition at line 58 of file AudioFile.cs.


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index