Skip to main content

FromRawVideoFrame

Trait FromRawVideoFrame 

Source
pub trait FromRawVideoFrame {
    const FORMAT: u32;

    // Required methods
    fn check(video: &VideoOutputInfo) -> Result<(), String>;
    unsafe fn from_raw(
        video: &VideoOutputInfo,
        frame_data_ptr: *const u8,
        last_frame_id: Arc<AtomicUsize>,
        frame_id: usize,
    ) -> Self;
}
Available on crate feature output only.
Expand description

動画フレームを表すトレイト。 aviutl2-rsでは、このトレイトを実装した型で動画フレームのフォーマットを指定します。

Required Associated Constants§

Source

const FORMAT: u32

動画フレームのフォーマットを表す定数。

Required Methods§

Source

fn check(video: &VideoOutputInfo) -> Result<(), String>

動画フレームのフォーマットが出力情報に適合するかをチェックする。 例えば、Yuy2VideoFrame(YUV 4:2:2)を使用する場合は、出力情報の幅と高さが偶数であることを確認します。

Source

unsafe fn from_raw( video: &VideoOutputInfo, frame_data_ptr: *const u8, last_frame_id: Arc<AtomicUsize>, frame_id: usize, ) -> Self

動画フレームを生のポインタから取得する。

§Safety

func_get_videoの戻り値のポインタのみが許容される。

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromRawVideoFrame for ImageBuffer<Rgba<u16>, Vec<u16>>

Available on crate feature image only.
Source§

const FORMAT: u32 = aviutl2_sys::common::BI_PA64

Source§

fn check(video: &VideoOutputInfo) -> Result<(), String>

Source§

unsafe fn from_raw( video: &VideoOutputInfo, frame_data_ptr: *const u8, last_frame_id: Arc<AtomicUsize>, frame_id: usize, ) -> Self

Source§

impl FromRawVideoFrame for RgbImage

Available on crate feature image only.
Source§

const FORMAT: u32 = aviutl2_sys::common::BI_RGB

Source§

fn check(video: &VideoOutputInfo) -> Result<(), String>

Source§

unsafe fn from_raw( video: &VideoOutputInfo, frame_data_ptr: *const u8, last_frame_id: Arc<AtomicUsize>, frame_id: usize, ) -> Self

Source§

impl FromRawVideoFrame for Rgba32FImage

Available on crate feature image only.
Source§

const FORMAT: u32 = aviutl2_sys::common::BI_HF64

Source§

fn check(video: &VideoOutputInfo) -> Result<(), String>

Source§

unsafe fn from_raw( video: &VideoOutputInfo, frame_data_ptr: *const u8, last_frame_id: Arc<AtomicUsize>, frame_id: usize, ) -> Self

Implementors§

Source§

impl FromRawVideoFrame for BorrowedRawBgrVideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_RGB

Source§

impl FromRawVideoFrame for BorrowedRawHf64VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_HF64

Source§

impl FromRawVideoFrame for BorrowedRawPa64VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_PA64

Source§

impl FromRawVideoFrame for BorrowedRawYc48VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_YC48

Source§

impl FromRawVideoFrame for BorrowedRawYuy2VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_YUY2

Source§

impl FromRawVideoFrame for Hf64VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_HF64

Source§

impl FromRawVideoFrame for Pa64VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_PA64

Source§

impl FromRawVideoFrame for RawBgrVideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_RGB

Source§

impl FromRawVideoFrame for RawHf64VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_HF64

Source§

impl FromRawVideoFrame for RawPa64VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_PA64

Source§

impl FromRawVideoFrame for RawYc48VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_YC48

Source§

impl FromRawVideoFrame for RawYuy2VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_YUY2

Source§

impl FromRawVideoFrame for RgbVideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_RGB

Source§

impl FromRawVideoFrame for Yc48VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_YC48

Source§

impl FromRawVideoFrame for Yuy2VideoFrame

Source§

const FORMAT: u32 = aviutl2_sys::common::BI_YUY2