Class: Ogg::Vorbis::IdentificationHeaderPacket
- Inherits:
-
HeaderPacket
- Object
- Packet
- HeaderPacket
- Ogg::Vorbis::IdentificationHeaderPacket
- Defined in:
- lib/ogginfo-rb.rb
Overview
Instance Attribute Summary collapse
-
#audio_channels ⇒ Object
readonly
Returns the value of attribute audio_channels.
-
#audio_sample_rate ⇒ Object
readonly
Returns the value of attribute audio_sample_rate.
-
#bitrate_maximum ⇒ Object
readonly
Returns the value of attribute bitrate_maximum.
-
#bitrate_minimum ⇒ Object
readonly
Returns the value of attribute bitrate_minimum.
-
#bitrate_nominal ⇒ Object
readonly
Returns the value of attribute bitrate_nominal.
-
#vorbis_version ⇒ Object
readonly
Returns the value of attribute vorbis_version.
Attributes inherited from HeaderPacket
Attributes inherited from Packet
Instance Method Summary collapse
-
#initialize(page) ⇒ IdentificationHeaderPacket
constructor
A new instance of IdentificationHeaderPacket.
Methods inherited from Packet
Constructor Details
#initialize(page) ⇒ IdentificationHeaderPacket
Returns a new instance of IdentificationHeaderPacket.
187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/ogginfo-rb.rb', line 187 def initialize page super @vorbis_version = @data.read(4).unpack('L').first @audio_channels = @data.read(1).unpack('C').first @audio_sample_rate = @data.read(4).unpack('L').first @bitrate_maximum = @data.read(4).unpack('l').first @bitrate_nominal = @data.read(4).unpack('l').first @bitrate_minimum = @data.read(4).unpack('l').first blocksizes = @data.read(1).unpack('C').first end |
Instance Attribute Details
#audio_channels ⇒ Object (readonly)
Returns the value of attribute audio_channels.
184 185 186 |
# File 'lib/ogginfo-rb.rb', line 184 def audio_channels @audio_channels end |
#audio_sample_rate ⇒ Object (readonly)
Returns the value of attribute audio_sample_rate.
184 185 186 |
# File 'lib/ogginfo-rb.rb', line 184 def audio_sample_rate @audio_sample_rate end |
#bitrate_maximum ⇒ Object (readonly)
Returns the value of attribute bitrate_maximum.
185 186 187 |
# File 'lib/ogginfo-rb.rb', line 185 def bitrate_maximum @bitrate_maximum end |
#bitrate_minimum ⇒ Object (readonly)
Returns the value of attribute bitrate_minimum.
185 186 187 |
# File 'lib/ogginfo-rb.rb', line 185 def bitrate_minimum @bitrate_minimum end |
#bitrate_nominal ⇒ Object (readonly)
Returns the value of attribute bitrate_nominal.
185 186 187 |
# File 'lib/ogginfo-rb.rb', line 185 def bitrate_nominal @bitrate_nominal end |
#vorbis_version ⇒ Object (readonly)
Returns the value of attribute vorbis_version.
184 185 186 |
# File 'lib/ogginfo-rb.rb', line 184 def vorbis_version @vorbis_version end |