MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / start

Function start

flow-plugins/src/video_server.rs:57–62  ·  view source on GitHub ↗
(#[data] state: State, url: String)

Source from the content-addressed store, hash-verified

55#[post("/start/{url}")]
56#[openapi(summary = "start a video stream")]
57async fn start(#[data] state: State, url: String) -> RwebResult {
58 let id = state.id();
59 let (s, r) = oneshot::channel();
60 state.sender.send((id, url, s)).await.ok();
61 r.await.unwrap()
62}
63
64#[post("/stop/{id}")]
65#[openapi(summary = "stop a video stream by id")]

Callers 1

execMethod · 0.70

Calls 2

idMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected