You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add optional drv feature deriving drv::Input on identity types (algesten#974)
* Add optional drv feature deriving drv::Input on identity types
Adds a default-off `drv` feature that derives `drv::Input` (drv's
memoization cache-key plumbing) on the public identity types, so
downstream `#[drv::memo]` queries can take them by value as cache keys
without newtyping them to satisfy drv's ToStatic bound (the orphan rule
blocks a consumer-side impl on str0m's foreign types).
Types covered: Mid, Rid, Ssrc, Pt, SessionId, SeqNo, Direction,
MediaKind, Frequency, Codec, CodecSpec, FormatParams, VideoOrientation,
and the H265 profile types (H265ProfileTierLevel, H265Profile, H265Tier,
H265Level) — the last of which FormatParams transitively requires.
Frequency(NonZeroU32) relies on drv 0.4.3's NonZero ToStatic impls. The
feature is off by default, so non-drv consumers pay no dependency.
Support MediaTime as a drv::Input via an identity ToStatic impl
MediaTime's PartialEq rebases to a common timebase before comparing, so
the structural drv::Input derive would diverge from its real equality.
It's Copy + 'static, so give it a hand-written identity ToStatic impl
that defers to that PartialEq — the same shape drv uses for primitives.
0 commit comments