# `VideoInterop.ConsumerSession`
[🔗](https://github.com/emerge-elixir/video_interop/blob/v0.1.2/lib/video_interop/consumer_session.ex#L1)

An opened consumer stream with explicit frame ownership receipts.

`transfer/2` must perform every fallible admission check before claiming the
frame. After claim it must return a transferred receipt and retain a path that
retires the holder exactly once. Implementations must not raise across an
unknown claim point.

`close/1` is idempotent and returns only after admission is closed and all
pending/current claims are retired or scheduled for consumer-safe retirement.

# `ownership_error`

```elixir
@type ownership_error() :: {:caller_owned | :transferred, term()}
```

# `t`

```elixir
@type t() :: term()
```

All the types that implement this protocol.

# `transfer_result`

```elixir
@type transfer_result() ::
  {:ok, :transferred | :released} | {:error, ownership_error()}
```

# `close`

```elixir
@spec close(t()) :: :ok
```

# `transfer`

```elixir
@spec transfer(t(), VideoInterop.Frame.t()) :: transfer_result()
```

---

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