Progress audio encoder (FIFO)

This commit is contained in:
2024-03-26 15:51:57 +00:00
parent 2a82e2c00b
commit d6c03004ff
17 changed files with 803 additions and 271 deletions

View File

@ -7,7 +7,6 @@ use ffmpeg_sys_next::{
avcodec_find_decoder, avcodec_free_context, avcodec_open2, avcodec_parameters_to_context,
avcodec_receive_frame, avcodec_send_packet, AVCodecContext, AVERROR, AVERROR_EOF, AVPacket, AVStream,
};
use ffmpeg_sys_next::AVPictureType::{AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_NONE};
use tokio::sync::broadcast;
use tokio::sync::mpsc::UnboundedReceiver;
@ -101,7 +100,11 @@ impl Decoder {
return Err(Error::msg(format!("Failed to decode {}", ret)));
}
(*frame).time_base = (*stream).time_base;
self.chan_out.send(PipelinePayload::AvFrame("Decoder frame".to_owned(), frame))?;
self.chan_out.send(PipelinePayload::AvFrame(
"Decoder frame".to_owned(),
frame,
stream_index as usize,
))?;
frames += 1;
}
return Ok(frames);