Mercurial > mplayer.hg
annotate DOCS/DGA @ 860:edc6758694ed
sok csunya ize
author | gabucino |
---|---|
date | Thu, 24 May 2001 16:22:18 +0000 |
parents | 3de4dc1d1d12 |
children | b194061e3f03 |
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 | |
860 | 26 DGA is short for Direct Graphics Access and is a mean for a program to |
827 | 27 bypass the X-Server and directly modifying the framebuffer memory. |
28 Technically spoken this happens by mapping the framebuffer memory into | |
29 the memory range of your process. This is just 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 |
860 | 31 as root or by setting the suid bit on the mplayer executable. |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
32 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
33 There are two versions of DGA: DGA1 is used by XFree 3.X.X and DGA2 was |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
34 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
|
35 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
36 DGA1 just provides direct framebuffer access as described above. For |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
37 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
|
38 XVidMode extension. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
39 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
40 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
|
41 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
|
42 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
|
43 versa. |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
44 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
45 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
|
46 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
|
47 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
|
48 |
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 3. Resolution switching |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
51 ~~~~~~~~~~~~~~~~~~~~~~~ |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
52 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
|
53 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
|
54 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
|
55 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
|
56 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
|
57 /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
|
58 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
|
59 of your video hardware. The XServer scans this config file on startup and |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
60 disables those modelines not suitable for your hardware. You can find |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
61 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
|
62 /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
|
63 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
|
64 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
65 4. DGA & MPLayer |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
66 ~~~~~~~~~~~~~~~~ |
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 DGA is used in two places with MPlayer: The SDL driver can be made to make |
837 | 69 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
|
70 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
|
71 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
|
72 |
827 | 73 |
832
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
74 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
|
75 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
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 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
|
78 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
79 ... 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
|
80 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
81 # 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
|
82 # 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
|
83 # 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
|
84 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
85 # 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
|
86 # 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
|
87 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
88 # Second you |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
89 |
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 # 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
|
93 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
94 # 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
|
95 # 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
|
96 # 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
|
97 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
98 # 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
|
99 # !!!! BUT STAY TUNED !!!! |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
100 # 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
|
101 # 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
|
102 # 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
|
103 # !!!! 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
|
104 # |
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 A. Sample modelines |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
107 ~~~~~~~~~~~~~~~~~~~ |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
108 Section "Modes" |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
109 Identifier "Modes[0]" |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
110 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
|
111 Modeline "640x480" 25.175 640 664 760 800 480 491 493 525 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
112 Modeline "352x240" 15.750 352 368 416 432 240 244 246 262 Doublescan |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
113 # 800x600 @ 60 Hz, 37.8 kHz hsync |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
114 Modeline "800x600" 40 800 840 968 1056 600 601 605 628 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
115 Modeline "352x288" 25.10 352 368 416 432 288 296 290 310 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
116 EndSection |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
117 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
118 |
369697a87773
- some more introductionary words; no real flesh yet however ;-( (got to go to bed)
acki2
parents:
827
diff
changeset
|
119 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
|
120 module. |
827 | 121 |
122 Acki (acki@acki-netz.de, www.acki-netz.de) 17.5.2001 | |
123 | |
124 |