Class: M2TSParser::Appendix::AribDuration

Inherits:
BinaryParser::TemplateBase
  • Object
show all
Defined in:
lib/m2ts_parser/appendix/arib_duration.rb

Instance Method Summary collapse

Instance Method Details

#content_descriptionObject



10
11
12
# File 'lib/m2ts_parser/appendix/arib_duration.rb', line 10

def content_description
  to_s
end

#to_sObject



14
15
16
# File 'lib/m2ts_parser/appendix/arib_duration.rb', line 14

def to_s
  return sprintf("%02d:%02d:%02d", hour.to_i, min.to_i, sec.to_i)
end

#to_secObject



18
19
20
# File 'lib/m2ts_parser/appendix/arib_duration.rb', line 18

def to_sec
  return hour.to_i * 3600 + min.to_i * 60 + sec.to_i
end