taglib.tag_c

Undocumented in source.

Members

Enums

TagLib_File_Type
enum TagLib_File_Type

File type

TagLib_ID3v2_Encoding
enum TagLib_ID3v2_Encoding

Special convenience ID3v2 functions

TagLib_Variant_Type
enum TagLib_Variant_Type

Types which can be stored in a TagLib_Variant.

Functions

taglib_audioproperties_bitrate
int taglib_audioproperties_bitrate(const(TagLib_AudioProperties)* audioProperties)

Returns the bitrate of the file in kb/s.

taglib_audioproperties_channels
int taglib_audioproperties_channels(const(TagLib_AudioProperties)* audioProperties)

Returns the number of channels in the audio stream.

taglib_audioproperties_length
int taglib_audioproperties_length(const(TagLib_AudioProperties)* audioProperties)

Returns the length of the file in seconds.

taglib_audioproperties_samplerate
int taglib_audioproperties_samplerate(const(TagLib_AudioProperties)* audioProperties)

Returns the sample rate of the file in Hz.

taglib_complex_property_free
void taglib_complex_property_free(TagLib_Complex_Property_Attribute*** props)

Frees the null terminated array props of property attribute arrays (as returned by taglib_complex_property_get()) and the data such as C-strings and byte vectors contained in these attributes.

taglib_complex_property_free_keys
void taglib_complex_property_free_keys(char** keys)

Frees the null terminated array keys (as returned by taglib_complex_property_keys()) and the C-strings it contains.

taglib_complex_property_get
TagLib_Complex_Property_Attribute*** taglib_complex_property_get(const(TagLib_File)* file, const(char)* key)

Get value(s) of complex property key.

taglib_complex_property_keys
char** taglib_complex_property_keys(const(TagLib_File)* file)

Get the keys of the complex properties.

taglib_complex_property_set
bool taglib_complex_property_set(TagLib_File* file, const(char)* key, const(TagLib_Complex_Property_Attribute**) value)

Sets the complex property key with value. Use value = null to remove the property, otherwise it will be replaced with the null terminated array of attributes in value.

taglib_complex_property_set_append
bool taglib_complex_property_set_append(TagLib_File* file, const(char)* key, const(TagLib_Complex_Property_Attribute**) value)

Appends value to the complex property key (sets it if non-existing). Use value = null to remove all values associated with the key.

taglib_file_audioproperties
const(TagLib_AudioProperties)* taglib_file_audioproperties(const(TagLib_File)* file)

Returns a pointer to the audio properties associated with this file. This will be freed automatically when the file is freed.

taglib_file_free
void taglib_file_free(TagLib_File* file)

Frees and closes the file.

taglib_file_is_valid
bool taglib_file_is_valid(const(TagLib_File)* file)

Returns true if the file is open and readable and valid information for the Tag and / or AudioProperties was found.

taglib_file_new
TagLib_File* taglib_file_new(const(char)* filename)

Creates a TagLib file based on filename. TagLib will try to guess the file type.

taglib_file_new_iostream
TagLib_File* taglib_file_new_iostream(TagLib_IOStream* stream)

Creates a TagLib file from a stream. A byte vector stream can be used to read a file from memory and write to memory, e.g. when fetching network data. The stream has to be created using taglib_memory_iostream_new() and shall be freed using taglib_iostream_free() after this file is freed with taglib_file_free().

taglib_file_new_type
TagLib_File* taglib_file_new_type(const(char)* filename, TagLib_File_Type type)

Creates a TagLib file based on filename. Rather than attempting to guess the type, it will use the one specified by type.

taglib_file_save
bool taglib_file_save(TagLib_File* file)

Saves the file to disk.

taglib_file_tag
TagLib_Tag* taglib_file_tag(const(TagLib_File)* file)

Returns a pointer to the tag associated with this file. This will be freed automatically when the file is freed.

taglib_free
void taglib_free(void* pointer)

Explicitly free a string returned from TagLib

taglib_id3v2_set_default_text_encoding
void taglib_id3v2_set_default_text_encoding(TagLib_ID3v2_Encoding encoding)

This sets the default encoding for ID3v2 frames that are written to tags.

taglib_iostream_free
void taglib_iostream_free(TagLib_IOStream* stream)

Frees and closes the stream.

taglib_memory_iostream_new
TagLib_IOStream* taglib_memory_iostream_new(const(char)* data, uint size)

Creates a byte vector stream from size bytes of data. Such a stream can be used with taglib_file_new_iostream() to create a file from memory.

taglib_picture_from_complex_property
void taglib_picture_from_complex_property(TagLib_Complex_Property_Attribute*** properties, TagLib_Complex_Property_Picture_Data* picture)

Extract the complex property values of a picture.

taglib_property_free
void taglib_property_free(char** props)

Frees the null terminated array props and the C-strings it contains.

taglib_property_get
char** taglib_property_get(const(TagLib_File)* file, const(char)* prop)

Get value(s) of property prop.

taglib_property_keys
char** taglib_property_keys(const(TagLib_File)* file)

Get the keys of the property map.

taglib_property_set
void taglib_property_set(TagLib_File* file, const(char)* prop, const(char)* value)

Sets the property prop with value. Use value = null to remove the property, otherwise it will be replaced.

taglib_property_set_append
void taglib_property_set_append(TagLib_File* file, const(char)* prop, const(char)* value)

Appends value to the property prop (sets it if non-existing). Use value = null to remove all values associated with the property.

taglib_set_string_management_enabled
void taglib_set_string_management_enabled(bool management)

TagLib can keep track of strings that are created when outputting tag values and clear them using taglib_tag_clear_strings(). This is enabled by default. However if you wish to do more fine grained management of strings, you can do so by setting management to false.

taglib_set_strings_unicode
void taglib_set_strings_unicode(bool unicode)

By default all strings coming into or out of TagLib's C API are in UTF8. However, it may be desirable for TagLib to operate on Latin1 (ISO-8859-1) strings in which case this should be set to false.

taglib_tag_album
char* taglib_tag_album(const(TagLib_Tag)* tag)

Returns a string with this tag's album name.

taglib_tag_artist
char* taglib_tag_artist(const(TagLib_Tag)* tag)

Returns a string with this tag's artist.

taglib_tag_comment
char* taglib_tag_comment(const(TagLib_Tag)* tag)

Returns a string with this tag's comment.

taglib_tag_free_strings
void taglib_tag_free_strings()

Frees all of the strings that have been created by the tag.

taglib_tag_genre
char* taglib_tag_genre(const(TagLib_Tag)* tag)

Returns a string with this tag's genre.

taglib_tag_set_album
void taglib_tag_set_album(TagLib_Tag* tag, const(char)* album)

Sets the tag's album.

taglib_tag_set_artist
void taglib_tag_set_artist(TagLib_Tag* tag, const(char)* artist)

Sets the tag's artist.

taglib_tag_set_comment
void taglib_tag_set_comment(TagLib_Tag* tag, const(char)* comment)

Sets the tag's comment.

taglib_tag_set_genre
void taglib_tag_set_genre(TagLib_Tag* tag, const(char)* genre)

Sets the tag's genre.

taglib_tag_set_title
void taglib_tag_set_title(TagLib_Tag* tag, const(char)* title)

Sets the tag's title.

taglib_tag_set_track
void taglib_tag_set_track(TagLib_Tag* tag, uint track)

Sets the tag's track number. 0 indicates that this field should be cleared.

taglib_tag_set_year
void taglib_tag_set_year(TagLib_Tag* tag, uint year)

Sets the tag's year. 0 indicates that this field should be cleared.

taglib_tag_title
char* taglib_tag_title(const(TagLib_Tag)* tag)

Returns a string with this tag's title.

taglib_tag_track
uint taglib_tag_track(const(TagLib_Tag)* tag)

Returns the tag's track number or 0 if the track number is not set.

taglib_tag_year
uint taglib_tag_year(const(TagLib_Tag)* tag)

Returns the tag's year or 0 if the year is not set.

Structs

TagLib_Complex_Property_Attribute
struct TagLib_Complex_Property_Attribute

Attribute of a complex property. Complex properties consist of a null-terminated array of pointers to this structure with key and value.

TagLib_Complex_Property_Picture_Data
struct TagLib_Complex_Property_Picture_Data

Picture data extracted from a complex property by the convenience function taglib_picture_from_complex_property().

TagLib_Variant
struct TagLib_Variant

Discriminated union used in complex property attributes.