Class: VCSRuby::MPlayerVideoStream

Inherits:
Object
  • Object
show all
Defined in:
lib/MPlayer/mplayer_video_stream.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#rawObject (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_ratioObject



40
41
42
# File 'lib/MPlayer/mplayer_video_stream.rb', line 40

def aspect_ratio
  nil
end

#bit_rateObject



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_spaceObject



27
28
29
# File 'lib/MPlayer/mplayer_video_stream.rb', line 27

def color_space
  ''
end

#frame_rateObject



36
37
38
# File 'lib/MPlayer/mplayer_video_stream.rb', line 36

def frame_rate
  @raw['ID_VIDEO_FPS'].to_f
end

#heightObject



19
20
21
# File 'lib/MPlayer/mplayer_video_stream.rb', line 19

def height
  @raw['ID_VIDEO_HEIGHT'].to_i
end

#widthObject



15
16
17
# File 'lib/MPlayer/mplayer_video_stream.rb', line 15

def width
  @raw['ID_VIDEO_WIDTH'].to_i
end