Method: FLV::FLVTag#initialize
- Defined in:
- lib/flv/tag.rb
#initialize(stream = nil) ⇒ FLVTag
Returns a new instance of FLVTag.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/flv/tag.rb', line 43 def initialize(stream = nil) @tag_type = UNDEFINED @byte_offset = nil unless stream.nil? data_size = stream.read__UI24 @timestamp = stream.read__UI24 stream.read__UI32 @data = stream.read(data_size) else @timestamp = 0 @data = '' end after_initialize(stream.nil?) if respond_to? :after_initialize end |