-While list_in !empty and list_out !empty
- 1. If list_in is empty (need a seek)
- 1.1 Add requests to list_in
- 1.1.1 Find all time requests with the lowest start time in list_out
- (ltime)
- 1.1.2 Find all position requests with the lowest position in list_out
- (lpos)
- 1.1.3 If lpos.start time < ltime
- - Add lpos to list_in, remove them from list_out
- 1.1.4 Else, (lpos.start time >= ltime)
- - Add ltime to list_in, remove them from list_out
- 1.2 Seek
- 1.2.1 If first request in list_in is a time request
- 1.2.1.1 Seek to that time
- 1.2.2 Else, the first request in list_in is a position request
- 1.2.2.1 Seek to that position
- 1.3 Call begin for all list_in members
- (1.3.1 begin hooks called)
- (1.3.2 middle hooks added)
- 2. Else, list_in is not empty, we continue a read
- 2.1 For each req of list_out
- - if req.start time == current context time
- - Add to list_in, remove from list_out
- - Call begin
- - if req.start position == current position
- - Add to list_in, remove from list_out
- - Call begin