Media source, source parameters and player interfaces.
More...
|
| enum class | ProxyMode { None
, Donor
, Recipient
} |
| | How a source participates in track-source substitutions;. More...
|
| |
| enum class | PersistenceMode { Temporary
, Loaded
, Remember
, Restore
} |
| |
| enum class | SelectionMethod {
Song
, Album
, Artist
, Playlist
,
Random
} |
| | The manner in which shuffling is performed. More...
|
| |
| enum class | Key {
Unknown
, Artist
, Album
, Title
,
Genre
, Comment
, Year
, Track
,
Disc
} |
| |
|
| void | reportLibrariesAndVersions (int verbose) |
| | Report media libraries in use and their versions. More...
|
| |
| static const GValue * | retrieveTag (const GstTagList *tag_list, const gchar *tag, GType type) |
| | Retrieve a value out of the tag list. More...
|
| |
| static void | retrieveTag (const GstTagList *list, const gchar *tag, float *value) |
| | Extract a floating point value from the tag list. More...
|
| |
| static void | retrieveUintTag (const GstTagList *list, const gchar *tag, int *value) |
| | Extract an unsigned integer value from the tag list. More...
|
| |
| static void | retrieveYearTag (const GstTagList *list, const gchar *tag, int *value) |
| | Extract the year from the tag list. More...
|
| |
| static void | retrieveDurationTag (const GstTagList *list, const gchar *tag, float *value) |
| | Extract a string value from the tag list. More...
|
| |
| static void | retrieveTag (const GstTagList *list, const gchar *tag, std::string *value) |
| | Extract a string value from the tag list. More...
|
| |
| constexpr int32_t | KeyCode (int32_t a, int32_t b, int32_t c, int32_t d) |
| |
| static Key | saneKey (const NSString *keySpace, const NSObject *key, const NSObject *commonKey) |
| |
| static std::string | getTagByName (const TagLib::FileRef &file, const char *tagname) |
| | Acquire a metadata field by name. More...
|
| |
| static float | getFileGain (const TagLib::FileRef &file) |
| |
Media source, source parameters and player interfaces.
◆ SourcePtr
◆ Key
| Enumerator |
|---|
| Unknown | |
| Artist | |
| Album | |
| Title | |
| Genre | |
| Comment | |
| Year | |
| Track | |
| Disc | |
◆ PersistenceMode
| Enumerator |
|---|
| Temporary | Provided from command line, store neither settings nor indexes.
|
| Loaded | Values loaded from stored data, do not update settings but do update indexes.
|
| Remember | Store it, store indexes, but manually restore only.
|
| Restore | Store it, store indexes, and automatically restore on startup.
|
◆ ProxyMode
How a source participates in track-source substitutions;.
| Enumerator |
|---|
| None | Source does not participate.
|
| Donor | Source provides substitute tracks.
|
| Recipient | Source wants its tracks replaced when possible.
|
◆ SelectionMethod
The manner in which shuffling is performed.
| Enumerator |
|---|
| Song | Songs are picked randomly from the union of applicable playlists.
|
| Album | An entire album is picked randomly from a playlist.
|
| Artist | An artist is picked randomly, then a few of their songs are picked.
|
| Playlist | A playlist is picked randomly, then a few of its songs randomly.
|
| Random | One of the above methods is randomly chosen.
|
◆ getFileGain()
| static float Media::getFileGain |
( |
const TagLib::FileRef & |
file | ) |
|
|
static |
Extract replay gain. libavformat does this sometime, but since there are so many standards to choose from (ID3, APE, iTunes, some others) it doesn't over them all. Here we cover the iTunes case, which libavformat & gstreamer ignore.
◆ getTagByName()
| static std::string Media::getTagByName |
( |
const TagLib::FileRef & |
file, |
|
|
const char * |
tagname |
|
) |
| |
|
static |
Acquire a metadata field by name.
- Parameters
-
| file | A taglib file handle. |
| tagname | The metadata field name. |
- Returns
- The data found, or an empty string.
◆ KeyCode()
| constexpr int32_t Media::KeyCode |
( |
int32_t |
a, |
|
|
int32_t |
b, |
|
|
int32_t |
c, |
|
|
int32_t |
d |
|
) |
| |
|
constexpr |
◆ reportLibrariesAndVersions()
| void Media::reportLibrariesAndVersions |
( |
int |
verbose | ) |
|
Report media libraries in use and their versions.
- Parameters
-
| verbose | If >0, include additional details. |
◆ retrieveDurationTag()
| static void Media::retrieveDurationTag |
( |
const GstTagList * |
list, |
|
|
const gchar * |
tag, |
|
|
float * |
value |
|
) |
| |
|
static |
Extract a string value from the tag list.
- Parameters
-
| list | A dictionary of tags and values. |
| tag | The tag whose value to retrieve. |
| value | The variable to retrieve into. |
◆ retrieveTag() [1/3]
| static void Media::retrieveTag |
( |
const GstTagList * |
list, |
|
|
const gchar * |
tag, |
|
|
float * |
value |
|
) |
| |
|
static |
Extract a floating point value from the tag list.
- Parameters
-
| list | A dictionary of tags and values. |
| tag | The tag whose value to retrieve. |
| value | The variable to retrieve into. |
◆ retrieveTag() [2/3]
| static void Media::retrieveTag |
( |
const GstTagList * |
list, |
|
|
const gchar * |
tag, |
|
|
std::string * |
value |
|
) |
| |
|
static |
Extract a string value from the tag list.
- Parameters
-
| list | A dictionary of tags and values. |
| tag | The tag whose value to retrieve. |
| value | The variable to retrieve into. |
◆ retrieveTag() [3/3]
| static const GValue* Media::retrieveTag |
( |
const GstTagList * |
tag_list, |
|
|
const gchar * |
tag, |
|
|
GType |
type |
|
) |
| |
|
static |
Retrieve a value out of the tag list.
- Parameters
-
| tag_list | The tag collection to extract a value from. |
| tag | The tag whose value to retrieve. |
| type | The expected datatype of the tag's value. |
- Returns
- If found an the expected type, the value, otherwise null.
◆ retrieveUintTag()
| static void Media::retrieveUintTag |
( |
const GstTagList * |
list, |
|
|
const gchar * |
tag, |
|
|
int * |
value |
|
) |
| |
|
static |
Extract an unsigned integer value from the tag list.
- Parameters
-
| list | A dictionary of tags and values. |
| tag | The tag whose value to retrieve. |
| value | The variable to retrieve into. |
◆ retrieveYearTag()
| static void Media::retrieveYearTag |
( |
const GstTagList * |
list, |
|
|
const gchar * |
tag, |
|
|
int * |
value |
|
) |
| |
|
static |
Extract the year from the tag list.
- Parameters
-
| list | A dictionary of tags and values. |
| tag | The tag whose value to retrieve. |
| value | The variable to retrieve into. |
◆ saneKey()
| static Key Media::saneKey |
( |
const NSString * |
keySpace, |
|
|
const NSObject * |
key, |
|
|
const NSObject * |
commonKey |
|
) |
| |
|
static |
◆ media_formats
| const char* Media::media_formats[] |
|
static |
Initial value:= {
".mp3",
".m4a",
".flac",
".wav",
".mp4a",
".wma",
".snd",
".aiff",
".aac",
".ogg",
".mpa",
".alac",
nullptr
}
◆ PersistenceWords
Initial value:{
{ "none", PersistenceMode::Temporary },
{ "remember", PersistenceMode::Remember },
{ "restore", PersistenceMode::Restore }
}
◆ ProxyWords
Initial value:{
{ "none", ProxyMode::None },
{ "donor", ProxyMode::Donor },
{ "recipient", ProxyMode::Recipient }
}