XvSetPortAttribute(3)
π XvSetPortAttribute(3) β the libXv glow-up for your video port β¨
okay bestie, come sit with me, because this one is literally a libXv function and it's giving main character energy. This page is XvSetPortAttribute(3), and it lives in the libXv family. If you've ever wanted to reach into a video port and justβ¦ change its vibe? This is the girl. π
πΈ NAME πΈ
XvSetPortAttribute β sets an attribute of a video port π
β¨ SYNOPSIS β¨
#include <X11/extensions/Xvlib.h>
int XvSetPortAttribute(Display *dpy, XvPortID port,
Atom attribute, int value);
no cap, that's the whole signature. four args, one int back. iconic. π¦
π«Ά ARGUMENTS π«Ά
dpyβ the connection to the X server. your whole line to the server, basically your group chat with it.portβ the port whose attribute is getting used. like, which port are we doing this to.attributeβ identifies the port attribute this request is gonna set. it can be one of the table entries under the column "String," below. yep, the strings below, those ones. πvalueβ the value thatattributeis being set to. it can be one of the table entries under the column "Type," below. yes queen, cross-reference the table.
π DESCRIPTION π
So XvSetPortAttribute(3) lets a client set the port attribute to specified values. that's it, that's the job. and this request supports the following values:
"XV_ENCODING"β typeXvEncodingIDβ default: Server dependent"XV_HUE"β type[-1000...1000]β default:0"XV_SATURATION"β type[-1000...1000]β default:0"XV_BRIGHTNESS"β type[-1000...1000]β default:0"XV_CONTRAST"β type[-1000...1000]β default:0
(that's the Attribute String / Type / Default situation, all five rows, nothing skipped, we keep the receipts. π§Ύ)
The supplied encoding must be one of the encodings listed for the adaptor, otherwise an Encoding error results. so likeβ¦ don't freestyle the encoding, it will not eat. π
If the adaptor does not support the exact hue, saturation, brightness, and contrast levels you supplied, the closest levels supported are assumed. it's doing its best, okay?? and heads up β use XvGetPortAttribute(3) to query the resulting levels, because what you asked for and what you got might not be twins fr fr. π
When an XvSetPortAttribute(3) request is processed, a XvPortNotify(3) event is generated for all clients that have requested notification of port changes using XvSelectPortNotify(3). so everybody who signed up for the notifs gets pinged. group chat goes off. π
β RETURN VALUES β
[Success]β returned ifXvSetPortAttribute(3)completed successfully. slay, we ate. π[XvBadExtension]β returned if the Xv extension is unavailable. she's not here, she's not coming. π[XvBadAlloc]β returned ifXvSelectVideoNotify(3)failed to allocate memory to process the request. ran out of room, tragic. π
π₯ DIAGNOSTICS π₯
[XvBadPort]β generated if the requested port does not exist. that port is a ghost, bestie. π»[XvBadEncoding]β generated if an encoding is specified that does not exist. made-up encoding? not on my watch. π«[BadMatch]β generated if the requested attribute atom does not specify an attribute supported by the adaptor. the adaptor said "never heard of her." π βοΈ
π SEE ALSO π
XvGetPortAttribute(3), XvQueryPortAttributes(3), XvSelectPortNotify(3), XvPortNotify(3)
like, go read those too, iykyk. π
real talk: if the levels you asked for aren't supported, the closest ones get assumed β so always circle back with XvGetPortAttribute(3) before you trust the numbers. no guessing, just checking. π«Ά
and that's the page, periodt. π this whole thing came out of X Version 11, specifically libXv 1.0.13 β so when you see XvSetPortAttribute(3) out in the wild, that's the era she's from. 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