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