Class: BMFF::Box::ColourInformation
- Defined in:
- lib/bmff/box/colour_information.rb
Overview
vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
Instance Attribute Summary collapse
-
#colour_primaries ⇒ Object
Returns the value of attribute colour_primaries.
-
#colour_type ⇒ Object
Returns the value of attribute colour_type.
-
#full_range_flag ⇒ Object
Returns the value of attribute full_range_flag.
-
#icc_profile ⇒ Object
Returns the value of attribute icc_profile.
-
#matrix_coefficients ⇒ Object
Returns the value of attribute matrix_coefficients.
-
#reserved1 ⇒ Object
Returns the value of attribute reserved1.
-
#transfer_characteristics ⇒ Object
Returns the value of attribute transfer_characteristics.
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, #remaining_size, #seek_to_end
Instance Attribute Details
#colour_primaries ⇒ Object
Returns the value of attribute colour_primaries.
5 6 7 |
# File 'lib/bmff/box/colour_information.rb', line 5 def colour_primaries @colour_primaries end |
#colour_type ⇒ Object
Returns the value of attribute colour_type.
5 6 7 |
# File 'lib/bmff/box/colour_information.rb', line 5 def colour_type @colour_type end |
#full_range_flag ⇒ Object
Returns the value of attribute full_range_flag.
5 6 7 |
# File 'lib/bmff/box/colour_information.rb', line 5 def full_range_flag @full_range_flag end |
#icc_profile ⇒ Object
Returns the value of attribute icc_profile.
5 6 7 |
# File 'lib/bmff/box/colour_information.rb', line 5 def icc_profile @icc_profile end |
#matrix_coefficients ⇒ Object
Returns the value of attribute matrix_coefficients.
5 6 7 |
# File 'lib/bmff/box/colour_information.rb', line 5 def matrix_coefficients @matrix_coefficients end |
#reserved1 ⇒ Object
Returns the value of attribute reserved1.
5 6 7 |
# File 'lib/bmff/box/colour_information.rb', line 5 def reserved1 @reserved1 end |
#transfer_characteristics ⇒ Object
Returns the value of attribute transfer_characteristics.
5 6 7 |
# File 'lib/bmff/box/colour_information.rb', line 5 def transfer_characteristics @transfer_characteristics end |
Instance Method Details
#parse_data ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/bmff/box/colour_information.rb', line 10 def parse_data super @colour_type = io.get_ascii(4) case @colour_type when "nclx" @colour_primaries = io.get_uint16 @transfer_characteristics = io.get_uint16 @matrix_coefficients = io.get_uint16 tmp = io.get_uint8 @full_range_flag = (tmp & 0x80) > 0 @reserved1 = tmp & 0x7F when "rICC" @icc_profile = :restricted when "prof" @icc_profile = :unrestricted end end |