pianod2
multisource multiuser scriptable networked music player
Static Public Member Functions | Public Attributes | Static Protected Member Functions | List of all members
Media::Metadata Class Reference

#include <metadata.h>

Inheritance diagram for Media::Metadata:
Inheritance graph
[legend]

Static Public Member Functions

static float gainFromiTunesNormalization (const char *)
 Get the iTunes normalization, a/k/a sound check. More...
 
static float gainFromiTunesNormalization (const std::string &value)
 
static float getFileGain (const std::string &filename)
 Get a file's gain for playback. More...
 
static const Metadata getMetadata (const std::string &filename)
 Get metadata using whatever best mechanism is available. More...
 

Public Attributes

std::string artist
 
std::string album
 
std::string title
 
std::string cddb_id
 
std::string genre
 
int year = 0
 
int track_number = 0
 
int track_count = 0
 
int disc_number = 0
 
int disc_count = 0
 
float duration = 0
 
float gain = 0
 

Static Protected Member Functions

static void splitOf (const char *value, int *first, int *second)
 Split a string <number>/<number> into its two components. More...
 
static void splitOf (const std::string &value, int *first, int *second)
 

Member Function Documentation

◆ gainFromiTunesNormalization() [1/2]

float Media::Metadata::gainFromiTunesNormalization ( const char *  value)
static

Get the iTunes normalization, a/k/a sound check.

Parameters
valueThe value from the iTunNORM ID3 comment.
Returns
The gain specified by iTunNORM.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gainFromiTunesNormalization() [2/2]

static float Media::Metadata::gainFromiTunesNormalization ( const std::string &  value)
inlinestatic
Here is the call graph for this function:

◆ getFileGain()

float Media::Metadata::getFileGain ( const std::string &  filename)
static

Get a file's gain for playback.

This is currently done only if:

  • taglib is compiled in.
  • ffmpeg is the media engine. AVFoundation does this itself; taglib only improves over ffmpeg when there is iTunes normalization and not replay gain in the file's metadata.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMetadata()

const Metadata Media::Metadata::getMetadata ( const std::string &  filename)
static

Get metadata using whatever best mechanism is available.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ splitOf() [1/2]

void Media::Metadata::splitOf ( const char *  value,
int *  first,
int *  second 
)
staticprotected

Split a string <number>/<number> into its two components.

Parameters
valueThe string to split.
firstThe value before the slash, or the single value.
secondThe value after a slash, if present.
Here is the caller graph for this function:

◆ splitOf() [2/2]

static void Media::Metadata::splitOf ( const std::string &  value,
int *  first,
int *  second 
)
inlinestaticprotected
Here is the call graph for this function:

Member Data Documentation

◆ album

std::string Media::Metadata::album

◆ artist

std::string Media::Metadata::artist

◆ cddb_id

std::string Media::Metadata::cddb_id

◆ disc_count

int Media::Metadata::disc_count = 0

◆ disc_number

int Media::Metadata::disc_number = 0

◆ duration

float Media::Metadata::duration = 0

◆ gain

float Media::Metadata::gain = 0

◆ genre

std::string Media::Metadata::genre

◆ title

std::string Media::Metadata::title

◆ track_count

int Media::Metadata::track_count = 0

◆ track_number

int Media::Metadata::track_number = 0

◆ year

int Media::Metadata::year = 0

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