XvGetStill(3)
π XvGetStill(3) π
okay so bestie, welcome to libXv β¨ this one's called XvGetStill, and it's the glow-up moment where you grab one single frame of video off a drawable. literally just one. a lil snapshot. a still. π
πΈ NAME πΈ
XvGetStill β capture a single frame of video from a drawable π«Ά
β¨ SYNOPSIS β¨
#include <X11/extensions/Xvlib.h>
int XvGetStill(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 π¦
no cap, every single one of these matters, so let's go one by one π
dpyβ the connection to the X server. your lil phone line to the server, basically.portβ the port that the still gets output to. that's where the magic lands.dβ the drawable the still is captured from. heads up though: pixmaps are currently not supported, so don't even try it πgcβ the graphical context. the GC components in play are:subwindow-mode,clip-x-origin,clip-y-origin, andclip-mask. that's the whole list, no extras.vx,vy,vw,vhβ these define the location and size of the destination video region, aka where the still gets written into.vxandvyare the x and y coords of the upper-left corner of the video region;vwandvhare the width and height, in pixels, of the video region.dx,dy,dw,dhβ these define the location and size of the source drawable, aka where the still image is captured from.dxanddyare the x and y coords of the upper-left corner of the drawable region;dwanddhare the width and height, in pixels, of the drawable region.
π DESCRIPTION π
so what does it actually do? it captures a single frame of video from a drawable. that's the whole vibe. πΈ
the position and size of the destination (video) rectangle is specified by vx, vy, vw, and vh. the position and size of the source (drawable) rectangle is specified by dx, dy, dw, and dh. two rectangles, one still, slay.
drawable data gets clipped to the bounds of the drawable, then scaled to the requested video region size (or the closest size supported β sometimes it just does its best, okay?), and then clipped to the bounds of the video encoding. and here's the part you need to know: the contents of any region not updated with drawable data is undefined. undefined behaviour is not the vibe, so be aware. π
also, if the port is grabbed by another client, this request is ignored, and anXvVideoNotifyevent with detailXvBusyis generated for the drawable. so like, if someone else is holding the aux cord, you're not getting it. π
π RETURN VALUES π
[Success]β returned ifXvGetStill(3)completed successfully. we love a happy ending β¨[XvBadExtension]β returned if the Xv extension is unavailable. no extension, no party π[XvBadAlloc]β returned ifXvGetStill(3)failed to allocate memory to process the request.
π 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 π§
XvPutStill(3), XvGetVideo(3), XvPutVideo(3), XvVideoNotify(3)
go read those too, they're all part of the same friend group fr fr π«Ά
and that's the whole page, bestie π this was X Version 11, libXv 1.0.13, page XvGetStill(3) β periodt. now go capture that frame, you absolute main character πβ¨
π¦ 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