AutoMovie API
    Preparing search index...

    Class AutoMovieCaptureFolder

    The folder one capture writes, and the rules of which files it owns and in what order it touches them.

    A capture without a round writes into its root and replaces the previous unnamed capture; a capture with a round writes into <root>/rounds/<round>, which later captures of other rounds leave alone. A folder may hold only the files its last record lists, its record, and at the root the rounds folder; any other entry is a file the capture did not write, and the folder is refused rather than touched.

    The steps run in this order, each before the next:

    1. Read the compared round's record, refusing a round that is missing or unfinished.
    2. Create the folder, list it, read its previous record, and refuse an entry that record does not own.
    3. Delete the previous capture's files, leaving its record.
    4. On claim, write a running record listing every file about to be written, replacing the previous record.
    5. Write the claimed files; a name not claimed is refused.
    6. On close, write the complete record listing the files written.

    A folder interrupted after any step still has a record that owns every file in it, so the next capture replaces them instead of refusing the folder. Paths are the root and names joined by /, and no name leaves the folder.

    const folder = await AutoMovieCaptureFolder.open({ storage, root, round: null, compare: null });
    await folder.claim(["t000.000-film-beauty.png"]);
    await folder.write("t000.000-film-beauty.png", bytes);
    await folder.close(record);

    Implements

    Index
    compare: string | null

    Round compared against, or null.

    directory: string

    Path of the folder, the root or a round beneath it, without a trailing /.

    earlier:
        | {
            budget: IAutoMovieCaptureBudget;
            comparison: IAutoMovieCaptureComparison
            | null;
            diagnostics?: IAudit;
            files: string[];
            layout: IAutoMovieCaptureLayout;
            request: [key: string, value: string][];
            revision: string;
            rows: IAutoMovieCaptureCellRecord[];
            section: Readonly<Record<string, unknown>> | null;
            sheets: string[];
            state: "complete";
            subject: {
                durationSeconds: number;
                fps: number;
                height: number;
                name: string;
                width: number;
            };
            times: IAutoMovieCaptureTime[];
            video: IAutoMovieCaptureVideoSource
            | null;
            windows: IAutoMovieCaptureWindow[];
        }
        | null

    The compared round's complete record, or null without a comparison.

    Type Declaration

    • {
          budget: IAutoMovieCaptureBudget;
          comparison: IAutoMovieCaptureComparison | null;
          diagnostics?: IAudit;
          files: string[];
          layout: IAutoMovieCaptureLayout;
          request: [key: string, value: string][];
          revision: string;
          rows: IAutoMovieCaptureCellRecord[];
          section: Readonly<Record<string, unknown>> | null;
          sheets: string[];
          state: "complete";
          subject: {
              durationSeconds: number;
              fps: number;
              height: number;
              name: string;
              width: number;
          };
          times: IAutoMovieCaptureTime[];
          video: IAutoMovieCaptureVideoSource
          | null;
          windows: IAutoMovieCaptureWindow[];
      }
      • budget: IAutoMovieCaptureBudget

        The reader the sheets were laid out for.

      • comparison: IAutoMovieCaptureComparison | null

        The comparison against an earlier round, or null when none was asked.

      • Optionaldiagnostics?: IAudit

        Findings and coverage for captured samples that supplied diagnostics, without a full delivery schedule.

      • files: string[]

        Every file name the capture wrote in its folder, this record included.

      • layout: IAutoMovieCaptureLayout

        How the sheets were laid out.

      • request: [key: string, value: string][]

        The request as the named text values that repeat it.

      • revision: string

        Source revision the host drew from, such as a commit hash.

      • rows: IAutoMovieCaptureCellRecord[]

        One row per planned cell, in plan order.

      • section: Readonly<Record<string, unknown>> | null

        The subject owner's own section, such as a motion case's verdicts and metrics, as the host handed it over, or null when the owner has none.

      • sheets: string[]

        File names of the contact sheets, in order.

      • state: "complete"

        Written after the last file.

      • subject: {
            durationSeconds: number;
            fps: number;
            height: number;
            name: string;
            width: number;
        }

        The subject's name, clock and raster.

        • durationSeconds: number

          Running time in seconds.

        • fps: number

          Frames per second of its grid.

        • height: number

          Still height in pixels.

        • name: string

          Name of the subject.

        • width: number

          Still width in pixels.

      • times: IAutoMovieCaptureTime[]

        Every instant planned.

      • video: IAutoMovieCaptureVideoSource | null

        The video file the stills were taken from, with its detected cuts, or null for a drawn subject.

      • windows: IAutoMovieCaptureWindow[]

        The frames planned around each event and cut, with whether the subject's bounds cut them.

    • null
    reference: string | null

    Path of the compared round's folder, or null without a comparison.

    round: string | null

    Round the folder keeps, or null for the root.