pub struct H264Decoder {
sps: Option<Sps>,
pps: Option<Pps>,
width: u32,
height: u32,
}Fields§
§sps: Option<Sps>§pps: Option<Pps>§width: u32§height: u32Implementations§
Source§impl H264Decoder
impl H264Decoder
pub fn new() -> Self
Sourcepub fn set_parameter_sets(
&mut self,
sps_payloads: &[Vec<u8>],
pps_payloads: &[Vec<u8>],
)
pub fn set_parameter_sets( &mut self, sps_payloads: &[Vec<u8>], pps_payloads: &[Vec<u8>], )
avcC 由来の SPS/PPS を事前登録する(MP4 経路用)。
Sourcepub fn decode_nal(
&mut self,
nal_data: &[u8],
) -> Result<DecodedVideoFrame, &'static str>
pub fn decode_nal( &mut self, nal_data: &[u8], ) -> Result<DecodedVideoFrame, &'static str>
1つの NAL(Annex-B でも AVCC 単体でも、先頭にスタートコードがあれば剥がす)を処理。 互換性のため従来シグネチャを維持。
Sourcepub fn decode_access_unit_avcc(
&mut self,
sample: &[u8],
length_size: usize,
) -> Option<DecodedVideoFrame>
pub fn decode_access_unit_avcc( &mut self, sample: &[u8], length_size: usize, ) -> Option<DecodedVideoFrame>
AVCC(長さ前置)の1サンプル=アクセスユニットを処理し、含まれる picture を返す。 MP4 経路ではこちらを使う(SPS/PPS は事前に set_parameter_sets 済みが前提だが、 in-band の SPS/PPS が来た場合もここで取り込む)。
fn decode_slice( &mut self, _rbsp: &[u8], _is_idr: bool, ) -> Result<DecodedVideoFrame, &'static str>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for H264Decoder
impl RefUnwindSafe for H264Decoder
impl Send for H264Decoder
impl Sync for H264Decoder
impl Unpin for H264Decoder
impl UnsafeUnpin for H264Decoder
impl UnwindSafe for H264Decoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more