Basic used filetypes
This commit is contained in:
parent
687d79f44c
commit
244c92c5b9
1 changed files with 53 additions and 0 deletions
|
@ -0,0 +1,53 @@
|
|||
use std::error::Error;
|
||||
use std::fmt;
|
||||
|
||||
pub struct VideoMetadata {
|
||||
pub width: u32,
|
||||
pub height: u32,
|
||||
pub framerate: f32,
|
||||
pub codec: Option<VideoCodec>,
|
||||
}
|
||||
|
||||
pub enum VideoCodec {
|
||||
H264,
|
||||
}
|
||||
|
||||
pub struct AudioMetadata {
|
||||
pub samplerate: u32,
|
||||
pub channels: u8,
|
||||
pub codec: Option<AudioCodec>,
|
||||
}
|
||||
|
||||
pub enum AudioCodec {
|
||||
AAC,
|
||||
}
|
||||
|
||||
pub struct Metadata {
|
||||
pub video: VideoMetadata,
|
||||
pub audio: AudioMetadata,
|
||||
}
|
||||
|
||||
pub enum FileType {
|
||||
FLV,
|
||||
MPEGTS,
|
||||
}
|
||||
|
||||
pub enum NALUPacketType {
|
||||
Audio,
|
||||
Video,
|
||||
}
|
||||
|
||||
pub struct NALUPacket {
|
||||
pub packet_type: NALUPacketType,
|
||||
pub packet_data: Vec<u8>,
|
||||
}
|
||||
|
||||
pub enum RawMediaType {
|
||||
YUV420P,
|
||||
PCM16LE,
|
||||
}
|
||||
|
||||
pub struct RawMedia {
|
||||
pub media_type: RawMediaType,
|
||||
pub sample: Vec<u8>,
|
||||
}
|
Loading…
Reference in a new issue