change getstill to putstill tizen_2.1 submit/tizen_2.1/20130514.053139
authorBoram Park <boram1288.park@samsung.com>
Thu, 2 May 2013 08:36:54 +0000 (17:36 +0900)
committerBoram Park <boram1288.park@samsung.com>
Thu, 2 May 2013 08:36:54 +0000 (17:36 +0900)
Change-Id: Ic9b0bd3663769ecb4b8f025ba1ce18a7885577be

packaging/libslp-utilx.spec
x11.c

index d5c581c..32d2928 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libslp-utilx
 Summary:    utilX
-Version:    0.1.22
+Version:    0.1.23
 Release:    1.1
 Group:      UI Framework/Libraries
 License:    Apache-2.0
diff --git a/x11.c b/x11.c
index b3622fa..46aaee7 100644 (file)
--- a/x11.c
+++ b/x11.c
@@ -1425,7 +1425,7 @@ typedef struct _ShotInfo
 {
     Display *dpy;
 
-    /* GetStill */
+    /* PutImage */
     int      port;
     unsigned int width;
     unsigned int height;
@@ -1491,7 +1491,8 @@ _get_port (Display *dpy, unsigned int id)
     {
         int support_format = False;
 
-        if (!(ai[i].type & XvStillMask))
+        if (!(ai[i].type & XvInputMask) ||
+            !(ai[i].type & XvStillMask))
             continue;
 
         p = ai[i].base_id;
@@ -1819,6 +1820,8 @@ _init_screen_shot (Display* dpy, unsigned int width, unsigned int height)
     XvSetPortAttribute (info->dpy, info->port, atom_capture, 1);
     XvSetPortAttribute (info->dpy, info->port, atom_fps, 60);
 
+    XSync (info->dpy, 0);
+
     x_error_caught = False;
     XSetErrorHandler (old_handler);
 
@@ -1910,7 +1913,7 @@ utilx_create_screen_shot (Display* dpy, int width, int height)
     x_error_caught = False;
     old_handler = XSetErrorHandler (_screen_shot_x_error_handle);
 
-    XvGetStill (info->dpy, info->port, info->pixmap, info->gc,
+    XvPutStill (info->dpy, info->port, info->pixmap, info->gc,
                 0, 0, info->width, info->height,
                 0, 0, info->width, info->height);