pub enum AudioPacket {
MultichannelConfig {
channel_count: u8,
multichannel_config: MultichannelConfigOrder,
},
SequenceEnd,
SequenceStart {
header_data: Bytes,
},
CodedFrames {
data: Bytes,
},
Unknown {
audio_packet_type: AudioPacketType,
data: Bytes,
},
}
Expand description
Audio packet
Appears as part of the ExAudioTagBody
.
Defined by:
- Enhanced RTMP spec, page 23-25, ExAudioTagBody
Variants§
MultichannelConfig
Multichannel configuration
Specify a speaker for a channel as it appears in the bitstream. This is needed if the codec is not self-describing for channel mapping.
Fields
§
multichannel_config: MultichannelConfigOrder
The multichannel configuration.
Specifies the order of the channels in the audio stream.
SequenceEnd
Indicates the end of a sequence of audio packets.
SequenceStart
Indicates the start of a sequence of audio packets.
Fields
§
header_data: Bytes
The header data for the sequence.
CodedFrames
Coded audio frames.
Fields
§
data: Bytes
The audio data.
Unknown
An unknown AudioPacketType
.
Implementations§
Source§impl AudioPacket
impl AudioPacket
Sourcepub fn demux(
header: &ExAudioTagHeader,
reader: &mut Cursor<Bytes>,
) -> Result<Self>
pub fn demux( header: &ExAudioTagHeader, reader: &mut Cursor<Bytes>, ) -> Result<Self>
Demux an AudioPacket
from the given reader.
This is implemented as per spec, Enhanced RTMP page 23-25, ExAudioTagBody.
Trait Implementations§
Source§impl Clone for AudioPacket
impl Clone for AudioPacket
Source§fn clone(&self) -> AudioPacket
fn clone(&self) -> AudioPacket
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AudioPacket
impl Debug for AudioPacket
Source§impl PartialEq for AudioPacket
impl PartialEq for AudioPacket
impl StructuralPartialEq for AudioPacket
Auto Trait Implementations§
impl !Freeze for AudioPacket
impl RefUnwindSafe for AudioPacket
impl Send for AudioPacket
impl Sync for AudioPacket
impl Unpin for AudioPacket
impl UnwindSafe for AudioPacket
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