Class: M4S::Layout::Tfdt

Inherits:
Atom
  • Object
show all
Defined in:
lib/m4s/layout/tfdt.rb

Instance Attribute Summary

Attributes inherited from Atom

#cache, #segment_index, #track, #track_id

Instance Method Summary collapse

Methods inherited from Atom

generate, #generate, #initialize

Constructor Details

This class inherits a constructor from M4S::Layout::Atom

Instance Method Details

#binary_contentObject



9
10
11
12
13
14
15
# File 'lib/m4s/layout/tfdt.rb', line 9

def binary_content
  @binary_content ||= M4S::Binary::Tfdt.new(
    version: M4S::Binary::Tfdt::VERSION_1,
    flags: 0,
    base_media_decode_time: earliest_presentation_time,
  ).to_binary_s
end

#earliest_presentation_timeObject



17
18
19
# File 'lib/m4s/layout/tfdt.rb', line 17

def earliest_presentation_time
  cache.segment_earliest_presentation_ticks(track.fetch('track_id'), segment_index)
end

#nameObject



5
6
7
# File 'lib/m4s/layout/tfdt.rb', line 5

def name
  'tfdt'
end