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

πŸ’– NAME πŸ’–

okay so this is Xv, bestie β€” the X Window System video extension, served to you fresh from the libXv functions era. it's giving "your display has video powers and you're about to learn how to use them." periodt. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so the X Video Extension (aka Xv) is the whole reason your X display can do video stuff. its whole vibe? it lets video adaptors hook up to an X display. and the way it thinks about the world is: a display can have one or more video adaptors, and each of those adaptors can have one or more ports, and each port is a lane where independent video streams just... flow through. πŸŽ€

an adaptor can maybe display video in a drawable, or capture video from a drawable, or honestly both β€” it's flexible like that. what it does is translate between the video encoding (think NTSC, PAL, SECAM, etc...) and the drawable format, which is a depth and visual-id pair. and no cap, an adaptor can support multiple video encodings and/or multiple drawable formats. multi-talented icon behavior. πŸ‘‘

so how do clients actually use all this? they use Xv(3) to get access to a display's video resources and to manage the sharing of them. typically, a client is gonna:

  1. call XvQueryExtension(3) to find out the status of the extension ✨
  2. call XvQueryAdaptors(3) to get a description of what video adaptors actually exist πŸ¦‹
  3. call XvQueryEncodings(3) to get a description of what video encodings a given adaptor supports 🌸

once a client has figured out what video resources are available, it's free to put video into a drawable or get video from a drawable β€” whatever matches the capabilities that are supported, fr fr. and clients can also select to receive events when video activity changes in a drawable, and when port attributes have changed. πŸ‘€

now here's the glow-up part: the Xv protocol version 2.2 and later is extended to support client images in alternate colorspaces (that's XvImages, bestie). Xv adaptors that are capable of displaying XvImages will have the XvImageMask field set in the type field of the XvAdaptorInfo. and the XvImage formats that a port supports? you can query those with XvListImageFormats(3). πŸ’…

you can create XvImages with a little help from XvCreateImage(3) or XvShmCreateImage(3) 🫢, and you can display XvImages with XvPutImage(3) or XvShmPutImage(3). the Port attributes of the port you specified in the Xv(Shm)PutImage command will be valid for the image operation when applicable. also, there will be a port encoding with the name "XV_IMAGE", and the width and height of that encoding will indicate the maximum source image size. remember that. write it down. πŸ“


✨ SUMMARY OF LIBRARY FUNCTIONS ✨

here's the full roster of Xv library functions and events β€” every single one, no skips, because we don't gatekeep in this house:

and yeah β€” each one of these functions and events gets its own whole Xv man page, so go read those when you need the deep lore. πŸ“š


k bye bestie, go forth and video-extension responsibly πŸ’–βœ¨

signing off from X Version 11, libXv 1.0.13 β€” this was the Xv(3) page, mwah, slay, see you in the next man page πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from