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 749856 - d3dvideosink: avoid frame rendering while window handle is hidden
d3dvideosink: avoid frame rendering while window handle is hidden
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal enhancement
: 1.5.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2015-05-25 16:59 UTC by Fabio Cetrini
Modified: 2015-06-10 13:04 UTC
See Also:
GNOME target: ---
GNOME version: ---

skip buffer render hidden window (1.61 KB, patch)
2015-05-25 16:59 UTC, Fabio Cetrini
none Details | Review
skip buffer render hidden window (2.01 KB, patch)
2015-06-10 13:01 UTC, Fabio Cetrini
committed Details | Review

Description Fabio Cetrini 2015-05-25 16:59:24 UTC
Created attachment 303949 [details] [review]
skip buffer render hidden window

My application creates and embeds several instances (up to 20 per monitor) of video player using d3dvidesink as video sink plugin.
When one instances is maximized to full screen, the application GUI almost freezes, forcing users to kill main process.
Attached patch solves the problem skipping buffer rendering if a window hwnd is hidden by another one.
Comment 1 Sebastian Dröge (slomo) 2015-05-29 19:39:18 UTC
Review of attachment 303949 [details] [review]:

Thanks for the patch, looks really good and useful :) Just some minor style comments, other than that this can be merged

::: sys/d3dvideosink/d3dhelpers.c
@@ +1824,3 @@
+#define IWVTU_PARTIAL 2
+#define IWVTU_HIDDEN  3
+#define IWVTU_ERROR   4

Why IWVTU, and why not an enum? What about calling it e.g. WINDOW_VISIBILITY_FULL, _PARTIAL, etc?

@@ +1833,3 @@
+  HDC hdcWnd;
+  RECT rcWndClient;
+  RECT rcWndClip;

We generally use lowercase variable names, with underscores to split words

@@ +1873,3 @@
+		   uRetVal = IWVTU_FULL;
+		else
+		   uRetVal = IWVTU_PARTIAL;

I guess with a simple region we could also only render part of the frame relatively efficient? But not really important for a first step :)
Comment 2 Fabio Cetrini 2015-06-10 13:01:14 UTC
Created attachment 304967 [details] [review]
skip buffer render hidden window
Comment 3 Sebastian Dröge (slomo) 2015-06-10 13:04:15 UTC
commit 79f57e62dcf80f1448891f0292a1bcc7d53477fd
Author: Fabio Cetrini <>
Date:   Wed Jun 10 15:03:31 2015 +0200

    d3dvideosink: Avoid frame rendering while the window is completely hidden