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

Read and write metadata in Wavpack APE tags. More...

#include <libmythmetadata/metaiowavpack.h>

Inheritance diagram for MetaIOWavPack:
[legend]
Collaboration diagram for MetaIOWavPack:
[legend]

Public Member Functions

 MetaIOWavPack (void)=default
 
 ~MetaIOWavPack (void) override=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)=default
 
 ~MetaIOTagLib (void) override=default
 
- Public Member Functions inherited from MetaIO
 MetaIO (void)
 
virtual ~MetaIO (void)=default
 
virtual bool writeVolatileMetadata ([[maybe_unused]] const QString &filename, [[maybe_unused]] 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 ([[maybe_unused]] const QString &filename)
 Reads the list of embedded images in the tag. More...
 
virtual bool writeAlbumArt ([[maybe_unused]] const QString &filename, [[maybe_unused]] const AlbumArtImage *albumart)
 
virtual bool removeAlbumArt ([[maybe_unused]] const QString &filename, [[maybe_unused]] const AlbumArtImage *albumart)
 
virtual bool changeImageType ([[maybe_unused]] const QString &filename, [[maybe_unused]] const AlbumArtImage *albumart, [[maybe_unused]] ImageType newType)
 
virtual QImage * getAlbumArt ([[maybe_unused]] const QString &filename, [[maybe_unused]] 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 ([[maybe_unused]] const QString &filename)
 

Static Private Member Functions

static TagLib::WavPack::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 kValidFileExtensions
 
- Protected Member Functions inherited from MetaIOTagLib
std::chrono::milliseconds getTrackLength (const QString &filename) override
 Find the length of the track (in milliseconds) 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 std::chrono::milliseconds getTrackLength (TagLib::File *file)
 Find the length of the track (in milliseconds) 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 metadata in Wavpack APE tags.

N.B. No write support

Definition at line 23 of file metaiowavpack.h.

Constructor & Destructor Documentation

◆ MetaIOWavPack()

MetaIOWavPack::MetaIOWavPack ( void  )
default

◆ ~MetaIOWavPack()

MetaIOWavPack::~MetaIOWavPack ( void  )
overridedefault

Member Function Documentation

◆ write()

bool MetaIOWavPack::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 39 of file metaiowavpack.cpp.

◆ read()

MusicMetadata * MetaIOWavPack::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 89 of file metaiowavpack.cpp.

◆ OpenFile()

TagLib::WavPack::File * MetaIOWavPack::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 21 of file metaiowavpack.cpp.

Referenced by read(), and write().


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