After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703955 - osxvideosink: High CPU load
osxvideosink: High CPU load
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Mac OS
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-10 15:48 UTC by Alexey Chernov
Modified: 2017-07-28 20:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexey Chernov 2013-07-10 15:48:49 UTC
I found that osxvideosink eats too much of CPU even with quite simple pipelines. For instance, videotestsrc pipeline like this:

gst-launch-0.10 videotestsrc !
video/x-raw-yuv,width=1920,height=1080,framerate=\(fraction\)25/1 !
osxvideosink

gives 70% of CPU load and unfortunately the main impact is from glTexSubImage2D() GL method which I don't know how to optimize.
Comment 1 Sebastian Dröge (slomo) 2013-08-21 19:36:11 UTC
osxvideosink should a) support more color formats and b) implement some kind of zerocopy rendering. However ideally osxvideosink will be deprecated in favor of glimagesink from gst-plugins-gl soonish
Comment 2 Alexey Chernov 2013-08-22 14:19:42 UTC
Yes, that's right. Previously I've experimented on cocoawindow code trying to improve its performance and add some more color formats (as, e.g. after avdec_h264 it requires colorspace convertion with no direct path which eats some 5% to my estimations IIRC). There's one redundant memcpy() of every frame but it seems to not impact the overall performance significantly. Apart from that, I see no way to optimize the performance other than use more modern method of displaying video with OpenGL, with which I'm not that big expert, unfortunately.
So as to color convertion, which obviously can be implemented with some shader.
I agree that given gst-plugins-gl is almost around the corner it's better to put these things to it, if not already implemented there.
I still didn't have a chance to try gst-plugins-gl on Mac OS X and use osxvideosink for video output, but hopefully will do it in some time or the next time osxvideosink would require any fixes.
Comment 3 Julien Isorce 2017-07-28 20:20:31 UTC
Is osxvideosink something we want to maintain ? If yes feel free to re-open this bug, thx!