Class: VideoFile::File
- Inherits:
-
Data
- Object
- Data
- VideoFile::File
- Defined in:
- ext/video_file_ext/ext.c
Instance Method Summary collapse
-
#dar ⇒ Float
(also: #aspect_ratio)
The video’s aspect ratio.
-
#duration ⇒ Float
The video’s duration (in seconds).
-
#fps ⇒ Float
(also: #frame_frate)
The video’s frame rate (FPS, frames per second).
-
#height ⇒ Numeric
The video’s height (in pixels).
- #initialize(filename) ⇒ Object constructor
- #par ⇒ Object
-
#width ⇒ Numeric
The video’s width (in pixels).
Constructor Details
#initialize(filename) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 |
# File 'ext/video_file_ext/ext.c', line 40
VALUE file_m_initialize(VALUE self, VALUE filename)
{
Check_Type(filename, T_STRING);
VfFile *file;
TypedData_Get_Struct(self, VfFile, &file_type, file);
if(!vf_file_init(file, StringValueCStr(filename))) {
rb_raise(eError, "%s", file->last_error_str);
}
return self;
}
|
Instance Method Details
#dar ⇒ Float Also known as: aspect_ratio
Returns the video’s aspect ratio.
#duration ⇒ Float
Returns the video’s duration (in seconds).
#fps ⇒ Float Also known as: frame_frate
Returns the video’s frame rate (FPS, frames per second).
#height ⇒ Numeric
Returns the video’s height (in pixels).
#par ⇒ Object
#width ⇒ Numeric
Returns the video’s width (in pixels).