---
name: "XvQueryPortAttributes"
section: "3"
platform: "linux"
package: "libxv"
version: "1.0.13-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XvQueryPortAttributes"
---

# XvQueryPortAttributes(3)

return list of attributes of a video port

## 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*

  Specifies the connection to the X server.

- *port*

  Specifies the port whose adaptor is to be queried for its list of attributes.

- *p\_num\_attributes*

  A pointer to where the number of attributes returned in the array is written.

## DESCRIPTION

[**XvQueryPortAttributes**(3)](/XvQueryPortAttributes/3.md)**returns**the**number**of**attributes** and an array of XvAttributes valid for the given port.  The array may be freed with [**XFree**(3)](/XFree/3.md).

## RETURN VALUES

XvAttribute has the following structure:

```
    typedef struct {
      int flags;
      int min_value;
      int max_value;
      char *name;
    } XvAttribute;
```

- *flags*

  May be XvGettable or XvSettable or both OR'd together indicating the particular attribute is readable, writeable or readable and writeable.

- *min\_value*

  The minimum attribute values which are valid for the driver.

-

  The maximum attribute values which are valid for the driver.

- *name*

  A string describing the name of the attribute that may be used to retrieve the Atom for the particular attribute.

## DIAGNOSTICS

- \[XvBadPort\]

  Generated if the requested port does not exist.

## SEE ALSO

[**XvGetPortAttribute**(3)](/XvGetPortAttribute/3.md), [**XvSetPortAttribute**(3)](/XvSetPortAttribute/3.md)
