ビデオ入力クラス
[詳細]
#include <video.h>
mist::video::video_io_vaseを継承しています。
Public メソッド |
| decoder () |
| コンストラクタ
|
| decoder (const std::string &filename) |
| コンストラクタ
|
virtual | ~decoder () |
| デストラクタ
|
virtual bool | is_open () const |
| ビデオストリームが開いているかどうかを返す
|
virtual bool | is_eof () const |
| ビデオストリームの終わりに来たかどうかを返す
|
virtual int | codec_id () const |
| ストリームのフォーマットを標準出力にダンプする
|
virtual bool | dump () const |
| ストリームのフォーマットを標準出力にダンプする
|
virtual long double | time () const |
| 現在のビデオストリーム上での再生位置を表す秒数
|
virtual int64_t | frame_id () const |
| 現在のビデオストリーム上での再生位置を表す秒数
|
virtual long double | duration () const |
| ビデオストリームの総秒数を返す
|
virtual int64_t | number_of_frames () const |
| 総フレーム数を得る
|
virtual const std::string | filename () const |
| ファイル名を得る
|
virtual size_type | bit_rate () const |
| ビットレートを得る
|
virtual size_type | width () const |
| フレームの幅を得る
|
virtual size_type | height () const |
| フレームの高さを得る
|
virtual long double | frame_rate_numerator () const |
| フレームレートを得る
|
virtual long double | frame_rate_denominator () const |
| フレームレートベースを得る(実際のフレームレート=フレームレート/フレームレートベース)
|
virtual long double | frame_aspect_ratio () const |
| フレームのアスペクト比を得る(ウィンドウ幅/ウィンドウ高さ)
|
virtual bool | open (const std::string &filename) |
| ファイルから入力用ビデオストリームを開く
|
virtual bool | close () |
| ビデオストリームを閉じる
|
bool | skip (difference_type nskips=1) |
| 指定した回数だけフレームスキップ
|
bool | seek (long double tm) |
| 指定した時刻をビデオストリームから探す
|
bool | seek_frame (int64_t fno) |
| 指定したフレーム番号をビデオストリームから探す
|
template<class T , class Allocator > |
bool | read_buffer (array2< T, Allocator > &image) |
| 現在のフレームバッファをarray2形式に変換して格納する
|
template<class T > |
bool | read (array2< T > &image) |
| 現在のフレームバッファをarray2形式に変換して格納し,フレーム番号を1進める
|
template<class T > |
bool | read (array2< T > &image, long double &frame_time) |
| 現在のフレームバッファをarray2形式に変換して格納し,フレーム番号を1進める
|
decoder & | operator++ () |
| 次のフレームへ進む
|
decoder & | operator-- () |
| 一つ前のフレームへ戻る
|
decoder & | operator+= (difference_type fno) |
| ビデオストリームの位置を指定したフレーム数だけ進める
|
decoder & | operator-= (difference_type fno) |
| ビデオストリームの位置を指定したフレーム数だけ戻す
|
virtual bool | is_open () const =0 |
| ビデオストリームが開いているかどうかを返す
|
virtual bool | is_eof () const =0 |
| ビデオストリームの終わりに来たかどうかを返す
|
virtual bool | dump () const =0 |
| ストリームのフォーマットを標準出力にダンプする
|
virtual long double | time () const =0 |
| 現在のビデオストリーム上での再生位置を表す秒数
|
virtual long double | duration () const =0 |
| ビデオストリームの総秒数を返す
|
virtual const std::string | filename () const =0 |
| ファイル名を返す
|
virtual size_type | bit_rate () const =0 |
| ビットレートを返す
|
virtual size_type | width () const =0 |
| フレームの幅を返す
|
virtual size_type | height () const =0 |
| フレームの高さを返す
|
virtual long double | frame_rate_numerator () const =0 |
| フレームレート(A÷B)の分子部分のAを返す
|
virtual long double | frame_rate_denominator () const =0 |
| フレームレート(A÷B)の分母部分のBを返す
|
virtual long double | frame_aspect_ratio () const =0 |
| フレームのアスペクト比を得る(ウィンドウ幅/ウィンドウ高さ)
|
virtual long double | frame_rate () const |
| フレームレートを返す
|
virtual long double | seconds_per_frame () const |
| 1フレームあたりの時間を返す
|
Protected メソッド |
bool | decode (difference_type ntimes=1, int64_t pts=type_limits< int64_t >::maximum()) |
| 指定した回数もしくは指定した位置に来るまでフレームをデコードする
|
説明
ビデオ入力クラス
オーディオストリームは未サポート
コンストラクタとデストラクタ
mist::video::decoder::decoder |
( |
| ) |
|
|
inline |
mist::video::decoder::decoder |
( |
const std::string & |
filename | ) |
|
|
inline |
関数
bool mist::video::decoder::decode |
( |
difference_type |
ntimes = 1 , |
|
|
int64_t |
pts = type_limits< int64_t >::maximum( ) |
|
) |
| |
|
inlineprotected |
指定した回数もしくは指定した位置に来るまでフレームをデコードする
- 引数
-
[in] | ntimes | … スキップ枚数 |
[in] | pts | … 終了位置 |
virtual bool mist::video::decoder::open |
( |
const std::string & |
filename | ) |
|
|
inlinevirtual |
decoder& mist::video::decoder::operator+= |
( |
difference_type |
fno | ) |
|
|
inline |
ビデオストリームの位置を指定したフレーム数だけ進める
- 引数
-
[in] | fno | … ストリームの位置を進めるフレーム数 |
decoder& mist::video::decoder::operator-= |
( |
difference_type |
fno | ) |
|
|
inline |
ビデオストリームの位置を指定したフレーム数だけ戻す
- 引数
-
[in] | fno | … ストリームの位置を進めるフレーム数 |
template<class T >
bool mist::video::decoder::read |
( |
array2< T > & |
image | ) |
|
|
inline |
現在のフレームバッファをarray2形式に変換して格納し,フレーム番号を1進める
- 引数
-
[out] | image | … フレーム画像を格納するための2次元配列 |
- 戻り値
- ストリームの終わりを超えて読み込みを行った場合は false を返す.
参照元 mist::cut_detection().
template<class T >
bool mist::video::decoder::read |
( |
array2< T > & |
image, |
|
|
long double & |
frame_time |
|
) |
| |
|
inline |
現在のフレームバッファをarray2形式に変換して格納し,フレーム番号を1進める
- 引数
-
[out] | image | … フレーム画像を格納するための2次元配列 |
[out] | frame_time | … 読み込んだフレームのビデオストリーム上での時刻を格納する変数 |
- 戻り値
- ストリームの終わりを超えて読み込みを行った場合は false を返す.
template<class T , class Allocator >
bool mist::video::decoder::read_buffer |
( |
array2< T, Allocator > & |
image | ) |
|
|
inline |
bool mist::video::decoder::seek |
( |
long double |
tm | ) |
|
|
inline |
bool mist::video::decoder::seek_frame |
( |
int64_t |
fno | ) |
|
|
inline |
bool mist::video::decoder::skip |
( |
difference_type |
nskips = 1 | ) |
|
|
inline |
このクラスの説明は次のファイルから生成されました: