Class: BMFF::Box::SampleSize

Inherits:
Full
  • Object
show all
Defined in:
lib/bmff/box/sample_size.rb

Overview

vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:

Instance Attribute Summary collapse

Attributes inherited from Full

#flags, #version

Attributes inherited from Base

#io, #largesize, #offset, #parent, #size, #type, #usertype

Instance Method Summary collapse

Methods inherited from Base

#actual_size, #container?, #eob?, #parse, register_box, register_uuid_box, #remaining_size, #root, #seek_to_end

Instance Attribute Details

#entry_sizeObject

Returns the value of attribute entry_size.



5
6
7
# File 'lib/bmff/box/sample_size.rb', line 5

def entry_size
  @entry_size
end

#sample_countObject

Returns the value of attribute sample_count.



5
6
7
# File 'lib/bmff/box/sample_size.rb', line 5

def sample_count
  @sample_count
end

#sample_sizeObject

Returns the value of attribute sample_size.



5
6
7
# File 'lib/bmff/box/sample_size.rb', line 5

def sample_size
  @sample_size
end

Instance Method Details

#parse_dataObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/bmff/box/sample_size.rb', line 8

def parse_data
  super
  @sample_size = io.get_uint32
  @sample_count = io.get_uint32
  @entry_size = []
  if @sample_size == 0
    @sample_count.times do
      @entry_size << io.get_uint32
    end
  end
end