Re: [whatwg] Exposing framerate / statistics of <video> playback and related feedback

On Tue, 1 May 2012, Charles Pritchard wrote:
> 
> The list looked at having a (canvas) ctx.stream = mediaElement; option 
> to better copy frames from a media stream into Canvas. I don't think 
> that the assignment operator will work, but it does seem like we could 
> optimize our drawImage calls to only happen when needed. At present, we 
> simply would run requestAnimationFrame. But, if a video stream is 
> operating on a slower frame rate than rAF, then the drawImage + rAF 
> method will be wasteful.
> 
> I've suggested an onframeready event; it seems as though that event 
> could also carry the number of dropped frames.

I haven't added this, because copying a video one frame at a time doesn't 
seem like an efficient way to do anything. Some sort of mechanism like 
what I had proposed for WebRTC (not sure if it's still in there) seems 
like a more solid solution, letting the browser do all the heavy lifting 
(potentially off the main thread).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 30 November 2012 01:07:35 UTC