extern FLAC__bool FLAC__stream_encoder_disable_constant_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value);
extern FLAC__bool FLAC__stream_encoder_disable_fixed_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value);
extern FLAC__bool FLAC__stream_encoder_disable_verbatim_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value);
+extern FLAC__bool FLAC__stream_encoder_set_do_md5(FLAC__StreamEncoder *encoder, FLAC__bool value);
/*
* local routines
static FLAC__bool read_sane_extended(FILE *f, FLAC__uint32 *val, FLAC__bool eof_ok, const char *fn);
static FLAC__bool fskip_ahead(FILE *f, FLAC__uint64 offset);
static unsigned count_channel_mask_bits(FLAC__uint32 mask);
+#if 0
static FLAC__uint32 limit_channel_mask(FLAC__uint32 mask, unsigned channels);
+#endif
/*
* public routines
FLAC__stream_encoder_disable_constant_subframes(e->encoder, options.debug.disable_constant_subframes);
FLAC__stream_encoder_disable_fixed_subframes(e->encoder, options.debug.disable_fixed_subframes);
FLAC__stream_encoder_disable_verbatim_subframes(e->encoder, options.debug.disable_verbatim_subframes);
+ if(!options.debug.do_md5) {
+ flac__utils_printf(stderr, 1, "%s: WARNING, MD5 computation disabled, resulting file will not have MD5 sum\n", e->inbasefilename);
+ if(e->treat_warnings_as_errors) {
+ if(0 != cuesheet)
+ FLAC__metadata_object_delete(cuesheet);
+ return false;
+ }
+ FLAC__stream_encoder_set_do_md5(e->encoder, false);
+ }
#if FLAC__HAS_OGG
if(e->use_ogg) {
return count;
}
+#if 0
FLAC__uint32 limit_channel_mask(FLAC__uint32 mask, unsigned channels)
{
FLAC__uint32 x = 0x80000000;
FLAC__ASSERT(count_channel_mask_bits(mask) == channels);
return mask;
}
+#endif
FLAC__bool disable_constant_subframes;
FLAC__bool disable_fixed_subframes;
FLAC__bool disable_verbatim_subframes;
+ FLAC__bool do_md5;
} debug;
} encode_options_t;
{ "disable-constant-subframes", share__no_argument, 0, 0 },
{ "disable-fixed-subframes" , share__no_argument, 0, 0 },
{ "disable-verbatim-subframes", share__no_argument, 0, 0 },
+ { "no-md5-sum" , share__no_argument, 0, 0 },
{0, 0, 0, 0}
};
FLAC__bool disable_constant_subframes;
FLAC__bool disable_fixed_subframes;
FLAC__bool disable_verbatim_subframes;
+ FLAC__bool do_md5;
} debug;
} option_values;
option_values.debug.disable_constant_subframes = false;
option_values.debug.disable_fixed_subframes = false;
option_values.debug.disable_verbatim_subframes = false;
+ option_values.debug.do_md5 = true;
return true;
}
else if(0 == strcmp(long_option, "disable-verbatim-subframes")) {
option_values.debug.disable_verbatim_subframes = true;
}
+ else if(0 == strcmp(long_option, "no-md5-sum")) {
+ option_values.debug.do_md5 = false;
+ }
}
else {
switch(short_option) {
common_options.debug.disable_constant_subframes = option_values.debug.disable_constant_subframes;
common_options.debug.disable_fixed_subframes = option_values.debug.disable_fixed_subframes;
common_options.debug.disable_verbatim_subframes = option_values.debug.disable_verbatim_subframes;
+ common_options.debug.do_md5 = option_values.debug.do_md5;
/* if infilename and outfilename point to the same file, we need to write to a temporary file */
if(encode_infile != stdin && grabbag__file_are_same(infilename, outfilename)) {