Sha256: 8f4c1dfff2fcc29f00f15c2de51385ef2d4e9fbc55e53effb3352d8d313bb79b

Contents?: true

Size: 575 Bytes

Versions: 10

Compression:

Stored size: 575 Bytes

Contents

#
# Implementes AudioStream Interface for MPlayer
#

# AudioStream = Struct.new(:codec, :channels, :channel_layout, :sample_rate, :bit_rate, :raw)
module VCSRuby
  class MPlayerAudioStream
    attr_reader :raw

    def initialize audio_stream
      @raw = audio_stream
    end

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

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

    def channel_layout
      ''
    end

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vcs_ruby-1.1.16 lib/MPlayer/mplayer_audio_stream.rb
vcs_ruby-1.1.15 lib/MPlayer/mplayer_audio_stream.rb
vcs_ruby-1.1.14 lib/MPlayer/mplayer_audio_stream.rb
vcs_ruby-1.1.13 lib/MPlayer/mplayer_audio_stream.rb
vcs_ruby-1.1.12 lib/MPlayer/mplayer_audio_stream.rb
vcs_ruby-1.1.11 lib/MPlayer/mplayer_audio_stream.rb
vcs_ruby-1.1.10 lib/MPlayer/mplayer_audio_stream.rb
vcs_ruby-1.1.8 lib/MPlayer/mplayer_audio_stream.rb
vcs_ruby-1.1.7 lib/MPlayer/mplayer_audio_stream.rb
vcs_ruby-1.1.6 lib/MPlayer/mplayer_audio_stream.rb