[Mesa-dev] [PATCH 2/2] st/vdpau: improve frame dumping functionality a bit

Christian König deathsimple at vodafone.de
Thu Mar 15 04:37:09 PDT 2012


Just a workaround until we get a real unit-
testing tool for VDPAU.

Signed-off-by: Christian König <deathsimple at vodafone.de>
---
 src/gallium/state_trackers/vdpau/presentation.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index d85e656..2e3bea9 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -286,9 +286,12 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
       static unsigned int framenum = 0;
       char cmd[256];
 
-      sprintf(cmd, "xwd -id %d -out vdpau_frame_%08d.xwd", (int)pq->drawable, ++framenum);
-      if (system(cmd) != 0)
-         VDPAU_MSG(VDPAU_ERR, "[VDPAU] Dumping surface %d failed.\n", surface);
+      if (framenum) {
+         sprintf(cmd, "xwd -id %d -silent -out vdpau_frame_%08d.xwd", (int)pq->drawable, framenum);
+         if (system(cmd) != 0)
+            VDPAU_MSG(VDPAU_ERR, "[VDPAU] Dumping surface %d failed.\n", surface);
+      }
+      framenum++;
    }
 
    pipe_resource_reference(&tex, NULL);
-- 
1.7.5.4



More information about the mesa-dev mailing list