The lib and vq, at least, build again. Tackling the examples and xmms
[platform/upstream/libvorbis.git] / include / vorbis / vorbisfile.h
1 /********************************************************************
2  *                                                                  *
3  * THIS FILE IS PART OF THE Ogg Vorbis 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 DISTRIBUTING.                            *
7  *                                                                  *
8  * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000             *
9  * by Monty <monty@xiph.org> and The XIPHOPHORUS Company            *
10  * http://www.xiph.org/                                             *
11  *                                                                  *
12  ********************************************************************
13
14  function: stdio-based convenience library for opening/seeking/decoding
15  last mod: $Id: vorbisfile.h,v 1.2 2000/01/28 09:05:02 xiphmont Exp $
16
17  ********************************************************************/
18
19 #ifndef _OV_FILE_H_
20 #define _OV_FILE_H_
21
22 #include <stdio.h>
23 #include "codec.h"
24
25 typedef struct {
26   FILE             *f;
27   int              seekable;
28   long             offset;
29   long             end;
30   ogg_sync_state   oy; 
31
32   /* If the FILE handle isn't seekable (eg, a pipe), only the current
33      stream appears */
34   int              links;
35   long             *offsets;
36   long             *dataoffsets;
37   long             *serialnos;
38   int64_t           *pcmlengths;
39   vorbis_info      *vi;
40   vorbis_comment  *vc;
41
42   /* Decoding working state local storage */
43   int64_t          pcm_offset;
44   int              decode_ready;
45   long             current_serialno;
46   int              current_link;
47
48   ogg_stream_state os; /* take physical pages, weld into a logical
49                           stream of packets */
50   vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
51   vorbis_block     vb; /* local working space for packet->PCM decode */
52
53 } OggVorbis_File;
54
55 extern int ov_clear(OggVorbis_File *vf);
56 extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
57
58 extern long ov_bitrate(OggVorbis_File *vf,int i);
59 extern long ov_streams(OggVorbis_File *vf);
60 extern long ov_seekable(OggVorbis_File *vf);
61 extern long ov_serialnumber(OggVorbis_File *vf,int i);
62
63 extern long ov_raw_total(OggVorbis_File *vf,int i);
64 extern int64_t ov_pcm_total(OggVorbis_File *vf,int i);
65 extern double ov_time_total(OggVorbis_File *vf,int i);
66
67 extern int ov_raw_seek(OggVorbis_File *vf,long pos);
68 extern int ov_pcm_seek(OggVorbis_File *vf,int64_t pos);
69 extern int ov_time_seek(OggVorbis_File *vf,double pos);
70
71 extern long ov_raw_tell(OggVorbis_File *vf);
72 extern int64_t ov_pcm_tell(OggVorbis_File *vf);
73 extern double ov_time_tell(OggVorbis_File *vf);
74
75 extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
76 extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
77
78 extern long ov_read(OggVorbis_File *vf,char *buffer,int length,
79                     int bigendianp,int word,int sgned,int *bitstream);
80
81 #endif
82
83
84
85
86
87
88