summaryrefslogtreecommitdiff
path: root/apps/codecs/libm4a/m4a.h
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2006-10-11 17:02:23 +0000
committerMagnus Holmgren <magnushol@gmail.com>2006-10-11 17:02:23 +0000
commit9896fd1adef70e77b2e226d5e44fabd23192266d (patch)
treeb006fed80eadb14e1d8849b8a4cc01263bbc47c2 /apps/codecs/libm4a/m4a.h
parentca3d872699d56905c7edf875fdec80472c832942 (diff)
downloadrockbox-9896fd1adef70e77b2e226d5e44fabd23192266d.zip
rockbox-9896fd1adef70e77b2e226d5e44fabd23192266d.tar.gz
rockbox-9896fd1adef70e77b2e226d5e44fabd23192266d.tar.bz2
rockbox-9896fd1adef70e77b2e226d5e44fabd23192266d.tar.xz
AAC codec: Improved MP4 file parsing. Should now handle most streamable files. Also some code cleanup and policing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11187 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libm4a/m4a.h')
-rw-r--r--apps/codecs/libm4a/m4a.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/apps/codecs/libm4a/m4a.h b/apps/codecs/libm4a/m4a.h
index 7fea375..17f54c0 100644
--- a/apps/codecs/libm4a/m4a.h
+++ b/apps/codecs/libm4a/m4a.h
@@ -33,12 +33,21 @@ typedef uint32_t fourcc_t;
typedef struct
{
uint16_t num_channels;
- uint16_t sample_size;
- uint32_t sample_rate;
+ uint16_t sound_sample_size;
+ uint32_t sound_sample_rate;
fourcc_t format;
void *buf;
struct {
+ uint32_t first_chunk;
+ uint32_t num_samples;
+ } *sample_to_chunk;
+ uint32_t num_sample_to_chunks;
+
+ uint32_t *chunk_offset;
+ uint32_t num_chunk_offsets;
+
+ struct {
uint32_t sample_count;
uint32_t sample_duration;
} *time_to_sample;
@@ -93,16 +102,13 @@ void stream_skip(stream_t *stream, size_t skip);
int stream_eof(stream_t *stream);
void stream_create(stream_t *stream,struct codec_api* ci);
-int get_sample_info(demux_res_t *demux_res, uint32_t samplenum,
- uint32_t *sample_duration,
- uint32_t *sample_byte_size);
-unsigned int alac_seek (demux_res_t* demux_res,
- stream_t* stream,
- unsigned int sample_loc,
- uint32_t* samplesdone, int* currentblock);
-unsigned int alac_seek_raw (demux_res_t* demux_res,
- stream_t* stream,
- unsigned int file_loc,
- uint32_t* samplesdone, int* currentblock);
+int get_sample_info(demux_res_t *demux_res, uint32_t sample,
+ uint32_t *sample_duration, uint32_t *sample_byte_size);
+unsigned int get_sample_offset(demux_res_t *demux_res, uint32_t sample);
+unsigned int alac_seek (demux_res_t* demux_res, stream_t* stream,
+ uint32_t sound_sample_loc, uint32_t* sound_samples_done,
+ int* current_sample);
+unsigned int alac_seek_raw (demux_res_t* demux_res, stream_t* stream,
+ uint32_t file_loc, uint32_t* sound_samples_done, int* current_sample);
#endif /* STREAM_H */