libcfe  0.12.1
some useful C-functions
id3.c File Reference
#include "config.h"
#include "id3.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "len.h"
#include "int_to_bit.h"
#include "ustrncpy.h"
Include dependency graph for id3.c:

Go to the source code of this file.

Macros

#define ID3_MAJOR_VERSION   3
 

Functions

int ID3_tag_init (ID3_tag *t)
 
int ID3_tag_add_data (ID3_tag *tag, uint8_t t1, uint8_t t2, uint8_t t3, uint8_t t4, char *data)
 
int ID3_tag_fwrite (ID3_tag *t, FILE *fp)
 
int ID3_tag_write (ID3_tag *tag, char *filename)
 

Macro Definition Documentation

◆ ID3_MAJOR_VERSION

#define ID3_MAJOR_VERSION   3

Definition at line 12 of file id3.c.

Function Documentation

◆ ID3_tag_add_data()

int ID3_tag_add_data ( ID3_tag tag,
uint8_t  t1,
uint8_t  t2,
uint8_t  t3,
uint8_t  t4,
char *  data 
)

Store data in an ID3 tag.

Parameters
[in]tagThe ID3 tag to store the data in.
[in]t1,t2,t3,t4Identifies the type of data.
[in]dataThe data to store.
Returns
return value
  • 0 succeed
  • -1 wrong tag major version

Definition at line 26 of file id3.c.

Here is the call graph for this function:

◆ ID3_tag_fwrite()

int ID3_tag_fwrite ( ID3_tag t,
FILE *  fp 
)

Write an ID3 tag to a file.

Parameters
[in]tThe ID3 tag to write.
[in]fpA file pointer.
Returns
return value
  • 0 succeed
  • -1 wrong tag major version

Definition at line 79 of file id3.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ID3_tag_init()

int ID3_tag_init ( ID3_tag t)

Initialize an empty ID3 tag.

Parameters
[in,out]tID3 tag
Returns
always zero

Definition at line 14 of file id3.c.

◆ ID3_tag_write()

int ID3_tag_write ( ID3_tag tag,
char *  filename 
)

Write an ID3 tag to a file.

Parameters
[in]tagThe ID3 tag to write.
[in]filenameA pointer to a string representing a filename.
Returns
return value
  • 0 succeed
  • -1 wrong tag major version

Definition at line 129 of file id3.c.

Here is the call graph for this function: