|
id3dev 26.01
An ID3 metadata library
|
#include "id3v1Types.h"

Go to the source code of this file.
Functions | |
| Id3v1Tag * | id3v1TagFromFile (const char *filePath) |
| Creates an Id3v1Tag from a provided file path. | |
| Id3v1Tag * | id3v1CopyTag (Id3v1Tag *toCopy) |
| Creates a deep copy of an Id3v1Tag structure. | |
| int | id3v1WriteTitle (const char *title, Id3v1Tag *tag) |
| Writes a title to an Id3v1Tag. | |
| int | id3v1WriteArtist (const char *artist, Id3v1Tag *tag) |
| Writes an artist to an Id3v1Tag. | |
| int | id3v1WriteAlbum (const char *album, Id3v1Tag *tag) |
| Writes an album to an Id3v1Tag. | |
| int | id3v1WriteYear (int year, Id3v1Tag *tag) |
| Writes a year to an Id3v1Tag. | |
| int | id3v1WriteComment (const char *comment, Id3v1Tag *tag) |
| Writes a comment to an Id3v1Tag. | |
| int | id3v1WriteGenre (Genre genre, Id3v1Tag *tag) |
| Writes a Genre to an Id3v1Tag. | |
| int | id3v1WriteTrack (int track, Id3v1Tag *tag) |
| Writes a track number to an Id3v1Tag. | |
| bool | id3v1CompareTag (const Id3v1Tag *tag1, const Id3v1Tag *tag2) |
| Compares two Id3v1Tag structures for equality. | |
| char * | id3v1GenreFromTable (Genre val) |
| Converts a Genre enum value to it's string representation. | |
| char * | id3v1ReadTitle (const Id3v1Tag *tag) |
| Reads the title member from an Id3v1Tag. | |
| char * | id3v1ReadArtist (const Id3v1Tag *tag) |
| Reads the artist member from an Id3v1Tag. | |
| char * | id3v1ReadAlbum (const Id3v1Tag *tag) |
| Reads the album member from an Id3v1Tag. | |
| int | id3v1ReadYear (const Id3v1Tag *tag) |
| Reads the year member from an Id3v1Tag. | |
| char * | id3v1ReadComment (const Id3v1Tag *tag) |
| Reads the comment member from an Id3v1Tag. | |
| Genre | id3v1ReadGenre (const Id3v1Tag *tag) |
| Reads a Genre from a tag. | |
| int | id3v1ReadTrack (const Id3v1Tag *tag) |
| Reads a track number from a tag. | |
| char * | id3v1ToJSON (const Id3v1Tag *tag) |
| Converts an Id3v1Tag to a JSON string representation. | |
| int | id3v1WriteTagToFile (const char *filePath, const Id3v1Tag *tag) |
| Writes/Overwrites an Id3v1Tag to the bottom of a file . | |
Compares two Id3v1Tag structures for equality.
Performs a field-by-field comparison of all tag members (title, artist, album, year, track, comment, genre).
| tag1 | - The first tag to compare |
| tag2 | - The second tag to compare |
| char * id3v1GenreFromTable | ( | Genre | val | ) |
Converts a Genre enum value to it's string representation.
Maps genre enum values to their corresponding string names. Returns "Other" for unrecognized values as specified by the ID3v1 standard
| val | - The genre enum value to convert |
| char * id3v1ReadAlbum | ( | const Id3v1Tag * | tag | ) |
| char * id3v1ReadArtist | ( | const Id3v1Tag * | tag | ) |
| char * id3v1ReadComment | ( | const Id3v1Tag * | tag | ) |
| char * id3v1ReadTitle | ( | const Id3v1Tag * | tag | ) |
| int id3v1ReadTrack | ( | const Id3v1Tag * | tag | ) |
| int id3v1ReadYear | ( | const Id3v1Tag * | tag | ) |
| Id3v1Tag * id3v1TagFromFile | ( | const char * | filePath | ) |
Creates an Id3v1Tag from a provided file path.
Reads the last 128 bytes from the specified file to extract ID3v1 metadata. The function opens the file in binary read mode, seeks to the position 128 bytes from the end of the file, reads the metadata bytes, and then delegates to id3v1TagFromBuffer for parsing.
| filePath | - The path to the audio file containing ID3v1 metadata. Must not be NULL. |
| char * id3v1ToJSON | ( | const Id3v1Tag * | tag | ) |
Converts an Id3v1Tag to a JSON string representation.
Allocates and returns a JSON-formatted string containing all tag fields. Returns "{}" if tag is NULL. The JSON format is: {"title":"...","artist":"...","album":"...","year":n,"track":n,"comment":"...","genreNumber":n,"genre":"..."}. Caller must free the returned string.
| tag | - The tag to convert. |
| int id3v1WriteAlbum | ( | const char * | album, |
| Id3v1Tag * | tag ) |
| int id3v1WriteArtist | ( | const char * | artist, |
| Id3v1Tag * | tag ) |
| int id3v1WriteComment | ( | const char * | comment, |
| Id3v1Tag * | tag ) |
| int id3v1WriteTagToFile | ( | const char * | filePath, |
| const Id3v1Tag * | tag ) |
Writes/Overwrites an Id3v1Tag to the bottom of a file .
Serializes the tag to ID3v1 binary format and writes it to the file. Creates the file if it doesn't exist, overwrites existing ID3v1 tags if present, or appends to files without tags.
| filePath | - The file path to write to. Must not be NULL. |
| tag | - The tag to write. Must not be NULL. |
| int id3v1WriteTitle | ( | const char * | title, |
| Id3v1Tag * | tag ) |
| int id3v1WriteTrack | ( | int | track, |
| Id3v1Tag * | tag ) |