From b4552c73f731a8df0103152235cb51c260a55b23 Mon Sep 17 00:00:00 2001 From: Martin Algesten Date: Wed, 25 Sep 2024 09:28:44 +0200 Subject: [PATCH] Add Transport::Raw --- src/dec.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dec.rs b/src/dec.rs index d395cc6..99af772 100644 --- a/src/dec.rs +++ b/src/dec.rs @@ -117,6 +117,9 @@ unsafe impl Sync for Decoder {} impl Decoder { pub fn new(transport: Transport) -> Self { let handle = match transport { + Transport::Raw => { + unsafe { sys::aacDecoder_Open(sys::TRANSPORT_TYPE_TT_MP4_RAW, 1) } + } Transport::Adts => { unsafe { sys::aacDecoder_Open(sys::TRANSPORT_TYPE_TT_MP4_ADTS, 1) } } @@ -192,5 +195,6 @@ impl Drop for Decoder { #[derive(Clone, Copy, Debug)] pub enum Transport { + Raw, Adts, }