2 * Copyright (C) 2010-2011 Andre Noll <maan@systemlinux.org>
4 * Licensed under the GPL v2. For licencing details see COPYING.
8 * \file ogg_afh_common.h Structures and prototypes common to audio format
9 * handlers that use the ogg container format.
13 * Callback structure provided by vorbis/speex audio format handlers.
15 * Both audio formats utilize the ogg container format. Meta info about
16 * the audio file is contained in the first three ogg packets.
18 struct ogg_afh_callback_info {
20 * ogg_get_file_info() calls this function for each of the three
21 * header packets. If this callback returns a negative value, the
22 * audio file is considered invalid and the chunk table is not
23 * created. If it returns zero, the end of the header has been
24 * reached and no further ogg packets should be processed.
26 int (*packet_callback)(ogg_packet *packet, int packet_num,
27 struct afh_info *afhi, void *private_data);
28 /** Vorbis/speex specific data. */
32 int ogg_get_file_info(char *map, size_t numbytes, struct afh_info *afhi,
33 struct ogg_afh_callback_info *ci);