xcb_dri2_get_msc(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_dri2_get_msc(3) โ€” XCB Requests ๐Ÿ’–

okay bestie, so this is a page from the XCB Requests manual, and yes it lives in section 3, and yes it's giving "generated from an XML file at 2am" energy but we're gonna make it cute. It's the xcb_dri2_get_msc request from libxcb โ€” the DRI2 "hey server, what's your media stream counter rn" situation. Let's get into it ๐ŸŽ€


โœจ NAME โœจ

xcb_dri2_get_msc โ€”

lowkey the description here is literally empty in the source, so like... that's the whole vibe. no cap, there's nothing after the dash. ๐Ÿ™ˆ


โœจ SYNOPSIS โœจ

First things first, you gotta pull in the header:

#include <xcb/dri2.h>

๐Ÿฆ‹ Request function ๐Ÿฆ‹

xcb_dri2_get_msc_cookie_t xcb_dri2_get_msc(xcb_connection_t *conn,
       xcb_drawable_t drawable);

๐Ÿฆ‹ Reply datastructure ๐Ÿฆ‹

typedef struct xcb_dri2_get_msc_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint32_t ust_hi;
    uint32_t ust_lo;
    uint32_t msc_hi;
    uint32_t msc_lo;
    uint32_t sbc_hi;
    uint32_t sbc_lo;
} xcb_dri2_get_msc_reply_t;

๐Ÿฆ‹ Reply function ๐Ÿฆ‹

xcb_dri2_get_msc_reply_t *xcb_dri2_get_msc_reply(xcb_connection_t *conn,
       xcb_dri2_get_msc_cookie_t cookie, xcb_generic_error_t **e);

๐ŸŒธ REQUEST ARGUMENTS ๐ŸŒธ

  • conn โ€” your XCB connection to X11. the whole lifeline, the main character, the reason any of this works ๐Ÿ’…
  • drawable โ€” TODO: NOT YET DOCUMENTED. yeah bestie, the docs said "idk" on this one. iconic of them honestly. ๐Ÿซ 

๐ŸŒˆ REPLY FIELDS ๐ŸŒˆ

  • response_type โ€” the type of this reply, and in this case it's XCB_DRI2_GET_MSC. This field also shows up in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. it's the little name tag at the party ๐Ÿท๏ธ
  • sequence โ€” the sequence number of the last request the X11 server processed. tracking numbers but for requests โœจ
  • length โ€” the length of the reply, in words (and a word is 4 bytes, so do the math bestie ๐Ÿงฎ)
  • ust_hi โ€” TODO: NOT YET DOCUMENTED.
  • ust_lo โ€” TODO: NOT YET DOCUMENTED.
  • msc_hi โ€” TODO: NOT YET DOCUMENTED.
  • msc_lo โ€” TODO: NOT YET DOCUMENTED.
  • sbc_hi โ€” TODO: NOT YET DOCUMENTED.
  • sbc_lo โ€” TODO: NOT YET DOCUMENTED.

the hi/lo pairs are all just sitting there undocumented, minding their own business, thriving ๐Ÿ’œ


๐ŸŽ€ DESCRIPTION ๐ŸŽ€

bestie. there is nothing here. the DESCRIPTION section is empty. it's giving blank canvas, it's giving "we'll fill this in later", it's giving absolutely nothing and honestly? we respect the confidence. ๐Ÿ’€


โญ RETURN VALUE โญ

It hands you back an xcb_dri2_get_msc_cookie_t โ€” a little cookie, a little promise, a little IOU ๐Ÿช

Errors? Those have to be handled when you call the reply function, xcb_dri2_get_msc_reply.

But if you'd rather handle your errors in the event loop instead (very valid, very you), then use xcb_dri2_get_msc_unchecked. Peep xcb-requests(3) for the deets.


๐Ÿ’€ ERRORS ๐Ÿ’€

This request does never generate any errors. not one. zero. it's a well-behaved king ๐Ÿ‘‘

๐ŸŒŸ SEE ALSO ๐ŸŒŸ

...it's empty. nothing to see here. literally. no references, no friends, no mutuals. a lone wolf. ๐Ÿบ


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Generated from dri2.xml. Wanna send corrections or improvements? Contact xcb@lists.freedesktop.org โ€” they're the ones to @, fr fr. ๐Ÿซถ


and that's the whole page babes!! this one came from X Version 11, shipped with libxcb 1.17.0, and it's the xcb_dri2_get_msc(3) page โ€” so next time someone asks you about your media stream counter you can just say "iykyk" and point them here. slay, periodt, stay hydrated ๐Ÿ’…โœจ๐ŸŒธ