There's another generic function to deal with comment frames // and another one that deals with apic frames. Since TCOP is a text frame, we have to use the generic function that deals // with text frames. ID3v2_tag * tag = ID3v2_read_tag( "file.mp3") // Load the full tag from the file // Alternatively, the buffer version can be used // ID3v2_Tag* tag = ID3v2_read_tag_from_buffer(buffer, size) if( tag = NULL) It can be one of the previously mentioned tags.įor more examples, go to the test folder. ID3v2_Tag_delete_ where frame is the name of the desired frame to delete.It can be one of the previously mentioned tags.ĭelete frames from the tag, they have the following name pattern: Currently it supports both ID3v1 and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack, TrueAudio, WAV. ID3v2_Tag_set_ where frame is the name of the desired frame to edit.Set new information in a frame, they have the following name pattern: It can be one of the previously mentioned tags. ID3v2_Tag_get_frame where frame is the name of the desired frame to find.Retrieve information from a frame, they have the following name pattern: More in the section about extending functionality. In case less known frames need to be manipulated, general purpose functions that interact with any frame id are also provided. For the most used frames, a set of specific functions is provided. The installer is straightforward with no nonsense to worry about. These functions interacts with the different frames found in the tag. Download MP3tag from its official website to begin. ID3v2_Tag* ID3v2_read_tag_from_buffer(const char* buffer, const int size).ID3v2_TagHeader* ID3v2_read_tag_header_from_buffer(const char* buffer).void ID3v2_delete_tag(const char* file_name)Īlternatively, there's another set of functions that will take a buffer as an argument instead of a file name in case that's preferred/needed:.void ID3v2_write_tag(const char* file_name, ID3v2_Tag* Tag).ID3v2_Tag* ID3v2_read_tag(const char* file_name).ID3v2_TagHeader* ID3v2_read_tag_header(const char* file_name).These functions interacts directly with the file to edit: $ gcc -o example example.c -lid3v2lib APIĮvery intended public facing function or type is prefixed with ID3v2_ to help with autocompletion, prevent conflicts and make identifying wich functions belong to the public API and which functions belong to the internal API easier. To build the library using Make, simply cd into the project's folder and run: Building and Installing Building Using GNU Make in UNIX Systems However, the library can be extended in a very easy way, to read all the tags available. By default, it can read and edit a small subset of well known tags. However, it's not compatible with id3v1 tags. Id3v2lib can read and edit id3 v2.3 and v2.4 tags from mp3 files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |