Chapter 2. Configuring Xv Texture Video

The XVideo (abbreviated as Xv) is a video output mechanism for the X windows system. It's mainly used to rescale video playback in the video controller hardware. Without XVideo, X would have to do the scaling on the main CPU. That requires a considerable amount of processing power. The XVideo uses hardware overlay to rendering an image to a display device with a dedicated memory buffer inside computer video hardware. Because a hardware overlay could not be shared by several applications simultaneously, it's only possible to support one or two XVideo. For sufficiently capable combinations of hardware and operating systems, in X.Org server release 7.0 or above, X could access the video hardware only via the Direct Redering Infrastructure (DRI), using the 3D hardware. In this way, the XVideo output is treated as 3D texture.

To enable Xv texture video, the following things have to come together.

To enable composite extension, add options into Section "Device" and Section "Extensions" as,

Section "ServerLayout"
      #Option "RandR"		"off" 
EndSection
If the XRandR extension is disabled, you should unmark the Option "RandR" "off".

To start Xv texture video playback, use the command: $ xvinfo to get the information of xv adaptor, and search for "#0 Overlay Adaptor" and "#1 Texture Adaptor", then record the port base and port num of Texture Video.

Start the video playback software, here takes mplayer for example. Type in the command:
        $ mplayer -vo xv:port=port-num  your-video-file
The port-num is the port num of Texture video.

Enable EXA Composite Effect

Open a terminal in X window, using the command:
       $ xcompmgr -cfF

To enable transparency effect, using the command:
       $ transset 0.x
The parameter 0.x represents a decimal fraction, and the value ranges from 0.0 to 1.0, where 0.0 represents a fully transparent color, and 1.0 represents a fully opaque color. Click arbitrarily inside the playback window, you will get the video playback window alpha blending on the desktop background.

To enbale 3D composite effect, turn to Chapter 3. Configuring 3D desktop.