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

πŸ’– 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 be XvGettable or XvSettable, 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 the min_value label, and there's no separate max_value heading. iconic typo behavior tbh. the max_value field is still in the struct up there, we just get its explanation riding shotgun with min_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