Class: VCSRuby::MPlayerVideoStream
- Inherits:
-
Object
- Object
- VCSRuby::MPlayerVideoStream
- Defined in:
- lib/MPlayer/mplayer_video_stream.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #aspect_ratio ⇒ Object
- #bit_rate ⇒ Object
- #codec(short = false) ⇒ Object
- #color_space ⇒ Object
- #frame_rate ⇒ Object
- #height ⇒ Object
-
#initialize(video_stream) ⇒ MPlayerVideoStream
constructor
A new instance of MPlayerVideoStream.
- #width ⇒ Object
Constructor Details
#initialize(video_stream) ⇒ MPlayerVideoStream
Returns a new instance of MPlayerVideoStream.
11 12 13 |
# File 'lib/MPlayer/mplayer_video_stream.rb', line 11 def initialize video_stream @raw = video_stream end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
9 10 11 |
# File 'lib/MPlayer/mplayer_video_stream.rb', line 9 def raw @raw end |
Instance Method Details
#aspect_ratio ⇒ Object
40 41 42 |
# File 'lib/MPlayer/mplayer_video_stream.rb', line 40 def aspect_ratio nil end |
#bit_rate ⇒ Object
31 32 33 |
# File 'lib/MPlayer/mplayer_video_stream.rb', line 31 def bit_rate @raw['ID_VIDEO_BITRATE'].to_i end |
#codec(short = false) ⇒ Object
23 24 25 |
# File 'lib/MPlayer/mplayer_video_stream.rb', line 23 def codec short = false @raw['ID_VIDEO_FORMAT'] end |
#color_space ⇒ Object
27 28 29 |
# File 'lib/MPlayer/mplayer_video_stream.rb', line 27 def color_space '' end |
#frame_rate ⇒ Object
36 37 38 |
# File 'lib/MPlayer/mplayer_video_stream.rb', line 36 def frame_rate @raw['ID_VIDEO_FPS'].to_f end |
#height ⇒ Object
19 20 21 |
# File 'lib/MPlayer/mplayer_video_stream.rb', line 19 def height @raw['ID_VIDEO_HEIGHT'].to_i end |
#width ⇒ Object
15 16 17 |
# File 'lib/MPlayer/mplayer_video_stream.rb', line 15 def width @raw['ID_VIDEO_WIDTH'].to_i end |