Commit Graph
17 Commits
Author SHA1 Message Date
Vanilagy b4a6757739 Fix field typo 2026-06-16 13:43:03 +02:00
4affad934e Add per-sink decoder preferences (hardwareAcceleration, optimizeForLatency) (#406)
* Add per-sink decoder preferences to VideoSampleSink and CanvasSink

Adds an optional VideoSinkDecoderOptions ({ hardwareAcceleration,
optimizeForLatency }) parameter to VideoSampleSink, exposed on CanvasSink
via options.decoderOptions, applied to the decoder config before the
VideoDecoderWrapper is constructed.

Motivation: applications that run many sinks concurrently (multi-track
video editors) need to manage hardware decode sessions deliberately -
the number of concurrent hardware sessions is OS-limited, undocumented,
and exceeding it fails silently on some platforms (macOS VideoToolbox
accepts configure() and decode() and simply never outputs). Such an
application places overflow sinks on 'prefer-software' explicitly.
optimizeForLatency is exposed alongside it since it is the other
WebCodecs decoder-config preference an application may want per sink.

The override composes with the existing interlaced-AVC Chromium
workaround, which runs later and can only strengthen the preference
toward software.

Validation mirrors decode.ts's validateVideoDecodingConfig.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* Modify docs

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: Vanilagy <[email protected]>
2026-06-16 11:42:24 +00:00
Vanilagy 1680bd02ad Holistic technical website cleanup 2026-05-03 19:47:39 +02:00
Vanilagy 7080b79a2a Update docs a bunch, fix some typos 2026-04-15 14:36:53 +02:00
Vanilagy 05ae21e5ea Add EncodedPacketSink.getFirstKeyPacket() (used to fix #314) 2026-03-09 10:19:01 +01:00
Vanilagy bb4749cd8d Add support for reading/writing non-square pixel video frames (fixes #309) 2026-02-25 17:16:33 +01:00
Vanilagy 684b7b7391 Fix order 2025-09-12 16:50:14 +02:00
Vanilagy eba1f360d5 Clean up cropping logic 2025-09-12 16:48:35 +02:00
Pablo Cúbico 904fd8f95e feat: add video crop option 2025-09-05 07:07:43 -03:00
Vanilagy 5e933d9362 Add packet type derivation logic, new verifyKeyPackets options, new determinePacketType method 2025-07-24 16:09:01 +02:00
Vanilagy 0ff0729fec Fix incorrect API usage in docs 2025-06-27 19:06:17 +02:00
Vanilagy 99f813c938 Mediakit -> Mediabunny 2025-06-16 15:46:44 +02:00
Vanilagy e37af1bdad Create conversion doc page, small fixes 2025-06-08 20:40:01 +02:00
Vanilagy f95843e637 Small docs adjustments 2025-05-23 19:05:55 +02:00
Vanilagy 4bbb6edf5d Add thumbnail generation example, fix MP3 detection code error, prefer canvas element over OffscreenCanvas 2025-05-23 18:52:09 +02:00
Vanilagy 65ff4d0106 Add docs for custom coders 2025-05-09 17:03:25 +02:00
Vanilagy 64294655d9 Add documentation for reading files 2025-04-28 12:14:06 +02:00