42 #define RF64_AUTO (-1)
59 static inline void bwf_write_bext_string(
AVFormatContext *
s,
const char *key,
int maxlen)
65 len = strlen(tag->
value);
66 len =
FFMIN(len, maxlen);
76 uint64_t time_reference = 0;
79 bwf_write_bext_string(s,
"description", 256);
80 bwf_write_bext_string(s,
"originator", 32);
81 bwf_write_bext_string(s,
"originator_reference", 32);
82 bwf_write_bext_string(s,
"origination_date", 10);
83 bwf_write_bext_string(s,
"origination_time", 8);
86 time_reference = strtoll(tmp_tag->
value, NULL, 10);
91 unsigned char umidpart_str[17] = {0};
96 for (i = 0; i < len/16; i++) {
97 memcpy(umidpart_str, tmp_tag->
value + 2 + (i*16), 16);
98 umidpart = strtoll(umidpart_str, NULL, 16);
159 bwf_write_bext_chunk(s);
195 int64_t number_of_samples = 0;
203 data_size = file_size - wav->
data;
208 avio_wl32(pb, (uint32_t)(file_size - 8));
222 if (rf64 || (wav->
rf64 ==
RF64_AUTO && number_of_samples > UINT32_MAX)) {
258 #define OFFSET(x) offsetof(WAVMuxContext, x)
259 #define ENC AV_OPT_FLAG_ENCODING_PARAM
269 static const AVClass wav_muxer_class = {
279 .mime_type =
"audio/x-wav",
289 .priv_class = &wav_muxer_class,
352 end_guid(pb, wav->
data);
359 int64_t number_of_samples;