Using XVideo extension?

Florian Harmuth florian.harmuth at googlemail.com
Thu Dec 13 06:34:06 PST 2007


Hello again,
if use the code i have attached all works fine, but without scaling. If i
set the scale matrix to the following value my screen looks strange (without
scaling factor:
http://img136.imageshack.us/my.php?image=screenshotwithoutscalinfc9.png)
(with scaling factor:
http://img88.imageshack.us/my.php?image=screenshotwithscaling05cf7.png).

XTransform scale = {{{ XDoubleToFixed (0.5), 0.0, 0.0 },
                             { 0.0, XDoubleToFixed (0.5), 0.0 },
                             { 0.0, 0.0, XDoubleToFixed (1.0) }}};

And where i have to set the new image height/width? PutImage or
XRenderComposite?

Best regards,

flo

<code>
Picture pixmap_pic;
Picture window_pic;
Pixmap pixmap;
XRenderPictureAttributes pic_attr;
XTransform scale = {{{ XDoubleToFixed (1.0), 0.0, 0.0 },
                             { 0.0, XDoubleToFixed (1.0), 0.0 },
                             { 0.0, 0.0, XDoubleToFixed (1.0) }}};

/* find the used format */
XRenderPictFormat *xformat = XRenderFindVisualFormat (dpy,vis);
window_pic = XRenderCreatePicture(dpy, desktopWin, xformat, 0, &pic_attr);
pixmap = XCreatePixmap(dpy, desktopWin, si.framebufferWidth,
si.framebufferHeight,image->depth);
pixmap_pic = XRenderCreatePicture (dpy, pixmap, xformat, 0, &pic_attr);

XRenderSetPictureTransform (dpy, pixmap_pic, &scale);
/* get the image from server...*/
...
/* put my image to the screen... */
XShmPutImage(dpy,pixmap, gc, image, x, y, x, y,width,height, False);
XRenderComposite(dpy,PictOpSrc,pixmap_pic,None,window_pic,x,y,0,0,x,y,width,height);
</code>


2007/12/11, Peter Harris <peter.harris at hummingbird.com>:
>
> Florian Harmuth wrote:
> > Hello again,
> > i hope that this will be my last post ;-). How can i connect the data of
> > pixmap and my XImage struct?
>
> >     2007/12/10, Peter Harris < peter.harris at hummingbird.com
> >     <mailto:peter.harris at hummingbird.com>>:
> >
> >>     XPutImage(pixmap) # XImage struct used here
>
>
> --
>      Hummingbird Connectivity - A Division of Open Text
> Peter Harris                    http://connectivity.hummingbird.com
> Research and Development        Phone: +1 905 762 6001
> peter.harris at hummingbird.com    Toll Free: 1 877 359 4866
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20071213/3176a9d9/attachment.html>


More information about the xorg mailing list