---
title: "ClikaRT::io::VideoReader::FrameRange"
sidebar_label: "VideoReader::FrameRange"
description: "A lazy range over frames yielding FrameBatches of up to batch_size frames each. The consecutive form covers all frames [0, T); the explicit form covers an arbitrary indices set."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--class">class</span>

**Header:** `ClikaRT/io/video.h`

A lazy range over frames yielding [`FrameBatch`](./FrameBatch.md)es of up to `batch_size` frames each. The consecutive form covers all frames `[0, T)`; the explicit form covers an arbitrary `indices` set. Each dereference decodes its window (and raises [`ClikaRT::Error`](../Error.md) on a decode failure). An index past the clip's last frame is refused by name at the decode, whichever form asked for it.

## Nested types

| Name | Description |
| --- | --- |
| [`iterator`](./VideoReader.FrameRange.iterator.md) | Forward iterator over the range's frames; dereference decodes the frame at the current position. |

## Member functions

### FrameRange() {#FrameRange}

<div class="api-signature">

**`FrameRange`**(`FrameRange&&`) `noexcept`

</div>

Move-only: transfers the range.

<div class="api-declared">

Declared in `ClikaRT/io/video.h`, line 96

</div>

### operator=() {#operator-assign}

<div class="api-signature">

[`FrameRange`](./VideoReader.FrameRange.md)`&` **`operator=`**([`FrameRange`](./VideoReader.FrameRange.md)`&&`) `noexcept`

</div>

Move-assign: transfers the range.

<div class="api-declared">

Declared in `ClikaRT/io/video.h`, line 98

</div>

### \~FrameRange() {#FrameRange-2}

<div class="api-signature">

**`~FrameRange`**()

</div>

Releases the range.

<div class="api-declared">

Declared in `ClikaRT/io/video.h`, line 100

</div>

### begin() {#begin}

<div class="api-signature">

[`iterator`](./VideoReader.FrameRange.iterator.md) **`begin`**() `const`

</div>

The first frame position.

<div class="api-declared">

Declared in `ClikaRT/io/video.h`, line 118

</div>

### end() {#end}

<div class="api-signature">

[`iterator`](./VideoReader.FrameRange.iterator.md) **`end`**() `const`

</div>

One past the last frame position.

<div class="api-declared">

Declared in `ClikaRT/io/video.h`, line 120

</div>

### num\_batches() {#num_batches}

<div class="api-signature">

`std::size_t` **`num_batches`**() `const`

</div>

Number of batches this range yields.

<div class="api-declared">

Declared in `ClikaRT/io/video.h`, line 122

</div>
