The latest Help release available in English.
© 2019 R-Tools Technology Inc.
All rights reserved.
<?xml version="1.0" encoding="utf-8"?>
<!-- Une section modèle. Le nom du modèle est AVI File LIST -->
<template name="AVI File LIST">
<!-- A template signature section. Alignment is 1. -->
<signature align="1">
<!-- A 4-byte signature at offset 0x00. -->
<field offset="0x00">4C 49 53 54</field> <!-- ANSI: LIST -->
</signature>
<!-- Une section données. Son nom est AVI File LIST . C'est la section données principale. Cela n'est pas affiché comme une section dans l'arbre syntaxique (son nom est ignoré).-->
< section name="AVI File LIST">
<!-- The first 4 bytes are read and shown as an ANSI string. -->
<field type="char" size="4" name="Signature: LIST"/>
<!-- The current position is moved to the beginning of the file (4 bytes backward). -->
<goto offset="-4"/>
<!-- Les 4 premiers octets du fichier sont affichés comme des entiers non signés. La signature de la variable interne récupère la valeur du champ. -->
<field type="uint32" name="Signature LIST as unsigned integer" var="signature"/>
<!-- Un test contre la condition ( signature == LIST ) -->
<if test="signature == 1414744396"> <!-- ANSI: LIST -->
<!-- Les 4 premiers octets sont affichés comme des entiers non signés. La listSize e la variable interne récupère sa valeur. -->
<field type="uint32" name="Size of the data in the list" var="listSize"/>
<setvar var="endOfList" expr="offset + listSize"/>
<field type="char" size="4" name="List type"/>
<goto offset="-4"/>
<field type="uint32" base="hex" name="List type as unsigned integer in hex format" var="listType"/>
<!-- Un test contre la condition ( listType == movi ) -->
<if test="listType == 0x69766f6d"> <!-- ANSI: movi -->
<!-- This chunk is not to be parsed. The current position is moved to the end of the chunk. -->
<goto address="endOfList"/>
</if>
<setvar var="mediaType" expr="0"/>
<repeat test="endOfList > offset - 8">
<section name="CHUNK">
<field type="char" size="4" name="Chunk ID"/>
<goto offset="-4"/>
<field type="uint32" name="Chunk ID as unsigned integer" var="chunkId"/>
<if test="chunkId == 1414744396"> <!-- ANSI: LIST -->
<goto offset="-4"/>
<field type="uint32" base="hex" name="LIST chunk ID as unsigned integer in hex format" as-offset="start_position + offset - 4" assigned-template="AVI File LIST"/>
</if>
<field type="uint32" name="Size of the data in the chunk" var="chunkSize"/>
<setvar var="endOfChunk" expr="offset + chunkSize"/>
<!-- Arrondir la valeur de la variable endOfChunk to a number divisible by 2. -->
<if test="endOfChunk & 1">
<setvar var="endOfChunk" expr="endOfChunk & 0xFFFFFFFE"/>
<setvar var="endOfChunk" expr="endOfChunk + 2"/>
</if>
<if test="chunkId == 1751742049"> <!-- ANSI: avih -->
<field type="uint32" name="Number of microseconds between frames"/>
<field type="uint32" name="Approximate maximum data rate of the file"/>
<field type="uint32" name="Alignment for data, in bytes"/>
<field type="uint32" name="Bitwise combination of zero or more of the flags"/>
<field type="uint32" name="Total number of frames of data in the file"/>
<field type="uint32" name="Initial frame for interleaved files"/>
<field type="uint32" name="Number of streams in the file"/>
<field type="uint32" name="Suggested buffer size for reading the file"/>
<field type="uint32" name="Width of the AVI file in pixels"/>
<field type="uint32" name="Height of the AVI file in pixels"/>
<field type="binary" size="16" name="Reserved"/>
</if>
<if test="chunkId == 1852994675"> <!-- ANSI: strn -->
<field type="char" size="chunkSize" name="Stream name"/>
</if>
<if test="chunkId == 1752331379"> <!-- ANSI: strh -->
<field type="char" size="4" name="Type"/>
<goto offset="-4"/>
<field type="uint32" base="hex" name="Type as unsigned integer in hex format" var="type"/>
<setvar var="mediaType" expr="type"/>
<field type="char" size="4" name="Handler (codec)"/>
<field type="uint32" base="hex" name="Flags"/>
<field type="uint32" name="Number of the first block of the stream that is present in the file"/>
<field type="uint32" name="Scale"/>
<field type="uint32" name="Rate"/>
<field type="uint32" name="Start time of stream"/>
<field type="uint32" name="Size of stream in units as defined in Rate and Scale"/>
<field type="uint32" name="Size of buffer necessary to store blocks of that stream"/>
<field type="uint32" name="Quality"/>
<field type="uint32" name="Sample size (number of bytes of one stream atom)"/>
</if>
<if test="chunkId == 1718776947"> <!-- ANSI: strf -->
<if test="mediaType == 0x73646976"> <!-- ANSI: vids -->
<section name="BITMAPINFOHEADER">
<field type="uint32" name="Number of bytes required by the structure"/>
<field type="int32" name="Width of the bitmap, in pixels"/>
<field type="int32" name="Height of the bitmap, in pixels"/>
<field type="uint16" name="Number of planes for the target device"/>
<field type="uint16" name="Number of bits-per-pixel"/>
<field type="uint32" name="Type of compression for a compressed bottom-up bitmap"/>
<field type="uint32" name="Size, in bytes, of the image"/>
<field type="int32" name="Horizontal resolution, in pixels-per-meter, of the target device for the bitmap"/>
<field type="int32" name="Vertical resolution, in pixels-per-meter, of the target device for the bitmap"/>
<field type="uint32" name="Number of color indexes in the color table that are actually used by the bitmap"/>
<field type="uint32" name="Number of color indexes that are required for displaying the bitmap"/>
</section>
</if>
<if test="mediaType == 0x73647561"> <!-- ANSI: auds -->
<section name="WAVEFORMATEX">
<field type="uint16" name="Waveform-audio format type"/>
<field type="uint16" name="Number of channels in the waveform-audio data"/>
<field type="uint32" name="Sample rate, in samples per second (hertz)"/>
<field type="uint32" name="Required average data-transfer rate, in bytes per second, for the format tag"/>
<field type="uint16" name="Block alignment, in bytes"/>
<field type="uint16" name="Bits per sample for the Waveform-audio format type"/>
<field type="uint16" name="Size, in bytes, of extra format information appended to the end of the WAVEFORMATEX structure"/>
</section>
</if>
</if>
<goto address="endOfChunk"/>
</section>
</repeat>
</if>
<if test="signature != 1414744396">
<section name="Invalid LIST signature found">
</section>
</if>
</section>
</template>