Closed Bug 813685 Opened 13 years ago Closed 11 years ago

Camera - lag between camera and viewfinder

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-basecamp:-)

RESOLVED DUPLICATE of bug 844248
blocking-basecamp -

People

(Reporter: mikeh, Assigned: mikeh)

References

Details

It looks like there's a fairly significant (potentially annoying) lag between what the camera is pointing at, and the viewfinder updating. More so, it _looks_ like initially the viewfinder has very little lag, and that the lag increases within the first few seconds of the viewfinder being on, at which point it settles into what looks like ~333ms of delay.
(I'm adding this as a bug because it doesn't appear on the Android/ICS viewfinder on the same hardware, so there's likely something we can do to fix this.)
blocking-basecamp: --- → ?
Mike: Do you think this is bad enough that we should block on it?
Flags: needinfo?(mhabicher)
(In reply to Jonas Sicking (:sicking) from comment #2) > Mike: Do you think this is bad enough that we should block on it? Jonas: tough call. Firefox OS will invariably attract comparisons to Android, I think, so it would be _nice_ to not have a laggy viewfinder; but nothing is broken with this.
Flags: needinfo?(mhabicher)
I'll interpret comment 3 as that we should not block on this. That said, maybe there are some caches in the <video> implementation that's causing this lag. Feel free to reach out to the media team to see if they can help. But minusing does mean that there are higher priority bugs to work on, so please don't spend too much time here.
blocking-basecamp: ? → -
(In reply to Jonas Sicking (:sicking) from comment #4) > I'll interpret comment 3 as that we should not block on this. Agreed. I logged it so it wouldn't get forgotten, and just went looking for anything obvious. Will come back back to this later.
Some additional data: I did some poking around with this late last night, and it looks like, after the CameraGraphicBuffer is constructed, it takes the driver only 10~18 microseconds to populate said buffer and dispatch it to the viewfinder layer. Once the buffer has been been stuffed into a VideoSegment and dispatched to the preview MediaStream, it lives for ~90 to 100 milliseconds, or about 3 frames at 30 frames-per-second.
One more data point: commenting out these three lines in camera.js: // style.MozTransform = transform; // style.width = width + 'px'; // style.height = height + 'px'; ...seems to significantly reduce the viewfinder lag.
Depends on: 844248
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.