streamer-rs 0.1.0

Backend-agnostic async library for streaming audio and video, with GStreamer as the first implementation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * SpinorML Ltd 🚀 AGPL-3.0 License - https://spinorml.com/license
 */

use async_trait::async_trait;

use crate::error::Result;
use crate::frame::{FrameData, VideoFrame};

#[async_trait]
pub trait VideoTransform: Send {
    type Input: FrameData;
    type Output: FrameData;

    async fn process(&mut self, frame: VideoFrame<Self::Input>) -> Result<VideoFrame<Self::Output>>;
}