3 uint32_t (*read)(void *user_data, void *buffer, uint32_t length);
4 uint32_t (*write)(void *udata, void *buffer, uint32_t length);
5 uint32_t (*seek)(void *user_data, uint64_t position);
6 uint32_t (*truncate)(void *user_data);
20 int32_t stsd_entry_count;
23 int32_t stsz_sample_size;
24 int32_t stsz_sample_count;
28 int32_t stts_entry_count;
29 int32_t *stts_sample_count;
30 int32_t *stts_sample_delta;
33 int32_t stsc_entry_count;
34 int32_t *stsc_first_chunk;
35 int32_t *stsc_samples_per_chunk;
36 int32_t *stsc_sample_desc_index;
39 int32_t stco_entry_count;
40 int32_t *stco_chunk_offset;
43 int32_t ctts_entry_count;
44 int32_t *ctts_sample_count;
45 int32_t *ctts_sample_offset;
48 uint8_t *decoderConfig;
49 int32_t decoderConfigLen;
59 #define MAX_TRACKS 1024
74 /* mp4 main file structure */
77 /* stream to read from */
78 mp4ff_callback_t *stream;
79 int64_t current_position;
91 /* incremental track index while reading the file */
95 mp4ff_track_t *track[MAX_TRACKS];
98 mp4ff_metadata_t tags;
101 void mp4ff_set_sample_position(mp4ff_t *f, const int32_t track, const int32_t sample);
102 int32_t mp4ff_total_tracks(const mp4ff_t *f);
103 void mp4ff_get_decoder_config(const mp4ff_t *f, const int track,
104 unsigned char** ppBuf, unsigned int* pBufSize);
105 mp4ff_t *mp4ff_open_read(mp4ff_callback_t *f);
106 void mp4ff_close(mp4ff_t *f);
107 int32_t mp4ff_get_sample_size(const mp4ff_t *f, int track, int sample);
108 uint32_t mp4ff_get_sample_rate(const mp4ff_t *f, const int32_t track);
109 uint32_t mp4ff_get_channel_count(const mp4ff_t * f,const int32_t track);
110 int32_t mp4ff_num_samples(const mp4ff_t *f, const int track);
111 mp4ff_t *mp4ff_open_read_metaonly(mp4ff_callback_t *f);
113 int mp4ff_meta_get_by_index(const mp4ff_t *f, unsigned int index,
114 char **item, char **value);
115 int32_t mp4ff_meta_update(mp4ff_callback_t *f,const mp4ff_metadata_t * data);
117 int mp4ff_meta_get_num_items(const mp4ff_t *f);
118 int mp4ff_meta_get_artist(const mp4ff_t *f, char **value);
119 int mp4ff_meta_get_title(const mp4ff_t *f, char **value);
120 int mp4ff_meta_get_date(const mp4ff_t *f, char **value);
121 int mp4ff_meta_get_album(const mp4ff_t *f, char **value);
122 int mp4ff_meta_get_comment(const mp4ff_t *f, char **value);