MythTV  master
Public Member Functions | Static Private Member Functions | List of all members
MetaIOOggVorbis Class Reference

Read and write Vorbis (Xiph) tags in an Ogg container. More...

#include <metaiooggvorbis.h>

Inheritance diagram for MetaIOOggVorbis:
Inheritance graph
[legend]
Collaboration diagram for MetaIOOggVorbis:
Collaboration graph
[legend]

Public Member Functions

 MetaIOOggVorbis (void)
 
 ~MetaIOOggVorbis (void)=default
 
bool write (const QString &filename, MusicMetadata *mdata) override
 Writes all metadata back to a file. More...
 
MusicMetadataread (const QString &filename) override
 Reads MusicMetadata from a file. More...
 
- Public Member Functions inherited from MetaIOTagLib
 MetaIOTagLib (void)
 
virtual ~MetaIOTagLib (void)=default
 
- Public Member Functions inherited from MetaIO
 MetaIO (void)
 Constructor. More...
 
virtual ~MetaIO (void)=default
 
virtual bool writeVolatileMetadata (const QString &filename, MusicMetadata *mdata)
 Writes rating and playcount back to a file. More...
 
virtual bool supportsEmbeddedImages (void)
 Does the tag support embedded cover art. More...
 
virtual AlbumArtList getAlbumArtList (const QString &filename)
 Reads the list of embedded images in the tag. More...
 
virtual bool writeAlbumArt (const QString &filename, const AlbumArtImage *albumart)
 
virtual bool removeAlbumArt (const QString &filename, const AlbumArtImage *albumart)
 
virtual bool changeImageType (const QString &filename, const AlbumArtImage *albumart, ImageType newType)
 
virtual QImage * getAlbumArt (const QString &filename, ImageType type)
 
void readFromFilename (const QString &filename, QString &artist, QString &album, QString &title, QString &genre, int &tracknum)
 Reads MusicMetadata based on the folder/filename. More...
 
MusicMetadatareadFromFilename (const QString &filename, bool blnLength=false)
 Reads MusicMetadata based on the folder/filename. More...
 
void readFromFilename (MusicMetadata *metadata)
 Reads MusicMetadata based on the folder/filename. More...
 
virtual bool TagExists (const QString &filename)
 

Static Private Member Functions

static TagLib::Ogg::Vorbis::File * OpenFile (const QString &filename)
 Open the file to read the tag. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MetaIO
static MetaIOcreateTagger (const QString &filename)
 Finds an appropriate tagger for the given file. More...
 
static MusicMetadatareadMetadata (const QString &filename)
 Read the metadata from filename directly. More...
 
static MusicMetadatagetMetadata (const QString &filename)
 Get the metadata for filename. More...
 
- Static Public Attributes inherited from MetaIO
static const QString ValidFileExtensions
 
- Protected Member Functions inherited from MetaIOTagLib
int getTrackLength (const QString &filename) override
 Find the length of the track (in seconds) More...
 
void ReadGenericMetadata (TagLib::Tag *tag, MusicMetadata *metadata)
 Writes metadata common to all tag formats to the tag. More...
 
- Protected Member Functions inherited from MetaIO
void saveTimeStamps (void)
 
void restoreTimeStamps (void)
 
- Static Protected Member Functions inherited from MetaIOTagLib
static int getTrackLength (TagLib::File *file)
 Find the length of the track (in seconds) More...
 
static void WriteGenericMetadata (TagLib::Tag *tag, const MusicMetadata *metadata)
 Writes metadata common to all tag formats to the tag. More...
 
- Protected Attributes inherited from MetaIO
QString m_filename
 
QString m_filenameFormat
 

Detailed Description

Read and write Vorbis (Xiph) tags in an Ogg container.

Definition at line 21 of file metaiooggvorbis.h.

Constructor & Destructor Documentation

◆ MetaIOOggVorbis()

MetaIOOggVorbis::MetaIOOggVorbis ( void  )
inline

Definition at line 24 of file metaiooggvorbis.h.

◆ ~MetaIOOggVorbis()

MetaIOOggVorbis::~MetaIOOggVorbis ( void  )
default

Member Function Documentation

◆ write()

bool MetaIOOggVorbis::write ( const QString &  filename,
MusicMetadata mdata 
)
overridevirtual

Writes all metadata back to a file.

Parameters
filenameThe filename to write metadata to
mdataA pointer to a MusicMetadata object
Returns
Boolean to indicate success/failure.

Implements MetaIOTagLib.

Definition at line 35 of file metaiooggvorbis.cpp.

Referenced by VorbisEncoder::~VorbisEncoder().

◆ read()

MusicMetadata * MetaIOOggVorbis::read ( const QString &  filename)
overridevirtual

Reads MusicMetadata from a file.

Parameters
filenameThe filename to read metadata from.
Returns
MusicMetadata pointer or nullptr on error

Implements MetaIOTagLib.

Definition at line 92 of file metaiooggvorbis.cpp.

◆ OpenFile()

TagLib::Ogg::Vorbis::File * MetaIOOggVorbis::OpenFile ( const QString &  filename)
staticprivate

Open the file to read the tag.

Parameters
filenameThe filename
Returns
A taglib file object for this format

Definition at line 16 of file metaiooggvorbis.cpp.

Referenced by read(), and write().


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