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

Method new

flow-plugins/src/video_input.rs:35–49  ·  view source on GitHub ↗
(_: String, args: &Table)

Source from the content-addressed store, hash-verified

33
34impl VideoInput {
35 fn new(_: String, args: &Table) -> VideoInput {
36 VideoInput {
37 urls: args["urls"]
38 .as_array()
39 .expect("expect string array for urls")
40 .iter()
41 .map(|n| n.as_str().unwrap().to_owned())
42 .collect(),
43 repeat: args["repeat"]
44 .as_integer()
45 .expect("expect args[repeat] in node[VideoInput]")
46 .to_owned() as u32,
47 ..Default::default()
48 }
49 }
50}
51
52node_register!("VideoInput", VideoInput);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected