server fix
This commit is contained in:
parent
53c86db00c
commit
8a1610ce92
@ -21,12 +21,17 @@ pub async fn spawn_camera(
|
|||||||
video/x-h264,stream-format=byte-stream,profile=baseline,level=4,\
|
video/x-h264,stream-format=byte-stream,profile=baseline,level=4,\
|
||||||
bitrate={max_bitrate_kbit}000 ! appsink name=sink emit-signals=true sync=false"
|
bitrate={max_bitrate_kbit}000 ! appsink name=sink emit-signals=true sync=false"
|
||||||
);
|
);
|
||||||
let pipeline = gst::parse_launch(&desc)?.downcast::<gst::Pipeline>()?;
|
|
||||||
|
|
||||||
let pipeline = gst::parse::launch(&desc)?
|
let pipeline = gst::parse::launch(&desc)?
|
||||||
.downcast::<gst::Pipeline>()
|
.downcast::<gst::Pipeline>()
|
||||||
.expect("pipeline down-cast");
|
.expect("pipeline down-cast");
|
||||||
|
|
||||||
|
let sink = pipeline
|
||||||
|
.by_name("sink")
|
||||||
|
.expect("appsink")
|
||||||
|
.dynamic_cast::<gst_app::AppSink>()
|
||||||
|
.expect("appsink downcast");
|
||||||
|
|
||||||
let (tx, rx) = tokio::sync::mpsc::channel(256);
|
let (tx, rx) = tokio::sync::mpsc::channel(256);
|
||||||
|
|
||||||
sink.set_callbacks(
|
sink.set_callbacks(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user