return f->total_tracks;
}
-int32_t mp4ff_read_data(mp4ff_t * f, void *data, uint32_t size)
+static int32_t mp4ff_read_data(mp4ff_t * f, void *data, uint32_t size)
{
int32_t result = 1;
return (int32_t) result;
}
-uint64_t mp4ff_read_int64(mp4ff_t * f)
+static uint64_t mp4ff_read_int64(mp4ff_t * f)
{
uint8_t data[8];
uint64_t result = 0;
}
/* read atom header, return atom size, atom size is with header included */
-uint64_t mp4ff_atom_read_header(mp4ff_t * f, uint8_t * atom_type,
+static uint64_t mp4ff_atom_read_header(mp4ff_t * f, uint8_t * atom_type,
uint8_t * header_size)
{
uint64_t size;
return size;
}
-int64_t mp4ff_position(const mp4ff_t * f)
+static int64_t mp4ff_position(const mp4ff_t * f)
{
return f->current_position;
}
}
}
-int32_t mp4ff_set_position(mp4ff_t * f, const int64_t position)
+static int32_t mp4ff_set_position(mp4ff_t * f, const int64_t position)
{
f->stream->seek(f->stream->user_data, position);
f->current_position = position;
memset(f->track[f->total_tracks - 1], 0, sizeof (mp4ff_track_t));
}
-uint8_t mp4ff_read_char(mp4ff_t * f)
+static uint8_t mp4ff_read_char(mp4ff_t * f)
{
uint8_t output;
mp4ff_read_data(f, &output, 1);
return output;
}
-uint32_t mp4ff_read_int24(mp4ff_t * f)
+static uint32_t mp4ff_read_int24(mp4ff_t * f)
{
uint32_t result;
uint32_t a, b, c;
return (uint32_t) result;
}
-uint32_t mp4ff_read_int32(mp4ff_t * f)
+static uint32_t mp4ff_read_int32(mp4ff_t * f)
{
uint32_t result;
uint32_t a, b, c, d;
return 0;
}
-uint16_t mp4ff_read_int16(mp4ff_t * f)
+static uint16_t mp4ff_read_int16(mp4ff_t * f)
{
uint32_t result;
uint32_t a, b;
return (uint16_t) result;
}
-uint32_t mp4ff_read_mp4_descr_length(mp4ff_t * f)
+static uint32_t mp4ff_read_mp4_descr_length(mp4ff_t * f)
{
uint8_t b;
uint8_t numBytes = 0;
"Anime", "JPop", "SynthPop",
};
-const char *mp4ff_meta_index_to_genre(uint32_t idx)
+static const char *mp4ff_meta_index_to_genre(uint32_t idx)
{
if (idx > 0 && idx <= sizeof (ID3v1GenreList) / sizeof (ID3v1GenreList[0])) {
return ID3v1GenreList[idx - 1];
}
}
-char *mp4ff_read_string(mp4ff_t * f, uint32_t length)
+static char *mp4ff_read_string(mp4ff_t * f, uint32_t length)
{
char *str = (char *) malloc(length + 1);
if (str != 0) {
return 1;
}
-int32_t mp4ff_parse_metadata(mp4ff_t * f, const int32_t size)
+static int32_t mp4ff_parse_metadata(mp4ff_t * f, const int32_t size)
{
uint64_t subsize, sumsize = 0;
uint8_t atom_type;
return 0;
}
-int32_t mp4ff_atom_read(mp4ff_t * f, const int32_t size,
+static int32_t mp4ff_atom_read(mp4ff_t * f, const int32_t size,
const uint8_t atom_type)
{
uint64_t dest_position = mp4ff_position(f) + size - 8;
}
/* parse atoms that are sub atoms of other atoms */
-int32_t parse_sub_atoms(mp4ff_t * f, const uint64_t total_size, int meta_only)
+static int32_t parse_sub_atoms(mp4ff_t * f, const uint64_t total_size, int meta_only)
{
uint64_t size;
uint8_t atom_type = 0;
}
/* parse root atoms */
-int32_t parse_atoms(mp4ff_t * f, int meta_only)
+static int32_t parse_atoms(mp4ff_t * f, int meta_only)
{
uint64_t size;
uint8_t atom_type = 0;
return ff;
}
-int32_t mp4ff_tag_delete(mp4ff_metadata_t * tags)
+static int32_t mp4ff_tag_delete(mp4ff_metadata_t * tags)
{
uint32_t i;
return 0;
}
-int32_t mp4ff_audio_frame_size(const mp4ff_t * f, const int32_t track,
+static int32_t mp4ff_audio_frame_size(const mp4ff_t * f, const int32_t track,
const int32_t sample)
{
int32_t bytes;
#define stricmp strcasecmp
-membuffer *membuffer_create(void)
+static membuffer *membuffer_create(void)
{
const unsigned initial_size = 256;
return buf;
}
-unsigned membuffer_write(membuffer * buf, const void *ptr, unsigned bytes)
+static unsigned membuffer_write(membuffer * buf, const void *ptr, unsigned bytes)
{
unsigned dest_size = buf->written + bytes;
#define membuffer_write_data membuffer_write
-unsigned membuffer_write_atom_name(membuffer * buf, const char *data)
+static unsigned membuffer_write_atom_name(membuffer * buf, const char *data)
{
return membuffer_write_data(buf, data, 4) == 4 ? 1 : 0;
}
-unsigned membuffer_write_int16(membuffer * buf, uint16_t data)
+static unsigned membuffer_write_int16(membuffer * buf, uint16_t data)
{
uint8_t temp[2] = { (uint8_t) (data >> 8), (uint8_t) data };
return membuffer_write_data(buf, temp, 2);
}
-unsigned membuffer_write_int32(membuffer * buf, uint32_t data)
+static unsigned membuffer_write_int32(membuffer * buf, uint32_t data)
{
uint8_t temp[4] = { (uint8_t) (data >> 24), (uint8_t) (data >> 16),
(uint8_t) (data >> 8), (uint8_t) data };
return param ? atoi(param) : 0;
}
-uint32_t mp4ff_meta_genre_to_index(const char *genrestr)
+static uint32_t mp4ff_meta_genre_to_index(const char *genrestr)
{
unsigned n;
for (n = 0; n < sizeof (ID3v1GenreList) / sizeof (ID3v1GenreList[0]); n++) {
membuffer_write_data(buf, value, strlen(value));
}
-unsigned membuffer_error(const membuffer * buf)
+static unsigned membuffer_error(const membuffer * buf)
{
return buf->error;
}
-void membuffer_free(membuffer * buf)
+static void membuffer_free(membuffer * buf)
{
if (buf->data)
free(buf->data);
free(buf);
}
-unsigned membuffer_get_size(const membuffer * buf)
+static unsigned membuffer_get_size(const membuffer * buf)
{
return buf->written;
}
-void *membuffer_detach(membuffer * buf)
+static void *membuffer_detach(membuffer * buf)
{
void *ret;
return 1;
}
-void membuffer_write_atom(membuffer * buf, const char *name, unsigned size,
+static void membuffer_write_atom(membuffer * buf, const char *name, unsigned size,
const void *data)
{
membuffer_write_int32(buf, size + 8);
membuffer_write_data(buf, data, size);
}
-void *membuffer_get_ptr(const membuffer * buf)
+static void *membuffer_get_ptr(const membuffer * buf)
{
return buf->data;
}
-void membuffer_set_error(membuffer * buf)
+static void membuffer_set_error(membuffer * buf)
{
buf->error = 1;
}
-unsigned membuffer_transfer_from_file(membuffer * buf, mp4ff_t * src,
+static unsigned membuffer_transfer_from_file(membuffer * buf, mp4ff_t * src,
unsigned bytes)
{
unsigned oldsize;
return 1;
}
-int32_t mp4ff_write_data(mp4ff_t * f, void *data, uint32_t size)
+static int32_t mp4ff_write_data(mp4ff_t * f, void *data, uint32_t size)
{
int32_t result = 1;
return result;
}
-int32_t mp4ff_write_int32(mp4ff_t * f, const uint32_t data)
+static int32_t mp4ff_write_int32(mp4ff_t * f, const uint32_t data)
{
uint32_t result;
uint32_t a, b, c, d;
return mp4ff_write_data(f, (uint8_t *) & result, sizeof (result));
}
-int32_t mp4ff_truncate(mp4ff_t * f)
+static int32_t mp4ff_truncate(mp4ff_t * f)
{
return f->stream->truncate(f->stream->user_data);
}