• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/minidlna/flac-1.2.1/src/metaflac/

Lines Matching defs:options

36 static FLAC__bool do_major_operation(const CommandLineOptions *options);
37 static FLAC__bool do_major_operation_on_file(const char *filename, const CommandLineOptions *options);
38 static FLAC__bool do_major_operation__list(const char *filename, FLAC__Metadata_Chain *chain, const CommandLineOptions *options);
39 static FLAC__bool do_major_operation__append(FLAC__Metadata_Chain *chain, const CommandLineOptions *options);
40 static FLAC__bool do_major_operation__remove(FLAC__Metadata_Chain *chain, const CommandLineOptions *options);
41 static FLAC__bool do_major_operation__remove_all(FLAC__Metadata_Chain *chain, const CommandLineOptions *options);
42 static FLAC__bool do_shorthand_operations(const CommandLineOptions *options);
43 static FLAC__bool do_shorthand_operations_on_file(const char *filename, const CommandLineOptions *options);
48 static FLAC__bool passes_filter(const CommandLineOptions *options, const FLAC__StreamMetadata *block, unsigned block_number);
67 FLAC__bool do_operations(const CommandLineOptions *options)
71 if(options->show_long_help) {
74 if(options->show_version) {
77 else if(options->args.checks.num_major_ops > 0) {
78 FLAC__ASSERT(options->args.checks.num_shorthand_ops == 0);
79 FLAC__ASSERT(options->args.checks.num_major_ops == 1);
80 FLAC__ASSERT(options->args.checks.num_major_ops == options->ops.num_operations);
81 ok = do_major_operation(options);
83 else if(options->args.checks.num_shorthand_ops > 0) {
84 FLAC__ASSERT(options->args.checks.num_shorthand_ops == options->ops.num_operations);
85 ok = do_shorthand_operations(options);
100 FLAC__bool do_major_operation(const CommandLineOptions *options)
106 for(i = 0; i < options->num_files; i++)
107 ok &= do_major_operation_on_file(options->filenames[i], options);
112 FLAC__bool do_major_operation_on_file(const char *filename, const CommandLineOptions *options)
130 switch(options->ops.operations[0].type) {
132 ok = do_major_operation__list(options->prefix_with_filename? filename : 0, chain, options);
135 ok = do_major_operation__append(chain, options);
139 ok = do_major_operation__remove(chain, options);
143 ok = do_major_operation__remove_all(chain, options);
160 if(options->use_padding)
162 ok = FLAC__metadata_chain_write(chain, options->use_padding, options->preserve_modtime);
172 FLAC__bool do_major_operation__list(const char *filename, FLAC__Metadata_Chain *chain, const CommandLineOptions *options)
190 else if(passes_filter(options, FLAC__metadata_iterator_get_block(iterator), block_number))
191 write_metadata(filename, block, block_number, !options->utf8_convert, options->application_data_format_is_hexdump);
200 FLAC__bool do_major_operation__append(FLAC__Metadata_Chain *chain, const CommandLineOptions *options)
202 (void) chain, (void) options;
207 FLAC__bool do_major_operation__remove(FLAC__Metadata_Chain *chain, const CommandLineOptions *options)
221 if(passes_filter(options, FLAC__metadata_iterator_get_block(iterator), block_number)) {
222 ok &= FLAC__metadata_iterator_delete_block(iterator, options->use_padding);
223 if(options->use_padding)
233 FLAC__bool do_major_operation__remove_all(FLAC__Metadata_Chain *chain, const CommandLineOptions *options)
244 ok &= FLAC__metadata_iterator_delete_block(iterator, options->use_padding);
245 if(options->use_padding)
254 FLAC__bool do_shorthand_operations(const CommandLineOptions *options)
260 for(i = 0; i < options->num_files; i++)
261 ok &= do_shorthand_operations_on_file(options->filenames[i], options);
264 if(ok && options->num_files > 0) {
265 for(i = 0; i < options->ops.num_operations; i++) {
266 if(options->ops.operations[i].type == OP__ADD_REPLAY_GAIN)
267 ok = do_shorthand_operation__add_replay_gain(options->filenames, options->num_files, options->preserve_modtime);
274 FLAC__bool do_shorthand_operations_on_file(const char *filename, const CommandLineOptions *options)
277 FLAC__bool ok = true, needs_write = false, use_padding = options->use_padding;
288 for(i = 0; i < options->ops.num_operations && ok; i++) {
293 if(options->ops.operations[i].type != OP__ADD_SEEKPOINT)
294 ok &= do_shorthand_operation(filename, options->prefix_with_filename, chain, &options->ops.operations[i], &needs_write, options->utf8_convert);
303 if(options->ops.operations[i].type == OP__ADD_PADDING)
311 for(i = 0; i < options->ops.num_operations && ok; i++) {
312 if(options->ops.operations[i].type == OP__ADD_SEEKPOINT)
313 ok &= do_shorthand_operation(filename, options->prefix_with_filename, chain, &options->ops.operations[i], &needs_write, options->utf8_convert);
319 ok = FLAC__metadata_chain_write(chain, use_padding, options->preserve_modtime);
510 FLAC__bool passes_filter(const CommandLineOptions *options, const FLAC__StreamMetadata *block, unsigned block_number)
516 for(i = 0; i < options->args.num_arguments; i++) {
517 if(options->args.arguments[i].type == ARG__BLOCK_TYPE || options->args.arguments[i].type == ARG__EXCEPT_BLOCK_TYPE) {
518 for(j = 0; j < options->args.arguments[i].value.block_type.num_entries; j++) {
519 if(options->args.arguments[i].value.block_type.entries[j].type == block->type) {
520 if(block->type != FLAC__METADATA_TYPE_APPLICATION || !options->args.arguments[i].value.block_type.entries[j].filter_application_by_id || 0 == memcmp(options->args.arguments[i].value.block_type.entries[j].application_id, block->data.application.id, FLAC__STREAM_METADATA_APPLICATION_ID_LEN/8))
525 else if(options->args.arguments[i].type == ARG__BLOCK_NUMBER) {
527 for(j = 0; j < options->args.arguments[i].value.block_number.num_entries; j++) {
528 if(options->args.arguments[i].value.block_number.entries[j] == block_number)
537 if(options->args.checks.has_block_type) {
538 FLAC__ASSERT(!options->args.checks.has_except_block_type);
540 else if(options->args.checks.has_except_block_type)