XvQueryPortAttributes(3)
π XvQueryPortAttributes(3) π
okay bestie, welcome to the libXv Functions corner of the universe β¨ this one's called XvQueryPortAttributes and it's gonna hand you the whole ~vibe list~ of attributes on a video port. literally the receipts of what that port can do. let's go π
β¨ NAME β¨
XvQueryPortAttributes β return list of attributes of a video port πΈ
β¨ SYNOPSIS β¨
#include <X11/extensions/Xvlib.h>
XvAttribute* XvQueryPortAttributes(Display *dpy,
XvPortID port, int *p_num_attributes);
β¨ ARGUMENTS β¨
dpyβ the connection to the X server. your lil phone line to the server, basically π«Άportβ the port whose adaptor is getting interrogated for its list of attributes. yes we're asking it to spill πp_num_attributesβ a pointer to where the number of attributes returned in the array gets written. it's the lil counter that gets filled in for you β¨
β¨ DESCRIPTION β¨
so XvQueryPortAttributes(3) returns the number of attributes and an array of XvAttributes that are valid for the given port. two-for-one, no cap π₯
pro tip bestie: that array? you can free it with XFree(3). don't ghost it, clean it up π
β¨ RETURN VALUES β¨
XvAttribute has this structure, and it's giving very much struct-core:
typedef struct {
int flags;
int min_value;
int max_value;
char *name;
} XvAttribute;
flagsβ may beXvGettableorXvSettable, or both of them OR'd together, indicating that this particular attribute is readable, writeable, or readable and writeable. pick your fighter πmin_valueβ the minimum attribute values which are valid for the driver.
The maximum attribute values which are valid for the driver.
okay so real talk: the page describes both the min and the max right here under themin_valuelabel, and there's no separatemax_valueheading. iconic typo behavior tbh. themax_valuefield is still in the struct up there, we just get its explanation riding shotgun withmin_value's. π
nameβ a string describing the name of the attribute, and you can use it to retrieve the Atom for that particular attribute. it's the β¨nameβ¨ bestie π
β¨ DIAGNOSTICS β¨
[XvBadPort]β generated if the requested port does not exist. it's not a vibe check fail, it's a real error, so handle it π«
β¨ SEE ALSO β¨
and that's the whole page, bestie, we ate and left no crumbs π this was X Version 11, libXv 1.0.13, 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