Method
to
(
&'a self,
yuvfmt: EncodeYuvFormat,
yuv: &'a mut Vec<u8>,
mid_data: &mut Vec<u8>,
)
Source from the content-addressed store, hash-verified
| 163 | } |
| 164 | |
| 165 | pub fn to<'a>( |
| 166 | &'a self, |
| 167 | yuvfmt: EncodeYuvFormat, |
| 168 | yuv: &'a mut Vec<u8>, |
| 169 | mid_data: &mut Vec<u8>, |
| 170 | ) -> ResultType<EncodeInput> { |
| 171 | match self { |
| 172 | Frame::PixelBuffer(pixelbuffer) => { |
| 173 | convert_to_yuv(&pixelbuffer, yuvfmt, yuv, mid_data)?; |
| 174 | Ok(EncodeInput::YUV(yuv)) |
| 175 | } |
| 176 | Frame::Texture(texture) => Ok(EncodeInput::Texture(*texture)), |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | pub enum EncodeInput<'a> { |