# `MedEx.PreviewProvider`
[🔗](https://github.com/nshkrdotcom/med_ex/blob/med_ex-v0.2.0/components/core/med_capture/lib/med_ex/preview_provider.ex#L1)

Explicit optional encoder port. start_link options bind owner, format and session ID.
A granted offer produces {:med_ex_encoded, operation_id, sample_index, payload}
or {:med_ex_encode_failed, operation_id, reason} to that owner. At most one
offer is in flight. Native providers belong outside the authoritative VM in
the strict deployment profile. These callbacks do not grant storage access.

# `offer`

```elixir
@callback offer(pid(), term(), non_neg_integer(), binary()) ::
  :ok | {:error, :busy | term()}
```

# `start_legacy`
*optional* 

```elixir
@callback start_legacy(owner :: pid()) :: {:ok, pid(), pid()} | {:error, term()}
```

# `start_link`

```elixir
@callback start_link(keyword()) :: {:ok, pid()} | {:error, term()}
```

# `stop`

```elixir
@callback stop(pid()) :: :ok
```

---

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