Add 2003 to copyright notice
[platform/upstream/flac.git] / src / flac / encode.h
1 /* flac - Command-line FLAC encoder/decoder
2  * Copyright (C) 2000,2001,2002,2003  Josh Coalson
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17  */
18
19 #ifndef flac__encode_h
20 #define flac__encode_h
21
22 #include "FLAC/metadata.h"
23 #include "utils.h"
24
25 #ifdef HAVE_CONFIG_H
26 #include <config.h>
27 #endif
28
29 typedef struct {
30         FLAC__bool verbose;
31         utils__SkipUntilSpecification skip_specification;
32         utils__SkipUntilSpecification until_specification;
33         FLAC__bool verify;
34 #ifdef FLAC__HAS_OGG
35         FLAC__bool use_ogg;
36         FLAC__bool has_serial_number;
37         long serial_number;
38 #endif
39         FLAC__bool lax;
40         FLAC__bool do_mid_side;
41         FLAC__bool loose_mid_side;
42         FLAC__bool do_exhaustive_model_search;
43         FLAC__bool do_escape_coding;
44         FLAC__bool do_qlp_coeff_prec_search;
45         unsigned min_residual_partition_order;
46         unsigned max_residual_partition_order;
47         unsigned rice_parameter_search_dist;
48         unsigned max_lpc_order;
49         unsigned blocksize;
50         unsigned qlp_coeff_precision;
51         int padding;
52         char *requested_seek_points;
53         int num_requested_seek_points;
54         const char *cuesheet_filename;
55         FLAC__bool cued_seekpoints;
56
57         /* options related to --replay-gain and --sector-align */
58         FLAC__bool is_first_file;
59         FLAC__bool is_last_file;
60         FLAC__int32 **align_reservoir;
61         unsigned *align_reservoir_samples;
62         FLAC__bool replay_gain;
63         FLAC__bool sector_align;
64
65         FLAC__StreamMetadata *vorbis_comment;
66
67         struct {
68                 FLAC__bool disable_constant_subframes;
69                 FLAC__bool disable_fixed_subframes;
70                 FLAC__bool disable_verbatim_subframes;
71         } debug;
72 } encode_options_t;
73
74 typedef struct {
75         encode_options_t common;
76 } wav_encode_options_t;
77
78 typedef struct {
79         encode_options_t common;
80
81         FLAC__bool is_big_endian;
82         FLAC__bool is_unsigned_samples;
83         unsigned channels;
84         unsigned bps;
85         unsigned sample_rate;
86 } raw_encode_options_t;
87
88 int flac__encode_aif(FILE *infile, long infilesize, const char *infilename, const char *outfilename, const FLAC__byte *lookahead, unsigned lookahead_length, wav_encode_options_t options);
89 int flac__encode_wav(FILE *infile, long infilesize, const char *infilename, const char *outfilename, const FLAC__byte *lookahead, unsigned lookahead_length, wav_encode_options_t options);
90 int flac__encode_raw(FILE *infile, long infilesize, const char *infilename, const char *outfilename, const FLAC__byte *lookahead, unsigned lookahead_length, raw_encode_options_t options);
91
92 #endif