# `ExCubecl.VideoFrame`
[🔗](https://github.com/ohhi-vn/ex_cubecl/blob/v0.4.0/lib/ex_cubecl/video_frame.ex#L1)

A video frame buffer residing on the GPU.

## Fields

  * `handle` — GPU buffer reference (Rustler ResourceArc)
  * `width` — frame width in pixels
  * `height` — frame height in pixels
  * `format` — pixel format (`:yuv420p`, `:rgb24`, `:rgba`, `:nv12`)
  * `pts` — presentation timestamp in microseconds
  * `duration` — frame duration in microseconds

# `t`

```elixir
@type t() :: %ExCubecl.VideoFrame{
  duration: non_neg_integer(),
  format: :yuv420p | :rgb24 | :rgba | :nv12,
  handle: reference(),
  height: non_neg_integer(),
  pts: non_neg_integer(),
  width: non_neg_integer()
}
```

# `from_map`

```elixir
@spec from_map(map()) :: t()
```

Creates a VideoFrame from a map returned by the NIF.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
