XvQueryAdaptors(3)
π NAME π
XvQueryAdaptors β bestie, this is the one that pulls up all the adaptor info for a screen. like, the whole roster. π
β¨ SYNOPSIS β¨
#include <X11/extensions/Xvlib.h>
int XvQueryAdaptors(Display *dpy, Window window,
unsigned int *p_num_adaptors,
XvAdaptorInfo **pp_adaptor_info);
okay so this is from libXv, the manual page lives in section 3, and she's serving c function realness π
πΈ ARGUMENTS πΈ
dpyβ the connection to the X server. your whole vibe-link to the display, no cap.windowβ a window of the screen you want adaptor info for. literally any window on that screen, she'll figure out which screen you mean from it. πͺp_num_adaptorsβ a pointer to where the number of adaptors for the specified screen gets dropped off. you give her the address, she fills it in. β¨pp_adaptor_infoβ a pointer to where the list of returned adaptor information lands. yes that's a pointer to a pointer. she's that kind of girl. π
π DESCRIPTION π
So XvQueryAdaptors(3) returns video adaptor information for the screen of the specified drawable. iconic behaviour honestly.
The XvAdaptorInfo structure has this exact organization:
typedef struct {
XvPortID base_id;
unsigned long num_ports;
char type;
char *name;
unsigned long num_formats;
XvFormat *formats;
unsigned long num_adaptors;
} XvAdaptorInfo;
and here's what each lil field is giving:
base_idβ the resource ID of the first adaptor port. the origin point, the main character's entrance. βnum_portsβ how many ports this adaptor supports.typeβ a bit mask, okay pay attention bestie π«Ά.XvInputMaskis asserted if the adaptor supports video input, andXvOutputMaskis asserted if it supports video output. AND in Xv protocol 2.2 and later, there are 3 new bits defined βXvVideoMask,XvStillMaskandXvImageMaskβ indicating the adaptor is capable of video, still or image primitives respectively. three new icons dropped in the update, we love to see it. π₯nameβ a vendor specific name that identifies the adaptor. her government name, basically.num_formatsβ the number of depth/visual id formats supported by the adaptor.formatsβ a pointer to an array ofXvFormatstructures.
and the XvFormat structure looks like THIS:
typedef struct {
char depth;
unsigned long visual_id;
} XvFormat;
depthβ a drawable depth supported by the adaptor.visual_idβ a visual-id supported for the given depth by the adaptor. the two of them are a package deal, fr fr. π¦
π RETURN VALUES π
[Success]β returned ifXvQueryAdaptors(3)completed successfully. she ate and left no crumbs. π[XvBadExtension]β returned if the Xv extension is unavailable. the extension ghosted you, sorry babe π[XvBadAlloc]β returned ifXvQueryAdaptors(3)failed to allocate memory to process the request. no room, no memory, no service. π
π©Ί DIAGNOSTICS π©Ί
[Drawable]β returned if the requested drawable does not exist. you asked for a window that isn't there. she looked. she found nothing. π
π SEE ALSO π
XvFreeAdaptorInfo(3)β yes bestie, you HAVE to free that info afterwards. go read it, it's the sequel. β¨
reminder: this page is part of the libXv Functions crew, and she's the XvQueryAdaptors(3) one. π
okay that's the whole thing, love u, go free your adaptor info π«Ά
X Version 11 Β· libXv 1.0.13 Β· XvQueryAdaptors(3) β mwah, bye bestie! πβ¨πΈ
π¦ 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