Gstreamer using 100% cpu

RESOLVED FIXED in mozilla26

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: ajones, Assigned: eflores)

Tracking

unspecified
mozilla26
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

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.
Posted 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)

Comment 4

6 years ago
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.

Updated

6 years ago
Attachment #766532 - Flags: feedback?(alessandro.d) → feedback+
Attachment #766532 - Flags: review?(cpearce) → review+
https://hg.mozilla.org/mozilla-central/rev/73dff4338b06
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.