update bytes(protobuf types) mapping, from Vec<u8> to bytes:Byte

issues:958
This commit is contained in:
tom
2022-07-16 00:45:23 +08:00
parent c6c5d2cb98
commit efa6b5972d
13 changed files with 34 additions and 25 deletions

View File

@@ -12,6 +12,7 @@ use crate::STRIDE_ALIGN;
use super::vpx::{vp8e_enc_control_id::*, vpx_codec_err_t::*, *};
use std::os::raw::{c_int, c_uint};
use std::{ptr, slice};
use hbb_common::bytes::Bytes;
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum VpxVideoCodecId {
@@ -291,7 +292,7 @@ impl VpxEncoder {
#[inline]
fn create_frame(frame: &EncodeFrame) -> EncodedVideoFrame {
EncodedVideoFrame {
data: frame.data.to_vec(),
data: Bytes::from(frame.data.to_vec()),
key: frame.key,
pts: frame.pts,
..Default::default()