diff --git a/server/src/video.rs b/server/src/video.rs index f189709..0a15e63 100644 --- a/server/src/video.rs +++ b/server/src/video.rs @@ -21,12 +21,17 @@ pub async fn spawn_camera( video/x-h264,stream-format=byte-stream,profile=baseline,level=4,\ bitrate={max_bitrate_kbit}000 ! appsink name=sink emit-signals=true sync=false" ); - let pipeline = gst::parse_launch(&desc)?.downcast::()?; let pipeline = gst::parse::launch(&desc)? .downcast::() .expect("pipeline down-cast"); + let sink = pipeline + .by_name("sink") + .expect("appsink") + .dynamic_cast::() + .expect("appsink downcast"); + let (tx, rx) = tokio::sync::mpsc::channel(256); sink.set_callbacks(