encore des debug...
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user