X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-registry%2Fsrc%2Fregister.rs;h=fdf9e83d855485c44968a1a0d1488e00dee7ebdd;hb=87927c5732b39bb23209486bed8d7bb7fc56b92e;hp=b92746cfc1d3c10ab9d346be05a35332e32fbdcb;hpb=3d5fb08f404cd219161c2133e24022d53acdec61;p=nihav.git diff --git a/nihav-registry/src/register.rs b/nihav-registry/src/register.rs index b92746c..fdf9e83 100644 --- a/nihav-registry/src/register.rs +++ b/nihav-registry/src/register.rs @@ -31,11 +31,16 @@ impl fmt::Display for CodecType { } } -const CODEC_CAP_INTRAONLY:u32 = 0x0001; -const CODEC_CAP_LOSSLESS:u32 = 0x0002; -const CODEC_CAP_REORDER:u32 = 0x0004; -const CODEC_CAP_HYBRID:u32 = 0x0008; -const CODEC_CAP_SCALABLE:u32 = 0x0010; +/// Codec capability flag for intra-only codecs. +pub const CODEC_CAP_INTRAONLY:u32 = 0x0001; +/// Codec capability flag for lossless codecs. +pub const CODEC_CAP_LOSSLESS:u32 = 0x0002; +/// Codec capability flag for codecs with frame reordering. +pub const CODEC_CAP_REORDER:u32 = 0x0004; +/// Codec capability flag for codecs that can be both lossy and lossless. +pub const CODEC_CAP_HYBRID:u32 = 0x0008; +/// Codec capability flag for codecs with scalability features. +pub const CODEC_CAP_SCALABLE:u32 = 0x0010; /// Codec description structure. #[derive(Clone)] @@ -132,6 +137,10 @@ macro_rules! desc { CodecDescription{ name: $n, fname: $fn, ctype: CodecType::Audio, caps: CODEC_CAP_LOSSLESS | CODEC_CAP_INTRAONLY } }); + (audio-hyb; $n:expr, $fn:expr) => ({ + CodecDescription{ name: $n, fname: $fn, ctype: CodecType::Audio, + caps: CODEC_CAP_HYBRID } + }); } /// Returns codec description for the provided codec short name if it is found. @@ -185,7 +194,7 @@ static CODEC_REGISTER: &'static [CodecDescription] = &[ desc!(video; "qt-rle", "Apple Animation"), desc!(video; "apple-video", "Apple video"), desc!(video; "sorenson-video", "Sorenson Video"), - desc!(video; "sorenson-video3", "Sorenson Video 3"), + desc!(video; "sorenson-video3", "Sorenson Video 3", CODEC_CAP_REORDER), desc!(audio; "mace-3", "MACE 3:1"), desc!(audio; "mace-6", "MACE 6:1"), desc!(audio; "ima-adpcm-qt", "IMA ADPCM (Apple variant)"), @@ -221,6 +230,8 @@ static CODEC_REGISTER: &'static [CodecDescription] = &[ desc!(video-ll; "midivid-ll", "MidiVid Lossless"), desc!(video; "vmd-video", "VMD video"), desc!(audio; "vmd-audio", "VMD audio"), + desc!(video; "vxvideo", "Actimagine Vx"), + desc!(audio; "vxaudio", "Actimagine Sx"), desc!(video; "smacker-video", "Smacker video"), desc!(audio; "smacker-audio", "Smacker audio"), @@ -238,6 +249,11 @@ static CODEC_REGISTER: &'static [CodecDescription] = &[ desc!(video; "vivo2", "VivoActive Video 2.0", CODEC_CAP_REORDER), desc!(audio; "g723.1", "ITU G.723.1"), desc!(audio; "siren", "Polycom Siren"), + + desc!(audio-ll; "ape", "Monkey's Audio"), + desc!(audio-ll; "flac", "Free Lossless Audio Codec"), + desc!(audio-ll; "tta", "True Audio codec"), + desc!(audio-hyb; "wavpack", "WavPack"), ]; static AVI_VIDEO_CODEC_REGISTER: &'static [(&[u8;4], &str)] = &[ @@ -306,7 +322,9 @@ static MOV_VIDEO_CODEC_REGISTER: &'static [(&[u8;4], &str)] = &[ (b"mjpa", "mjpeg-a"), (b"mjpb", "mjpeg-b"), (b"svqi", "sorenson-video"), + (b"SVQ1", "sorenson-video"), (b"svq3", "sorenson-video3"), + (b"SVQ3", "sorenson-video3"), (b"IV31", "indeo3"), (b"IV32", "indeo3"),