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
impl OutputInfo
Sourcepub fn get_video_frame<F: FromRawVideoFrame>(&self, frame: i32) -> Option<F>
pub fn get_video_frame<F: FromRawVideoFrame>(&self, frame: i32) -> Option<F>
動画のフレームを取得する。
Sourcepub unsafe fn get_video_frame_unchecked<F: FromRawVideoFrame>(
&self,
frame: i32,
) -> Option<F>
pub unsafe fn get_video_frame_unchecked<F: FromRawVideoFrame>( &self, frame: i32, ) -> Option<F>
動画のフレームを取得する。
Self::get_video_frameと違い、FromRawVideoFrame::checkや境界のチェックを行いません。
§Safety
以下は未定義動作です:
FromRawVideoFrame::checkがfalseの場合frameが動画のフレーム数の範囲外の場合
Sourcepub fn get_video_frames_iter<F: FromRawVideoFrame>(
&self,
) -> VideoFramesIterator<'_, F> ⓘ
pub fn get_video_frames_iter<F: FromRawVideoFrame>( &self, ) -> VideoFramesIterator<'_, F> ⓘ
動画のフレームをイテレータとして取得する。
Sourcepub fn get_audio_samples<F: FromRawAudioSamples>(
&self,
start: i32,
length: i32,
) -> Option<(Vec<F>, u32)>
pub fn get_audio_samples<F: FromRawAudioSamples>( &self, start: i32, length: i32, ) -> Option<(Vec<F>, u32)>
指定した区間の音声サンプルとチャンネル数を取得する。
Sourcepub fn get_mono_audio_samples<F: FromRawAudioSamples>(
&self,
start: i32,
length: i32,
) -> Option<Vec<F>>
pub fn get_mono_audio_samples<F: FromRawAudioSamples>( &self, start: i32, length: i32, ) -> Option<Vec<F>>
指定した区間の音声サンプルをモノラル形式で取得する。
num_channelsが1の場合はそのまま、2の場合は左チャンネルのサンプルを返します。
Sourcepub fn get_mono_audio_samples_iter<F: FromRawAudioSamples>(
&self,
length: i32,
) -> MonoAudioSamplesIterator<'_, F> ⓘ
pub fn get_mono_audio_samples_iter<F: FromRawAudioSamples>( &self, length: i32, ) -> MonoAudioSamplesIterator<'_, F> ⓘ
Sourcepub fn get_stereo_audio_samples<F: FromRawAudioSamples>(
&self,
start: i32,
length: i32,
) -> Option<Vec<(F, F)>>
pub fn get_stereo_audio_samples<F: FromRawAudioSamples>( &self, start: i32, length: i32, ) -> Option<Vec<(F, F)>>
指定した区間の音声サンプルをステレオ形式で取得する。
num_channelsが2の場合はそのまま、1の場合はチャンネルを複製してステレオ形式に変換します。
Sourcepub fn get_stereo_audio_samples_iter<F: FromRawAudioSamples>(
&self,
length: i32,
) -> StereoAudioSamplesIterator<'_, F> ⓘ
pub fn get_stereo_audio_samples_iter<F: FromRawAudioSamples>( &self, length: i32, ) -> StereoAudioSamplesIterator<'_, F> ⓘ
Sourcepub fn is_aborted(&self) -> bool
pub fn is_aborted(&self) -> bool
出力が中断されたかどうかを確認する。
Sourcepub fn update_display(&self, current_frame: i32, total_frames: i32)
pub fn update_display(&self, current_frame: i32, total_frames: i32)
出力の進行状況を更新する。
Sourcepub fn set_buffer_size(&self, video_size: i32, audio_size: i32)
pub fn set_buffer_size(&self, video_size: i32, audio_size: i32)
データ取得のバッファ数(フレーム数)を設定する。 バッファ数の半分のデータを先読みリクエストするようになります。
Trait Implementations§
Source§impl Clone for OutputInfo
impl Clone for OutputInfo
Source§fn clone(&self) -> OutputInfo
fn clone(&self) -> OutputInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutputInfo
impl Debug for OutputInfo
Source§impl Drop for OutputInfo
impl Drop for OutputInfo
impl Send for OutputInfo
impl Sync for OutputInfo
Auto Trait Implementations§
impl Freeze for OutputInfo
impl RefUnwindSafe for OutputInfo
impl Unpin for OutputInfo
impl UnwindSafe for OutputInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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