XvQueryBestSize(3)
π XvQueryBestSize(3) π
okay bestie, welcome to XvQueryBestSize(3), a little gem from the libXv Functions lineup β¨ she's here to figure out the optimum drawable region size for you, and honestly? she ate.
π NAME π
XvQueryBestSize β determine the optimum drawable region size π
β¨ SYNOPSIS β¨
#include <X11/extensions/Xvlib.h>
int XvQueryBestSize(Display *dpy, XvPort port, Bool motion,
unsigned int vw, unsigned int vh,
unsigned int dw, unsigned int dh,
unsigned int *p_dw, unsigned int *p_dh);
πΈ ARGUMENTS πΈ
dpyβ the connection to the X server. that's your link to the whole vibe, no cap.portβ the port that's associated with the display and adaptor you want the optimum size calculated for π«Άmotionβ putTruehere if your destination size needs to support full motion, orFalseif it only needs to support still images. yes, it's giving "do I need to move or can I just pose" πvw,vhβ the size of the source video region you want. literally the w and h of the source, bestie.dw,dhβ the size of the destination drawable region you want. note: what you want and what you get are two different girls.p_dw,p_dhβ pointers where the closest destination sizes supported by the server get returned. this is where the server writes back to you π
π¦ DESCRIPTION π¦
so here's the tea: some ports are able to scale incoming or outgoing video π not all of them, but some. iconic of them honestly.
XvQueryBestSize(3) returns the size of the closest destination region that is supported by the adaptor. and here's the important part, don't miss it β the returned size is guaranteed to be smaller than the requested size if a smaller size is supported. so if you asked for something too big, she'll hand you the closest smaller one that actually works. she's honest like that. no catfishing β¨
π RETURN VALUES π
[Success]β returned ifXvQueryBestSize(3)completed successfully. slay, we love a happy ending π[XvBadExtension]β returned if the Xv extension is unavailable. sad. the extension ghosted you π[XvBadAlloc]β returned ifXvQueryBestSize(3)failed to allocate memory to process the request. she tried, but the memory said no π
π DIAGNOSTICS π
[XvBadPort]β generated if the requested port does not exist. like, who is she? we don't know her π
ngl if you're seeing XvBadPort, double check that port, bestie. she's not in the building.
X Version 11 Β· libXv 1.0.13 Β· XvQueryBestSize(3)
and that's the whole page, fr fr π go query your best size, queen β 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