Closed Bug 884651 Opened 11 years ago Closed 11 years ago

Gstreamer using 100% cpu

Categories

(Core :: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: ajones, Assigned: eflores)

References

()

Details

Attachments

(1 file)

Steps to reproduce:

* Enable gstreamer pref
* Go to http://www.quirksmode.org/html5/tests/video.html

Expected results:

CPU isn't busy.

Actual results:

CPU is 100% busy.
Blocks: 886181
No longer blocks: 794282
Doesn't look to me like it's actually pegging a CPU.

On my machine top *does* report 100% CPU usage, but looking closer it's just four cores each being used at 25%. Probably the ffmpeg software decoder.
The CPU load goes up without playing the video.
Attached patch FixSplinter Review
gstreamer usually syncs audio and video for clients so they don't have to deal with it -- stopping audio from coming down the pipeline if it's ahead of video, or vice versa. In our case, we just want |AmpleVideoFrames| video frames and |AmpleAudioUsecs| audio usecs, which can differ considerably (time-wise). So we'll end up being starved of one or the other until we start playback.

This patch just disables the gstreamer audio/video sync because we already do that and it's just getting in the way.
Assignee: nobody → edwin
Status: NEW → ASSIGNED
Attachment #766532 - Flags: review?(cpearce)
Attachment #766532 - Flags: feedback?(alessandro.d)
This makes sense. I would add a comment explaining that we run with sync disabled otherwise DecodeAudioData and DecodeVideoFrame can get called in a tight loop, and that gst threads will still block on max-buffers (and not decode everything) if ffox threads can't keep up.
Attachment #766532 - Flags: feedback?(alessandro.d) → feedback+
Attachment #766532 - Flags: review?(cpearce) → review+
https://hg.mozilla.org/mozilla-central/rev/73dff4338b06
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: