Basic used filetypes

This commit is contained in:
Muaz Ahmad 2023-10-05 14:26:28 +05:00
parent 687d79f44c
commit 244c92c5b9

View file

@ -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>,
}