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

Method encode

libs/scrap/src/common/hwcodec.rs:224–233  ·  view source on GitHub ↗
(&mut self, yuv: &[u8])

Source from the content-addressed store, hash-verified

222 }
223
224 pub fn encode(&mut self, yuv: &[u8]) -> ResultType<Vec<EncodeFrame>> {
225 match self.encoder.encode(yuv) {
226 Ok(v) => {
227 let mut data = Vec::<EncodeFrame>::new();
228 data.append(v);
229 Ok(data)
230 }
231 Err(_) => Ok(Vec::<EncodeFrame>::new()),
232 }
233 }
234
235 pub fn convert_quality(name: &str, quality: crate::codec::Quality) -> u32 {
236 use crate::codec::Quality;

Callers 1

encode_to_messageMethod · 0.45

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected