VideoInterop.Consumer protocol (video_interop v0.1.0)

Copy Markdown View Source

Opens an ownership-aware stream into a video frame consumer.

Implementations validate the format, create a unique consumer-stream identity, and arrange for owner: death or native resource drop to close that stream. The returned value must implement VideoInterop.ConsumerSession.

Summary

Types

t()

All the types that implement this protocol.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

open(consumer, format, opts)

@spec open(t(), VideoInterop.Format.t(), keyword()) ::
  {:ok, VideoInterop.ConsumerSession.t()} | {:error, term()}