Recognizes if input is ogg or not.
[xiph.git] / vorbis-tools / ogg123 / callbacks.h
blob2eae4acaf1d80bf79dc3d82a896677dd6900eb2b
1 /********************************************************************
2 * *
3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
5 * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *
6 * PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
7 * *
8 * THE Ogg123 SOURCE CODE IS (C) COPYRIGHT 2000-2001 *
9 * by Stan Seibert <volsung@xiph.org> AND OTHER CONTRIBUTORS *
10 * http://www.xiph.org/ *
11 * *
12 ********************************************************************
14 last mod: $Id: callbacks.h,v 1.2 2001/12/19 02:52:53 volsung Exp $
16 ********************************************************************/
18 #ifndef __CALLBACKS_H__
19 #define __CALLBACKS_H__
21 #include "audio.h"
22 #include "buffer.h"
23 #include "status.h"
24 #include "format.h"
25 #include "transport.h"
28 /* Audio callbacks */
30 typedef struct audio_play_arg_t {
31 stat_format_t *stat_format;
32 audio_device_t *devices;
33 } audio_play_arg_t;
35 typedef struct audio_reopen_arg_t {
36 audio_device_t *devices;
37 audio_format_t *format;
38 } audio_reopen_arg_t;
40 int audio_play_callback (void *ptr, int nbytes, int eos, void *arg);
41 void audio_reopen_action (buf_t *buf, void *arg);
43 audio_reopen_arg_t *new_audio_reopen_arg (audio_device_t *devices,
44 audio_format_t *fmt);
47 /* Statisitics callbacks */
49 typedef struct print_statistics_arg_t {
50 stat_format_t *stat_format;
51 data_source_stats_t *data_source_statistics;
52 decoder_stats_t *decoder_statistics;
53 } print_statistics_arg_t;
55 void print_statistics_action (buf_t *buf, void *arg);
56 print_statistics_arg_t *new_print_statistics_arg (
57 stat_format_t *stat_format,
58 data_source_stats_t *data_source_statistics,
59 decoder_stats_t *decoder_statistics);
62 /* Decoder callbacks */
63 void decoder_error_callback (void *arg, int severity, char *message, ...);
64 void decoder_metadata_callback (void *arg, int verbosity, char *message, ...);
66 void decoder_buffered_error_callback (void *arg, int severity,
67 char *message, ...);
68 void decoder_buffered_metadata_callback (void *arg, int verbosity,
69 char *message, ...);
72 #endif /* __CALLBACKS_H__ */