VDPAU: X11 Window System Integration Layer

VDPAU

X11 Window System Integration Layer
Window System Integration Layer
Collaboration diagram for X11 Window System Integration Layer:

typedef VdpStatus | VdpDeviceCreateX11(Display *display, int screen, VdpDevice *device, VdpGetProcAddress **get_proc_address)
| Create a VdpDevice object for use with X11.
typedef VdpStatus | VdpPresentationQueueTargetCreateX11(VdpDevice device, Drawable drawable, VdpPresentationQueueTarget *target)
| Create a VdpPresentationQueueTarget for use with X11.
VdpDeviceCreateX11 | vdp_device_create_x11
| Create a VdpDevice object for use with X11. This is an actual symbol of type VdpDeviceCreateX11.
#define | VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_CREATE_X11

## Detailed Description

The set of VDPAU functionality specific to usage with the X Window System.

# Library Layout

An X11-oriented VDPAU installation consists of the following components:

- Header files. These files are located in the standard system header file path.
  - `vdpau/vdpau.h`
  - `vdpau/vdpau_x11.h`
- The VDPAU wrapper library. These files are located in the standard system (possibly X11-specific) library path.
  - `libvdpau.so.1` (runtime)
  - `libvdpau.so` (development)
- Back-end driver files. These files are located in a system-defined library path, which is configurable at compile time but is typically /usr/lib/vdpau. Use pkg-config --variable=moduledir vdpau to locate the driver install path.
  - `$moduledir/libvdpau_%s.so.1` For example:
  - `/usr/lib/vdpau/libvdpau_nvidia`.so.1
  - `/usr/lib/vdpau/libvdpau_intel`.so.1
  - `/usr/lib/vdpau/libvdpau_ati`.so.1 The library path can be overridden by the VDPAU_DRIVER_PATH environment variable.

The VDPAU wrapper library implements just one function; vdp_device_create_x11. The wrapper implements this function by dynamically loading the appropriate back-end driver file mentioned above. When available, the wrapper uses the DRI2 extension's DRI2Connect request with the driver type 'DRI2DriverVDPAU' to determine which back-end driver to load. If that fails, the wrapper library hard-codes the driver name as "nvidia", although this can be overridden using the environment variable VDPAU_DRIVER.

The back-end driver is expected to implement a function named vdp_imp_device_create_x11. The wrapper will call this function to actually implement the vdp_device_create_x11 application call.

Note that it is theoretically possible for an application to create multiple VdpDevice objects. In this case, the wrapper library may load multiple back-end drivers into the same application, and/or invoke a specific back-end driver's VdpImpDeviceCreateX11 multiple times. The wrapper library imposes no policy regarding whether the application may instantiate multiple VdpDevice objects for the same display and/or screen. However, back-end drivers are free to limit the number of VdpDevice objects as required by their implementation.

## Macro Definition Documentation

## ◆ VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_CREATE_X11

#define VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_CREATE_X11

## Typedef Documentation

## ◆ VdpDeviceCreateX11

typedef VdpStatus VdpDeviceCreateX11(Display *display, int screen, VdpDevice *device, VdpGetProcAddress **get_proc_address)

Create a VdpDevice object for use with X11.

Parameters

  [in] | display | The X Display that the VdpDevice VdpDevice will operate against.
  [in] | screen | The X screen that the VdpDevice will operate against.
  [out] | device | The new device's handle.
  [out] | get_proc_address | The get_proc_address entry point to use with this device.

Returns
  VdpStatus The completion status of the operation.

## ◆ VdpPresentationQueueTargetCreateX11

typedef VdpStatus VdpPresentationQueueTargetCreateX11(VdpDevice device, Drawable drawable, VdpPresentationQueueTarget *target)

Create a VdpPresentationQueueTarget for use with X11.

Parameters

  [in] | device | The device that will contain the queue target.
  [in] | drawable | The X11 Drawable that the presentation queue will present into.
  [out] | target | The new queue target's handle.

Returns
  VdpStatus The completion status of the operation.

Note: VDPAU expects to own the entire drawable for the duration of time that the presentation queue target exists. In particular, implementations may choose to manipulate client-visible X11 window state as required. As such, it is recommended that applications create a dedicated window for the presentation queue target, as a child (grand-child, ...) of their top-level application window.

Applications may also create child-windows of the presentation queue target, which will cover any presented video in the normal fashion. VDPAU implementations will not manipulate such child windows in any fashion.

## Variable Documentation

## ◆ vdp_device_create_x11

VdpDeviceCreateX11 vdp_device_create_x11

Create a VdpDevice object for use with X11. This is an actual symbol of type VdpDeviceCreateX11.