X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fflac%2Fencode.h;h=337d5afddbccc84858cbd311c9327753723eedaa;hb=f25b2602dce3c09098e3092bfad983e3ec7fdb4f;hp=1394c89aea83479248fcc3a8981f262967eea40c;hpb=5967f4981ec6ed719ca391165b4209bd2be354dd;p=platform%2Fupstream%2Fflac.git diff --git a/src/flac/encode.h b/src/flac/encode.h index 1394c89..337d5af 100644 --- a/src/flac/encode.h +++ b/src/flac/encode.h @@ -1,5 +1,5 @@ /* flac - Command-line FLAC encoder/decoder - * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -11,25 +11,22 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef flac__encode_h #define flac__encode_h -/* needed because of off_t */ #if HAVE_CONFIG_H # include #endif #include "FLAC/metadata.h" +#include "foreign_metadata.h" #include "utils.h" - -#ifdef HAVE_CONFIG_H -#include -#endif +#include "share/compat.h" extern const int FLAC_ENCODE__DEFAULT_PADDING; @@ -91,6 +88,20 @@ typedef struct { FLAC__StreamMetadata *pictures[64]; unsigned num_pictures; + FileFormat format; + union { + struct { + FLAC__bool is_big_endian; + FLAC__bool is_unsigned_samples; + unsigned channels; + unsigned bps; + unsigned sample_rate; + } raw; + struct { + foreign_metadata_t *foreign_metadata; /* NULL unless --keep-foreign-metadata requested */ + } iff; + } format_options; + struct { FLAC__bool disable_constant_subframes; FLAC__bool disable_fixed_subframes; @@ -99,27 +110,6 @@ typedef struct { } debug; } encode_options_t; -typedef struct { - encode_options_t common; -} wav_encode_options_t; - -typedef struct { - encode_options_t common; - - FLAC__bool is_big_endian; - FLAC__bool is_unsigned_samples; - unsigned channels; - unsigned bps; - unsigned sample_rate; -} raw_encode_options_t; - -typedef struct { - encode_options_t common; -} flac_encode_options_t; - -int flac__encode_aif(FILE *infile, off_t infilesize, const char *infilename, const char *outfilename, const FLAC__byte *lookahead, unsigned lookahead_length, wav_encode_options_t options, FLAC__bool is_aifc); -int flac__encode_wav(FILE *infile, off_t infilesize, const char *infilename, const char *outfilename, const FLAC__byte *lookahead, unsigned lookahead_length, wav_encode_options_t options); -int flac__encode_raw(FILE *infile, off_t infilesize, const char *infilename, const char *outfilename, const FLAC__byte *lookahead, unsigned lookahead_length, raw_encode_options_t options); -int flac__encode_flac(FILE *infile, off_t infilesize, const char *infilename, const char *outfilename, const FLAC__byte *lookahead, unsigned lookahead_length, flac_encode_options_t options, FLAC__bool input_is_ogg); +int flac__encode_file(FILE *infile, FLAC__off_t infilesize, const char *infilename, const char *outfilename, const FLAC__byte *lookahead, unsigned lookahead_length, encode_options_t options); #endif