Closed Bug 1509548 Opened 5 years ago Closed 5 years ago

Reenable the start time assertion in StreamTracks.h


(Core :: WebRTC: Audio/Video, enhancement, P2)




Tracking Status
firefox65 --- fixed


(Reporter: padenot, Assigned: pehrsons)




(6 files, 1 obsolete file)

Disable to keep the Stream -> Tracks refactoring in the tree, but we should have a look.
Pushed by
Temporarily disable an assertion following 1423241.
Andreas, if you could have a look in a timely manner it would be great, thanks!
Blocks: 1423241
Flags: needinfo?(apehrson)
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Oops I meant to mark this one leave-open.
Resolution: FIXED → ---
Flags: needinfo?(apehrson)
Since DecodedStream pushes data ahead of the MediaStreamGraph's currentTime we have some data buffered in StreamTracks.

When seeking, the original media element stops playback and starts seeking. The captureStream will continue to play the buffered data instead (breaking spec).

When seeking is finished the original media element starts playback again, from the new position. DecodedStream on the other hand creates new tracks for playing from the new position (breaking spec). If the old tracks haven't ended yet, there's an overlap in the stream's timeline, and the new tracks are added to the graph *before* the knownTracksTime (which is the end of the pushed data) and we fail the assert.

This ties a bit into bug 1172394 since we should not create new tracks when seeking. Fixing that should be the long-term solution for this bug.

Short-term I feel inclined to remove knownTracksTime altogether. It is used as a measure outside of end times of track's to keep a stream's currentTime from advancing. With it removed, a stream's currentTime would instead be capped at the earliest end time of its non-ended tracks. That seems fine.
We'd also lose this assert, but that seems fine to me too.

Also note that of all users of SourceMediaStream, only DecodedStream is currently using AdvanceKnownTracksTime,
They deserve descriptive names.
Without knownTracksTime, StreamTracks::GetFirstTrackEnd() returns
STREAM_TIME_MAX for an empty StreamTracks, so PullNewData() thinks no new data
is needed.

This circumvents that by always checking whether tracks need data.
Attachment #9027576 - Attachment is obsolete: true
Rank: 15
Priority: -- → P2
Pushed by
Remove the concept of a known tracks time from MediaStreamGraph. r=padenot
Rename track-end-time methods in StreamTracks. r=padenot
Clean up what appears to be wip-leftover gunk in DecodedStream. r=jya
Remove early PullNewData return. r=padenot
Make MediaStreamGraph pull data per track instead of per stream. r=padenot
Depends on: 1513973
Depends on: 1521577
Depends on: 1523817
You need to log in before you can comment on or make changes to this bug.