encore des debug...

This commit is contained in:
2025-11-24 08:06:56 +01:00
parent b7995a14a1
commit 3957e17f64
6 changed files with 148 additions and 213 deletions

View File

@@ -33,25 +33,33 @@ pub fn create_streaming_flac_transformer() -> StreamTransformer {
"transcode"
};
context
.set_metadata(TransformMetadata {
mode: Some(mode.to_string()),
input_codec: Some(codec_to_string(codec)),
details: Some(
json!({
"sample_rate": info.sample_rate,
"bits_per_sample": info.bits_per_sample,
"channels": info.channels,
"total_samples": info.total_samples,
})
.to_string(),
),
sample_rate: Some(info.sample_rate),
bits_per_sample: Some(info.bits_per_sample),
channels: Some(info.channels),
total_samples: info.total_samples,
})
.await;
let metadata = TransformMetadata {
mode: Some(mode.to_string()),
input_codec: Some(codec_to_string(codec)),
details: Some(
json!({
"sample_rate": info.sample_rate,
"bits_per_sample": info.bits_per_sample,
"channels": info.channels,
"total_samples": info.total_samples,
})
.to_string(),
),
sample_rate: Some(info.sample_rate),
bits_per_sample: Some(info.bits_per_sample),
channels: Some(info.channels),
total_samples: info.total_samples,
};
tracing::debug!(
"Transformer setting metadata: sr={:?}, bps={:?}, ch={:?}, ts={:?}",
metadata.sample_rate,
metadata.bits_per_sample,
metadata.channels,
metadata.total_samples
);
context.set_metadata(metadata).await;
let mut flac_stream = transcode.into_stream();
let mut buffer = vec![0u8; 64 * 1024];