xcb_xv_query_extension(3)

πŸ“¦
version 1.17.0 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’« xcb_xv_query_extension β€” bestie, it's the X11 extension query, but make it XCB ✨

okay so real talk: this is xcb_xv_query_extension(3), a request from the XCB Requests family, and it lives in the X protocol bindings crew (libxcb). It asks the X server about the Xv extension β€” you know, the video one. It's giving "hello?? are you there?? which version are we on??" energy, and honestly? Iconic.

Fair warning though: the NAME line in the original is literally just the function name with a dangling dash and nothing after it, and the DESCRIPTION section is a total ghost town. Not me covering for the docs β€” I'm telling you exactly what's there, no cap. πŸ™ˆ


πŸŽ€ SYNOPSIS πŸŽ€

First up, the include, because you always gotta bring your header:

#include <xcb/xv.h>

πŸ’… Request function

xcb_xv_query_extension_cookie_t
       xcb_xv_query_extension(xcb_connection_t *conn,

(Yes, bestie, that's exactly how it's written in the original β€” it trails off mid-signature like a text you sent at 2am. I'm not gonna invent the rest. 🫢)

πŸ¦‹ Reply datastructure

This is the struct you get back, and she is structured:

typedef struct xcb_xv_query_extension_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint16_t major;
    uint16_t minor;
} xcb_xv_query_extension_reply_t;

🌸 Reply function

xcb_xv_query_extension_reply_t
       *xcb_xv_query_extension_reply(xcb_connection_t *conn,
       xcb_xv_query_extension_cookie_t cookie, xcb_generic_error_t **e);

πŸ“ REQUEST ARGUMENTS πŸ“

  • conn β€” The XCB connection to X11. She's the whole line to the server, the main character, the one you pass everywhere. Periodt.

✨ REPLY FIELDS ✨

  • response_type β€” The type of this reply, and in this case it's XCB_XV_QUERY_EXTENSION. This field is also present in the xcb_generic_reply_t, so you can use it to tell replies apart from each other. It's like a name tag at a party where everyone looks identical. πŸ’€
  • sequence β€” The sequence number of the last request processed by the X11 server. Basically the server's "and that was request #whatever, bestie."
  • length β€” The length of the reply, in words. And heads up: a word here is 4 bytes. Don't @ me, that's just the math. πŸ”₯
  • major β€” TODO: NOT YET DOCUMENTED. The original really said "we'll get to it." 😭
  • minor β€” TODO: NOT YET DOCUMENTED. Same vibe, same silence. πŸ™ˆ

🌈 DESCRIPTION 🌈

So… the original manpage has a DESCRIPTION heading and then absolutely nothing under it. Empty. Void. The group chat went quiet. I'm not gonna make stuff up to fill it, because that would be lying to you, and we don't do that. πŸ’œ


πŸ‘‘ RETURN VALUE πŸ‘‘

You get back an xcb_xv_query_extension_cookie_t. That's your little claim ticket β€” the reply hasn't come home yet.

Errors have to be handled when you call the reply function, xcb_xv_query_extension_reply. That's where the truth comes out.

If you'd rather handle errors in the event loop instead, use xcb_xv_query_extension_unchecked. See xcb-requests(3) for details. Lowkey essential reading, fr fr.


🧚 ERRORS 🧚

This request does never generate any errors. Zero. None. She's unproblematic. ✨


⭐ SEE ALSO ⭐

Nothing listed. The original left this section empty, so I'm leaving it empty too β€” I'm not about to manifest fake cross-references into existence. 🌸


πŸ’– AUTHOR πŸ’–

Generated from xv.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. Yes, that's the real email β€” send your glow-up suggestions there. πŸŽ€


Heads up bestie: the missing NAME description, the empty DESCRIPTION, and the two TODO: NOT YET DOCUMENTED fields are all straight from the source. That's not me being lazy, that's me being honest. Slay responsibly. πŸ’…

And that's the whole page, no cap β€” from X Version 11, libxcb 1.17.0, xcb_xv_query_extension(3). Thanks for reading, ily, go handle your errors. πŸ«ΆπŸ¦‹