mirror of
https://github.com/v0l/zap-stream-core.git
synced 2025-06-18 20:37:11 +00:00
Configurable encoder pipeline
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
use crate::demux::Demuxer;
|
||||
use tokio::sync::mpsc::UnboundedReceiver;
|
||||
use crate::ingress::ConnectionInfo;
|
||||
use crate::pipeline::runner::PipelineRunner;
|
||||
use crate::pipeline::PipelineStep;
|
||||
use crate::webhook::Webhook;
|
||||
|
||||
#[derive(Clone)]
|
||||
@ -14,12 +13,8 @@ impl PipelineBuilder {
|
||||
Self { webhook }
|
||||
}
|
||||
|
||||
pub async fn build_for(&self, info: ConnectionInfo) -> Result<PipelineRunner, anyhow::Error> {
|
||||
pub async fn build_for(&self, info: ConnectionInfo, recv: UnboundedReceiver<bytes::Bytes>) -> Result<PipelineRunner, anyhow::Error> {
|
||||
let config = self.webhook.start(info).await?;
|
||||
|
||||
let mut steps: Vec<Box<dyn PipelineStep + Sync + Send>> = Vec::new();
|
||||
steps.push(Box::new(Demuxer::new()));
|
||||
|
||||
Ok(PipelineRunner::new(steps))
|
||||
Ok(PipelineRunner::new(config, recv))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user