summaryrefslogtreecommitdiffstats
path: root/src/libXvMC
diff options
context:
space:
mode:
authorYounes Manton <[email protected]>2008-09-10 19:37:56 -0400
committerYounes Manton <[email protected]>2008-09-12 14:31:07 -0400
commitf3f449a49136ae2fd2dc3cf62d2c24dd42505e7d (patch)
tree7d135aea5fb122570bc397cfb75085559ade7400 /src/libXvMC
parent42a42dec3dbb5e150584b3d0b2e14e9b555a4ac1 (diff)
g3dvl: Implement surface sync functions.
Diffstat (limited to 'src/libXvMC')
-rw-r--r--src/libXvMC/surface.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/libXvMC/surface.c b/src/libXvMC/surface.c
index b8459c03cf4..a920da52f91 100644
--- a/src/libXvMC/surface.c
+++ b/src/libXvMC/surface.c
@@ -201,7 +201,7 @@ Status XvMCFlushSurface(Display *display, XvMCSurface *surface)
assert(display == vlGetNativeDisplay(vlGetDisplay(vlSurfaceGetScreen(vl_sfc))));
- /* TODO */
+ vlSurfaceFlush(vl_sfc);
return Success;
}
@@ -219,7 +219,7 @@ Status XvMCSyncSurface(Display *display, XvMCSurface *surface)
assert(display == vlGetNativeDisplay(vlGetDisplay(vlSurfaceGetScreen(vl_sfc))));
- /* TODO */
+ vlSurfaceSync(vl_sfc);
return Success;
}
@@ -273,7 +273,8 @@ Status XvMCPutSurface
Status XvMCGetSurfaceStatus(Display *display, XvMCSurface *surface, int *status)
{
- struct vlSurface *vl_sfc;
+ struct vlSurface *vl_sfc;
+ enum vlResourceStatus res_status;
assert(display);
@@ -286,8 +287,28 @@ Status XvMCGetSurfaceStatus(Display *display, XvMCSurface *surface, int *status)
assert(display == vlGetNativeDisplay(vlGetDisplay(vlSurfaceGetScreen(vl_sfc))));
- /* TODO */
- *status = 0;
+ vlSurfaceGetStatus(vl_sfc, &res_status);
+
+ switch (res_status)
+ {
+ case vlResourceStatusFree:
+ {
+ *status = 0;
+ break;
+ }
+ case vlResourceStatusRendering:
+ {
+ *status = XVMC_RENDERING;
+ break;
+ }
+ case vlResourceStatusDisplaying:
+ {
+ *status = XVMC_DISPLAYING;
+ break;
+ }
+ default:
+ assert(0);
+ }
return Success;
}