Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

Info tag data structure
Representation of available information of processed audio file. More...

Topics

 Value Help
 

Classes

class  kodi::addon::AudioDecoderInfoTag
 

Functions

void kodi::addon::AudioDecoderInfoTag::SetTitle (const std::string &title)
 Set the title from music as string on info tag.
 
std::string kodi::addon::AudioDecoderInfoTag::GetTitle () const
 Get title name.
 
void kodi::addon::AudioDecoderInfoTag::SetArtist (const std::string &artist)
 Set artist name.
 
std::string kodi::addon::AudioDecoderInfoTag::GetArtist () const
 Get artist name.
 
void kodi::addon::AudioDecoderInfoTag::SetAlbum (const std::string &album)
 Set album name.
 
std::string kodi::addon::AudioDecoderInfoTag::GetAlbum () const
 Set album name.
 
void kodi::addon::AudioDecoderInfoTag::SetAlbumArtist (const std::string &albumArtist)
 Set album artist name.
 
std::string kodi::addon::AudioDecoderInfoTag::GetAlbumArtist () const
 Get album artist name.
 
void kodi::addon::AudioDecoderInfoTag::SetMediaType (const std::string &mediaType)
 Set the media type of the music item.
 
std::string kodi::addon::AudioDecoderInfoTag::GetMediaType () const
 Get the media type of the music item.
 
void kodi::addon::AudioDecoderInfoTag::SetGenre (const std::string &genre)
 Set genre name from music as string if present.
 
std::string kodi::addon::AudioDecoderInfoTag::GetGenre () const
 Get genre name from music as string if present.
 
void kodi::addon::AudioDecoderInfoTag::SetDuration (int duration)
 Set the duration of music as integer from info.
 
int kodi::addon::AudioDecoderInfoTag::GetDuration () const
 Get the duration of music as integer from info.
 
void kodi::addon::AudioDecoderInfoTag::SetTrack (int track)
 Set track number (if present) from music info as integer.
 
int kodi::addon::AudioDecoderInfoTag::GetTrack () const
 Get track number (if present).
 
void kodi::addon::AudioDecoderInfoTag::SetDisc (int disc)
 Set disk number (if present) from music info as integer.
 
int kodi::addon::AudioDecoderInfoTag::GetDisc () const
 Get disk number (if present)
 
void kodi::addon::AudioDecoderInfoTag::SetDiscSubtitle (const std::string &discSubtitle)
 Set disk subtitle name (if present) from music info.
 
std::string kodi::addon::AudioDecoderInfoTag::GetDiscSubtitle () const
 Get disk subtitle name (if present) from music info.
 
void kodi::addon::AudioDecoderInfoTag::SetDiscTotal (int discTotal)
 Set disks amount quantity (if present) from music info as integer.
 
int kodi::addon::AudioDecoderInfoTag::GetDiscTotal () const
 Get disks amount quantity (if present)
 
void kodi::addon::AudioDecoderInfoTag::SetReleaseDate (const std::string &releaseDate)
 Set release date as string from music info (if present).
ISO8601 date YYYY, YYYY-MM or YYYY-MM-DD.
 
std::string kodi::addon::AudioDecoderInfoTag::GetReleaseDate () const
 Get release date as string from music info (if present).
 
void kodi::addon::AudioDecoderInfoTag::SetLyrics (const std::string &lyrics)
 Set string from lyrics.
 
std::string kodi::addon::AudioDecoderInfoTag::GetLyrics () const
 Get string from lyrics.
 
void kodi::addon::AudioDecoderInfoTag::SetSamplerate (int samplerate)
 Set related stream samplerate.
 
int kodi::addon::AudioDecoderInfoTag::GetSamplerate () const
 Get related stream samplerate.
 
void kodi::addon::AudioDecoderInfoTag::SetChannels (int channels)
 Set related stream channels amount.
 
int kodi::addon::AudioDecoderInfoTag::GetChannels () const
 Get related stream channels amount.
 
void kodi::addon::AudioDecoderInfoTag::SetBitrate (int bitrate)
 Set related stream bitrate.
 
int kodi::addon::AudioDecoderInfoTag::GetBitrate () const
 Get related stream bitrate.
 
void kodi::addon::AudioDecoderInfoTag::SetComment (const std::string &comment)
 Set additional information comment (if present).
 
std::string kodi::addon::AudioDecoderInfoTag::GetComment () const
 Get additional information comment (if present).
 
void kodi::addon::AudioDecoderInfoTag::SetCoverArtByPath (const std::string &path)
 Set cover art image by path.
 
std::string kodi::addon::AudioDecoderInfoTag::GetCoverArtByPath () const
 Get cover art image path.
 
void kodi::addon::AudioDecoderInfoTag::SetCoverArtByMem (const uint8_t *data, size_t size, const std::string &mimetype)
 Set cover art image by memory.
 
const uint8_tkodi::addon::AudioDecoderInfoTag::GetCoverArtByMem (size_t &size, std::string &mimetype) const
 Get cover art data by memory.
 

Detailed Description

Info tag data structure
Representation of available information of processed audio file.

This is used to store all the necessary data of audio stream and to have on e.g. GUI for information.


The following table contains values that can be set with class AudioDecoderInfoTag :

Name Type Set call Get call
Title std::string SetTitle GetTitle
Artist std::string SetArtist GetArtist
Album std::string SetAlbum GetAlbum
Album artist std::string SetAlbumArtist GetAlbumArtist
Media type std::string SetMediaType GetMediaType
Genre std::string SetGenre GetGenre
Duration int SetDuration GetDuration
Track number int SetTrack GetTrack
Disc number int SetDisc GetDisc
Disc subtitle name std::string SetDiscSubtitle GetDiscSubtitle
Disc total amount int SetDiscTotal GetDiscTotal
Release date std::string SetReleaseDate GetReleaseDate
Lyrics std::string SetLyrics GetLyrics
Samplerate int SetSamplerate GetSamplerate
Channels amount int SetChannels GetChannels
Bitrate int SetBitrate GetBitrate
Comment text std::string SetComment GetComment
Cover art by path std::string SetCoverArtByPath GetCoverArtByPath
Cover art by memory std::string SetCoverArtByMem GetCoverArtByMem

Function Documentation

◆ GetAlbum()

std::string kodi::addon::AudioDecoderInfoTag::GetAlbum ( ) const
inline

Set album name.

◆ GetAlbumArtist()

std::string kodi::addon::AudioDecoderInfoTag::GetAlbumArtist ( ) const
inline

Get album artist name.

◆ GetArtist()

std::string kodi::addon::AudioDecoderInfoTag::GetArtist ( ) const
inline

Get artist name.

◆ GetBitrate()

int kodi::addon::AudioDecoderInfoTag::GetBitrate ( ) const
inline

Get related stream bitrate.

◆ GetChannels()

int kodi::addon::AudioDecoderInfoTag::GetChannels ( ) const
inline

Get related stream channels amount.

◆ GetComment()

std::string kodi::addon::AudioDecoderInfoTag::GetComment ( ) const
inline

Get additional information comment (if present).

◆ GetCoverArtByMem()

const uint8_t * kodi::addon::AudioDecoderInfoTag::GetCoverArtByMem ( size_t & size,
std::string & mimetype ) const
inline

Get cover art data by memory.

Parameters
[out]sizeStored size about art image
[in]mimetypeRelated image mimetype to stored data
Returns
Image data
Note
This only works if SetCoverArtByMem was used before
Warning
This function is not thread safe and related data should never be changed by SetCoverArtByMem, if data from here is used without copy!

◆ GetCoverArtByPath()

std::string kodi::addon::AudioDecoderInfoTag::GetCoverArtByPath ( ) const
inline

Get cover art image path.

Returns
Image position path
Note
Only be available if set before by SetCoverArtByPath. Cannot be combined with SetCoverArtByMem and GetCoverArtByMem.

◆ GetDisc()

int kodi::addon::AudioDecoderInfoTag::GetDisc ( ) const
inline

Get disk number (if present)

◆ GetDiscSubtitle()

std::string kodi::addon::AudioDecoderInfoTag::GetDiscSubtitle ( ) const
inline

Get disk subtitle name (if present) from music info.

◆ GetDiscTotal()

int kodi::addon::AudioDecoderInfoTag::GetDiscTotal ( ) const
inline

Get disks amount quantity (if present)

◆ GetDuration()

int kodi::addon::AudioDecoderInfoTag::GetDuration ( ) const
inline

Get the duration of music as integer from info.

◆ GetGenre()

std::string kodi::addon::AudioDecoderInfoTag::GetGenre ( ) const
inline

Get genre name from music as string if present.

◆ GetLyrics()

std::string kodi::addon::AudioDecoderInfoTag::GetLyrics ( ) const
inline

Get string from lyrics.

◆ GetMediaType()

std::string kodi::addon::AudioDecoderInfoTag::GetMediaType ( ) const
inline

Get the media type of the music item.

◆ GetReleaseDate()

std::string kodi::addon::AudioDecoderInfoTag::GetReleaseDate ( ) const
inline

Get release date as string from music info (if present).

◆ GetSamplerate()

int kodi::addon::AudioDecoderInfoTag::GetSamplerate ( ) const
inline

Get related stream samplerate.

◆ GetTitle()

std::string kodi::addon::AudioDecoderInfoTag::GetTitle ( ) const
inline

Get title name.

◆ GetTrack()

int kodi::addon::AudioDecoderInfoTag::GetTrack ( ) const
inline

Get track number (if present).

◆ SetAlbum()

void kodi::addon::AudioDecoderInfoTag::SetAlbum ( const std::string & album)
inline

Set album name.

◆ SetAlbumArtist()

void kodi::addon::AudioDecoderInfoTag::SetAlbumArtist ( const std::string & albumArtist)
inline

Set album artist name.

◆ SetArtist()

void kodi::addon::AudioDecoderInfoTag::SetArtist ( const std::string & artist)
inline

Set artist name.

◆ SetBitrate()

void kodi::addon::AudioDecoderInfoTag::SetBitrate ( int bitrate)
inline

Set related stream bitrate.

◆ SetChannels()

void kodi::addon::AudioDecoderInfoTag::SetChannels ( int channels)
inline

Set related stream channels amount.

◆ SetComment()

void kodi::addon::AudioDecoderInfoTag::SetComment ( const std::string & comment)
inline

Set additional information comment (if present).

◆ SetCoverArtByMem()

void kodi::addon::AudioDecoderInfoTag::SetCoverArtByMem ( const uint8_t * data,
size_t size,
const std::string & mimetype )
inline

Set cover art image by memory.

Parameters
[in]dataImage data
[in]sizeImage data size
[in]mimetypeImage format mimetype Possible mimetypes:
  • "image/jpeg"
  • "image/png"
  • "image/gif"
  • "image/bmp"

◆ SetCoverArtByPath()

void kodi::addon::AudioDecoderInfoTag::SetCoverArtByPath ( const std::string & path)
inline

Set cover art image by path.

Parameters
[in]pathImage position path
Note
Cannot be combined with SetCoverArtByMem and GetCoverArtByMem.

◆ SetDisc()

void kodi::addon::AudioDecoderInfoTag::SetDisc ( int disc)
inline

Set disk number (if present) from music info as integer.

◆ SetDiscSubtitle()

void kodi::addon::AudioDecoderInfoTag::SetDiscSubtitle ( const std::string & discSubtitle)
inline

Set disk subtitle name (if present) from music info.

◆ SetDiscTotal()

void kodi::addon::AudioDecoderInfoTag::SetDiscTotal ( int discTotal)
inline

Set disks amount quantity (if present) from music info as integer.

◆ SetDuration()

void kodi::addon::AudioDecoderInfoTag::SetDuration ( int duration)
inline

Set the duration of music as integer from info.

◆ SetGenre()

void kodi::addon::AudioDecoderInfoTag::SetGenre ( const std::string & genre)
inline

Set genre name from music as string if present.

◆ SetLyrics()

void kodi::addon::AudioDecoderInfoTag::SetLyrics ( const std::string & lyrics)
inline

Set string from lyrics.

◆ SetMediaType()

void kodi::addon::AudioDecoderInfoTag::SetMediaType ( const std::string & mediaType)
inline

Set the media type of the music item.

Available strings about media type for music:

String Description
artist If it is defined as an artist
album If it is defined as an album
music If it is defined as an music
song If it is defined as a song

◆ SetReleaseDate()

void kodi::addon::AudioDecoderInfoTag::SetReleaseDate ( const std::string & releaseDate)
inline

Set release date as string from music info (if present).
ISO8601 date YYYY, YYYY-MM or YYYY-MM-DD.

◆ SetSamplerate()

void kodi::addon::AudioDecoderInfoTag::SetSamplerate ( int samplerate)
inline

Set related stream samplerate.

◆ SetTitle()

void kodi::addon::AudioDecoderInfoTag::SetTitle ( const std::string & title)
inline

Set the title from music as string on info tag.

◆ SetTrack()

void kodi::addon::AudioDecoderInfoTag::SetTrack ( int track)
inline

Set track number (if present) from music info as integer.