OutputInfo

Struct OutputInfo 

Source
pub struct OutputInfo {
    pub video: Option<VideoOutputInfo>,
    pub audio: Option<AudioOutputInfo>,
    pub path: PathBuf,
    /* private fields */
}
Available on crate feature output only.
Expand description

出力情報を表す構造体。

Fields§

§video: Option<VideoOutputInfo>

動画出力情報。動画出力がない場合はNone

§audio: Option<AudioOutputInfo>

音声出力情報。音声出力がない場合はNone

§path: PathBuf

出力先のファイルパス。

Implementations§

Source§

impl OutputInfo

Source

pub fn get_video_frame<F: FromRawVideoFrame>(&self, frame: i32) -> Option<F>

動画のフレームを取得する。

Source

pub unsafe fn get_video_frame_unchecked<F: FromRawVideoFrame>( &self, frame: i32, ) -> Option<F>

動画のフレームを取得する。 Self::get_video_frameと違い、FromRawVideoFrame::checkや境界のチェックを行いません。

§Safety

以下は未定義動作です:

Source

pub fn get_video_frames_iter<F: FromRawVideoFrame>( &self, ) -> VideoFramesIterator<'_, F>

動画のフレームをイテレータとして取得する。

Source

pub fn get_audio_samples<F: FromRawAudioSamples>( &self, start: i32, length: i32, ) -> Option<(Vec<F>, u32)>

指定した区間の音声サンプルとチャンネル数を取得する。

Source

pub fn get_mono_audio_samples<F: FromRawAudioSamples>( &self, start: i32, length: i32, ) -> Option<Vec<F>>

指定した区間の音声サンプルをモノラル形式で取得する。 num_channelsが1の場合はそのまま、2の場合は左チャンネルのサンプルを返します。

Source

pub fn get_mono_audio_samples_iter<F: FromRawAudioSamples>( &self, length: i32, ) -> MonoAudioSamplesIterator<'_, F>

モノラルの音声サンプルをイテレータとして取得する。

§Arguments
  • length: 一回のイテレーションで取得するサンプル数。
Source

pub fn get_stereo_audio_samples<F: FromRawAudioSamples>( &self, start: i32, length: i32, ) -> Option<Vec<(F, F)>>

指定した区間の音声サンプルをステレオ形式で取得する。 num_channelsが2の場合はそのまま、1の場合はチャンネルを複製してステレオ形式に変換します。

Source

pub fn get_stereo_audio_samples_iter<F: FromRawAudioSamples>( &self, length: i32, ) -> StereoAudioSamplesIterator<'_, F>

ステレオの音声サンプルをイテレータとして取得する。

§Arguments
  • length: 一回のイテレーションで取得するサンプル数。
Source

pub fn is_aborted(&self) -> bool

出力が中断されたかどうかを確認する。

Source

pub fn update_display(&self, current_frame: i32, total_frames: i32)

出力の進行状況を更新する。

Source

pub fn set_buffer_size(&self, video_size: i32, audio_size: i32)

データ取得のバッファ数(フレーム数)を設定する。 バッファ数の半分のデータを先読みリクエストするようになります。

Trait Implementations§

Source§

impl Clone for OutputInfo

Source§

fn clone(&self) -> OutputInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OutputInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for OutputInfo

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for OutputInfo

Source§

impl Sync for OutputInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.