⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 wince下著名的视频播放器源码
💻 C
📖 第 1 页 / 共 5 页
字号:
				break;			case '0':				option_values.do_exhaustive_model_search = false;				option_values.do_escape_coding = false;				option_values.do_mid_side = false;				option_values.loose_mid_side = false;				option_values.qlp_coeff_precision = 0;				option_values.min_residual_partition_order = option_values.max_residual_partition_order = 2;				option_values.rice_parameter_search_dist = 0;				option_values.max_lpc_order = 0;				break;			case '1':				option_values.do_exhaustive_model_search = false;				option_values.do_escape_coding = false;				option_values.do_mid_side = true;				option_values.loose_mid_side = true;				option_values.qlp_coeff_precision = 0;				option_values.min_residual_partition_order = option_values.max_residual_partition_order = 2;				option_values.rice_parameter_search_dist = 0;				option_values.max_lpc_order = 0;				break;			case '2':				option_values.do_exhaustive_model_search = false;				option_values.do_escape_coding = false;				option_values.do_mid_side = true;				option_values.loose_mid_side = false;				option_values.qlp_coeff_precision = 0;				option_values.min_residual_partition_order = 0;				option_values.max_residual_partition_order = 3;				option_values.rice_parameter_search_dist = 0;				option_values.max_lpc_order = 0;				break;			case '3':				option_values.do_exhaustive_model_search = false;				option_values.do_escape_coding = false;				option_values.do_mid_side = false;				option_values.loose_mid_side = false;				option_values.qlp_coeff_precision = 0;				option_values.min_residual_partition_order = option_values.max_residual_partition_order = 3;				option_values.rice_parameter_search_dist = 0;				option_values.max_lpc_order = 6;				break;			case '4':				option_values.do_exhaustive_model_search = false;				option_values.do_escape_coding = false;				option_values.do_mid_side = true;				option_values.loose_mid_side = true;				option_values.qlp_coeff_precision = 0;				option_values.min_residual_partition_order = option_values.max_residual_partition_order = 3;				option_values.rice_parameter_search_dist = 0;				option_values.max_lpc_order = 8;				break;			case '5':				option_values.do_exhaustive_model_search = false;				option_values.do_escape_coding = false;				option_values.do_mid_side = true;				option_values.loose_mid_side = false;				option_values.qlp_coeff_precision = 0;				option_values.min_residual_partition_order = option_values.max_residual_partition_order = 3;				option_values.rice_parameter_search_dist = 0;				option_values.max_lpc_order = 8;				break;			case '6':				option_values.do_exhaustive_model_search = false;				option_values.do_escape_coding = false;				option_values.do_mid_side = true;				option_values.loose_mid_side = false;				option_values.qlp_coeff_precision = 0;				option_values.min_residual_partition_order = 0;				option_values.max_residual_partition_order = 4;				option_values.rice_parameter_search_dist = 0;				option_values.max_lpc_order = 8;				break;			case '7':				option_values.do_exhaustive_model_search = true;				option_values.do_escape_coding = false;				option_values.do_mid_side = true;				option_values.loose_mid_side = false;				option_values.qlp_coeff_precision = 0;				option_values.min_residual_partition_order = 0;				option_values.max_residual_partition_order = 6;				option_values.rice_parameter_search_dist = 0;				option_values.max_lpc_order = 8;				break;			case '8':				option_values.do_exhaustive_model_search = true;				option_values.do_escape_coding = false;				option_values.do_mid_side = true;				option_values.loose_mid_side = false;				option_values.qlp_coeff_precision = 0;				option_values.min_residual_partition_order = 0;				option_values.max_residual_partition_order = 6;				option_values.rice_parameter_search_dist = 0;				option_values.max_lpc_order = 12;				break;			case '9':				return usage_error("ERROR: compression level '9' is reserved\n");			case 'V':				option_values.verify = true;				break;			case 'S':				FLAC__ASSERT(0 != option_argument);				if(option_values.num_requested_seek_points < 0)					option_values.num_requested_seek_points = 0;				option_values.num_requested_seek_points++;				if(strlen(option_values.requested_seek_points)+strlen(option_argument)+2 >= sizeof(option_values.requested_seek_points)) {					return usage_error("ERROR: too many seekpoints requested\n");				}				else {					strcat(option_values.requested_seek_points, option_argument);					strcat(option_values.requested_seek_points, ";");				}				break;			case 'P':				FLAC__ASSERT(0 != option_argument);				option_values.padding = atoi(option_argument);				if(option_values.padding < 0)					return usage_error("ERROR: argument to -P must be >= 0\n");				break;			case 'b':				FLAC__ASSERT(0 != option_argument);				option_values.blocksize = atoi(option_argument);				break;			case 'e':				option_values.do_exhaustive_model_search = true;				break;			case 'E':				option_values.do_escape_coding = true;				break;			case 'l':				FLAC__ASSERT(0 != option_argument);				option_values.max_lpc_order = atoi(option_argument);				break;			case 'm':				option_values.do_mid_side = true;				option_values.loose_mid_side = false;				break;			case 'M':				option_values.loose_mid_side = option_values.do_mid_side = true;				break;			case 'p':				option_values.do_qlp_coeff_prec_search = true;				break;			case 'q':				FLAC__ASSERT(0 != option_argument);				option_values.qlp_coeff_precision = atoi(option_argument);				break;			case 'r':				FLAC__ASSERT(0 != option_argument);				p = strchr(option_argument, ',');				if(0 == p) {					option_values.min_residual_partition_order = 0;					option_values.max_residual_partition_order = atoi(option_argument);				}				else {					option_values.min_residual_partition_order = atoi(option_argument);					option_values.max_residual_partition_order = atoi(++p);				}				break;			case 'R':				FLAC__ASSERT(0 != option_argument);				option_values.rice_parameter_search_dist = atoi(option_argument);				break;			default:				FLAC__ASSERT(0);		}	}	return 0;}void free_options(){	unsigned i;	if(0 != option_values.filenames) {		for(i = 0; i < option_values.num_files; i++) {			if(0 != option_values.filenames[i])				free(option_values.filenames[i]);		}		free(option_values.filenames);	}	if(0 != option_values.vorbis_comment)		FLAC__metadata_object_delete(option_values.vorbis_comment);}int usage_error(const char *message, ...){	if(flac__utils_verbosity_ >= 1) {		va_list args;		FLAC__ASSERT(0 != message);		va_start(args, message);		(void) vfprintf(stderr, message, args);		va_end(args);		printf("Type \"flac\" for a usage summary or \"flac --help\" for all options\n");	}	return 1;}void show_version(){	printf("flac %s\n", FLAC__VERSION_STRING);}static void usage_header(){	printf("===============================================================================\n");	printf("flac - Command-line FLAC encoder/decoder version %s\n", FLAC__VERSION_STRING);	printf("Copyright (C) 2000,2001,2002,2003,2004,2005  Josh Coalson\n");	printf("\n");	printf("This program is free software; you can redistribute it and/or\n");	printf("modify it under the terms of the GNU General Public License\n");	printf("as published by the Free Software Foundation; either version 2\n");	printf("of the License, or (at your option) any later version.\n");	printf("\n");	printf("This program is distributed in the hope that it will be useful,\n");	printf("but WITHOUT ANY WARRANTY; without even the implied warranty of\n");	printf("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n");	printf("GNU General Public License for more details.\n");	printf("\n");	printf("You should have received a copy of the GNU General Public License\n");	printf("along with this program; if not, write to the Free Software\n");	printf("Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n");	printf("===============================================================================\n");}static void usage_summary(){	printf("Usage:\n");	printf("\n");	printf(" Encoding: flac [<general-options>] [<encoding/format-options>] [INPUTFILE [...]]\n");	printf(" Decoding: flac -d [<general-options>] [<format-options>] [FLACFILE [...]]\n");	printf("  Testing: flac -t [<general-options>] [FLACFILE [...]]\n");	printf("Analyzing: flac -a [<general-options>] [<analysis-options>] [FLACFILE [...]]\n");	printf("\n");}void short_usage(){	usage_header();	printf("\n");	printf("This is the short help; for all options use 'flac --help'; for even more\n");	printf("instructions use 'flac --explain'\n");	printf("\n");	printf("To encode:\n");	printf("  flac [-#] [INPUTFILE [...]]\n");	printf("\n");	printf("  -# is -0 (fastest compression) to -8 (highest compression); -5 is the default\n");	printf("\n");	printf("To decode:\n");	printf("  flac -d [INPUTFILE [...]]\n");	printf("\n");	printf("To test:\n");	printf("  flac -t [INPUTFILE [...]]\n");}void show_help(){	usage_header();	usage_summary();	printf("general options:\n");	printf("  -v, --version                Show the flac version number\n");	printf("  -h, --help                   Show this screen\n");	printf("  -H, --explain                Show detailed explanation of usage and options\n");	printf("  -d, --decode                 Decode (the default behavior is to encode)\n");	printf("  -t, --test                   Same as -d except no decoded file is written\n");	printf("  -a, --analyze                Same as -d except an analysis file is written\n");	printf("  -c, --stdout                 Write output to stdout\n");	printf("  -s, --silent                 Do not write runtime encode/decode statistics\n");	printf("      --totally-silent         Do not print anything, including errors\n");	printf("  -f, --force                  Force overwriting of output files\n");	printf("  -o, --output-name=FILENAME   Force the output file name\n");	printf("      --output-prefix=STRING   Prepend STRING to output names\n");	printf("      --delete-input-file      Deletes after a successful encode/decode\n");	printf("      --skip={#|mm:ss.ss}      Skip the given initial samples for each input\n");	printf("      --until={#|[+|-]mm:ss.ss}  Stop at the given sample for each input file\n");#ifdef FLAC__HAS_OGG	printf("      --ogg                    Use Ogg as transport layer\n");	printf("      --serial-number          Serial number to use for the FLAC stream\n");#endif	printf("analysis options:\n");	printf("      --residual-text          Include residual signal in text output\n");	printf("      --residual-gnuplot       Generate gnuplot files of residual distribution\n");	printf("decoding options:\n");	printf("  -F, --decode-through-errors  Continue decoding through stream errors\n");	printf("      --cue=[#.#][-[#.#]]      Set the beginning and ending cuepoints to decode\n");	printf("encoding options:\n");	printf("  -V, --verify                 Verify a correct encoding\n");	printf("      --lax                    Allow encoder to generate non-Subset files\n");	printf("      --sector-align           Align multiple files on sector boundaries\n");	printf("      --replay-gain            Calculate ReplayGain & store in Vorbis comments\n");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -