TagLib::Matroska::File Class Reference

An implementation of TagLib::File with Matroska specific methods. More...

`#include <matroskafile.h>`

Inheritance diagram for TagLib::Matroska::File:
[legend]
Collaboration diagram for TagLib::Matroska::File:
[legend]

## Public Member Functions

| File (FileName file, bool readProperties=true, Properties::ReadStyle readStyle=Properties::Average)
| File (IOStream *stream, bool readProperties=true, Properties::ReadStyle readStyle=Properties::Average)
| ~File () override
| File (const File &)=delete
File & | operator= (const File &)=delete
TagLib::Tag * | tag () const override
Tag * | tag (bool create) const
PropertyMap | properties () const override
void | removeUnsupportedProperties (const StringList &properties) override
PropertyMap | setProperties (const PropertyMap &) override
StringList | complexPropertyKeys () const override
List< VariantMap > | complexProperties (const String &key) const override
bool | setComplexProperties (const String &key, const List< VariantMap > &value) override
Properties * | audioProperties () const override
bool | save () override
Attachments * | attachments (bool create=false) const
Chapters * | chapters (bool create=false) const
Public Member Functions inherited from TagLib::File
| File (const File &)=delete
File & | operator= (const File &)=delete
FileName | name () const
ByteVector | readBlock (size_t length)
void | writeBlock (const ByteVector &data)
offset_t | find (const ByteVector &pattern, offset_t fromOffset=0, const ByteVector &before=ByteVector())
offset_t | rfind (const ByteVector &pattern, offset_t fromOffset=0, const ByteVector &before=ByteVector())
void | insert (const ByteVector &data, offset_t start=0, size_t replace=0)
void | removeBlock (offset_t start=0, size_t length=0)
bool | readOnly () const
bool | isOpen () const
bool | isValid () const
void | seek (offset_t offset, Position p=Beginning)
void | clear ()
offset_t | tell () const
offset_t | length ()

## Static Public Member Functions

static bool | isSupported (IOStream *stream)

## Friends

class | Properties

## Additional Inherited Members

Public Types inherited from TagLib::File
enum | Position { Beginning , Current , End }
enum | StripTags { StripNone , StripOthers }
enum | DuplicateTags { Duplicate , DoNotDuplicate }
Protected Member Functions inherited from TagLib::File
| File (FileName fileName)
| File (IOStream *stream)
void | setValid (bool valid)
void | truncate (offset_t length)
Static Protected Member Functions inherited from TagLib::File
static unsigned int | bufferSize ()

## Detailed Description

An implementation of TagLib::File with Matroska specific methods.

Implementation of TagLib::File for Matroska.

## Constructor & Destructor Documentation

## File() [1/3]

TagLib::Matroska::File::File | ( | FileName | file,
|  | bool | readProperties = true,
|  | Properties::ReadStyle | readStyle = Properties::Average )

explicit

Constructs a Matroska file from file. If readProperties is `true` the file's audio properties will also be read.

If readStyle is `Accurate` all seek head and cues segment positions are verified for the isValid() state of the file.

References TagLib::AudioProperties::Average.

Referenced by File(), and operator=().

## File() [2/3]

TagLib::Matroska::File::File | ( | IOStream * | stream,
|  | bool | readProperties = true,
|  | Properties::ReadStyle | readStyle = Properties::Average )

explicit

Constructs a Matroska file from stream. If readProperties is `true` the file's audio properties will also be read.

If readStyle is `Accurate` all seek head and cues segment positions are verified for the isValid() state of the file.

References TagLib::AudioProperties::Average.

## ~File()

TagLib::Matroska::File::~File | ( |  | ) |

override virtual

Destroys this instance of the File.

Reimplemented from TagLib::File.

## File() [3/3]

TagLib::Matroska::File::File | ( | const File & |  | ) |

delete

References File().

## Member Function Documentation

## attachments()

Attachments * TagLib::Matroska::File::attachments | ( | bool | create = false | ) | const

Returns a pointer to the attachments of the file.

If create is `false` this may return a null pointer if there are no attachments. If create is `true` it will create attachments if none exist and returns a valid pointer.

## audioProperties()

Properties * TagLib::Matroska::File::audioProperties | ( |  | ) | const

override virtual

Returns the Matroska::Properties for this file. If no audio properties were read then this will return a null pointer.

Implements TagLib::File.

References Properties.

## chapters()

Chapters * TagLib::Matroska::File::chapters | ( | bool | create = false | ) | const

Returns a pointer to the chapters of the file.

If create is `false` this may return a null pointer if there are no chapters. If create is `true` it will create chapters if none exist and returns a valid pointer.

## complexProperties()

List< VariantMap > TagLib::Matroska::File::complexProperties | ( | const String & | key | ) | const

override virtual

Get the pictures stored in the attachments as complex properties for key "PICTURE". Other attached files can be retrieved, by media type, file name or UID. The attached files are returned as maps with keys "data", "mimeType", "description", "fileName, "uid". Binary simple tags can be retrieved as maps with keys "data", "name", "targetTypeValue", "language", "defaultLanguage".

Reimplemented from TagLib::File.

## complexPropertyKeys()

StringList TagLib::Matroska::File::complexPropertyKeys | ( |  | ) | const

override virtual

Returns the keys for attached files, "PICTURE" for images, the media type, file name or UID for other attached files. The names of the binary simple tags are included too.

Reimplemented from TagLib::File.

## isSupported()

bool TagLib::Matroska::File::isSupported | ( | IOStream * | stream | ) |

static

Returns whether or not the given stream can be opened as a Matroska file.

Note
  This method is designed to do a quick check. The result may not necessarily be correct.

## operator=()

File & TagLib::Matroska::File::operator= | ( | const File & |  | ) |

delete

References File().

## properties()

PropertyMap TagLib::Matroska::File::properties | ( |  | ) | const

override virtual

Implements the reading part of the unified property interface.

Reimplemented from TagLib::File.

Referenced by removeUnsupportedProperties().

## removeUnsupportedProperties()

void TagLib::Matroska::File::removeUnsupportedProperties | ( | const StringList & | properties | ) |

override virtual

Removes unsupported properties, or a subset of them, from the file's metadata. The parameter properties must contain only entries from properties().unsupportedData().

Reimplemented from TagLib::File.

References properties().

## save()

bool TagLib::Matroska::File::save | ( |  | ) |

override virtual

Save the file.

This returns `true` if the save was successful.

Implements TagLib::File.

## setComplexProperties()

bool TagLib::Matroska::File::setComplexProperties | ( | const String & | key,
|  | const List< VariantMap > & | value )

override virtual

Set attached files as complex properties value, e.g. pictures for key "PICTURE" with the maps in value having keys "data", "mimeType", "description", "fileName, "uid". For other attached files, the mime type, file name or UID can be used as the \a key. Maps with keys "name" (with the same value as \a key) and "data" are stored as binary simple tags with additional keys "targetTypeValue", "language", "defaultLanguage".

Reimplemented from TagLib::File.

## setProperties()

PropertyMap TagLib::Matroska::File::setProperties | ( | const PropertyMap & |  | ) |

override virtual

Implements the writing part of the unified tag dictionary interface.

Reimplemented from TagLib::File.

## tag() [1/2]

TagLib::Tag * TagLib::Matroska::File::tag | ( |  | ) | const

override virtual

Returns a pointer to the tag of the file.

It will create a tag if one does not exist and returns a valid pointer.

Note
  The tag is still owned by the Matroska::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.

Implements TagLib::File.

## tag() [2/2]

Tag * TagLib::Matroska::File::tag | ( | bool | create | ) | const

Returns a pointer to the Matroska tag of the file.

If create is `false` this may return a null pointer if there is no tag. If create is `true` it will create a tag if one does not exist and returns a valid pointer.

Note
  The tag is still owned by the Matroska::File and should not be deleted by the user. It will be deleted when the file (object) destroyed.

## Friends And Related Symbol Documentation

## Properties

friend class Properties

friend

References Properties, and TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE.

Referenced by audioProperties(), and Properties.

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

- matroskafile.h