From 244c92c5b9f47ae975563f165ba768783a53f0bf Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Thu, 5 Oct 2023 14:26:28 +0500 Subject: [PATCH] Basic used filetypes --- src/util/mod.rs | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/src/util/mod.rs b/src/util/mod.rs index e69de29..9a8d351 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -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, +} + +pub enum VideoCodec { + H264, +} + +pub struct AudioMetadata { + pub samplerate: u32, + pub channels: u8, + pub codec: Option, +} + +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, +} + +pub enum RawMediaType { + YUV420P, + PCM16LE, +} + +pub struct RawMedia { + pub media_type: RawMediaType, + pub sample: Vec, +}