Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
Since September 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
allocationSize() は VideoFrame インターフェイスのメソッドで、メソッドに渡すオプションでフィルタリングされた動画を保持するために必要なバイト数を返します。
以下のものを含むオブジェクトです。
rect 省略可VideoFrame からコピーされるピクセルの長方形。未指定の場合、 visibleRect を使用します。これは以下のものを含む辞書オブジェクトの形を採ります。
VideoFrame 内の各プレーンについて、以下の値を格納したリスト。プレーンは重なってはいけません。未指定の場合、プレーンは密に詰められます。
offset整数で、指定されたプレーンが始まるバイト単位のオフセットを表します。
stride整数で、プレーンの各行が使用するバイト数(パディングを含む)を表します。
options で指定したフレームを格納するのに必要なバイト数を示す整数。
次の例では、左上の 800 × 600 の長方形に対して allocationSize が返されます。
| WebCodecs # dom-videoframe-allocationsize |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2024年4月28日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.