Class: Furnace::SWF::Stream

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/furnace-swf/swf/stream.rb

Instance Method Summary collapse

Instance Method Details

#frame_rateObject



12
13
14
15
# File 'lib/furnace-swf/swf/stream.rb', line 12

def frame_rate
  BigDecimal.new(frame_rate_hi) +
      BigDecimal.new(frame_rate_lo) / 100
end

#real_num_bytesObject



21
22
23
# File 'lib/furnace-swf/swf/stream.rb', line 21

def real_num_bytes
  num_bytes + tag_wrappers.map(&:content_size).reduce(0, :+)
end

#tags(*types) ⇒ Object



17
18
19
# File 'lib/furnace-swf/swf/stream.rb', line 17

def tags(*types)
  tag_wrappers.select { |tw| types.any? { |type| tw.content.is_a? type } }.map(&:content)
end