Bug 62655 - REGRESSION: Drawing video into canvas gets about one frame every 5 seconds (AVFoundation)
Summary: REGRESSION: Drawing video into canvas gets about one frame every 5 seconds (A...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL: http://www.craftymind.com/factory/htm...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-06-14 11:20 PDT by Jer Noble
Modified: 2011-06-14 13:35 PDT (History)
1 user (show)

See Also:


Attachments
Patch (2.05 KB, patch)
2011-06-14 11:26 PDT, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2011-06-14 11:20:32 PDT
REGRESSION: Drawing video into canvas gets about one frame every 5 seconds (AVFoundation)
Comment 1 Jer Noble 2011-06-14 11:25:12 PDT
http://www.craftymind.com/factory/html5video/CanvasVideo.html has terrible performance on Lion. On SL, it's pretty smooth, but on Lion the animation is really choppy.

Sampling shows lots of time in -[AVAssetImageGenerator copyCGImageAtTime:actualTime:error:] (attached.
Comment 2 Jer Noble 2011-06-14 11:25:26 PDT
<rdar://problem/9569220>
Comment 3 Jer Noble 2011-06-14 11:26:38 PDT
Created attachment 97143 [details]
Patch
Comment 4 Eric Carlson 2011-06-14 11:27:59 PDT
Note that frequency of new frames is directly related to the key frame frequency in the video file because we are not resetting AVFoundation's default of snapping the time value to the nearest key frame time.

This makes the title is slightly misleading, as we could get one frame every five seconds, one frame every minute, ten frames per second, etc.
Comment 5 Eric Carlson 2011-06-14 11:28:47 PDT
Comment on attachment 97143 [details]
Patch

Nice simple fix!
Comment 6 Jer Noble 2011-06-14 13:35:25 PDT
Committed r88847: <http://trac.webkit.org/changeset/88847>