Added Makefile.in to vq/
[platform/upstream/libvorbis.git] / lib / 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-1999             *
9  * by 1999 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  author: Monty <xiphmont@mit.edu>
16  modifications by: Monty
17  last modification date: Nov 04 1999
18
19  ********************************************************************/
20
21 #ifndef _OV_FILE_H_
22 #define _OV_FILE_H_
23
24 #include <stdio.h>
25 #include "codec.h"
26
27 typedef struct {
28   FILE             *f;
29   int              seekable;
30   long             offset;
31   long             end;
32   ogg_sync_state   oy; 
33
34   /* If the FILE handle isn't seekable (eg, a pipe), only the current
35      stream appears */
36   int              links;
37   long             *offsets;
38   long             *dataoffsets;
39   long             *serialnos;
40   size64           *pcmlengths;
41   vorbis_info      *vi;
42
43   /* Decoding working state local storage */
44   size64           pcm_offset;
45   int              decode_ready;
46   long             current_serialno;
47   int              current_link;
48
49   ogg_stream_state os; /* take physical pages, weld into a logical
50                           stream of packets */
51   vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
52   vorbis_block     vb; /* local working space for packet->PCM decode */
53
54 } OggVorbis_File;
55
56 extern int ov_clear(OggVorbis_File *vf);
57 extern int ov_open(FILE *f,OggVorbis_File *vf,char *initial,long ibytes);
58
59 extern long ov_bitrate(OggVorbis_File *vf,int i);
60 extern long ov_streams(OggVorbis_File *vf);
61 extern long ov_seekable(OggVorbis_File *vf);
62 extern long ov_serialnumber(OggVorbis_File *vf,int i);
63
64 extern long ov_raw_total(OggVorbis_File *vf,int i);
65 extern size64 ov_pcm_total(OggVorbis_File *vf,int i);
66 extern double ov_time_total(OggVorbis_File *vf,int i);
67
68 extern int ov_raw_seek(OggVorbis_File *vf,long pos);
69 extern int ov_pcm_seek(OggVorbis_File *vf,size64 pos);
70 extern int ov_time_seek(OggVorbis_File *vf,double pos);
71
72 extern long ov_raw_tell(OggVorbis_File *vf);
73 extern size64 ov_pcm_tell(OggVorbis_File *vf);
74 extern double ov_time_tell(OggVorbis_File *vf);
75
76 extern vorbis_info *ov_info(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