Class: FormatParser::Video
- Inherits:
-
Object
- Object
- FormatParser::Video
- Includes:
- AttributesJSON
- Defined in:
- lib/video.rb
Constant Summary collapse
- NATURE =
:video
Constants included from AttributesJSON
AttributesJSON::MAXIMUM_JSON_NESTING_WHEN_SANITIZING
Instance Attribute Summary collapse
-
#codecs ⇒ Object
Returns the value of attribute codecs.
-
#content_type ⇒ Object
The MIME type of the video.
-
#format ⇒ Object
Type of the file (e.g :mp3).
-
#frame_rate ⇒ Object
Returns the value of attribute frame_rate.
-
#height_px ⇒ Object
Returns the value of attribute height_px.
-
#intrinsics ⇒ Object
If a parser wants to provide any extra information to the caller it can be placed here.
-
#media_duration_frames ⇒ Object
Duration of the media object in addressable frames or samples, as an Integer.
-
#media_duration_seconds ⇒ Object
Duration of the media object (be it audio or video) in seconds, as a Float.
-
#width_px ⇒ Object
Returns the value of attribute width_px.
Instance Method Summary collapse
-
#initialize(**attributes) ⇒ Video
constructor
Only permits assignments via defined accessors.
- #nature ⇒ Object
Methods included from AttributesJSON
_sanitize_json_value, #as_json, #to_json
Constructor Details
#initialize(**attributes) ⇒ Video
Only permits assignments via defined accessors
34 35 36 |
# File 'lib/video.rb', line 34 def initialize(**attributes) attributes.map { |(k, v)| public_send("#{k}=", v) } end |
Instance Attribute Details
#codecs ⇒ Object
Returns the value of attribute codecs.
16 17 18 |
# File 'lib/video.rb', line 16 def codecs @codecs end |
#content_type ⇒ Object
The MIME type of the video
31 32 33 |
# File 'lib/video.rb', line 31 def content_type @content_type end |
#format ⇒ Object
Type of the file (e.g :mp3)
14 15 16 |
# File 'lib/video.rb', line 14 def format @format end |
#frame_rate ⇒ Object
Returns the value of attribute frame_rate.
11 12 13 |
# File 'lib/video.rb', line 11 def frame_rate @frame_rate end |
#height_px ⇒ Object
Returns the value of attribute height_px.
9 10 11 |
# File 'lib/video.rb', line 9 def height_px @height_px end |
#intrinsics ⇒ Object
If a parser wants to provide any extra information to the caller it can be placed here
28 29 30 |
# File 'lib/video.rb', line 28 def intrinsics @intrinsics end |
#media_duration_frames ⇒ Object
Duration of the media object in addressable frames or samples, as an Integer
24 25 26 |
# File 'lib/video.rb', line 24 def media_duration_frames @media_duration_frames end |
#media_duration_seconds ⇒ Object
Duration of the media object (be it audio or video) in seconds, as a Float
20 21 22 |
# File 'lib/video.rb', line 20 def media_duration_seconds @media_duration_seconds end |
#width_px ⇒ Object
Returns the value of attribute width_px.
7 8 9 |
# File 'lib/video.rb', line 7 def width_px @width_px end |
Instance Method Details
#nature ⇒ Object
38 39 40 |
# File 'lib/video.rb', line 38 def nature NATURE end |