MCPcopy Create free account
hub / github.com/Recordscript/recordscript / encode_to_message

Method encode_to_message

libs/scrap/src/common/aom.rs:252–265  ·  view source on GitHub ↗
(&mut self, input: EncodeInput, ms: i64)

Source from the content-addressed store, hash-verified

250 }
251
252 fn encode_to_message(&mut self, input: EncodeInput, ms: i64) -> ResultType<VideoFrame> {
253 let mut frames = Vec::new();
254 for ref frame in self
255 .encode(ms, input.yuv()?, STRIDE_ALIGN)
256 .with_context(|| "Failed to encode")?
257 {
258 frames.push(Self::create_frame(frame));
259 }
260 if frames.len() > 0 {
261 Ok(Self::create_video_frame(frames))
262 } else {
263 Err(anyhow!("no valid frame"))
264 }
265 }
266
267 fn yuvfmt(&self) -> crate::EncodeYuvFormat {
268 self.yuvfmt.clone()

Callers

nothing calls this directly

Calls 2

yuvMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected