pub enum FlvTagData {
Audio(AudioData),
Video(VideoTagHeader),
ScriptData(ScriptData),
Unknown {
tag_type: FlvTagType,
data: Bytes,
},
}Expand description
FLV Tag Data
This is a container for the actual media data. This enum contains the data for the different types of tags.
Defined by:
- video_file_format_spec_v10.pdf (Chapter 1 - The FLV File Format - FLV tags)
- video_file_format_spec_v10_1.pdf (Annex E.4.1 - FLV Tag)
Variants§
Audio(AudioData)
AudioData when the FlvTagType is Audio(8) Defined by:
- video_file_format_spec_v10.pdf (Chapter 1 - The FLV File Format - Audio tags)
- video_file_format_spec_v10_1.pdf (Annex E.4.2.1 - AUDIODATA)
Video(VideoTagHeader)
VideoData when the FlvTagType is Video(9) 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)
ScriptData(ScriptData)
ScriptData when the FlvTagType is ScriptData(18) Defined by:
- video_file_format_spec_v10.pdf (Chapter 1 - The FLV File Format - Data tags)
- video_file_format_spec_v10_1.pdf (Annex E.4.4.1 - SCRIPTDATA)
Unknown
Any tag type that we dont know how to parse, with the corresponding data being the raw bytes of the tag
Implementations§
Source§impl FlvTagData
impl FlvTagData
Sourcepub fn demux(tag_type: FlvTagType, reader: &mut Cursor<Bytes>) -> Result<Self>
pub fn demux(tag_type: FlvTagType, reader: &mut Cursor<Bytes>) -> Result<Self>
Demux a FLV tag data from the given reader.
The reader will be enirely consumed.
The reader needs to be a std::io::Cursor with a [Bytes] buffer because we
take advantage of zero-copy reading.
Trait Implementations§
Source§impl Clone for FlvTagData
impl Clone for FlvTagData
Source§fn clone(&self) -> FlvTagData
fn clone(&self) -> FlvTagData
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 FlvTagData
impl Debug for FlvTagData
Source§impl PartialEq for FlvTagData
impl PartialEq for FlvTagData
impl StructuralPartialEq for FlvTagData
Auto Trait Implementations§
impl !Freeze for FlvTagData
impl RefUnwindSafe for FlvTagData
impl Send for FlvTagData
impl Sync for FlvTagData
impl Unpin for FlvTagData
impl UnwindSafe for FlvTagData
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