libtaginfo
0.2.0
|
A simple, generic interface to common audio meta data fields and media properties. More...
#include <taginfo.h>
Public Member Functions | |
String | get_file_name (void) |
bool | is_valid () |
String | get_album_artist (void) const |
Get the album artist tag of a media track. More... | |
void | set_album_artist (const String new_artist) |
String | get_album (void) const |
Get the album tag of a media track. More... | |
void | set_album (const String new_album) |
String | get_artist (void) const |
Get the artist tag of a media track. More... | |
void | set_artist (const String new_artist) |
int | get_beats_per_minute () const |
Get the BPM of a media track. More... | |
void | set_beats_per_minute (const int new_bpm) |
String | get_comments (void) const |
Get the comments tag of a media track. More... | |
void | set_comments (const String new_comments) |
String | get_composer (void) const |
Get the composer tag of a media track. More... | |
void | set_composer (const String new_composer) |
String | get_copyright (void) const |
Get the copyright tag of a media track. More... | |
void | set_copyright (const String new_copyright) |
String | get_encoder (void) const |
Get the encoder tag of a media track. More... | |
void | set_encoder (const String new_encoder) |
String | get_genre (void) const |
Get the genre of a media track. More... | |
void | set_genre (const String new_genre) |
bool | get_has_image () const |
Get information on the availability of an image. More... | |
String | get_homepage (void) const |
Get the homepage tag of a media track. More... | |
void | set_homepage (const String new_homepage) |
bool | get_is_compilation () const |
Get wether the media file is part of a compilation/various artists album, or not. | |
void | set_is_compilation (bool compilation) |
String | get_original_artist (void) const |
Get the original artist tag of a media track. More... | |
void | set_original_artist (const String new_artist) |
int | get_playcount () const |
Get the playcount tag of a media track. More... | |
void | set_playcount (int new_playcount) |
int | get_rating () const |
void | set_rating (const int new_rating) |
String | get_title (void) const |
Get the title of a media track. More... | |
void | set_title (const String new_title) |
int | get_track_count () const |
void | set_track_count (const int new_track_count) |
int | get_track_number () const |
Get the track_number tag of a media track. More... | |
void | set_track_number (const int new_track_number) |
int | get_volume_count () const |
Get volume count of a media track. (like CD 2 of 3) More... | |
void | set_volume_count (const int count) |
int | get_volume_number () const |
Get volume number of a media track. (like CD 2 of 3) More... | |
void | set_volume_number (const int number) |
int | get_year () const |
Get the year tag of a media track. More... | |
void | set_year (const int new_year) |
int | get_length_seconds () const |
Get the length of the media file in seconds. | |
int | get_bitrate () const |
Get the bitrate of the media file. | |
int | get_channels () const |
Get the number of channels of the media file. | |
int | get_samplerate () const |
Get the samplerate of the media file. | |
StringList | get_track_labels_list () const |
Get a list of embedded track labels. | |
void | set_track_labels_list (const StringList &new_track_labels_list) |
StringList | get_artist_labels_list () const |
Get a list of embedded artist labels. | |
void | set_artist_labels_list (const StringList &new_artist_labels_list) |
StringList | get_album_labels_list () const |
Get a list of embedded album labels. | |
void | set_album_labels_list (const StringList &new_album_labels_list) |
virtual bool | load (void) |
virtual bool | save (void) |
virtual ImageList | get_images () const |
virtual void | set_images (const ImageList images) |
virtual String | get_lyrics (void) const |
virtual void | set_lyrics (const String &lyrics) |
Set an embedded Lyrics String to be saved to Info object. | |
Static Public Member Functions | |
static Info * | create (const String &filename) |
static Info * | create_with_file_type (const String &file, MediaFileType format) |
static Info * | create_from_mime (const String &filename, const String &mime_type) |
Protected Member Functions | |
Info (const String &filename="") | |
Constructor to be called from derrived classes. | |
void | load_base_tags (TagLib::Tag *tag) |
void | save_base_tags (TagLib::Tag *tag) |
Protected Attributes | |
TagLib::FileRef * | taglib_fileref |
TagLib::FileRef of the media file | |
TagLib::File * | taglib_file |
TagLib::File of the media file | |
TagLib::Tag * | taglib_tag |
TagLib::Tag of the media file | |
String | file_name |
The path of the media file. | |
String | title |
Title of the Info object. | |
String | genre |
Genre of the Info object. | |
String | artist |
Artist of the Info object. | |
String | album_artist |
Album artist of the Info object. | |
String | album |
Album of the Info object. | |
String | composer |
Composer of the Info object. | |
String | comments |
Comments of the Info object. | |
String | homepage |
Homepage of the Info object. | |
String | encoder |
Encoder of the Info object. | |
String | copyright |
Copyright of the Info object. | |
String | original_artist |
Original artist of the Info object. | |
int | track_number |
Track number of the Info object. | |
int | track_count |
Track count of the Info object. | |
int | year |
Year of the Info object. | |
bool | is_compilation |
Whether the media file is part of a compilation. | |
int | beats_per_minute |
Speed in beats per minute. | |
int | volume_number |
Volume number of the Info object. | |
int | volume_count |
Volume count of the Info object. | |
int | length_seconds |
Lenght in seconds. | |
int | bitrate |
Bitrate. | |
int | samplerate |
Sample rate. | |
int | channels |
Channel count. | |
int | playcount |
Play count. | |
int | rating |
Rating (1 - 5 stars, 0 not set) | |
StringList | track_labels |
User defined track labels. | |
String | track_labels_string |
User defined track labels as string with "|" as delimiter. | |
StringList | artist_labels |
User defined artist labels. | |
String | artist_labels_string |
User defined artist labels as string with "|" as delimiter. | |
StringList | album_labels |
User defined album labels. | |
String | album_labels_string |
User defined album labels as string with "|" as delimiter. | |
ulong | changedflag |
The setters for the tags on the info object will set these ChangedFlags flags. | |
bool | has_image |
Whether there is image data available. | |
bool | valid |
Whether the info object is valid. | |
A simple, generic interface to common audio meta data fields and media properties.
Info is an abstract base class for media tag reading/writing
|
static |
Create a Info object from a media file.
This is a recommended way for accessing media tags through libtaginfo. create() will return a matching Info subclass
filename | is the path to a media file. |
This function will make use of the file extension to find out the media type
|
static |
Create a Info from
filename | . If |
mime_type | is given, libtaginfo will try to create an Info object for the desired mime_type. This is a recommended way for accessing media tags through libtaginfo. create_from_mime() will return a matching Info subclass |
filename | is the path to a media file. |
mime_type | is the mime type of the media file (e.g. "audio/x-vorbis+ogg") as String. |
|
static |
Create a Info from file. If format is given, libtaginfo will try to create an Info object for the desired format. This is a recommended way for accessing media tags through libtaginfo. create_with_file_type() will return a matching Info subclass
filename | is the path to a media file. |
format | is the MediaFileType. |
String Info::get_album | ( | void | ) | const |
Get the album tag of a media track.
String Info::get_album_artist | ( | void | ) | const |
Get the album artist tag of a media track.
String Info::get_artist | ( | void | ) | const |
Get the artist tag of a media track.
int Info::get_beats_per_minute | ( | ) | const |
Get the BPM of a media track.
String Info::get_comments | ( | void | ) | const |
Get the comments tag of a media track.
String Info::get_composer | ( | void | ) | const |
Get the composer tag of a media track.
String Info::get_copyright | ( | void | ) | const |
Get the copyright tag of a media track.
String Info::get_encoder | ( | void | ) | const |
Get the encoder tag of a media track.
String TagInfo::Info::get_file_name | ( | void | ) |
String Info::get_genre | ( | void | ) | const |
Get the genre of a media track.
bool Info::get_has_image | ( | ) | const |
Get information on the availability of an image.
This information is just a quick lookup if something is there.
String Info::get_homepage | ( | void | ) | const |
Get the homepage tag of a media track.
|
virtual |
Get an array of images from the Info object. The ownership of the images is on the caller side. You have to destroy all the images in the retured array
Reimplemented in TagInfo::FlacInfo, TagInfo::XiphInfo, TagInfo::Id3Info, TagInfo::AsfInfo, TagInfo::ApeTagInfo, and TagInfo::Mp4Info.
|
virtual |
Get an embedded Lyrics String from the Info object.
Reimplemented in TagInfo::XiphInfo, TagInfo::Id3Info, TagInfo::AsfInfo, TagInfo::ApeTagInfo, and TagInfo::Mp4Info.
String Info::get_original_artist | ( | void | ) | const |
Get the original artist tag of a media track.
int Info::get_playcount | ( | ) | const |
Get the playcount tag of a media track.
int Info::get_rating | ( | ) | const |
Get the rating tag of a media track. rating 1 - 5 ; 0 -> not set
String Info::get_title | ( | void | ) | const |
Get the title of a media track.
int Info::get_track_count | ( | ) | const |
Get the track_count tag of a media track. This is the amount of tracks of the album the media file was taken from.
int Info::get_track_number | ( | ) | const |
Get the track_number tag of a media track.
int Info::get_volume_count | ( | ) | const |
Get volume count of a media track. (like CD 2 of 3)
int Info::get_volume_number | ( | ) | const |
Get volume number of a media track. (like CD 2 of 3)
int Info::get_year | ( | ) | const |
Get the year tag of a media track.
bool Info::is_valid | ( | ) |
Information if the media file could be recognized and appears to be valid
|
virtual |
Loads tags and properties from the Info object of a file. String returns are coming as TagLib::String.
Reimplemented in TagInfo::FlacInfo, TagInfo::XiphInfo, TagInfo::Id3Info, TagInfo::ModTagInfo, TagInfo::AsfInfo, TagInfo::ApeTagInfo, and TagInfo::Mp4Info.
|
protected |
Load the abstact basic tags from TagLib::Tag This will only do something if
tag | is not NULL |
|
virtual |
Saves the tags of the Info object to the media file.
Reimplemented in TagInfo::XiphInfo, TagInfo::Id3Info, TagInfo::ModTagInfo, TagInfo::AsfInfo, TagInfo::ApeTagInfo, and TagInfo::Mp4Info.
|
protected |
Save the abstact basic tags to TagLib::Tag This will only do something if
tag | is not NULL |
void Info::set_album | ( | const String | new_album | ) |
void Info::set_album_artist | ( | const String | new_album_artist | ) |
void Info::set_album_labels_list | ( | const StringList & | new_album_labels_list | ) |
void Info::set_artist | ( | const String | new_artist | ) |
void Info::set_artist_labels_list | ( | const StringList & | new_artist_labels_list | ) |
void Info::set_beats_per_minute | ( | const int | new_bpm | ) |
void Info::set_comments | ( | const String | new_comments | ) |
void Info::set_composer | ( | const String | new_composer | ) |
void Info::set_copyright | ( | const String | new_copyright | ) |
void Info::set_encoder | ( | const String | new_encoder | ) |
void Info::set_genre | ( | const String | new_genre | ) |
void Info::set_homepage | ( | const String | new_homepage | ) |
|
virtual |
Set an array of Image to the Info object. The ownership of the images remains on the caller side.
Reimplemented in TagInfo::FlacInfo, TagInfo::XiphInfo, TagInfo::Id3Info, TagInfo::AsfInfo, TagInfo::ApeTagInfo, and TagInfo::Mp4Info.
void Info::set_is_compilation | ( | bool | compilation | ) |
void Info::set_original_artist | ( | const String | new_artist | ) |
void Info::set_playcount | ( | int | new_playcount | ) |
void Info::set_rating | ( | const int | new_rating | ) |
void Info::set_title | ( | const String | new_title | ) |
void Info::set_track_count | ( | const int | new_track_count | ) |
void Info::set_track_labels_list | ( | const StringList & | new_track_labels_list | ) |
void Info::set_track_number | ( | const int | new_track_number | ) |
void Info::set_volume_count | ( | const int | count | ) |
void Info::set_volume_number | ( | const int | number | ) |
void Info::set_year | ( | const int | new_year | ) |