Closed Bug 1211814 Opened 9 years ago Closed 8 years ago

Optimize the triggering timer for rendering frames in VideoQueue.

Categories

(Core :: Audio/Video: Playback, defect, P2)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: kikuo, Unassigned)

References

Details

Attachments

(1 file)

See Bug 1194918 Comment 33, 
we can use the last video frame remaining time in VideoQueue as the timer target to reduce to overhead of looping cycle.
Depends on: 1194918
Priority: -- → P2
Tested dom/media/test/test_playback.html, the number of calls to |VideoSink::UpdateRenderedVideoFramesByTimer()| reduced about 3/4.

I need to make sure the frame rate is kept, (at least I can't see difference through my eyes :p)
The problem is that we will be discarding outdated video frames less aggressively. Keeping video frames longer than necessary is bad for video decoding because hardware memory is limited.

I think we can wontfix this bug. Does that make sense to you?
Flags: needinfo?(kikuo)
(In reply to JW Wang [:jwwang] from comment #3)
> The problem is that we will be discarding outdated video frames less
> aggressively. Keeping video frames longer than necessary is bad for video
> decoding because hardware memory is limited.

Agreed !
> I think we can wontfix this bug. Does that make sense to you?

I think there's another way to optimize here is, we can still check the discarding of outdated video frames each time when new VideoData is pushed into queue, but we can schedule a timer which indicate to the last frame we pushed to videocontainer.

Because right now, we scheduled a timer just greater than clockTime, but there maybe more than 1 frames pushed into videocontainer already.  So you will see some video frames stays in VideoQueue and doing redundant work in VideoSink::RenderVideoFrames.

Do you think this is worth optimizing ?
Flags: needinfo?(kikuo)
Per offline discussion with JW, we should keep current timer scheduler machinery to avoid discarding large amount of outdated frames at once.
But there's still a small optimization we could do is to avoid sending redundant video frames into videocontainer.

Won't fix this bug.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: