XvPutStill(3)
π XvPutStill(3) β libXv Functions π
okay bestie, gather round, because today we're learning how to yeet one single frame of video into a drawable. that's it. one frame. iconic behaviour honestly. this is XvPutStill from the libXv crew, and she's serving β¨
β¨ NAME β¨
XvPutStill β write a single frame of video to a drawable π
πΈ SYNOPSIS πΈ
#include <X11/extensions/Xvlib.h>
int XvPutStill(Display *dpy, XvPortID port, Drawable d, GC gc,
int vx, int vy, unsigned int vw, unsigned int vh,
int dx, int dy, unsigned int dw, unsigned int dh);
π¦ ARGUMENTS π¦
dpyβ the connection to the X server, aka your whole entire link to the server. gotta have it.portβ the port you're pulling the still from. this is where the video lives, girl.dβ the drawable the still gets written into. > β οΈ heads up: Pixmaps are currently not supported. so like, don't even try it. πgcβ the graphical context. the GC components she actually cares about are:subwindow-mode,clip-x-origin,clip-y-origin, andclip-mask. that's the whole list, no more no less.vx,vy,vw,vhβ the location and size of the video region being written.vxandvyset the upper-left pixel of the region, andvwandvhset the width and height, in pixels, of the region. πdx,dy,dw,dhβ the location and size of the destination region where the still image lands.dxanddyare the upper-left corner of the region, anddwanddhare the width and height, in pixels, of the region. π
π DESCRIPTION π
XvPutStill(3) writes a single frame of video to a drawable. one frame. that's the vibe. π«Ά
the position and size of the source (video) rectangle is specified by vx, vy, vw, and vh. the position and size of the destination (drawable) rectangle is specified by dx, dy, dw, and dh. so you've got your source box and your destination box, and she's gonna map one onto the other, no cap.
video data is clipped to the bounds of the video encoding, scaled to the requested drawable region size (or the closest size supported β bestie, sometimes she can't hit exactly what you asked for and she'll get as close as she can), and clipped to the bounds of the drawable.
now for the drama π β if the port is grabbed by another client, this request is ignored, and an XvVideoNotify event with detail XvBusy is generated for the drawable. and if the port is not receiving a valid video signal, a VideoNotify event with detail XvHardError is generated for the drawable. so yeah, if things go weird, check your events, not me. π
π RETURN VALUES π
[Success]β returned ifXvPutStill(3)completed successfully. slay. β¨[XvBadExtension]β returned if the Xv extension is unavailable. she's just not there. π[XvBadAlloc]β returned ifXvGetStill(3)failed to allocate memory to process the request. (yes, it really does sayXvGetStill(3)in this spot β I'm not fixing it, that's what the page says, and I keep the facts exactly as they are π«‘)
π₯ DIAGNOSTICS π₯
[XvBadPort]β generated if the requested port does not exist.[BadDrawable]β generated if the requested drawable does not exist.[BadGC]β generated if the requested graphics context does not exist.[BadAlloc]β generated if there were insufficient resources to process the request.
π SEE ALSO π
iykyk π
okay that's the whole page, bestie!! this was X Version 11, libXv 1.0.13, and the page herself is XvPutStill(3). go forth and put some stills, mwah πβ¨π
π¦ where this page comes from
- alpine 3.22: libxv-doc 1.0.13-r0 Β· MIT
- alpine 3.23: libxv-doc 1.0.13-r0 Β· MIT
- alpine 3.24: libxv-doc 1.0.13-r0 Β· MIT
- arch rolling: libxv 1.0.13-1 Β· SMLNJ AND HPND-sell-variant
- fedora 43: libXv-devel 1.0.13-3.fc43 Β· SMLNJ AND HPND-sell-variant
- fedora 43: libXv-devel 1.0.13-3.fc43 Β· SMLNJ AND HPND-sell-variant
- fedora 44: libXv-devel 1.0.13-4.fc44 Β· SMLNJ AND HPND-sell-variant
- fedora 44: libXv-devel 1.0.13-4.fc44 Β· SMLNJ AND HPND-sell-variant
- ubuntu resolute: libxv-dev 2:1.0.13-1 Β· MIT
- ubuntu stonking: libxv-dev 2:1.0.13-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms