Recognizes if input is ogg or not.
[xiph.git] / vorbis-tools / ogg123 / status.h
bloba6aad6171c3c82c971b5eb9913d7e4134596241b
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: status.h,v 1.2 2001/12/19 02:52:54 volsung Exp $
16 ********************************************************************/
18 #ifndef __STATUS_H__
19 #define __STATUS_H__
21 #include <stdarg.h>
22 #include "buffer.h"
23 #include "transport.h"
24 #include "format.h"
26 typedef struct {
27 int verbosity;
28 char enabled;
29 const char *formatstr;
30 enum {
31 stat_noarg = 0,
32 stat_intarg,
33 stat_stringarg,
34 stat_floatarg,
35 stat_doublearg
36 } type;
37 union {
38 int intarg;
39 char *stringarg;
40 float floatarg;
41 double doublearg;
42 } arg;
43 } stat_format_t;
46 /* Status options:
47 * stats[0] - currently playing file / stream
48 * stats[1] - current playback time
49 * stats[2] - remaining playback time
50 * stats[3] - total playback time
51 * stats[4] - instantaneous bitrate
52 * stats[5] - average bitrate (not yet implemented)
53 * stats[6] - input buffer fill %
54 * stats[7] - input buffer state
55 * stats[8] - output buffer fill %
56 * stats[9] - output buffer state
57 * stats[10] - Null format string to mark end of array
59 stat_format_t *stat_format_create ();
60 void stat_format_cleanup (stat_format_t *stats);
62 void status_init (int verbosity);
63 void status_reset_output_lock ();
64 void status_clear_line ();
65 void status_print_statistics (stat_format_t *stats,
66 buffer_stats_t *audio_statistics,
67 data_source_stats_t *data_source_statistics,
68 decoder_stats_t *decoder_statistics);
69 void status_message (int verbosity, const char *fmt, ...);
70 void vstatus_message (int verbosity, const char *fmt, va_list ap);
71 void status_error (const char *fmt, ...);
72 void vstatus_error (const char *fmt, va_list);
74 #endif /* __STATUS_H__ */