Class: VCSRuby::MPlayerAudioStream

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(audio_stream) ⇒ MPlayerAudioStream

Returns a new instance of MPlayerAudioStream.



10
11
12
# File 'lib/MPlayer/mplayer_audio_stream.rb', line 10

def initialize audio_stream
  @raw = audio_stream
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



8
9
10
# File 'lib/MPlayer/mplayer_audio_stream.rb', line 8

def raw
  @raw
end

Instance Method Details

#bit_rateObject



30
31
32
# File 'lib/MPlayer/mplayer_audio_stream.rb', line 30

def bit_rate
  @raw['ID_AUDIO_BITRATE'].to_i
end

#channel_layoutObject



22
23
24
# File 'lib/MPlayer/mplayer_audio_stream.rb', line 22

def channel_layout
  ''
end

#channelsObject



18
19
20
# File 'lib/MPlayer/mplayer_audio_stream.rb', line 18

def channels
  @raw['ID_AUDIO_NCH'].to_i
end

#codec(short = false) ⇒ Object



14
15
16
# File 'lib/MPlayer/mplayer_audio_stream.rb', line 14

def codec short = false
  @raw['ID_AUDIO_CODEC']
end

#sample_rateObject



26
27
28
# File 'lib/MPlayer/mplayer_audio_stream.rb', line 26

def sample_rate
  @raw['ID_AUDIO_RATE'].to_i
end