XvQueryBestSize(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

πŸ’– 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 β€” put True here if your destination size needs to support full motion, or False if 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 if XvQueryBestSize(3) completed successfully. slay, we love a happy ending πŸŽ‰
  • [XvBadExtension] β€” returned if the Xv extension is unavailable. sad. the extension ghosted you 😭
  • [XvBadAlloc] β€” returned if XvQueryBestSize(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