X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-registry%2Fsrc%2Fdetect.rs;h=cf178757e5509d304385c860db2841979c5c1403;hb=refs%2Fheads%2Fmaster;hp=bb452b2a69a8cec0fdea24f625554417ebd6a0de;hpb=88fd1059c144439b922c31baa61fcf3e93f608f0;p=nihav.git diff --git a/nihav-registry/src/detect.rs b/nihav-registry/src/detect.rs index bb452b2..87226a7 100644 --- a/nihav-registry/src/detect.rs +++ b/nihav-registry/src/detect.rs @@ -176,11 +176,11 @@ impl<'a> CC<'a> { CC::Le(ref arg) => { arg.le(src) }, CC::Gt(ref arg) => { arg.gt(src) }, CC::Ge(ref arg) => { arg.ge(src) }, - CC::Str(str) => { - let mut val: Vec = vec![0; str.len()]; + CC::Str(strng) => { + let mut val: Vec = vec![0; strng.len()]; let res = src.peek_buf(val.as_mut_slice()); if res.is_err() { return false; } - val == str + val == strng } } } @@ -222,6 +222,12 @@ const DETECTORS: &[DetectConditions] = &[ &CC::Str(b"moov")), &CC::Str(b"ftyp")) }], }, + DetectConditions { + demux_name: "gif", + extensions: ".gif", + conditions: &[CheckItem{offs: 0, cond: &CC::Or(&CC::Str(b"GIF87a"), + &CC::Str(b"GIF89a")) }], + }, DetectConditions { demux_name: "mov", extensions: ".mov", @@ -244,6 +250,11 @@ const DETECTORS: &[DetectConditions] = &[ extensions: ".y4m", conditions: &[CheckItem{offs: 0, cond: &CC::Str(b"YUV4MPEG2 ") }], }, + DetectConditions { + demux_name: "armovie", + extensions: ".rpl", + conditions: &[CheckItem{offs: 0, cond: &CC::Str(b"ARMovie\n") }], + }, DetectConditions { demux_name: "flv", extensions: ".flv", @@ -403,6 +414,11 @@ const DETECTORS: &[DetectConditions] = &[ conditions: &[CheckItem{offs: 0, cond: &CC::Str(b"BMVi") }, CheckItem{offs: 32, cond: &CC::Str(b"DATA")}], }, + DetectConditions { + demux_name: "sga", + extensions: ".dtv,.avc", + conditions: &[], + }, DetectConditions { demux_name: "vmd", extensions: ".vmd",