Class: Bootstrap

Inherits:
Object
  • Object
show all
Defined in:
lib/glued/bootstrap.rb

Constant Summary collapse

AFRA =

Top level

'afra'
ABST =

Fragment random access for HTTP streaming

'abst'
MOOV =

Bootstrap info for HTTP streaming

'moov'
MOOF =

Container for structural metadata

'moof'
MDAT =

Movie Fragment

'mdat'
ASRT =

Inside ABST

'asrt'
AFRT =

Segment run table box

'afrt'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Bootstrap

Returns a new instance of Bootstrap.



6
7
8
9
10
# File 'lib/glued/bootstrap.rb', line 6

def initialize(data)
  @reader = F4VIO.new(data)
  @boxes = []
  scan
end

Instance Attribute Details

#boxesObject (readonly)

Returns the value of attribute boxes.



4
5
6
# File 'lib/glued/bootstrap.rb', line 4

def boxes
  @boxes
end

Instance Method Details

#fragmentsObject



27
28
29
# File 'lib/glued/bootstrap.rb', line 27

def fragments
  @boxes.first.segment_run_tables.first.run_entry_table.first.fragments_per_segment
end

#segmentsObject

Fragment runt table box



23
24
25
# File 'lib/glued/bootstrap.rb', line 23

def segments
  @boxes.first.segments
end