parse.c File Reference

#include <config.h>
#include <assert.h>
#include <ctype.h>
#include "lame.h"
#include "set_get.h"
#include "brhist.h"
#include "parse.h"
#include "main.h"
#include "get_audio.h"
#include "version.h"
#include "console.h"

Include dependency graph for parse.c:

Go to the source code of this file.

Defines

#define strchr   index
#define strrchr   rindex
#define memcpy(d, s, n)   bcopy ((s), (d), (n))
#define memmove(d, s, n)   bcopy ((s), (d), (n))
#define INTERNAL_OPTS   LAME_ALPHA_VERSION
#define DEV_HELP(a)
#define T_IF(str)   if ( 0 == local_strcasecmp (token,str) ) {
#define T_ELIF(str)   } else if ( 0 == local_strcasecmp (token,str) ) {
#define T_ELIF_INTERNAL(str)   } else if (INTERNAL_OPTS && (0 == local_strcasecmp (token,str)) ) {
#define T_ELIF2(str1, str2)   } else if ( 0 == local_strcasecmp (token,str1) || 0 == local_strcasecmp (token,str2) ) {
#define T_ELSE   } else {
#define T_END   }

Enumerations

enum  ID3TAG_MODE { ID3TAG_MODE_DEFAULT, ID3TAG_MODE_V1_ONLY, ID3TAG_MODE_V2_ONLY }

Functions

char * strchr ()
char ** strrchr ()
static int lame_version_print (FILE *const fp)
 Long Filename support for the WIN32 platform.
static int print_license (FILE *const fp)
int usage (FILE *const fp, const char *ProgramName)
int short_help (const lame_global_flags *gfp, FILE *const fp, const char *ProgramName)
static void wait_for (FILE *const fp, int lessmode)
int long_help (const lame_global_flags *gfp, FILE *const fp, const char *ProgramName, int lessmode)
static void display_bitrate (FILE *const fp, const char *const version, const int d, const int indx)
int display_bitrates (FILE *const fp)
static void presets_longinfo_dm (FILE *msgfp)
void lame_set_msfix (lame_t gfp, double msfix)
static int presets_set (lame_t gfp, int fast, int cbr, const char *preset_name, const char *ProgramName)
static void genre_list_handler (int num, const char *name, void *cookie)
static int local_strcasecmp (const char *s1, const char *s2)
static int filename_to_type (const char *FileName)
static int resample_rate (double freq)
int parse_args (lame_global_flags *gfp, int argc, char **argv, char *const inPath, char *const outPath, char **nogap_inPath, int *num_nogap)

Variables

sound_file_format input_format
int swapbytes = 0
int silent
int ignore_tag_errors
int brhist
float update_interval
int mp3_delay
int mp3_delay_set
int disable_wav_header
mp3data_struct mp3input_data
int print_clipping_info
int in_endian = order_littleEndian
int in_bitwidth = 16
int flush_write = 0


Define Documentation

#define DEV_HELP (  ) 

Definition at line 82 of file parse.c.

Referenced by long_help().

#define INTERNAL_OPTS   LAME_ALPHA_VERSION

Definition at line 76 of file parse.c.

Referenced by parse_args().

#define memcpy ( d,
s,
 )     bcopy ((s), (d), (n))

Definition at line 41 of file parse.c.

#define memmove ( d,
s,
 )     bcopy ((s), (d), (n))

Definition at line 42 of file parse.c.

#define strchr   index

Definition at line 36 of file parse.c.

#define strrchr   rindex

Definition at line 37 of file parse.c.

#define T_ELIF ( str   )     } else if ( 0 == local_strcasecmp (token,str) ) {

Definition at line 1077 of file parse.c.

Referenced by parse_args().

#define T_ELIF2 ( str1,
str2   )     } else if ( 0 == local_strcasecmp (token,str1) || 0 == local_strcasecmp (token,str2) ) {

Definition at line 1079 of file parse.c.

Referenced by parse_args().

#define T_ELIF_INTERNAL ( str   )     } else if (INTERNAL_OPTS && (0 == local_strcasecmp (token,str)) ) {

Definition at line 1078 of file parse.c.

Referenced by parse_args().

#define T_ELSE   } else {

Definition at line 1080 of file parse.c.

Referenced by parse_args().

#define T_END   }

Definition at line 1081 of file parse.c.

Referenced by parse_args().

#define T_IF ( str   )     if ( 0 == local_strcasecmp (token,str) ) {

Definition at line 1076 of file parse.c.

Referenced by parse_args().


Enumeration Type Documentation

enum ID3TAG_MODE

Enumerator:
ID3TAG_MODE_DEFAULT 
ID3TAG_MODE_V1_ONLY 
ID3TAG_MODE_V2_ONLY 

Definition at line 1068 of file parse.c.


Function Documentation

static void display_bitrate ( FILE *const   fp,
const char *const  version,
const int  d,
const int  indx 
) [static]

Definition at line 682 of file parse.c.

References bitrate_table, and i.

Referenced by display_bitrates().

int display_bitrates ( FILE *const   fp  ) 

Definition at line 699 of file parse.c.

References display_bitrate().

Referenced by long_help(), and main().

Here is the call graph for this function:

static int filename_to_type ( const char *  FileName  )  [static]

Definition at line 1010 of file parse.c.

References local_strcasecmp(), sf_aiff, sf_mp123, sf_ogg, sf_raw, sf_unknown, and sf_wave.

Referenced by parse_args().

Here is the call graph for this function:

static void genre_list_handler ( int  num,
const char *  name,
void *  cookie 
) [static]

Definition at line 964 of file parse.c.

References console_printf().

Referenced by parse_args().

Here is the call graph for this function:

void lame_set_msfix ( lame_t  gfp,
double  msfix 
)

Definition at line 1758 of file set_get.c.

static int lame_version_print ( FILE *const   fp  )  [static]

Long Filename support for the WIN32 platform.

Definition at line 255 of file parse.c.

References rtpheader::b, get_lame_os_bitness(), get_lame_url(), get_lame_version(), and LAME_ALPHA_VERSION.

Referenced by long_help(), presets_set(), print_license(), short_help(), and usage().

Here is the call graph for this function:

static int local_strcasecmp ( const char *  s1,
const char *  s2 
) [static]

Definition at line 987 of file parse.c.

int long_help ( const lame_global_flags gfp,
FILE *const   fp,
const char *  ProgramName,
int  lessmode 
)

OBSOLETE " --athaa-loudapprox n n=1 total energy or n=2 equal loudness curve\n"

Definition at line 433 of file parse.c.

References DEV_HELP, display_bitrates(), gfp, lame_get_VBR_q(), lame_version_print(), and wait_for().

Referenced by parse_args().

Here is the call graph for this function:

int parse_args ( lame_global_flags gfp,
int  argc,
char **  argv,
char *const   inPath,
char *const   outPath,
char **  nogap_inPath,
int *  num_nogap 
)

Definition at line 1084 of file parse.c.

References AMD_3DNOW, brhist, Console_IO_t::Console_fp, Console_IO, console_printf(), disable_wav_header, DUAL_CHANNEL, error_printf(), filename_to_type(), flush_write, genre_list_handler(), gfp, i, id3tag_add_v2(), id3tag_genre_list(), id3tag_init(), ID3TAG_MODE_DEFAULT, ID3TAG_MODE_V1_ONLY, ID3TAG_MODE_V2_ONLY, id3tag_pad_v2(), id3tag_set_album(), id3tag_set_albumart(), id3tag_set_artist(), id3tag_set_comment(), id3tag_set_fieldvalue(), id3tag_set_genre(), id3tag_set_title(), id3tag_set_track(), id3tag_set_year(), id3tag_space_v1(), id3tag_v1_only(), id3tag_v2_only(), ignore_tag_errors, in_bitwidth, in_endian, in_signed, input_format, INTERNAL_OPTS, is_mpeg_file_format(), JOINT_STEREO, lame_get_brate(), lame_get_bWriteVbrTag(), lame_get_decode_on_the_fly(), lame_get_decode_only(), lame_get_exp_nspsytune(), lame_get_free_format(), lame_get_mode(), lame_get_VBR(), lame_get_VBR_mean_bitrate_kbps(), lame_get_VBR_q(), lame_set_asm_optimizations(), lame_set_athaa_sensitivity(), lame_set_athaa_type(), lame_set_ATHcurve(), lame_set_ATHlower(), lame_set_ATHonly(), lame_set_ATHshort(), lame_set_ATHtype(), lame_set_brate(), lame_set_bWriteVbrTag(), lame_set_compression_ratio(), lame_set_copyright(), lame_set_cwlimit(), lame_set_decode_on_the_fly(), lame_set_decode_only(), lame_set_disable_reservoir(), lame_set_emphasis(), lame_set_error_protection(), lame_set_exp_nspsytune(), lame_set_experimentalY(), lame_set_experimentalZ(), lame_set_findReplayGain(), lame_set_force_ms(), lame_set_force_short_blocks(), lame_set_free_format(), lame_set_highpassfreq(), lame_set_highpasswidth(), lame_set_in_samplerate(), lame_set_interChRatio(), lame_set_lowpassfreq(), lame_set_lowpasswidth(), lame_set_maskingadjust(), lame_set_maskingadjust_short(), lame_set_mode(), lame_set_msfix(), lame_set_no_short_blocks(), lame_set_noATH(), lame_set_num_channels(), lame_set_original(), lame_set_out_samplerate(), lame_set_preset(), lame_set_preset_notune(), lame_set_psy_model(), lame_set_quality(), lame_set_quant_comp(), lame_set_quant_comp_short(), lame_set_quantization_type(), lame_set_scale(), lame_set_scale_left(), lame_set_scale_right(), lame_set_sfscale(), lame_set_short_threshold(), lame_set_strict_ISO(), lame_set_subblock_gain(), lame_set_substep(), lame_set_tune(), lame_set_useTemporal(), lame_set_VBR(), lame_set_VBR_hard_min(), lame_set_VBR_max_bitrate_kbps(), lame_set_VBR_mean_bitrate_kbps(), lame_set_VBR_min_bitrate_kbps(), lame_set_VBR_q(), long_help(), Max, Min, MMX, MONO, mp3_delay, mp3_delay_set, order_bigEndian, order_littleEndian, PATH_MAX, presets_set(), print_clipping_info, print_license(), PSY_NSPSYTUNE, R3MIX, resample_rate(), set_debug_file(), sf_mp1, sf_mp2, sf_mp3, sf_ogg, sf_raw, sf_unknown, short_help(), silent, SSE, STEREO, swapbytes, T_ELIF, T_ELIF2, T_ELIF_INTERNAL, T_ELSE, T_END, T_IF, update_interval, usage(), vbr_abr, vbr_default, vbr_mtrh, vbr_off, and vbr_rh.

Referenced by main(), and parse_args_from_string().

Here is the call graph for this function:

static void presets_longinfo_dm ( FILE *  msgfp  )  [static]

Definition at line 735 of file parse.c.

Referenced by presets_set().

static int presets_set ( lame_t  gfp,
int  fast,
int  cbr,
const char *  preset_name,
const char *  ProgramName 
) [static]

Definition at line 823 of file parse.c.

References Console_IO, Console_IO_t::Error_fp, error_printf(), gfp, INSANE, lame_set_mode(), lame_set_preset(), lame_set_VBR(), lame_set_VBR_q(), lame_version_print(), MONO, presets_longinfo_dm(), vbr_mtrh, vbr_off, and vbr_rh.

Referenced by parse_args().

Here is the call graph for this function:

static int print_license ( FILE *const   fp  )  [static]

Definition at line 287 of file parse.c.

References lame_version_print().

Referenced by parse_args().

Here is the call graph for this function:

static int resample_rate ( double  freq  )  [static]

Definition at line 1038 of file parse.c.

References error_printf().

Referenced by parse_args().

Here is the call graph for this function:

int short_help ( const lame_global_flags gfp,
FILE *const   fp,
const char *  ProgramName 
)

Definition at line 367 of file parse.c.

References gfp, lame_get_VBR_q(), and lame_version_print().

Referenced by parse_args().

Here is the call graph for this function:

char* strchr (  ) 

char* * strrchr (  ) 

int usage ( FILE *const   fp,
const char *  ProgramName 
)

Definition at line 337 of file parse.c.

References lame_version_print().

Referenced by main(), and parse_args().

Here is the call graph for this function:

static void wait_for ( FILE *const   fp,
int  lessmode 
) [static]

Definition at line 420 of file parse.c.

Referenced by long_help().


Variable Documentation

int brhist

Definition at line 93 of file parse.c.

Referenced by brhist_init_package(), encoder_progress(), encoder_progress_end(), main(), and parse_args().

int disable_wav_header

Definition at line 100 of file parse.c.

Referenced by lame_decoder(), and parse_args().

int flush_write = 0

Definition at line 111 of file parse.c.

Referenced by lame_decoder(), lame_encoder(), and parse_args().

int ignore_tag_errors

Definition at line 92 of file parse.c.

Referenced by parse_args().

int in_bitwidth = 16

Definition at line 109 of file parse.c.

Referenced by init_infile(), and parse_args().

int in_endian = order_littleEndian

Definition at line 108 of file parse.c.

Referenced by parse_args(), and read_samples_pcm().

sound_file_format input_format

Definition at line 89 of file parse.c.

Referenced by close_infile(), get_audio_common(), gtkcontrol(), gtkmakeframe(), lame_decoder(), main(), OpenSndFile(), parse_args(), parse_file_header(), and read_samples_pcm().

int mp3_delay

Definition at line 95 of file parse.c.

Referenced by main(), and parse_args().

int mp3_delay_set

Definition at line 97 of file parse.c.

Referenced by main(), and parse_args().

mp3data_struct mp3input_data

Definition at line 101 of file parse.c.

Referenced by lame_decoder(), OpenSndFile(), and read_samples_mp3().

int print_clipping_info

Definition at line 102 of file parse.c.

Referenced by parse_args(), and print_trailing_info().

int silent

Definition at line 91 of file parse.c.

Referenced by aiff_check2(), CloseSndFile(), encoder_progress(), encoder_progress_begin(), encoder_progress_end(), fskip(), lame_decoder(), main(), OpenSndFile(), parse_aiff_header(), parse_args(), parse_file_header(), parse_wave_header(), read_samples_mp3(), and read_samples_pcm().

int swapbytes = 0

Definition at line 90 of file parse.c.

Referenced by init_infile(), lame_decoder(), OpenSndFile(), parse_aiff_header(), and parse_args().

float update_interval

Definition at line 94 of file parse.c.

Referenced by encoder_progress(), main(), and parse_args().


Generated on Sun Dec 2 11:35:23 2007 for LAME by  doxygen 1.5.2