* Init m4a file and write some tech data to given pointers.
*/
static int aac_get_file_info(FILE *file, char *info_str, long unsigned *frames,
- int *seconds)
+ int *seconds, size_t **vss_chunk_table)
{
int i, ret, decoder_len;
size_t skip;
return ret;
*frames = num_chunks;
*seconds = aac_set_chunk_tv(&mp4ASC);
+ *vss_chunk_table = chunk_table;
for (;;) {
ret = aac_find_entry_point(inbuf, inbuf_len, &skip);
if (ret >= 0)
* this audio format. A negative return value indicates that this audio format
* handler did not recognize the given file. On success, the function is
* expected to return a positive value and to fill in \arg info_str, \arg
- * chunks and \arg seconds appropriately.
+ * chunks and \arg seconds appropriately and to return the chunk table
+ * via \a vss_chunk_table.
*/
int (*get_file_info)(FILE *audio_file, char *info_str,
- long unsigned *chunks, int *seconds);
+ long unsigned *chunks, int *seconds, size_t **vss_chunk_table);
/**
* cleanup function of this audio format handler
*
* Read mp3 information from audio file
*/
static int mp3_get_file_info(FILE *audio_file, char *info_str,
- long unsigned *frames, int *seconds)
+ long unsigned *frames, int *seconds, size_t **vss_chunk_table)
{
int ret;
write_info_str(info_str);
*frames = num_chunks;
*seconds = mp3.seconds;
+ *vss_chunk_table = chunk_table;
if (*seconds < 2 || !*frames)
return -E_MP3_INFO;
return 1;
* Init oggvorbis file and write some tech data to given pointers.
*/
static int ogg_get_file_info(FILE *file, char *info_str, long unsigned *frames,
- int *seconds)
+ int *seconds, size_t **vss_chunk_table)
{
int ret;
double time_total;
vi_channels = vi->channels;
ogg_compute_chunk_table(time_total);
*frames = num_chunks;
+ *vss_chunk_table = chunk_table;
sprintf(info_str, "audio_file_info1:%zu x %lu, %ldkHz, %d channels, %ldkbps\n"
"audio_file_info2: \n"
"audio_file_info3: \n",
extern struct misc_meta_data *mmd;
extern struct audio_file_selector selectors[];
extern struct sender senders[];
+static size_t *chunk_table;
static FILE *audio_file = NULL;
/** iterate over each supported audio format */
#define FOR_EACH_AUDIO_FORMAT(i) for (i = 0; afl[i].name; i++)
+
+
/**
* check if vss status flag \a P (playing) is set
*
static int get_file_info(int i)
{
return afl[i].get_file_info(audio_file, mmd->audio_file_info,
- &mmd->chunks_total, &mmd->seconds_total);
+ &mmd->chunks_total, &mmd->seconds_total, &chunk_table);
}
/**