// Detect It Easy: detection rule file
// Author: BJNFNE <bjnfne@web.de>

// https://en.wikipedia.org/wiki/QuickTime_File_Format
// https://developer.apple.com/documentation/quicktime-file-format/movie_data_atom
meta("format", "QuickTime Movie");

function detect() {
    if (Binary.compare("........'moov'")) {
        var codec = Binary.getString(11, 5).trim();

        if (/^[a-z]{5}$/.test(codec)) {
            sOptions = codec;
            bDetected = true;
        }

    } else if (Binary.compare("........6d646174")) {
        sOptions = "Movie data atom";
        bDetected = true;
    }

    return result();
}