Class: BMFF::Box::VisualSampleEntry

Inherits:
SampleEntry show all
Includes:
Container
Defined in:
lib/bmff/box/visual_sample_entry.rb

Overview

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

Instance Attribute Summary collapse

Attributes included from Container

#children

Attributes inherited from SampleEntry

#data_reference_index, #reserved1

Attributes inherited from Base

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

Instance Method Summary collapse

Methods included from Container

#add_child, #container?, #find, #find_all, #parse_children, #select_descendants

Methods inherited from Base

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

Instance Attribute Details

#clean_aperture_boxObject

Returns the value of attribute clean_aperture_box.



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

def clean_aperture_box
  @clean_aperture_box
end

#compressornameObject

Returns the value of attribute compressorname.



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

def compressorname
  @compressorname
end

#depthObject

Returns the value of attribute depth.



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

def depth
  @depth
end

#frame_countObject

Returns the value of attribute frame_count.



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

def frame_count
  @frame_count
end

#heightObject

Returns the value of attribute height.



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

def height
  @height
end

#horizresolutionObject

Returns the value of attribute horizresolution.



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

def horizresolution
  @horizresolution
end

#pixel_aspect_ratio_boxObject

Returns the value of attribute pixel_aspect_ratio_box.



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

def pixel_aspect_ratio_box
  @pixel_aspect_ratio_box
end

#pre_defined1Object

Returns the value of attribute pre_defined1.



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

def pre_defined1
  @pre_defined1
end

#pre_defined2Object

Returns the value of attribute pre_defined2.



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

def pre_defined2
  @pre_defined2
end

#pre_defined3Object

Returns the value of attribute pre_defined3.



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

def pre_defined3
  @pre_defined3
end

#reserved2Object

Returns the value of attribute reserved2.



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

def reserved2
  @reserved2
end

#reserved3Object

Returns the value of attribute reserved3.



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

def reserved3
  @reserved3
end

#vertresolutionObject

Returns the value of attribute vertresolution.



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

def vertresolution
  @vertresolution
end

#widthObject

Returns the value of attribute width.



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

def width
  @width
end

Instance Method Details

#parse_dataObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/bmff/box/visual_sample_entry.rb', line 10

def parse_data
  super
  @pre_defined1 = io.get_uint16
  @reserved2 = io.get_uint16
  @pre_defined2 = [io.get_uint32, io.get_uint32, io.get_uint32]
  @width = io.get_uint16
  @height = io.get_uint16
  @horizresolution = io.get_uint32
  @vertresolution = io.get_uint32
  @reserved3 = io.get_uint32
  @frame_count = io.get_uint16
  compressorname_size = io.get_uint8 & 0x1F
  compressorname_buffer = io.get_ascii(31)
  @compressorname = compressorname_buffer[0, compressorname_size]
  @depth = io.get_uint16
  @pre_defined3 = io.get_int16
  until eob?
    box = BMFF::Box.get_box(io, self)
    add_child box
    case box
    when BMFF::Box::CleanAperture
      @clean_aperture_box = box
    when BMFF::Box::PixelAspectRatio
      @pixel_aspect_ratio_box = box
    end
  end
end