Class: VCSRuby::MPlayerAudioStream
- Inherits:
-
Object
- Object
- VCSRuby::MPlayerAudioStream
- Defined in:
- lib/MPlayer/mplayer_audio_stream.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #bit_rate ⇒ Object
- #channel_layout ⇒ Object
- #channels ⇒ Object
- #codec(short = false) ⇒ Object
-
#initialize(audio_stream) ⇒ MPlayerAudioStream
constructor
A new instance of MPlayerAudioStream.
- #sample_rate ⇒ Object
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
#raw ⇒ Object (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_rate ⇒ Object
30 31 32 |
# File 'lib/MPlayer/mplayer_audio_stream.rb', line 30 def bit_rate @raw['ID_AUDIO_BITRATE'].to_i end |
#channel_layout ⇒ Object
22 23 24 |
# File 'lib/MPlayer/mplayer_audio_stream.rb', line 22 def channel_layout '' end |
#channels ⇒ Object
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_rate ⇒ Object
26 27 28 |
# File 'lib/MPlayer/mplayer_audio_stream.rb', line 26 def sample_rate @raw['ID_AUDIO_RATE'].to_i end |