[Webkit-unassigned] [Bug 139813] [MSE] Implement per TrackBuffer buffered.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 14 10:41:55 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=139813

--- Comment #7 from Bartlomiej Gajda <b.gajda at samsung.com> ---
> This is great. What I'd like to see added, but maybe in another patch, is
> caching of buffered ranges at the MediaSource level. Right now, an expensive
> merge step happens every time someone requests buffered().

I will add caching for MediaSource after this, shouldn't be too hard, but don't want mix stuff too much. (would need to also handle activeSourceBuffers there)

> > Source/WebCore/Modules/mediasource/SourceBuffer.cpp:821
> > +    recalculateBuffered();
> 
> The way we do this in other places, like HTMLMediaElement, is that instead
> of recalculating the cached value immediately when its invalidated, we mark
> it as dirty and only recalculate the value when asked.  This would mean
> replacing all your instances of "recalculateBuffered()" to something like
> "invalidateBuffered()", and call "recalculateBuffered()" from within
> "buffered()" if the value is invalidated.

Done.

> This is probably more often than necessary. You could call this (or
> invalidate buffered) from sourceBufferPrivateAppendComplete().

Didn't thought about that, You're right, it would be way better. Will fix.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150114/a4da6f89/attachment-0002.html>


More information about the webkit-unassigned mailing list