pub enum VideoTagBody {
Avc(AvcPacket),
Enhanced(EnhancedPacket),
Command(CommandPacket),
Unknown {
codec_id: VideoCodecId,
data: Bytes,
},
}Expand description
FLV Tag Video Data Body
This is a container for video data. This enum contains the data for the different types of video tags.
Defined by:
- video_file_format_spec_v10.pdf (Chapter 1 - The FLV File Format - Video tags)
- video_file_format_spec_v10_1.pdf (Annex E.4.3.1 - VIDEODATA)
Variants§
Avc(AvcPacket)
AVC Video Packet (H.264)
When VideoPacketType::CodecId is VideoCodecId::Avc
Enhanced(EnhancedPacket)
Enhanced Packet (AV1, H.265, etc.)
When VideoPacketType::Enhanced is used
Command(CommandPacket)
Command Frame (VideoInfo or Command)
When FrameType::VideoInfoOrCommandFrame is used
Unknown
Data we don’t know how to parse
Implementations§
Source§impl VideoTagBody
impl VideoTagBody
Sourcepub fn demux(
packet_type: VideoPacketType,
reader: &mut Cursor<Bytes>,
) -> Result<Self>
pub fn demux( packet_type: VideoPacketType, reader: &mut Cursor<Bytes>, ) -> Result<Self>
Demux a video packet from the given reader. The reader will consume all the data from the reader.
Trait Implementations§
Source§impl Clone for VideoTagBody
impl Clone for VideoTagBody
Source§fn clone(&self) -> VideoTagBody
fn clone(&self) -> VideoTagBody
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 VideoTagBody
impl Debug for VideoTagBody
Source§impl PartialEq for VideoTagBody
impl PartialEq for VideoTagBody
impl StructuralPartialEq for VideoTagBody
Auto Trait Implementations§
impl !Freeze for VideoTagBody
impl RefUnwindSafe for VideoTagBody
impl Send for VideoTagBody
impl Sync for VideoTagBody
impl Unpin for VideoTagBody
impl UnwindSafe for VideoTagBody
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