Mercurial > mplayer.hg
annotate DOCS/DGA @ 948:7f32481f3b4e
z/x , FAST_OSD in config.h
author | gabucino |
---|---|
date | Sat, 02 Jun 2001 16:23:24 +0000 |
parents | b194061e3f03 |
children | f764455442f4 |
rev | line source |
---|---|
827 | 1 |
2 Contents | |
3 ~~~~~~~~ | |
4 | |
5 1. Summary | |
6 2. What is DGA | |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
7 3. Resolution switching |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
8 4. DGA & MPlayer |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
9 5. Features of the DGA driver |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
10 6. Speed issues |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
11 7. Known bugs |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
12 8. Future work |
827 | 13 |
14 A. Some modelines | |
15 | |
16 | |
17 | |
18 1. Summary | |
19 ~~~~~~~~~~ | |
20 This document tries to explain in some words what DGA is in general and | |
21 what the DGA video output driver for mplayer can do (and what it can't). | |
22 | |
23 2. What is DGA? | |
24 ~~~~~~~~~~~~~~~ | |
25 | |
907 | 26 DGA is short for Direct Graphics Access and is a method for a program to |
27 bypass the X-Server and directly modify the framebuffer memory. | |
827 | 28 Technically spoken this happens by mapping the framebuffer memory into |
907 | 29 the memory range of your process. This is only allowed by the kernel |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
30 if you have superuser privileges. You can get these either by logging in |
907 | 31 as root or by setting the suid bit on the mplayer executable (NOT |
32 recommended!). | |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
33 |
907 | 34 There are two versions of DGA: DGA1 is used by XFree 3.x.x and DGA2 was |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
35 introduced with XFree 4.0.1. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
36 |
907 | 37 DGA1 provides only the direct framebuffer access as described above. For |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
38 switching the resolution of the video signal you have to rely on the |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
39 XVidMode extension. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
40 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
41 DGA2 incorporated the features of XVidMode extension and also allows |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
42 switching the depth of the display. So you may, although basically |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
43 running a 32 bit depth XServer, switch to a depth of 15 bits and vice |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
44 versa. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
45 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
46 However DGA has some drawbacks. It seems it is somewhat dependent on the |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
47 graphics chip you use and on the implementation of the XServer's video |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
48 driver that controls this chip. So it does not work on every system ... |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
49 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
50 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
51 3. Resolution switching |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
52 ~~~~~~~~~~~~~~~~~~~~~~~ |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
53 The DGA driver allows for switching the resolution of the output signal. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
54 This avoids the need for doing (slow) software scaling and at the same |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
55 time provides a fullscreen image. Ideally it would switch to the exact |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
56 resolution (except for honouring aspect ratio) of the video data, but the |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
57 XServer only allows switching to resolutions predefined in |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
58 /etc/X11/XF86Config (/etc/X11/XF86Config-4 for XFree 4.0.X respectively). |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
59 Those are defined by so-called modelines and depend on the capabilites |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
60 of your video hardware. The XServer scans this config file on startup and |
907 | 61 disables the modelines not suitable for your hardware. You can find |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
62 out which modes survive with the X11 log file. It can be found at: |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
63 /var/log/XFree86.0.log |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
64 See appendix A for some sample modeline definitions. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
65 |
907 | 66 4. DGA & MPlayer |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
67 ~~~~~~~~~~~~~~~~ |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
68 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
69 DGA is used in two places with MPlayer: The SDL driver can be made to make |
837 | 70 use of it (-vo sdl -sdl dga) and within the DGA driver (-vo dga). |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
71 The above said is true for both; in the following sections I'll explain |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
72 how the DGA driver for MPlayer works. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
73 |
827 | 74 |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
75 5. Features of the DGA driver |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
76 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
77 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
78 The DGA driver is invoked by specifying -vo dga at the command line. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
79 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
80 ... to be continued during the next days ... |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
81 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
82 # An advantage of this method is that you are in full control of the |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
83 # framebuffer and can put your hand on the code that is used for copying |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
84 # to the framebuffer. However there are two disadvantages: |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
85 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
86 # First, you control the screen - no more windowmanager functionally - just |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
87 # the one application that uses DGA is visible. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
88 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
89 # Second you |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
90 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
91 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
92 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
93 # Do it like this (you got to be root for this): |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
94 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
95 # chown root /usr/local/bin/mplayer |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
96 # chmod 750 /usr/local/bin/mplayer |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
97 # chmod +s /usr/local/bin/mplayer |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
98 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
99 # Now it works for simple users, too. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
100 # !!!! BUT STAY TUNED !!!! |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
101 # This is a BIG security risk! Never do this on a server or on a computer |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
102 # can be accessed by more people than only you because they can gain root |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
103 # privilegies through suid root mplayer. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
104 # !!!! SO YOU HAVE BEEN WARNED ... !!!! |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
105 # |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
106 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
107 A. Sample modelines |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
108 ~~~~~~~~~~~~~~~~~~~ |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
109 Section "Modes" |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
110 Identifier "Modes[0]" |
907 | 111 # 800x600 @ 60 Hz, 37.8 kHz hsync |
112 Modeline "800x600" 40 800 840 968 1056 600 601 605 628 | |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
113 Modeline "712x600" 35.0 712 740 850 900 400 410 412 425 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
114 Modeline "640x480" 25.175 640 664 760 800 480 491 493 525 |
907 | 115 Modeline "400x300" 20 400 416 480 528 300 301 303 314 Doublescan |
116 Modeline "352x288" 25.10 352 368 416 432 288 296 290 310 | |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
117 Modeline "352x240" 15.750 352 368 416 432 240 244 246 262 Doublescan |
907 | 118 Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 Doublescan |
119 | |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
120 EndSection |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
121 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
122 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
123 These entries work fine with my Riva128 chip, using nv.o XServer driver |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
124 module. |
827 | 125 |
126 Acki (acki@acki-netz.de, www.acki-netz.de) 17.5.2001 | |
127 | |
128 |