XvPutStill(3)

πŸ“¦
version 1.0.13 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– 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, and clip-mask. that's the whole list, no more no less.
  • vx,vy,vw,vh β€” the location and size of the video region being written. vx and vy set the upper-left pixel of the region, and vw and vh set 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. dx and dy are the upper-left corner of the region, and dw and dh are 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 if XvPutStill(3) completed successfully. slay. ✨
  • [XvBadExtension] β€” returned if the Xv extension is unavailable. she's just not there. πŸ’€
  • [XvBadAlloc] β€” returned if XvGetStill(3) failed to allocate memory to process the request. (yes, it really does say XvGetStill(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